1. Set the source OST in read only status from mds server, if you do not want the files to be migrated to certain OSTs, set them to readonly too.
[root@umdist11 ~]# lctl get_param osp.t3test-OST0001*.max_create_count osp.t3test-OST0000-osc-MDT0000.max_create_count=20000 [root@umdist11 ~]# lctl set_param osp.t3test-OST0001*.max_create_count=0 osp.t3test-OST0001-osc-MDT0000.max_create_count=0
2. List the files from the source OST (from lustre client), execute the command on a client with 10Gbps network
[root@c-16-11 t3test]# lfs find --ost t3test-OST0001 /luste/t3test/
3. Use lfs_migrate to migrate the list of files to other OSTs (any other writable OSTs)
#lfs_migrate -y file1 file2 file3
Or
#lfs find --ost t3test-OST0001 /luste/t3test/|lfs_migrate -y
The speed of migrating varies from client to client, bl-2-1 70MB/s, c-16-39 180MB/s
Files can be split into different list, and let each client to migrate a list of files in parallel
#lfs find /lustre/umt3 --ost OST1 OST2
#/atlas/data08/manage/cluster/LustreMigration/OSTScanGen.sh umdist01 umdist02 lfs find /lustre/umt3 --ost umt3B-OST000c --ost umt3B-OST000d --ost umt3B-OST000e --ost umt3B-OST0010 --ost umt3B-OST0011 --ost umt3B-OST0012 --ost umt3B-OST0013 --ost umt3B-OST0014 --ost umt3B-OST0015 --ost umt3B-OST0016 --ost umt3B-OST0017 --ost umt3B-OST003f >/atlas/data08/manage/cluster/LustreMigration/FileList/ostflist_umdist01_umdist02Then choose a 10Gpbs work node, to run the above command, this command typically last 2-3 days depending on the size of the lustre file system, because it will scan the database on mdtmgs, and pick out the files stored on the specified OSTs.
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.