Replacing drive with different sector alignment

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

wookienz

Member
Apr 2, 2012
98
4
8
Hi all,

I have a 4 vdevs, each with 6x2TB HDD's in a Z2 config.

I initially started with 2 vedv, then added the other over time. Unbeknownst to me when i added the last vdev it created it with ashift 12 while the rest of the vdevs are ashift 9. I know little about ashift so bear with me if i get the syntax incorrect.

My high performance ;) WD 2TB Greens are failing, and so I am replacing them with some WD Red 3TB.

zpool replace on the vedv with ashift 12 was no problem. Replacing a hdd on the vdev with ashift 9 fails with an error about sector alignment. It would seem that the WD Red has a 4k sector and the vdev is 512. I thought the WD drives were logically 512 and physically 4k so it was backwards compatible.

I would love to move the data off and rebuild the array all with ashift 12 but it aint going to happen any time soon.

So any ides how i add this WD RED HDD into the ashift vdev?

Chur.
 

gea

Well-Known Member
Dec 31, 2010
3,163
1,195
113
DE
Ashift is a property of a vdev that is set during creation of a vdev (either automatically based on the physical sectorsize information of a disk or manually with a configuration setting). You cannot change this afterwards without a pool destroy and recreate and you cannot replace a ashift=9 disk (512B) with a ashift=12 disk (4k); read ZFS and Advanced Format disks - illumos - illumos wiki

If you force a vdev to ashift=12 with 512B disks, you can replace the disks with 4k ones.
If you do not want to recreate the whole pool you need 512B disks for replacement (WD or HGST 2TB disks with 512B )
 
Last edited:

wookienz

Member
Apr 2, 2012
98
4
8
Is it not possible to bs zfs that my wd red really a 512 drive? Alter sd.conf possibly?

It is an 18 tb array, no real way to move the data and recreate the pool.

All ideas considered!
 
Last edited: