Can we create an ext3, ext4, or xfs filesystem with a blocksize larger than 4096 (such as 8192)?
Issue
- We want to have a block-size of 8192 on a local filesystem such as Ext3, Ext4, or XFS.
- Can we create an Ext3, Ext4, or XFS filesystem with a block size greater than 4KiB (4096 bytes)?
-
What is the maximum supported Ext3, Ext4 block size in RHEL?
- Why can't I mount a ext4 filesystem with blocksize larger than 4 KiB?
-
After creating an ext4 filesystem with a blocksize larger than 4k, the message following error message returns when I try to mount it:
# mount -t ext4 /dev/sda1 /mnt mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. # dmesg | tail EXT4-fs (sda1): bad block size 32768
-
What is the maximum supported XFS block size in RHEL?
- What is the maximum
pagesize
supported by XFS? -
According to
man mkfs.xfs
, it says that block size can be specified up to65536
:$ man mkfs.xfs : -b block_size_options This option specifies the fundamental block size of the filesystem The valid block_size_options are: log=value or size=value and only one can be supplied. The block size is specified either as a base two logarithm value with log=, or in bytes with size=. The default value is 4096 bytes (4 KiB), the minimum is 512, and the maximum is 65536 (64 KiB). XFS on Linux currently only supports pagesize or smaller blocks. :
-
We confirmed that it could be specified up to
65536
(see below). However, it also says XFS on Linux currently only supports pagesize or smaller blocks:
# mkfs -t xfs -f -s size=4096 -b size=16384 /dev/sdb1 meta-data=/dev/sdb1 isize=256 agcount=4, agsize=16368 blks = sectsz=4096 attr=2, projid32bit=1 = crc=0 finobt=0 data = bsize=16384 blocks=65472, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=16384 ascii-ci=0 ftype=0 log =internal log bsize=16384 blocks=512, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1 realtime =none extsz=16384 blocks=0, rtextents=0 mkfs -t xfs -f -s size=4096 -b size=32768 /dev/sdb1 meta-data=/dev/sdb1 isize=256 agcount=4, agsize=8184 blks = sectsz=4096 attr=2, projid32bit=1 = crc=0 finobt=0 data = bsize=32768 blocks=32736, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=32768 ascii-ci=0 ftype=0 log =internal log bsize=32768 blocks=512, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1 realtime =none extsz=32768 blocks=0, rtextents=0 # mkfs -t xfs -f -s size=4096 -b size=65536 /dev/sdb1 meta-data=/dev/sdb1 isize=256 agcount=4, agsize=4092 blks = sectsz=4096 attr=2, projid32bit=1 = crc=0 finobt=0 data = bsize=65536 blocks=16368, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=65536 ascii-ci=0 ftype=0 log =internal log bsize=65536 blocks=512, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1 realtime =none extsz=65536 blocks=0, rtextents=0 # mkfs -t xfs -f -s size=4096 -b size=131072 /dev/sdb1 illegal block size 131072 Usage: mkfs.xfs :
- Does it mean as it shows Red Hat also does not support XFS if block size exceeds
pagesize
even though it can be specified beyondpagesize
?
- What is the maximum
Environment
- Red Hat Enterprise Linux (RHEL) 4, 5, 6, 7, 8
- x86 Architecture
- Local filesystems such as EXT3, EXT4, or XFS
- xfsprogs
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.