How to format XFS parition if the stability is the most important thing

15,797

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

Share:
15,797

Related videos on Youtube

flypen
Author by

flypen

Updated on September 18, 2022

Comments

  • flypen
    flypen over 1 year

    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?

  • Deb
    Deb about 12 years
    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.
  • Léo Léopold Hertz 준영
    Léo Léopold Hertz 준영 almost 9 years
    @ewwhite Why do you have forward flash in your filesystem name?
  • ewwhite
    ewwhite almost 9 years
    That was back when RHEL used partition labels. Now it's done with UUID, so the label name is not needed.