Skip to content

Instantly share code, notes, and snippets.

@blkperl
Created May 9, 2014 23:44
Show Gist options
  • Select an option

  • Save blkperl/705e89f6771712595f68 to your computer and use it in GitHub Desktop.

Select an option

Save blkperl/705e89f6771712595f68 to your computer and use it in GitHub Desktop.
# At the beginnging there is only rpool or the "root pool"
root@sunosfiler2:~# zpool status
pool: rpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c7d0 ONLINE 0 0 0
errors: No known data errors
# Let attach the second disk to it
You can get the device name from the format command
root@sunosfiler2:~# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c7d0 <VBOX HAR-81c98028-fcb6a68-0001-8.00GB>
/pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
1. c8d0 <VBOX HAR-192bb6fc-81528b0-0001-8.00GB>
/pci@0,0/pci-ide@1,1/ide@1/cmdk@0,0
root@sunosfiler2:~# zpool attach rpool c7d0 c8d0
Make sure to wait until resilver is done before rebooting.
# Now look at the pool
root@sunosfiler2:~# zpool status
pool: rpool
state: DEGRADED
status: One or more devices is currently being resilvered. The pool will
continue to function in a degraded state.
action: Wait for the resilver to complete.
Run 'zpool status -v' to see device specific details.
scan: resilver in progress since Sat May 10 09:34:15 2014
2.22G scanned out of 3.69G at 103M/s, 0h0m to go
2.19G resilvered, 60.07% done
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
c7d0 ONLINE 0 0 0
c8d0 DEGRADED 0 0 0 (resilvering)
Wait for it to resilver, otherwise it will complain that bootadm is already running
root@sunosfiler2:~# bootadm install-bootloader -P rpool
another instance of bootadm (pid 1668) is running
# Check that its done resilvering with zpool status, then run bootadm
root@sunosfiler2:~# bootadm install-bootloader -P rpool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment