XFS Filesystem Howto

From GridPP Wiki
Jump to: navigation, search

The following is the procedure to migrate from a non-xfs filesystem (e.g. ex2 or ex3) to xfs without loosing data. The DPM nameserver uses the diskserver and the filepath therein to source files. Hence the filesystem format can be altered without affecting the DPM nameservers ability to locate files. DO NOT unmount the filesystem (umount /dev/...) from the dpm headnode and DEFINATELY DO NOT remove the dpm filesystems (e.g dpm-rmfs)

  • Shutdown the DPM daemons

on the headnode

 service dpm-gsiftp stop
 service srmv2 stop
 service srmv1 stop
 service dpm stop
 service rfiod stop
 service dpnsdaemon stop

on each disk server

 service dpm-gsiftp stop
 service rfiod stop
                                                                                                                            

and make sure there can be no more writing to the files on the headnode

 mount -o remount ro "each filesystem mountpoint"
                                                                                                                            
  • Tar up all the data from each individual filesystem. e.g. if there are n filesystems then create n tarballs. And store the tarballs in a secure location.

The following examples assume the DPM filesystem mountpoint is filepath/dpmdata. The tarballing and moving can be done in one command. from the source machine (dpm headnode)

 tar -cvf filepath/dpmdata | ssh user@destination cat \> dpmdata.tar

from the destination (storage machine)

 ssh user@source tar -cvf - filepath/dpmdata > dpmdata.tar
                                                                                                                            
  • Verify the contents of each tarball.
 tar -tvf dpmdata.tar
                                                                                                                            
  • Unpack each tarball into the appropriate directory.

The moving and unpacking can be done in one command. from the source (storage machine)

 tar -xpvf dpmdata.tar | ssh user@destination \> filepath/dpmdata

from the destination (dpm headnode)

 ssh user@source tar -xpvf dpmdata.tar - > filepath/dpmdata