[ZFS] Booting from zpool created on 4k-sector drive

James R. Van Artsdalen james-freebsd-fs2 at jrv.org
Wed Mar 2 23:28:08 UTC 2011

Emil Smolenski wrote:
> James asks about disk replacement scenario. In this case you cannot
> use device with greater sector size than 2**ashift of the existing
> vdev as replacement:
> # diskinfo -v md0 |grep sectorsize
>         512             # sectorsize
> # zpool create test0 md0
> # zdb test0 |grep ashift
>                 ashift=9
> # diskinfo -v md1.nop |grep sectorsize
>         4096            # sectorsize
> # zpool replace test0 md0 md1.nop
> cannot replace md0 with md1.nop: devices have different sector alignment

I was thinking of the capacity of the drive as a problem, not the sector
sizes.  I wrongly thought gnop consumed space on the drive (like
gmirror) and this might make it hard to replace an ashift=12 disk with a
512-byte-sector disk.  But this is not the case.

It might be a good idea now to start using the gnop trick to force
vdev's to use ashift=12 in case disks begin advertising themselvess as

More information about the freebsd-fs mailing list