Whamcloud - gitweb
LU-12998 mds: add no_create parameter to stop creates 24/47124/19
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 23 Apr 2022 00:10:36 +0000 (18:10 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Nov 2023 21:41:11 +0000 (21:41 +0000)
commit1dbcd0bab881fac38d8a5e4ef1559f12618f8f0e
treecacacc0d584acd5273787724ecbb0830338c5d7e
parentf8e49e321ed81d77b204af40165f9ae2d07c5986
LU-12998 mds: add no_create parameter to stop creates

Add an target tunable parameter and mount option "no_create" to
disable new *directory* creation on an MDT.  This sends the
flag OS_STATFS_NOCREATE to the clients, and the DNE MDT space
balance will avoid selecting that MDT when creating a new
subdirectory, without disabling access to existing files/dirs.

This allows "soft disabling" an MDT in advance of storage
upgrades to minimize new directories and files created on that
MDT, reduce future migration, and/or backup/restore workload.

As yet it does not totally disable *file* creation on the MDT,
but it may be extended to do so in the future.

This is analogous to the "no_precreate" option that was added
on the OSTs, and "no_create" has been added to the OSTs for
consistency ("no_precreate" is kept for compatibility for now).

Test-Parameters: testlist=conf-sanity env=ONLY=112b,ONLY_REPEAT=50
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I53cfb48ade2f844b18bfc630e7fcea6de9ce7057
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/47124
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
23 files changed:
contrib/scripts/spelling.txt
lustre/include/lu_target.h
lustre/include/lustre_disk.h
lustre/include/obd.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/lmv/lmv_obd.c
lustre/lod/lod_object.c
lustre/lod/lod_qos.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_lproc.c
lustre/obdclass/lu_tgt_descs.c
lustre/obdclass/obd_mount.c
lustre/ofd/lproc_ofd.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_obd.c
lustre/osp/osp_precreate.c
lustre/ptlrpc/wiretest.c
lustre/tests/conf-sanity.sh
lustre/tests/test-framework.sh
lustre/utils/lfs.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c