Building the XFS Utilities
Once you have restarted your system with an XFS kernel, you will need to install the XFS tools before you can create and manage filesystems. If you obtained your kernel using CVS, you already have a copy of the XFS utilities.
#cd /usr/src/linux-2.4-xfs/cmd/xfsprogs#make install
Alternatively, you can download a tarball containing the source code from ftp://oss.sgi.com/projects/xfs/download/cmd_tars/xfsprogs-2.1.2.src.tar.gz. SGI also provides an RPM file (ftp://oss.sgi.com/projects/xfs/download/cmd_rpms/). Debian users can use apt-get install xfsprogs.
The mkfs.xfs command is used to create a new filesystem; the -b flag specifies the block size of the new filesystem.
# mkfs.xfs -b size=4k /dev/md0This command creates a new filesystem on /dev/md0, with a block size of 4 KB. XFS supports block sizes ranging from 512 bytes to 64 KB in power-of-2 increments. However, the current implementation allows only a block size less than or equal to the page size of the resident system. That means 4 KB or less on 32-bit systems (i386, PowerPC) and 8 KB or less on 64-bit systems (Alpha, SPARC, IA64). By default, mkfs.xfs creates a filesystem using a block size equal to page size.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access