On 01/04/2015 06:56 PM, Hillel Lubman wrote:
> Looking around I saw some references that it's preferable to use sector
> size (sectsz) of 4 KB when creating XFS partitions on hybrid (512e)
> advanced format hard drives and also some mentions of making that a
> default in mkfs.xfs. However I noticed that my current mkfs.xfs (3.2.1)
> used with current Debian testing (Linux 3.16.0) still uses 512 B sectors
> by default.
> Can you please clarify what after all is the recommended sector size for
> such drives and why isn't it a default in mkfs.xfs (since supposedly
> defaults are generally recommended optimal settings unless you have some
> special use case).
XFS sectsz is unimportant with these drives. What matters is that any
partitions you create start and end on 4KB boundaries. This will
prevent adjacent hardware sector RMW internal to the drive. XFS writes
in 4KB filesystem blocks on Linux. As long as the fsblocks are aligned
to the 4KB hardware sectors there's nothing more you can do to avoid
performance penalties with these drives.