create zpool from zvols?
- Reply: Rich : "Re: create zpool from zvols?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Mar 2022 13:33:54 UTC
Hello, I am using ZFS on FreeBSD 13.0-RELEASE-p8. For experimentation and demonstration, I would like to create zpools using zvols as the underlying block devices. For example, I have these: [root@ibex] # zfs list -r -t volume zroot | grep zv zroot/zv0 8.25G 832G 56K - zroot/zv1 8.25G 832G 56K - This seems as if it would do what I want: [root@ibex] # zpool create -n ztest mirror /dev/zvol/zroot/zv{0,1} would create 'ztest' with the following layout: ztest mirror zvol/zroot/zv0 zvol/zroot/zv1 But when I try to actually do it, it doesn't work: [root@ibex] # zpool create ztest mirror /dev/zvol/zroot/zv{0,1} cannot create 'ztest': no such pool or dataset FWIW, doing something similar on OmniOS works fine: [root@orca] # uname -srvp SunOS 5.11 omnios-r151040-852962cae3 i386 [root@orca] # zfs create -V 2G rpool/zv0 [root@orca] # zfs create -V 2G rpool/zv1 [root@orca] # zpool create ztest mirror /dev/zvol/dsk/rpool/zv{0,1} [root@orca] # zpool status ztest pool: ztest state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM ztest ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 /dev/zvol/dsk/rpool/zv0 ONLINE 0 0 0 /dev/zvol/dsk/rpool/zv1 ONLINE 0 0 0 errors: No known data errors I thought I had done this in the past. Am I doing something wrong? Am I misremembering and this never worked? Using files created with truncate(1) rather zvols seems to work fine so maybe that's what I did before. Not sure, it's been a long time since I wanted to do something like this. Thanks for any enlightenment.