> On Jan 26, 2019, at 1:23 PM, za.fus...@gmail.com wrote:
> 
> Hi,
> 
> this is more a question of interest and no loss of data is connected. Hence 
> skip if you don't have time or fun ;)
> 
> 
> I played around with zfs in virtualbox to learn. I used 4 virtual disks: 
> zfsD1, zfsD2, zfsD3 & zfsD4
> Main reason was how to learn  to make a mirrored pool t1 (zfsD1 and zfsD2), 
> transport one disk and recreate the pool on second PC . All worked fine and I 
> now like zfs. I mention it here, to make you aware that my disks contain old 
> zfs pool data.
> 
> Realizing /dev/sdX is mixing up when removing HDs in virtualbox. I wanted to 
> use labels (names?) that I can memorize rather than UUIDs. I used parted to 
> give the partitions the zfsDX names.
> 
> I were able to create a new pool u1 and attach the disk by label. Sorry I 
> used this confusing command sequence:
> #zpool create u1 /dev/sdb
> #zpool export u1
> #zpool import -d /dev/disk/by-partlabel -aN -f
> 
> #zpool status                shows:
> NAME     STATE 
> u1             ONLINE
>   zfsD1    ONLINE
> 
> The interesting happened when I wanted to attach the second disk
> # zpool attach u1 /dev/disk/py-partlabel/zfsD1  /dev/disk/by-partlabel/zfsD2
> invalid vdev spcification
> use '-f' to overrid the following errors:
> /dev/disk/by-partlabel/zfsD2 is part of exported pool 't1'

Read this again. Read it out loud, if that helps.

The disk came back and was identified as being exported from elsewhere.
Therefore ZFS knows that there is a pool on the disk and tries to prevent you
from accidentally destroying it.

> 
> Now I became curios and tried to reimport that disk. But failed.
> #zpool import -d /dev/disk/by-partlabel/zfsD2 t1
> cannot open '/dev/sdc1': Not a directory
> cannot import 't1': no such pool available

This is expected, the -d option takes a directory, not a file.
 -- richard

> 
> I also tried without luck:
> zpool import             - didn' list anything
> zpool import -a       - didn't work
> zpool import -d /dev/disk/by-id -aN -f     - t1 not shown at zpool status
> 
> 
> My guess is, if I manage to create a pool t1 and then attach the zfsD2 to it 
> as first (and only) disk, it might work.
> 
> Any comments ?
> 
> Cheers
> Zach
> 
> openzfs <https://openzfs.topicbox.com/latest> / openzfs-developer / see 
> discussions <https://openzfs.topicbox.com/groups/developer> + participants 
> <https://openzfs.topicbox.com/groups/developer/members> + delivery options 
> <https://openzfs.topicbox.com/groups/developer/subscription>Permalink 
> <https://openzfs.topicbox.com/groups/developer/Tc7e62464ec389621-M5615fd85e7519d33f4c65699>

------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/Tc7e62464ec389621-M2b6ec6c7ecee0d181f802360
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to