Whamcloud - gitweb
LU-4665 utils: lfs setstripe to specify OSTs 83/9383/29
authorJinshan Xiong <jinshan.xiong@intel.com>
Sat, 18 Oct 2014 03:29:33 +0000 (20:29 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 1 Nov 2014 04:55:54 +0000 (04:55 +0000)
commit979203503af2f77d51bcf27375a1a09f5f28a4a3
tree7866743c1467f9ec7898e3bdcd6294227d1c1ac7
parenta3488d2f33e3ba4ae1d9c127132a6b75b5bb0112
LU-4665 utils: lfs setstripe to specify OSTs

Extend lfs setstripe command to support specifying individual
OSTs. [--ost|-o] option is invented for this purpose. Support
specifying OSTs for regular files only. Directory support will
be implemented later in a separate project.

OSTs can be spcified by lfs setstripe [--ost|-o] as follows:
  lfs setstripe [[--ost-list|-o] <ost_1>,<ost_i>-<ost_j>,<ost_n>]

For example, -o 1,2,4-6,8 will be expanded as OSTs:
  1,2,4,5,6,8

In addition, duplicate indices will be eliminated automatically.

Calculate the max easize by ld_active_tgt_count instead of
ld_tgt_count. However this may introduce problems when the OSTs
are in recovery because non sufficient buffer may be allocated
to store EA.

This patch adds the following test cases into conf-sanity.sh:
test 81: sparse OST indexing
test 82a: specify OSTs for file (succeed) or directory (fail)
test 82b: specify OSTs for file with --pool and --ost-list options

Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I055ea492e909d1073e08d46e00cfb5389e958ad2
Reviewed-on: http://review.whamcloud.com/9383
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
24 files changed:
lustre/doc/lfs.1
lustre/include/lustre/lustre_idl.h
lustre/include/lustre/lustre_user.h
lustre/include/lustre/lustreapi.h
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/xattr.c
lustre/lod/lod_internal.h
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/lod/lod_qos.c
lustre/lov/lov_pack.c
lustre/mgs/mgs_llog.c
lustre/obdclass/llog_osd.c
lustre/osp/osp_dev.c
lustre/osp/osp_sync.c
lustre/ptlrpc/pack_generic.c
lustre/tests/conf-sanity.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/mkfs_lustre.c