Mirroring a zpool and installing bootblk in the new mirror
Destroy one pool which is not in usem ie, rpool and add the disk as mirror of rpool-ABE
SolarisHost:/root# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
sol10-update8 yes no no yes -
sol10-update8-new yes yes yes no -
SolarisHost:/root#
SolarisHost:/root# zpool status | grep rpool
pool: rpool
rpool ONLINE 0 0 0
pool: rpool-ABE
rpool-ABE ONLINE 0 0 0
SolarisHost:/root#
SolarisHost:/root# zpool status rpool
pool: rpool
state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on older software versions.
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0
errors: No known data errors
SolarisHost:/root# zpool status rpool-ABE
pool: rpool-ABE
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool-ABE ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
errors: No known data errors
Destroy the unused zpool
SolarisHost:/root#
SolarisHost:/root# zpool destroy rpool
SolarisHost:/root#
Mirror the zpool
SolarisHost:/root# zpool attach rpool-ABE c1t0d0s0 c1t1d0s0
Please be sure to invoke installboot(1M) to make 'c1t1d0s0' bootable.
SolarisHost:/root#
SolarisHost:/root# zpool status rpool-ABE
pool: rpool-ABE
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, 1.37% done, 0h28m to go
config:
NAME STATE READ WRITE CKSUM
rpool-ABE ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0 343M resilvered
errors: No known data errors
SolarisHost:/root#
Install bootblk on the newly added mirror (SPARC Machine):
SolarisHost:/usr/platform/SUNW,T5240/lib/fs/zfs# installboot -F zfs bootblk /dev/rdsk/c1t1d0s0
Check the mirror status:
SolarisHost:/root# zpool status rpool-ABE
pool: rpool-ABE
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, 9.24% done, 0h27m to go
config:
NAME STATE READ WRITE CKSUM
rpool-ABE ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0 2.28G resilvered
errors: No known data errors
SolarisHost:/root#
Mirrored:
SolarisHost:/root#
SolarisHost:/root# zpool status rpool-ABE
pool: rpool-ABE
state: ONLINE
scrub: resilver completed after 1h19m with 0 errors on Fri Oct 29 10:59:51 2010
config:
NAME STATE READ WRITE CKSUM
rpool-ABE ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0 24.5G resilvered
errors: No known data errors
SolarisHost:/root#
No comments:
Post a Comment