What is the maximum supported XFS block size in RHEL 7?

Solution Verified - Updated -

Issue

  • According to 'man mkfs.xfs', it says that block size can be specified up to 65536.
$ man mkfs.xfs
  :
  -b block_size_options
         This option specifies the fundamental block size of the filesys‐
         tem.   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.
[root@RHEL7U1 ~]# 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

[root@RHEL7U1 ~]# 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

[root@RHEL7U1 ~]# 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

[root@RHEL7U1 ~]# 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 redhat also does not support XFS if block size exceeds pagesize even though it can be specified beyond pagesize?

Environment

  • Red Hat Enterprise Linux 7.1
  • xfsprogs-3.2.1-6.el7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.