This procedure can be used to get a rough idea of the amount of free disk space that will remain after a filesystem is converted to XFS:
df -k
Filesystem Type kbytes use avail %use Mounted on
/dev/root efs 969857 663306 306551 68% /
This filesystem is 969857 KB, which rounds up to 970 MB.
% xfs_estimate -i logsize -b blocksize mountpoint
logsize is the size of the log. blocksize is the block size you chose for user files in the section "Choosing the Filesystem Block Size and Extent Size" in this chapter. mountpoint is the directory that is the mount point for the filesystem. For example,
% xfs_estimate -i 1m -b 4096 /
/ will take about 747 megabytes
The output of this command tells you how much disk space the files in the filesystem (with a blocksize of 4096 bytes) and an internal log of size logsize will take after conversion to XFS.
% xfs_estimate -e 0 -b blocksize mountpoint
blocksize is the block size you chose for user files in the section "Choosing the Filesystem Block Size and Extent Size" in this chapter. mountpoint is the directory that is the mount point for the filesystem. For example,
% xfs_estimate -e 0 -b 4096 /
/ will take about 746 megabytes
with the external log using 0 blocks or about 1 megabytes
The first line of output from xfs_estimate tells you how much disk space the files in the filesystem will take after conversion to XFS. In addition to this, you will need disk space on a different disk partition for the external log. You should ignore the second line of output.
970 MB - 747 MB = 223 MB free disk space
747 MB / 970 MB = 77% full
Use this information to decide if there will be an adequate amount of free disk space if this filesystem is converted to XFS.