I've created my first test mogilefs system, and decided to start with the simplest possible configuration - a single storage location. mogadm had no problems with me creating a 'single' storage class that had only a single copy, but running mogtool to inject data into the file system led to an infinite loop of
Beginning replication wait: 1 Beginning replication wait: 1 Beginning replication wait: 1 Beginning replication wait: 1
Looking at the code I see that in mogtool, method 'inject()' there's a section of code that is more or less like :
while (%still_need) { print "Beginning replication wait: " . join(' ', sort { $a <=> $b } keys %still_need) . "\n"; sleep 1; # give things time to replicate some
# now iterate over each and get the paths foreach my $num (keys %still_need) { <snip>
if (scalar(@npaths) >= 2) { <snip> code that updates %still_need to remove entry if OK } } }
So, if the class has no replication, it will wait forever. If you're prepared to accept non-replicated file classes, then this code should be updated, otherwise mogadm should refuse to allow a non-replicated storage class ?
Regards,
Gavin
|