0% found this document useful (0 votes)
52 views4 pages

How To Replace A Disk in The ZFS Root Pool

This document provides a step-by-step guide on how to replace a disk in the ZFS root pool in Oracle Solaris. It outlines procedures for both mirrored and non-redundant configurations, including commands for offline, unconfigure, and replace operations. Additionally, it emphasizes the importance of verifying the boot device pathnames and ensuring successful booting from the new disk after replacement.

Uploaded by

jishoikat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views4 pages

How To Replace A Disk in The ZFS Root Pool

This document provides a step-by-step guide on how to replace a disk in the ZFS root pool in Oracle Solaris. It outlines procedures for both mirrored and non-redundant configurations, including commands for offline, unconfigure, and replace operations. Additionally, it emphasizes the importance of verifying the boot device pathnames and ensuring successful booting from the new disk after replacement.

Uploaded by

jishoikat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

How to Replace a Disk in the ZFS Root Pool

docs.oracle.com/cd/E19253-01/819-5461/ghzvx/index.html

Oracle Solaris ZFS Administration Guide

You might need to replace a disk in the root pool for the following reasons:

The root pool is too small and you want to replace a smaller disk with a larger disk.

A root pool disk is failing. In a non-redundant pool, if the disk is failing such that the
system won't boot, you must boot from an alternate media, such as a CD or the
network, before you replace the root pool disk.

In a mirrored root pool configuration, you can attempt a disk replacement without booting
from alternate media. You can replace a failed disk by using the zpool replace
command. Or, if you have an additional disk, you can use the zpool attach command.
See the procedure in this section for an example of attaching an additional disk and
detaching a root pool disk.

Some hardware requires that you take a disk offline and unconfigure it before attempting
the zpool replace operation to replace a failed disk. For example:

# zpool offline rpool c1t0d0s0


# cfgadm -c unconfigure c1::dsk/c1t0d0
<Physically remove failed disk c1t0d0>
<Physically insert replacement disk c1t0d0>
# cfgadm -c configure c1::dsk/c1t0d0
# zpool replace rpool c1t0d0s0
# zpool online rpool c1t0d0s0
# zpool status rpool
<Let disk resilver before installing the boot blocks>
SPARC# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk
/dev/rdsk/c1t0d0s0
x86# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t9d0s0

On some hardware, you do not have to online or reconfigure the replacement disk after it
is inserted.

You must identify the boot device pathnames of the current disk and the new disk so that
you can test booting from the replacement disk and also manually boot from the existing
disk, if the replacement disk fails. In the example in the following procedure, the path
name for current root pool disk (c1t10d0s0) is:

1/4
/pci@8,700000/pci@3/scsi@5/s
d@a,0

The path name for the replacement boot disk (c1t9d0s0) is:

/pci@8,700000/pci@3/scsi@5/s
d@9,0

1. Physically connect the replacement (or new) disk.

2. Confirm that the new disk has an SMI label and a slice 0.

For information about relabeling a disk that is intended for the root pool, see the
following site:

http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshoo
ting_Guide

3. Attach the new disk to the root pool.

For example:

# zpool attach rpool c1t10d0s0


c1t9d0s0

2/4
4. Confirm the root pool status.

For example:

# zpool status rpool


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, 25.47% done, 0h4m to go
config:

NAME STATE READ WRITE CKSUM


rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c1t10d0s0 ONLINE 0 0 0
c1t9d0s0 ONLINE 0 0 0

errors: No known data errors

5. After the resilvering is completed, apply the boot blocks to the new disk.

Using syntax similar to the following:

SPARC:

# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk


/dev/rdsk/c1t9d0s0

x86:

# installgrub /boot/grub/stage1 /boot/grub/stage2


/dev/rdsk/c1t9d0s0

6. Verify that you can boot from the new disk.

For example, on a SPARC based system, you would use syntax similar to the
following:

ok boot
/pci@8,700000/pci@3/scsi@5/sd@9,0

3/4
7. If the system boots from the new disk, detach the old disk.

For example:

# zpool detach rpool


c1t10d0s0

8. Set up the system to boot automatically from the new disk, either by using the
eeprom command, the setenv command from the SPARC boot PROM, or
reconfigure the PC BIOS.

© 2010, Oracle Corporation and/or its affiliates

4/4

You might also like