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?

link|improve this question

feedback

2 Answers

up vote 4 down vote accepted

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.

link|improve this answer
Yeah, that's a bit ugly, especially if specific formatting options are needed. – ewwhite Feb 6 at 0:14
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.