| Revision 10 (by dpavlin, 2009/04/30 23:15:42) |
attach new device to zfs pool and turn it into mirror
|
root@opl:/srv/sysadmin-cookbook/recepies/zfs# fdisk -l /dev/nbd0
Disk /dev/nbd0: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/nbd0p1 1 13374 107426623+ 83 Linux
root@opl:~# zpool status
pool: zfs
state: ONLINE
scrub: scrub completed after 0h19m with 0 errors on Thu Apr 30 22:46:09 2009
config:
NAME STATE READ WRITE CKSUM
zfs ONLINE 0 0 0
raid0/zfs ONLINE 0 0 0
errors: No known data errors
root@opl:~# zpool attach zfs /dev/raid0/zfs /dev/nbd0p1
root@opl:~# zpool status
pool: zfs
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scrub: resilver in progress for 0h2m, 3.47% done, 1h5m to go
config:
NAME STATE READ WRITE CKSUM
zfs ONLINE 0 0 0
mirror ONLINE 0 0 0
raid0/zfs ONLINE 0 0 0
nbd0p1 ONLINE 0 0 0
errors: No known data errors