Unsolved
This post is more than 5 years old
5 Posts
0
4114
512b vs 4k sectors
I have a customer here testing ScaleIO and has just discovered an interesting problem that I find surprising to say the least. He is in the process of building a new pool based on 2Tb NL-SAS drives and when he tried to add the disks to a new pool we see the following message :
/dev/sdm One of the devices is using a sector size different that 512 bytes per sector. Currently, ScaleIO system only supports SDS devices with 512 bytes per sector.
Seriously? in 2016?
Other than sending back all of his disks are there any patches/workarounds etc. available?
c0redump
68 Posts
0
September 12th, 2016 09:00
Hello eableson,
from what I know ScaleIO requires devices that support 512n or 512e sector sizes. So 4kn devices are currently unsupported. Could you send me the model of 2TB NL-SAS you are trying to use?
I had some problem with 4kn drive also with VMware. In fact as you can see here:
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2091600
also current GA version of ESXi and VSAN doesn't support 4kn drives, so it doesn't sound too strange to me. ESXi and VSAN doesn't support also 512e drives.
Thanks,
Davide
eableson
5 Posts
0
September 13th, 2016 00:00
Hmm - I'd never run into this particular issue and assumed (stupid of me) that this sort of thing had been sorted out years ago about the time that I was getting these integrated with ZFS. In any case, the disks are the ST2000NX0263 which are 4K native, but there is the physically identical ST2000NX0273 that runs with 512e.
I'm wondering that since the drives are otherwise identical if there's any way to flash the firmware of the disks to convert them over to the ST2000NX0273 model.
Cheers,
Erik
c0redump
68 Posts
0
September 13th, 2016 14:00
Hello Erik,
I found something for you. With some drives it is possible to advance reformat 4kn disk in order to expose a sector size of 4096 Bytes physical / 512 Bytes logical (exactly as a 512e disks).
BEWARE
- I never tried this procedure.
- not all drives accept the SCSI commands necessary to reformat the drive. So it depends on the specific drive model
- I can't guarantee: since it's a low level operation it can also brick your drive
The reformat is accomplished using the sg3_utils package for linux.
Here you can find references to the operative procedure:
http://homerl.github.io/2016/08/10/Advance-reformat-4Kn-HDD-to-512-Bytes/
Pay attention to the sg_format command. When you execute the command it says "FORMAT Complete" but the procedure is still running detached, using sg_turs command you can check the status, as you can see it replies with a message like: "Sense key: Not Ready Additional sense: Logical unit not ready, format in progress" that means that the format operation is still in progress.
The person who wrote this procedure says that it takes more or less 18 hours (but his drive is 8TB).
As you can see he is using a HGST Ultrastar He8 (Part number: HUH728080AL4200) that is a 4KN drive according this page: https://www.hgst.com/products/hard-drives/ultrastar-he8
Please do futher research before trying this procedure because I simply found some informations on sg3_utils. Finally I found this operative procedure but I never tried it on my hardware.
Davide
eableson
5 Posts
0
September 16th, 2016 07:00
Very interesting. I think that we can sacrifice a drive for testing purposes...
Thanks !
c0redump
68 Posts
0
September 16th, 2016 08:00
Hello Erik,
if the procedure works with one of your drives, it would be great to test/evaluate, with fio for example, the difference of performance of a original 4kn formatted drive and the one 512e converted.
In my opinion to make a rapid comparison is sufficient to test: 4k random 70% mixed read/writes with QD=32.
To make test you can create a temporary ext4 partition on both drives, mount them on different directories and use fio to benchmark with this syntax:
fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=32 --size=4G --readwrite=randrw --rwmixread=70
This will lay out a 4GB file named "test" on the directory where you execute the command so you have to launch that moving between mounted directories to test both drives.
If the conversion procedure works and If you can post the result it would be great.
Thanks,
Davide