xfs_estimate(8)

πŸŽ€ xfs_estimate(8) πŸŽ€

okay bestie, this is the System Manager's Manual page for xfs_estimate, and it's about to be your new favorite tool πŸ’…βœ¨

🧚 NAME 🧚

xfs_estimate - estimate the space that an XFS filesystem will take πŸ’Ύ

🌸 SYNOPSIS 🌸

xfs_estimate [ -h ] [ -b blocksize ] [ -i logsize ]
             [ -e logsize ] [ -v ] directory ...
xfs_estimate -V

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so for every directory you hand it, xfs_estimate figures out how much space that directory would eat if you copied it onto an XFS filesystem πŸ“‚πŸ«Ά it does not cross mount points, so it stays in its lane πŸ™…β€β™€οΈ the sizes it uses are:

KB = *1024
MB = *1024*1024
GB = *1024*1024*1024

here's the full options lineup πŸ’–

  • -b blocksize β€” swaps out the default block size of 4096 bytes for whatever you pick ✨ you can add a k after the number to multiply by 1024. for example:
xfs_estimate -b 64k /
that one asks for the space / would need on an XFS filesystem with a 64K (65536) byte block size πŸ”₯
  • -v β€” shows you more info, but make it pretty and formatted πŸŽ€
  • -h β€” pulls up the usage message when you need a reminder πŸ™ˆ
  • -i, -e logsize β€” changes the default log size of 1000 blocks πŸ’œ -i is for an internal log and -e is for an external log πŸͺ„ you can put a k or m after the number to multiply by 1024 or 1048576 respectively. for example:
xfs_estimate -i 1m /

that one asks for the space / needs on XFS with an internal log of 1 megabyte, and yes it's giving main character energy πŸ‘‘

  • -V β€” prints the version number and then exits 🌈

πŸ’… EXAMPLES πŸ’…

ok here are the examples, read them like a story πŸ“–

% xfs_estimate -e 10m /var/tmp
/var/tmp will take about 4.2 megabytes
        with the external log using 2560 blocks or about 10.0 megabytes
% xfs_estimate -v -e 10m /var/tmp
directory                     bsize   blocks    megabytes    logsize
/var/tmp                       4096      792        4.0MB   10485760
% xfs_estimate -v /var/tmp
directory                     bsize   blocks    megabytes    logsize
/var/tmp                       4096     3352       14.0MB   10485760
% xfs_estimate /var/tmp
/var/tmp will take about 14.0 megabytes

bestie that's the whole page 🫢 it's literally the cutest way to figure out your XFS space before you commit πŸ’– ttyl, and remember, it's xfs_estimate(8) forever ✨🧚

πŸ“¦ where this page comes from