Whamcloud - gitweb
LU-13076 dne: dir migrate in QOS mode 86/44886/3
authorLai Siyao <lai.siyao@whamcloud.com>
Tue, 7 Sep 2021 09:33:21 +0000 (05:33 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 27 Oct 2021 00:37:31 +0000 (00:37 +0000)
commit378c7567876b430d06031f7d380112b9bdb15166
tree3b1dc7706fe5868b7288005e2ab9cf2f819d84a1
parentd2e8208e22f21bb7354a9207f381217c222d3df3
LU-13076 dne: dir migrate in QOS mode

Support "lfs migrate -m -1 ..." to migrate directory to MDTs by
space and inode usage, if system is balanced, the target MDT is
chosen in roundrobin mode, otherwise the less full MDTs will be
chosen, and the most full MDT is avoided.

Another minor change: if directory is migrated to specific MDTs,
and the target stripe count is more than 1, its subdirs may not be
migrated to the specified MDT in the command, but migrated to the
MDT where its parent stripe is located (subdir will be striped too),
as can avoid unnecessary remote directories. NB, for command like
"lfs migrate -m 0,1,2 ...", though the subdir may be located on
either MDT0, MDT1 or MDT2, its stripes will be striped over these
three MDTs, but for command like "lfs migrate -m 0 -c 3...", the
subdir may be striped on other MDTs if the subdir is not located on
MDT0.

Add sanity 230u.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I6e9c3d75bfc240b21c65ba27cd5e4bcca7058325
Reviewed-on: https://review.whamcloud.com/44886
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/lfs-migrate.1
lustre/lmv/lmv_obd.c
lustre/mdt/mdt_xattr.c
lustre/tests/sanity.sh