Auto-replication problem

Mark Smith junior at
Fri Aug 11 19:26:39 UTC 2006

> When i put one mogstored dead, the reaper detects and sync the files  
> to the mindevcount,


> but when i put the mogstored alive again, it should clear the files  
> from it or add URL to file list...

If you mark a device as dead and then bring it back online, then
MogileFS will NOT remove files from the disk that it removed from the
file_on table.

You should never take a device from dead to alive.  If you want to
reintroduce a disk into the pool that was previously dead, you should
treat it as an entirely new disk -- wipe it clean, give it a new device
id, mount it up, and insert it into the system under the new id.

It'd look something like this:

1) Uh oh, sdb on mymachine is acting weird.  Let's be safe and kill it.
The device id in mogile is 13!

    $ mogadm device mark mymachine 13 dead

2) Now that it's dead, let's see what's going on.  Unmount the desk, do
some checking... hmm, turns out the disk was fine.  I marked it dead for no
reason!  Damn.  Let's put it back in.

3) Okay; we need a new device id - the next free id is 42.  Great, let me
reformat the disk and do that!

    $ mkfs.ext3 /dev/sdb                    # wipe it
    $ mkdir /var/mogdata/dev42              # setup the mount point
    $ mount /dev/sdb /var/mogdata/dev42     # mount the disk
    $ mogadm device add mymachine 42        # add device 42 to mymachine

4) New disk is active and MogileFS will start putting files on it.

That's about how it should go...

Mark Smith
junior at

More information about the mogilefs mailing list