OT: AF 4k Sector Drives With 512 Emulation

Home » CentOS » OT: AF 4k Sector Drives With 512 Emulation
CentOS 7 Comments

Still have good quality older sata hardware raid cards that require 512
bytes/sector. As far as I know HD manufacturers are not making native 512
bytes/sector drives any more.

Some have better 512e emulation than others. Looking for some advice on which to avoid and which are recommended. Thanks. PS this is for a CentOS6
server.

7 thoughts on - OT: AF 4k Sector Drives With 512 Emulation

  • any of the ‘enterprise’ nearline storage or NAS drives should be fine.
    I wouldn’t use anything else in a RAID setup.

    Seagate NS series, for instance, or WD Red or Re, etc.

  • 512n drives still exist, although they tend to be a bit smaller, 2TB or less. http://www.hgst.com/tech/techlib.nsf/techdocs/FD3F376DC2ECCE68882579D40082C393/$file/US7K4000_ds.pdf

    4Kn drives are appearing now also. I don’t expect these drives to be bootable except possibly by systems with UEFI firmware. It’s also possible hardware RAID will reject them unless explicitly supported. http://www.hgst.com/tech/techlib.nsf/techdocs/29C9312E3B7D10CE88257D41000D8D16/$file/Ultrastar-7K6000-DS.pdf

    The emulation implementations don’t come into play if the alignment is correct from the start. The better implementations have significantly less pathological behavior if alignment is wrong, but that’s anecdotal, I don’t have any empirical data available. But I’d say in any case you want it properly aligned.

  • Chris Murphy wrote:

    You really, really want it properly aligned. We ran into that problem when we started getting 3TB drives a couple-three years ago. Proper alignment made a measured… trying to remember, but I think it was at *least* 20%
    difference in throughput.

    Alignment’s easy: using parted (the user-hostile program), if you do go in with parted -a optimal /dev/drive, and do mkpart pri ext4 0.0GB 100% (for non-root drives, for example), it’s aligned correctly.

    mark

  • i found -a optimal to do weird things, and almost always complain. I
    just use -a none now, and specify partition start in (512b) sectors, like..

    # parted /dev/sdc
    align none
    mklabel gpt
    mkpart pri 512s -1s

    don’t start at 0, as thats where the MBR or GPT has to go. 512
    sectors is 256K bytes, which puts you on a erase block boundary with most SSD’s as well as HD’s. -1s is end of the disk.

  • The default for fdisk, parted, and gdisk is starting the first partition on LBA 2048, which is 8 sector aligned. You don’t need any options. The alternative is to simply not partition the drives or the resulting RAID and just format it.

    Chris Murphy

  • I too noticed that HGST (now owned by WD) makes native 512n drives. That pdf states that they come in 2,3,4 TB models. (A6 in the model # represents
    512n). But there are almost no reviews on these HGST native 512n drives online.

    According to this pdf [1] alignment is important but from what I understand
    512e emulation still has a small RMW performance hit from writes that are smaller than 4k or if the writes are not a multiple of 4k.

    Also it’s probably not a good idea to mix 512e with 512n in a raid set. Although this may be hard to avoid as drives fail in the future.

    [1]
    http://i.dell.com/sites/doccontent/shared-content/data-sheets/en/Documents/512e_4Kn_Disk_Formats_120413.pdf

  • There shouldn’t be writes smaller than 4KB since ext234, XFS, and Btrfs all use 4KB block sizes. There is a possible case where the XFS
    journal writes are 512 bytes, this can be fixed by specifying a 4KB
    sector size at mkfs time if it’s not auto-detected.

    Scrambled eggs mixed with yogurt? Offhand it doesn’t seem like a bad idea (won’t kill me), even if it also may not be a good idea (sounds suboptimal).