Last active
August 29, 2015 14:02
-
-
Save ilovezfs/c318ef6032fc9182cb55 to your computer and use it in GitHub Desktop.
pool in pool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Josephs-MacBook-Pro:zfs joe$ dd if=/dev/zero of=poolonzvol.bin bs=1m count=256 | |
256+0 records in | |
256+0 records out | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool create outter `pwd`/poolonzvol.bin | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool status | |
pool: outter | |
state: ONLINE | |
scan: none requested | |
config: | |
NAME STATE READ WRITE CKSUM | |
outter ONLINE 0 0 0 | |
/Users/joe/Developer/zfs/poolonzvol.bin ONLINE 0 0 0 | |
errors: No known data errors | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zfs create -V 64M outter/thezvol | |
Josephs-MacBook-Pro:zfs joe$ readlink /var/run/zfs/zvol/dsk/outter/thezvol | |
/dev/disk3 | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool create inner /var/run/zfs/zvol/dsk/outter/thezvol | |
Josephs-MacBook-Pro:zfs joe$ sudo gpt -r show /dev/disk3 | |
start size index contents | |
0 131072 | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool export inner | |
Running process: '/usr/sbin/diskutil' 'unmount' '/inner' | |
Unmount successful for /inner | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool export outter | |
Running process: '/usr/sbin/diskutil' 'unmount' '/outter' | |
Unmount successful for /outter | |
Attempting to eject volume 'outter/thezvol' | |
Running process: '/usr/sbin/diskutil' 'unmountDisk' '/dev/disk3' | |
Unmount of all volumes on disk3 was successful | |
Josephs-MacBook-Pro:zfs joe$ dd if=/dev/zero of=placeholder.img bs=1m count=32 | |
32+0 records in | |
32+0 records out | |
33554432 bytes transferred in 0.057441 secs (584154772 bytes/sec) | |
Josephs-MacBook-Pro:zfs joe$ hdid -nomount placeholder.img | |
/dev/disk3 | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool import -d . outter | |
Josephs-MacBook-Pro:zfs joe$ readlink /var/run/zfs/zvol/dsk/outter/thezvol | |
/dev/disk4 | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool import | |
pool: inner | |
id: 398251020643748209 | |
state: ONLINE | |
action: The pool can be imported using its name or numeric identifier. | |
config: | |
inner ONLINE | |
disk4 ONLINE | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool import -d /var/run/zfs/zvol/dsk/outter | |
pool: inner | |
id: 398251020643748209 | |
state: ONLINE | |
action: The pool can be imported using its name or numeric identifier. | |
config: | |
inner ONLINE | |
/var/run/zfs/zvol/dsk/outter/thezvol ONLINE | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool import -d /var/run/zfs/zvol/dsk/outter inner | |
Josephs-MacBook-Pro:zfs joe$ sudo ./cmd.sh zpool status | |
pool: inner | |
state: ONLINE | |
scan: none requested | |
config: | |
NAME STATE READ WRITE CKSUM | |
inner ONLINE 0 0 0 | |
/var/run/zfs/zvol/dsk/outter/thezvol ONLINE 0 0 0 | |
errors: No known data errors | |
pool: outter | |
state: ONLINE | |
scan: none requested | |
config: | |
NAME STATE READ WRITE CKSUM | |
outter ONLINE 0 0 0 | |
/Users/joe/Developer/zfs/poolonzvol.bin ONLINE 0 0 0 | |
errors: No known data errors | |
Josephs-MacBook-Pro:zfs joe$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment