Replacing 4K sector drive under ZFS

Status
Not open for further replies.
Joined
Apr 3, 2012
Messages
2
Hello,
I have FreeNAS 8.0.4 running a ZFS RAIDZ array of four 2GB Western Digital 20GB (4K sector) drives. I configured FreeNAS to use 4K sector drives in the GUI.
FreeNAS is reporting bad sectors on one of the drives (ada1), so I need to replace it. I have identified the serial number of the faulty ada1 drive.
The normal commands for replacing the drive are:
#zfs offline <poolname> ada1
(power down, replace drive, restart system)
#zfs replace <poolname> ada1
However ZFS is modified with the gnop command to accomodate 4K sector drives; the command for setting up an unformatted drive using gnop is:
#gnop create -S 4096 /dev/ada1
Do I have to make sure the replacement drive is also configured with gnop? I don't want to destroy the zfs array by not doing it, on the other hand I don't want to do this if it is not necessary.
Does anyone have any comments?
Thanks,
Chris
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I think if you let the GUI handle the replacement it does this automatically if you have 4k sectors enabled in the GUI. If you're doing it from the command line, I think you're correct that you need to do this manually as well as create the swap partition. You can do gpart show to see how your drives are partitioned to verify the swap size/layout. So if you create the swap partition first, then your gnop command would change to /dev/ada1p2.
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
You dont need all this dance to replace 4k...

Once the pool is created with 4k does not matter how you replace/insert a new disk. This constraint is set on a pool level, not disk...
 
Status
Not open for further replies.
Top