It seems that device names aren't always updated when importing pools if devices have moved. I am not sure if this is only an cosmetic issue or if it could actually be a real problem - could it lead to the device not being found at a later import?
/ragge (This is on snv_127.) I ran the following script: ------------ #!/bin/bash set -e set -x zfs create -V 1G rpool/vol1 zfs create -V 1G rpool/vol2 zpool create pool mirror /dev/zvol/dsk/rpool/vol1 /dev/zvol/dsk/rpool/vol2 zpool status pool zpool export pool zfs create rpool/subvol1 zfs create rpool/subvol2 zfs rename rpool/vol1 rpool/subvol1/vol1 zfs rename rpool/vol2 rpool/subvol2/vol2 zpool import -d /dev/zvol/dsk/rpool/subvol1 sleep 1 zpool import -d /dev/zvol/dsk/rpool/subvol2 sleep 1 zpool import -d /dev/zvol/dsk/rpool/subvol1 pool zpool status pool ------------ And got the output below. I have annotated it with ### remarks. ------------ # bash zfs-test.bash + zfs create -V 1G rpool/vol1 + zfs create -V 1G rpool/vol2 + zpool create pool mirror /dev/zvol/dsk/rpool/vol1 /dev/zvol/dsk/rpool/vol2 + zpool status pool pool: pool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 /dev/zvol/dsk/rpool/vol1 ONLINE 0 0 0 /dev/zvol/dsk/rpool/vol2 ONLINE 0 0 0 errors: No known data errors + zpool export pool + zfs create rpool/subvol1 + zfs create rpool/subvol2 + zfs rename rpool/vol1 rpool/subvol1/vol1 + zfs rename rpool/vol2 rpool/subvol2/vol2 + zpool import -d /dev/zvol/dsk/rpool/subvol1 pool: pool id: 13941781561414544058 state: DEGRADED status: One or more devices are missing from the system. action: The pool can be imported despite missing or damaged devices. The fault tolerance of the pool may be compromised if imported. see: http://www.sun.com/msg/ZFS-8000-2Q config: pool DEGRADED mirror-0 DEGRADED /dev/zvol/dsk/rpool/subvol1/vol1 ONLINE /dev/zvol/dsk/rpool/vol2 UNAVAIL cannot open ### Note that it can't find vol2 - which is expected. + sleep 1 ### The sleep here seems to be necessary for vol1 to magically be ### found in the next zpool import. + zpool import -d /dev/zvol/dsk/rpool/subvol2 pool: pool id: 13941781561414544058 state: ONLINE action: The pool can be imported using its name or numeric identifier. config: pool ONLINE mirror-0 ONLINE /dev/zvol/dsk/rpool/vol1 ONLINE /dev/zvol/dsk/rpool/subvol2/vol2 ONLINE ### Note that it says vol1 is ONLINE, under it's old path, though it actually has moved + sleep 1 + zpool import -d /dev/zvol/dsk/rpool/subvol1 pool + zpool status pool pool: pool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 /dev/zvol/dsk/rpool/subvol1/vol1 ONLINE 0 0 0 /dev/zvol/dsk/rpool/vol2 ONLINE 0 0 0 errors: No known data errors ### Note that vol2 has it old path shown! ---------------------------- ### Interestingly, if you then + zpool export pool + zpool import -d /dev/zvol/dsk/rpool/subvol2 pool ### vol2's path gets updated too: + zpool status pool pool: pool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 /dev/zvol/dsk/rpool/subvol1/vol1 ONLINE 0 0 0 /dev/zvol/dsk/rpool/subvol2/vol2 ONLINE 0 0 0 errors: No known data errors ---------------------------- _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss