[zfs] attach by name/uuid still attaches wrong device

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Mar 19 20:20:55 UTC 2010


On Tue, Mar 02, 2010 at 10:38:26AM +0100, Alexander Leidinger wrote:
> Quoting "James R. Van Artsdalen" <james-freebsd-fs2 at jrv.org> (from  
> Sun, 28 Feb 2010 23:58:24 -0600):
> 
> >I don't think it's possible to do this right in vdev_geom.c: there's no
> >way to guess what is intended without a hint from higher ZFS layers as
> >to which drives should be found and which are new.
> 
> There is a way: do not attach blindly.

The same code was used for 'zpool import' and 'zpool create', so
ignoring guids was needed to make creation work.

Fortunately I found solution today by looking at different part of ZFS.
I can distinguish creation from import by looking at
vd->vdev_spa->spa_load_state. When it is equal to SPA_LOAD_NONE we're
creating a pool and it is not, we're importing.

This should be fixed now, see @205346.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20100319/4f5e02d8/attachment.pgp


More information about the freebsd-fs mailing list