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?

ewwhite
  • 194,921
  • 91
  • 434
  • 799
flypen
  • 205
  • 1
  • 2
  • 6

1 Answers1

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

ewwhite
  • 194,921
  • 91
  • 434
  • 799