You are on page 1of 3

ZFS -Enlarge root pool by replacing disks

January 10, 2011


Lingeswaran
Leave a comment
Go to comments
ZFS -Enlarge root pool by replacing disks
Example : 136gb to 300gb Drives (rpool 136gb to 300gb)
1. zpool list note the size of the rpool
root@sungl [/root] # zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
lpool 38G 2.34M 38G 0% ONLINE -
rpool 136G 49.7G 87G 15% ONLINE -
2. Remove rootmirror drive and replace with 300GB drive.
3. Run format e and put SMI label on 300GB drive.
4. Create partition table on drive;
X86: part 8 sector 0 and part 0 is sector 1 to end of drive
Sparc: part 0 is whole drive 0 to end of drive
5. Run zpool status should look like following
pool: rpool
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use zpool clear to mark the device
repaired.
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror DEGRADED 0 0 0
c1t1d0s0 FAULTED 24 4.05K 0 too many errors
c1t0d0s0 ONLINE 0 0 0
errors: No known data errors
6. Run zpool replace rpool cXtXd0s0 cXtXd0s0 where the drive numbers match the fau
lted drive (both cXtXd0s0 are the same drive).
7. Watch for the remirror to finish with zpool status
pool: rpool
state: DEGRADED
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, 0.60% done, 1h24m to go
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror DEGRADED 0 0 0
replacing DEGRADED 0 0 0
c1t1d0s0/old FAULTED 24 4.05K 0 too many errors
c1t1d0s0 ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
errors: No known data errors
pool: rpool
state: ONLINE
scrub: resilver completed after 0h15m with 0 errors on Fri April 2 13:31:35 2010
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
errors: No known data errors
8. Install the bootblock on the replaced drive. Using the following command:
Sparc:
/usr/sbin/installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rd
sk/cXtXd0s0
X86:
installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdskcXtXd0s0
You must wait for the resilvering to be complete before installing the bootblock
.
9. Sparc Only: Take the server to the ok prompt and verify that you can boot off
the new drive.
10. Remove the root drive and replace with 300GB drive.
11. Run format e and put SMI label on 300GB drive.
12. Create partition table on drive;
X86: part 8 sector 0 and part 0 is sector 1 to end of drive
Sparc: part 0 is whole drive 0 to end of drive
13. Run zpool status should look like following
pool: rpool
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use zpool clear to mark the device
repaired.
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror DEGRADED 0 0 0
c1t1d0s0 ONLINE 0 0 0
c1t0d0s0 FAULTED 1 3.79K 0 too many errors
errors: No known data errors
14. Run zpool replace rpool cXtXd0s0 cXtXd0s0 where the drive numbers match the fa
ulted drive (both cXtXd0s0 are the same drive).
15. Watch for the re-mirror to finish with zpool status
pool: rpool
state: DEGRADED
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, 0.09% done, 1h16m to go
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror DEGRADED 0 0 0
c1t1d0s0 ONLINE 0 0 0
replacing DEGRADED 0 0 0
c1t0d0s0/old FAULTED 1 3.79K 0 too many errors
c1t0d0s0 ONLINE 0 0 0
errors: No known data errors
pool: rpool
state: ONLINE
scrub: resilver completed after 0h8m with 0 errors on Fri April 2 14:02:01 2010
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
errors: No known data errors
16. Install the bootblock on the replaced drive. Using the following command:
Sparc:
/usr/sbin/installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rd
sk/cXtXd0s0
X86:
installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdskcXtXd0s0
You must wait for the resilvering to be complete before installing the bootblock
.
17. Sparc Only: Take the server to the ok prompt and verify that you can boot of
f the new drive.
18. Run zpool list note the size of the rpool
root@sungl [/root] # zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
lpool 38G 2.34M 38G 0% ONLINE -
rpool 279G 49.7G 230G 7% ONLINE -

You might also like