From 1741cb6c90a66147d91e7bbe0310692e62eeafce Mon Sep 17 00:00:00 2001 From: tamil Date: Thu, 12 Jul 2012 18:02:29 -0700 Subject: [PATCH] Added functionality to get mkfs and mount options for file systems from the config file,if present. Otherwise, default options are used. The default value for inode size is changed to 2k when creating xfs. Signed-off-by: tamil --- teuthology/task/ceph.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 774af9d2dcaf8..bc32722490c8c 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -617,15 +617,26 @@ def cluster(ctx, config): fs = config.get('fs') mkfs = ['mkfs.%s' % fs] package = None - options = ['noatime'] + options = [] + fs_options = config.get('mkfs_options') + mnt_options = config.get('mount_options') if fs == 'btrfs': package = 'btrfs-tools' - options.append('user_subvol_rm_allowed') + if mnt_options is None: + options = ['noatime','user_subvol_rm_allowed'] if fs == 'xfs': package = 'xfsprogs' - mkfs.append('-f') + if mnt_options is None: + options = ['noatime'] + if fs_options is None: + mkfs = mkfs + ['-f','-i','size=2048'] if fs == 'ext4' or fs == 'ext3': - options.append('user_xattr') + if mnt_options is None: + options = ['noatime','user_xattr'] + if fs_options is not None: + mkfs.extend(fs_options) + if mnt_options is not None: + options.extend(mnt_options) log.info('%s on %s on %s' % (mkfs, dev, remote)) if package is not None: @@ -906,7 +917,9 @@ def task(ctx, config): tasks: - ceph: - fs: btrfs + fs: xfs + mkfs_options: [-b,size=65536,-l,logdev=/dev/sdc1] + mount_options: [nobarrier, inode64] Note, this will cause the task to check the /scratch_devs file on each node for available devices. If no such file is found, /dev/sdb will be used. @@ -920,7 +933,7 @@ def task(ctx, config): mds.1: --tool=memcheck osd.1: [--tool=memcheck, --leak-check=no] - Those nodes which are using memcheck or helgrind will get + Those nodes which are using memcheck or valgrind will get checked for bad results. To adjust or modify config options, use:: @@ -1021,6 +1034,8 @@ def task(ctx, config): lambda: cluster(ctx=ctx, config=dict( conf=config.get('conf', {}), fs=config.get('fs', None), + mkfs_options=config.get('mkfs_options', None), + mount_options=config.get('mount_options',None), block_journal=config.get('block_journal', None), log_whitelist=config.get('log-whitelist', []), )), -- 2.39.5