6

We want to use XFS to format some partitions in a server. High performance is of course our goal, but we prefer to stability firstly. For example, we want to recover the FS quickly if power failure happens. It's not acceptable if the partition is corrupt and can't be used any more under this case. Can we change the options of mkfs.xfs to improve the stability?

Some people suggest this:

mkfs.xfs –b size=4096 –s size=4096 /dev/sdx -f

My questions are:

  1. Is the block 4096 bytes too small for performance? If I improve it, will the stability be affected?

  2. Sector size should be considered by low level block device driver, why does XFS has also a "sector size"? Are there any problems to set it to 4096 bytes if the system is a Linux with traditional 512-bytes sector support?

11

XFS is pretty stable on its own. It's a mature filesystem. Mount/formatting options will really only impact performance. I set the allocation group count and the log size.

My usual mkfs.xfs command string is: mkfs.xfs -f -L /partitionname -d agcount=64 -l size=128m,version=2 /dev/sdb1

My mount options for a system with a battery-backed RAID controller are: rw,noatime,logbufs=8,logbsize=256k,nobarrier

  • 3
    XFS has improved a lot during the 2.6 kernel, and by 2.6.33 or so the fixes in each kernel release were really, really minor. It really is a stable, mature filesystem worthy of housing high value assets. – sysadmin1138 Mar 7 '12 at 3:49
  • @ewwhite Why do you have forward flash in your filesystem name? – Léo Léopold Hertz 준영 Jul 12 '15 at 16:44
  • 1
    That was back when RHEL used partition labels. Now it's done with UUID, so the label name is not needed. – ewwhite Jul 12 '15 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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