Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 5 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.

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

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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