How to Replace a Disk in the ZFS Root Pool ?

Today we will see how to Replace a disk in the ZFS Root Pool.

Lets have a look at them commands step by step.


1. Take the disk in pool offline which we want to replace.

# zpool offline rpool c1t0d0s0


2. Now unconfigure the disk from system.

# cfgadm -c unconfigure c1:sk/c1t0d0

3. Now ask the onsite hardware engineer to replace the drive on the server.


4. Configure/Scan the new disk on the server.

# cfgadm -c configure c1:sk/c1t0d0


5. Now replace the disk in pool.

# zpool replace rpool c1t0d0s0


6. Solved: Error: I/O Error

# zpool replace rpool c1t0d0s0
cannot open '/dev/dsk/c1t0d0s0': I/O error

[here comes problem: cannot open '/dev/dsk/c1t0d0s0': I/O error
you need to label disk – instructions below]


7. Solved: Error: device too small

ngeaix001--> zpool replace rpool c1t0d0s0
cannot replace c1t0d0s0 with c1t0d0s0: device is too small [and another problem –copy slices:

ngeaix001--> prtvtoc /dev/dsk/c1t1d0s2 | fmthard -s - /dev/rdsk/c1t0d0s2
fmthard: New volume table of contents now in place. ]
# zpool online rpool c1t0d0s0
# zpool status rpool

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


8. Steps to label the disk

ngeaix001--> format
Searching for disks...done

c1t0d0: configured with capacity of 136.71GB

0. c1t0d0
1. c1t1d0
2. c4t60002AC0000000000000002D0000C71Fd0 <3PARdata-VV-3212 cyl 21555 alt 2 hd 8 sec 304>
3. c4t60002AC0000000000000002E0000C71Fd0 <3PARdata-VV-3212 cyl 65533 alt 2 hd 8 sec 500>
4. c4t60002AC0000000000000002F0000C71Fd0 <3PARdata-VV-3212 cyl 65533 alt 2 hd 8 sec 1084>
5. c4t60002AC000000000000000300000C71Fd0 <3PARdata-VV-3212 cyl 25867 alt 2 hd 8 sec 304>
Specify disk (enter its number): 0
selecting c1t0d0
[disk formatted]
Disk not labeled. Label it now? y

disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
! - execute , then return
format> q
0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments