4

I have a storage system that contains 8 x 1TB drives that use the 4k sector size "Advanced Format". I'm planning to run NexentaStor on this hardware and want to ensure that I'm taking the 4k sector size into account. Is there anything special I need to keep in mind when creating the root pool and subsequent data pools with ZFS?

ewwhite
  • 194,921
  • 91
  • 434
  • 799

1 Answers1

5

ZFS handles 4k sectors well as long as the drive advertises them correctly.

However, some drives have 4k sectors internally but present a logical 512 sector size to the operating system for backwards compatibility. If ZFS believes the drive, and writes in 512 byte chunks to 4k sectors, you'll suffer a heavy read-modify-write penalty.

Have a look at the Solarismen blog:

If your drive reports a sector size of 4k, you're fine. If your drive reports a sector size of 512, you may be able to work around it by using the modified zpool binary from the same site:

The modified binary hardcodes the sector size to 4k. Note that you only need to use it for the initial zpool creation. This may be a bit difficult for your root pool - you may need to slipstream the modified binary in to the NexentaStor ISO.

Tom Shaw
  • 3,702
  • 15
  • 23
  • Thank you. I may not have a nice way to get this into the Nexenta installer, but depending on what the disks report, I may have to use the modified zpool binary. Is there any harm in having a misaligned syspool? – ewwhite May 25 '11 at 18:36
  • It will work but performance won't be ideal. You may not care about performance of the root pool if you hardly ever boot. It is technically possible to re-create the root pool at a later date if you need to, but not easy. – Tom Shaw May 26 '11 at 00:21
  • And your suggestion is to replace the binary in the ISO *before* I create the root pool? – ewwhite May 26 '11 at 00:26
  • Correct. The only time the modified binary matters is at pool creation time. However, you only need to do this if the disk requires it and if the performance of the root pool is important to you. – Tom Shaw May 26 '11 at 00:42
  • By the way, a trickier but possibly quicker solution would be to interrupt the Nexenta installer, use an lofs mount from an NFS share to overlay the zpool binary, and then resume the installer. Not easy though. – Tom Shaw May 26 '11 at 00:48
  • Thank you. This did work, and there was a noticeable impact on iozone benchmarks this hardware after testing zpools created with the native and the modified binaries. I did not bother to fix the root pool, though. – ewwhite May 27 '11 at 18:51
  • No worries, glad I could help. – Tom Shaw May 28 '11 at 02:11
  • fyi the links to solarismen.de are dead – Pat James Sep 18 '12 at 17:49
  • 1
    Thanks @PatJames - it looks like solarismen.de has changed to solaris.kuehnke.de, so I have updated the links – Tom Shaw Sep 22 '12 at 03:03