# Adding a spare HDD to RAID-Z. Does alignment still matter?



## cbunn (Dec 27, 2013)

Due to a super sale on the WD Red 3 TB drives at an online retailer recently, I now have a spare hard drive for my NAS, which is running a 5 x 3 TB RAID-Z array. When I set up the array, I used the recommended method of creating virtual drives using gnop, creating the RAID-Z pool, exporting, destroying the gnop devices and finally importing the pool.

So when I add a spare drive to the pool, do I need to jump through the same hoops, or will the fact that all the drives are already 4k-aligned carry over to the spare if it is ever used?

I've seen opinions in both directions in archived e-mail lists, but I'm curious if there is something a bit more definitive. Thanks!


----------



## wblock@ (Dec 27, 2013)

*Re: Adding a spare HDD to RAID-Z. Does alignment still matte*

There are two different things here.

The first is filesystem block size.  gnop(8) is only used to force ZFS to use 4K blocks.  It does not force those filesystem blocks to be aligned to the hardware 4K blocks on the drive.

I believe ZFS will use the biggest block size already in the RAID-Z.  Alignment is still required on the drive.  If there are partitions, start them at a 4K-aligned location.


----------

