Degraded Pools

just for fun, I thought – what would happen if a zpool split was done prior to the submirror being complete.
strangely enough, Opensolaris does allows this, and the end result is the new pool seems to sometimes there, and sometimes not there.

root@opensolaris:~# zpool status
pool: rpool
state: ONLINE
scrub: none requested
config:

NAME        STATE     READ WRITE CKSUM
rpool       ONLINE       0     0     0
c5t0d0s0    ONLINE       0     0     0

root@opensolaris:~# zpool attach -f rpool c5t0d0s0 c5t1d0s0
Please be sure to invoke installgrub(1M) to make 'c5t1d0s0' bootable.
Make sure to wait until resilver is done before rebooting.

root@opensolaris:~# zpool attach -f rpool c5t0d0s0 c5t2d0s0
Please be sure to invoke installgrub(1M) to make 'c5t2d0s0' bootable.
Make sure to wait until resilver is done before rebooting.

root@opensolaris:~# installgrub -m -f /boot/grub/stage[12] /dev/rdsk/c5t1d0s0
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 273 sectors starting at 50 (abs 16115)
stage1 written to master boot sector

root@opensolaris:~# installgrub -m -f /boot/grub/stage[12] /dev/rdsk/c5t2d0s0
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 273 sectors starting at 50 (abs 16115)
stage1 written to master boot sector

root@opensolaris:~# zpool status
pool: rpool
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 0h1m, 26.99% done, 0h4m to go
config:

NAME          STATE     READ WRITE CKSUM
rpool         ONLINE       0     0     0
mirror-0      ONLINE       0     0     0
c5t0d0s0      ONLINE       0     0     0
c5t1d0s0      ONLINE       0     0     0  1.07G resilvered
c5t2d0s0      ONLINE       0     0     0  1.07G resilvered

root@opensolaris:~# zpool split rpool mypool c5t2d0s0

root@opensolaris:~# zpool status
pool: rpool
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 0h0m, 15.11% done, 0h1m to go
config:

NAME          STATE     READ WRITE CKSUM
rpool         ONLINE       0     0     0
mirror-0      ONLINE       0     0     0
c5t0d0s0      ONLINE       0     0     0
c5t1d0s0      ONLINE       0     0     0  614M resilvered

root@opensolaris:~# zpool import mypool
cannot iterate filesystems: I/O error

root@opensolaris:~# zpool list
NAME     SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
mypool  15.9G  3.97G  11.9G    25%  1.00x  DEGRADED  -
rpool   15.9G  4.01G  11.9G    25%  1.00x  ONLINE  -

root@opensolaris:~# zpool destroy mypool
cannot iterate filesystems: I/O error

root@opensolaris:~# zpool import mypool
cannot import 'mypool': no such pool available

root@opensolaris:~# zpool list
NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
rpool  15.9G  4.06G  11.8G    25%  1.00x  ONLINE  -

So the end result is sane – the not-wholly mirrored and split pool isn’t a valid zpool – but it’s interesting that it was there for a while [albeit marked as degraded].

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: