by brianwski · 7y ago · 0 comments
> I wonder if Backblaze does anything similar to provision drives.
We do different things for different drives, but ALWAYS have a "burn in" period for new vaults (group of 20 computers that files are Reed-Solomon encoded across) that come online.
When I say "different things", when we deployed a vault full of recent Toshiba (?) drives it came up "too slow" and we figured out the OS block size and drive block size wasn't lined up "by default". It "works" but essentially a single write required reading two blocks and then writing two blocks. (sigh) I always wonder how many mis-configured PCs exist in the world with little problems like this quietly slowing down some user who never figures it out.
All of them.
Definitely not the sort of problem I expected to encounter during that project, though, so I can totally see how even you guys would hit stuff like that.
2^20 bytes lines up with any known disk sectoring at the expense of "wasting" 1 mb, which wrt today's capacities is trivial.
If you want to declare a smaller offset, you can, but absent an explicit value, one (binary) mb is what you get.
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."
I may use 12MB going forward, myself (rather than the "1mb covers all ur bases" I cited in my upstream comment).