xfs_info(8)

๐Ÿ’– xfs_info(8) ๐Ÿ’–

xfs_info is part of the System Manager's Manual ๐Ÿ‘‘, so this is the official page for it. Let's get into it ๐Ÿงšโœจ


๐ŸŒธ NAME ๐ŸŒธ

xfs_info โ€” display XFS filesystem geometry information ๐Ÿ“

๐ŸŽ€ SYNOPSIS ๐ŸŽ€

xfs_info [ -t mtab ] [ mount-point | block-device | file-image ]
xfs_info -V

โœจ DESCRIPTION โœจ

okay so xfs_info is how you peek at the geometry of an XFS filesystem that already exists ๐Ÿ‘€ It tells you how the filesystem is laid out ๐Ÿ—บ๏ธ

You can point it at a mount-point, which is just the pathname of a directory where the filesystem is mounted ๐Ÿ“‚ Or you can give it a block-device or file-image, which holds a raw XFS filesystem ๐Ÿ’พ

Nothing gets touched!! The existing contents of the filesystem stay exactly as they are ๐Ÿซถ It's read-only vibes only ๐Ÿง˜โ€โ™€๏ธ

๐Ÿฆ‹ OPTIONS ๐Ÿฆ‹

  • -t โ€” pick your own mount table file ๐Ÿ—‚๏ธ By default it uses /proc/mounts if that exists, otherwise /etc/mtab. You'd reach for this when you're dealing with filesystems that got mounted without writing to the /etc/mtab file. Check out mount(8) for the deets ๐Ÿ“– Heads up: this one does nothing when you're using the block-device or file-image parameters ๐Ÿ™ˆ
  • -V โ€” prints the version number and then exits ๐Ÿท๏ธ You don't need a mount-point when you use -V, so skip it ๐Ÿ’…

๐Ÿ“ EXAMPLES ๐Ÿ“

Let's decode some xfs_info output, bestie ๐Ÿค“

Suppose one has the following "xfs_info /dev/sda" output:

  meta-data=/dev/pmem0             isize=512    agcount=8, agsize=5974144 blks
           =                       sectsz=512   attr=2, projid32bit=1
           =                       crc=1        finobt=1, sparse=1, rmapbt=1
           =                       reflink=1
  data     =                       bsize=4096   blocks=47793152, imaxpct=25
           =                       sunit=32     swidth=128 blks
  naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
  log      =internal log           bsize=4096   blocks=23336, version=2
           =                       sectsz=512   sunit=0 blks, lazy-count=1
  realtime =none                   extsz=4096   blocks=0, rtextents=0

okay so look at the data section ๐Ÿ‘€ It says bsize=4096, which means the data block size for this filesystem is 4096 bytes ๐Ÿ’– That's the main thing to catch ๐ŸŽฏ

Now the same section also shows sunit=32 swidth=128 blks, and this is giving stripe math ๐Ÿงฎ The stripe unit works out to 32*4096 bytes = 128 kibibytes โœจ The stripe width is 128*4096 bytes = 512 kibibytes ๐Ÿ”ฅ So one stripe of this filesystem is made up of four stripe units (128 blocks / 32 blocks per unit) ๐Ÿ‘‘ Slay the math ๐Ÿ’…

๐Ÿงš SEE ALSO ๐Ÿงš

mkfs.xfs(8), md(4), lvm(8), mount(8) ๐ŸŒˆ


bestie, that's the whole page ๐Ÿซถ The footer just says xfs_info(8) with no version or date listed, so that's all I've got for the source info ๐Ÿ’œ Stay iconic and go read some geometry output ๐Ÿฆ‹๐Ÿ’€

๐Ÿ“ฆ where this page comes from