Modify XFS filesystem creation parameters during kickstart installation
I'm streamlining the kickstart process for a series of EL6.2 (RHEL, CentOS, SL, etc.) systems. I'd prefer to use XFS over ext4 for the growth/data partition. However, I'd like some control over the options passed to mkfs.xfs
for the creation of the partition. I'd typically create this partition after the server was built, so that I'd have this control. But this should really be automated.
When creating a manual XFS partition of 400GB, I'd usually use a command string like:
mkfs.xfs -f -L /data -d agcount=100 -l size=128m,version=2 /dev/cciss/c0d1p0
With /etc/fstab
mount options like:
LABEL=/data /data xfs noatime,logbufs=8,logbsize=256k,nobarrier 1 2
How can I get something similar built into the anaconda kickstart installation process without resorting to placing it in %post?
Your options for creating filesystems are limited to those described in the kickstart documentation (in particular, the part
, logvol
, and raid
commands). The assumption there is generally that you're happy with the default options when creating filesystems. If you need anything fancier, you'll need to use the %pre
or %post
section to call mkfs.xfs directly.
The only way to specify non-default mkfs options during Kickstart is to use the --fsprofile
flag to the part
command. Unfortunately, this requires that the filesystem-specific mkfs have a "usage type" feature. With mke2fs
, this is a -T
flag that references /etc/mke2fs.conf
. For XFS, uhhhh …
But maybe that can point you in the right direction.
Oh, and --fsoptions
allows you to specify mount options.