9 ms·
> How would one go about finding the right block size? From our IT guy who figured out the problem...... "If it's 4K native, then a multiple of 4K is a good s
by brianwski 7y ago
> How would one go about finding the right block size?
From our IT guy who figured out the problem......
"If it's 4K native, then a multiple of 4K is a good starting point. If it's not then a multiple of 512 is ok. If it's SMR based then it's more complicated and depends on whether it's host managed or drive managed and the number of conventional PMR zones. The second part of the equation is alignment. If there's a partition table or logical volume mapping, then the partition or logical volume's offset needs to be a multiple of the native geometry otherwise the block size doesn't really matter because everything will be misaligned but it might be possible to use math to figure out a block size that cancels out the misalignment."
Sooooo..... consumers are hopelessly screwed and better hope Dell or Apple got it correct out of the factory.
More info from other IT guys.......
"These days I think parted gets it right most of the time, at least for individual spinning drives. SSDs are a bit weird because they tend to not want to share the erase block size, but I think the recent-gen ones tend to have enough firmware magic that it's OK.
...
parted also has a flag for alignment type (--align optimal) which is supposed to choose an optimal multiple of physical block size."
- BearOso 7y agoI read a while ago that Samsung’s TLC erase unit size was 3MB, so I like aligning to multiples of 12MB. This covers 1.5, 2, 3, and 4MB. No one will miss a few megabytes, and you’re pretty much guaranteed that things are aligned, no matter what the underlying format is.
- AceyMan 7y agoDid not know: thanks for sharing. I may use 12MB going forward, myself (rather than the "1mb covers all ur bases" I cited in my upstream comment).