From 84866d81d0f29934c3442bf04c87ca97bd9c86c7 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Wed, 21 Dec 2022 11:29:26 +0000 Subject: [PATCH] Increase minimum XFS size to 300 MiB (#217) As documented in the previous commit xfsprogs >= 5.19.0 refuses to create an XFS file system smaller than 300 MiB. $ truncate -s $((300*1024*1024-1)) test.img $ ls -l test.img -rw-r--r-- 1 auser auser 314572799 Dec 21 11:01 test.img $ mkfs.xfs -V mkfs.xfs version 6.0.0 $ mkfs.xfs test.img Filesystem must be larger than 300MB. ... $ echo $? 1 Successfully create an XFS file system at minimum size of 300 MiB. $ truncate -s $((300*1024*1024)) test.img $ ls -l test.img -rw-r--r-- 1 auser auser 314572800 Dec 21 11:05 test.img $ mkfs.xfs test.img ... $ echo $? 0 $ blkid test.img test.img: UUID="..." BLOCK_SIZE="512" TYPE="xfs" Increase the GParted minimum XFS size to 300 MiB. For simplicity and because the XFS developers said of smaller XFS file systems [1]: "are known to have performance and redundancy problems that are not present on the volume sizes that XFS is best at handling" regardless of the version of mkfs.xfs used to create that XFS then apply to all versions of xfsprogs. [1] https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=6e0ed3d19c54603f0f7d628ea04b550151d8a262 mkfs: stop allowing tiny filesystems Closes #217 - GitLab CI test job failing with new mkfs.xfs error "Filesystem must be larger than 300MB." --- src/xfs.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xfs.cc b/src/xfs.cc index 86db3955..21834240 100644 --- a/src/xfs.cc +++ b/src/xfs.cc @@ -92,8 +92,8 @@ FS xfs::get_filesystem_support() fs .online_grow = fs .grow ; #endif - // Official minsize = 16MB, but the smallest xfs_repair can handle is 32MB. - fs_limits.min_size = 32 * MEBIBYTE; + // From xfsprogs 5.19.0 the smallest creatable file system is 300 MiB. + fs_limits.min_size = 300 * MEBIBYTE; return fs ; }