From dfc0e8bfe2707b5654f84a45de4ad7fb7075ddc6 Mon Sep 17 00:00:00 2001 From: Tytus Kurek Date: Mon, 1 Jul 2019 07:41:39 +0000 Subject: [PATCH] Make XFS inode size configurable Make XFS inode size configurable, so that it could be set to the desired value, if different than default 1024. Change-Id: If621587a02746876ee6c35d7af2e878dbc2ac8ef Closes-Bug: 1826552 --- config.yaml | 4 ++++ lib/swift_storage_utils.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index 2af23ec..29cb743 100644 --- a/config.yaml +++ b/config.yaml @@ -206,3 +206,7 @@ options: description: | Encrypt block devices used by swift using dm-crypt, making use of vault for encryption key management; requires a relation to vault. + xfs-inode-size: + default: 512 + type: int + description: XFS inode size to use for block devices. diff --git a/lib/swift_storage_utils.py b/lib/swift_storage_utils.py index 8d9d063..7e4bae5 100644 --- a/lib/swift_storage_utils.py +++ b/lib/swift_storage_utils.py @@ -522,7 +522,7 @@ def setup_storage(encrypt=False): try: # If not cleaned and in use, mkfs should fail. - mkfs_xfs(dev, force=reformat) + mkfs_xfs(dev, force=reformat, inode_size=config('xfs-inode-size')) except subprocess.CalledProcessError as exc: # This is expected is a formatted device is provided and we are # forcing the format.