Background: I initially created a 2 disc striped pool on FreeBSD and labelled the drives using glabel for easy identification. Then I installed linux and imported the pool which worked OK, albeit no longer using the labels for devices as /dev/label does not exist in linux.
zpool status after import:
# zpool status -v storage
pool: storage
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0
errors: No known data errors
I then wanted to mirror each disk (to create a RAID10 like pool)
However this is what I got when trying to attach the first mirror:
# zpool attach storage sda sdc
cannot attach sdc to sda: no such device in pool
It appears to suggest that sda does not exist in the pool. However I know this is not true. I then tried the full device paths and even all of the other options such as the disk/by-id and disk/by-path device names and even tried to specify my own labels with zdev.conf, all to no avail.
Thanks to a helpful post on the zfs-fuse google group I found a way around this by retreiving the disc GUID using zdb -l and using this in place of the device name for sda:
# zpool attach storage 14855726366487100340 sdc
This was successful.
I don't know if this is a bug but I was urged to report it (and this seems a sensible thing to do).
I am aware of the risks of /dev/sdx for pool devices, and have switched to 'by-id' now that my problem has been resolved.
Here is the full output of zdb -l for sda which was originally labeled "label/storage0" with glabel in freebsd.:
Background: I initially created a 2 disc striped pool on FreeBSD and labelled the drives using glabel for easy identification. Then I installed linux and imported the pool which worked OK, albeit no longer using the labels for devices as /dev/label does not exist in linux.
zpool status after import:
I then wanted to mirror each disk (to create a RAID10 like pool)
However this is what I got when trying to attach the first mirror:
It appears to suggest that sda does not exist in the pool. However I know this is not true. I then tried the full device paths and even all of the other options such as the disk/by-id and disk/by-path device names and even tried to specify my own labels with zdev.conf, all to no avail.
Thanks to a helpful post on the zfs-fuse google group I found a way around this by retreiving the disc GUID using zdb -l and using this in place of the device name for sda:
This was successful.
I don't know if this is a bug but I was urged to report it (and this seems a sensible thing to do).
I am aware of the risks of /dev/sdx for pool devices, and have switched to 'by-id' now that my problem has been resolved.
Here is the full output of zdb -l for sda which was originally labeled "label/storage0" with glabel in freebsd.: