Drive sectors for Prox OS matter?

ieronymous

Active Member
Apr 1, 2019
251
18
38
44
Hello

I need to set up 2 servers for Virtualization in a production environment, so as I always do, ordered 2 ssd's for a zfs mirror installation. This time I ordered datacenter type ssds and specifically the below ones (I could have gone with others too but the budget and availability dictated these two)
-SAMSUNG MZ7LH480HAHQ-00005
-KINGSTON SEDC500M480G
I happen to notice (didnt expect that from ssds since I was used to sas 2.5inch drives) that the 2 drives have different sector specs
Samsung has 4096b physical / 512b logical
Kingsdon has 512b physical / 512b logical
In this case, can I use them in a zfs mirror system since I am not sure what to choose for ashift (512 drives use a value of 9(2x2x2x2x2x2x2x2x2=512) and 4096 drives use a value of 12 (2x2x2x2x2x2x2x2x2x2x2x2=4096))
Is the ashift value depended on the physical or logical sectors of the drive?

Anyone with practice experience on that or solid knowledge to help me out?

Thank you

PS Since I ordered the above disks in doubles, I could go with the first server with the two Samsung drives and use the two Kingstons for the second one, That way though I am going against my rule, never using the same manufacturer drive (for mirror-raid) and bunch since they might happen to fail at the same time render the system useless. I know it is easy to install the prox-os again and setup again the appropriate configurations but I would like to have an extra advantage of the mirror and avoid it.
 
Last edited:
In reality both SSDs will use neither of them. Internally they will use a way bigger blocksize but no manufacturer will tell you whats actually used internally. So I would go with the blocksize the SSDs report themself to be working at because it is most likely that they optimized the firmware for that blocksize to get better benchmark results. Should be never a problem to use a bigger blocksize but you should avoid to use a smaller blocksize. So I would use the bigger of the physical sector sizes so ashift=12 for the pool.
 
Last edited:
Internally they will use a way bigger blocksize but no manufacturer will tell you whats actually used internally.
I know that but what else to do apart from taking into consideration what the drive states when you query it.

So I would go with the blocksize the SSDs report themself to be working a
...and that would be the physical or the logical. Which of the two presents to the OS?

Should be never a problem to use a bigger blocksize
...what about the available space that is being lost this way.
So I would use the bigger of the physical sector sizes so ashift=12 for the pool.
...that would benefit the samsung drive only (given the fact that specs are true).
 
...and that would be the physical or the logical. Which of the two presents to the OS?
The physical.
...what about the available space that is being lost this way.
You don't loose any space. If the SSD really would use a 512B blocksize and you use a ashift of 12 and you write a 4K block to it, the SSD would just write 8x 512B blocks to store the 4K write. Just like doing a 4K write to a pool with ashift of 9 where also 8x 512B would be written. Only difference is that you would loose space if you want to store alot of files that are smaller than 4K, because each file smaller than 4K would need to store a full 4K block.
...that would benefit the samsung drive only (given the fact that specs are true).
Like I already said, its no problem to use a higher ashift. If a disk can handle 512B it will handle 4K fine too, because it will just write it as 8x 512B blocks.
 
Only difference is that you would loose space if you want to store alot of files that are smaller than 4K, because each file smaller than 4K would need to store a full 4K block.
That is what I meant with the lost space. Since the drives are specifically for the proxmox OS, and not an sql data base I don t think that this would be a problem.
If the SSD really would use a 512B blocksize and you use a ashift of 12 and you write a 4K block to it, the SSD would just write 8x 512B blocks to store the 4K write.
I am aware of that just can t figure out if there will eb a problem of that mixed sector size disk configuration. What I mean is during writing on the disk, in the case of mirror the data splits to both drives. I suppose the difference will be only in the amount of blocks the two disks will use to store the same data? The 4k one will use (in case of smaller size data) one block while the other one will use 8?

I am trying to troubleshoot a situation here without have happened in order to have a clue while it happens. What about the re-silvering process? Isnt it done block by block and not in a file type way? Isnt that going to be a problem during the process?

PS Maybe not relevant but maybe yes (I incline to yes) I kept in a txt links of troubleshooting for matters I care and this is something to add up to my current post. https://superuser.com/questions/126...s-mirror-with-disks-of-different-sector-sizes
Ok I won t try to expand the pool but the resilver /scrub process will happen and performance will be bad . Am I wrong?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!