Exporting files to another server

sanados sanados at failure.at
Wed Jan 30 07:33:31 UTC 2008

drpr0ctologist at gmail.com wrote:
>     Would add the new fileserver to the current tracker ...
>     then set the devices that will be replaced to drain ... the tracker
>     should take care of replication to the new fileserver and clean
>     the old
>     devices.
>     When that done you could easily shutdown the replaced fileserver.
>     then porting the db to the new db-server and tell tracker where to
>     look
>     for db now.
> The problem is the old file server and the new file server are 
> hundreds of miles apart. Could you give me code samples as to add the 
> new file server to the current tracker, and drain it? 
just add the devices of the new FS to the current tracker.
Then change the status of the the FS (devices) to be replaced to drain ...
So the tracker will start to remove the files from the drain-devices  
and starts to replicate them on the new server.
Everything is already implimented in the tracker ... no code needed.

Second possibility would be to play around some with the devices.
When you can take the FS offline for some time then copy the devices 
from the old to the new FS using the same structure of the devices and 
then only change the ip and hostname of the FS in the database (table host)

then restart mogstored and tracker.

third posibility:
add the devices of the new FS to the current tracker.
set devices which should be replaced to read-only then increase 
mindevcount of the classes by one.
let the tracker start replication.
When finished ... (check in db if every file on the host that should be 
replaced is already replicated to another server)
then mark the devices that should be replaced as dead and decrease 
mindevcount on classes again.
Then it's save to turn of the fileserver.

Hope you see what i mean ...

More information about the mogilefs mailing list