HP XC System Software Administration Guide Version 3.1
4. Use the mdadm command to remove each partition from the RAID array:
# mdadm /dev/md1 -r /dev/sdb1
# mdadm /dev/md2 -r /dev/sdb2
# mdadm /dev/md3 -r /dev/sdb3
5. Physically remove the old disk according to the manufacturer's instructions.
6. Physically install the new disk according to the manufacturer's instructions.
7. Partition the new disk.
8. Add the new partitions back to their arrays:
# mdadm /dev/md1 -a /dev/sdb1
# mdadm /dev/md2 -a /dev/sdb2
# mdadm /dev/md3 -a /dev/sdb3
The new partition begins synchronizing with the existing corresponding partition automatically.
9. Use the following two commands to update the mdadm configuration file, /etc/mdadm.conf, which
the mdadm command uses to manage the RAID arrays. This file also enables you to generate a prototype
file for the RAID array with the following command. Substitute the appropriate disk drive device
name for your installation. For example, for an ITE drive, use /dev/hd*[0–9] in place of the disk
parameter; for a SATA drive, use /dev/sd[a-i]* in place of the disk parameter.
# echo 'DEVICE disk' > /etc/mdadm.conf
# mdadm -detail -scan >> /etc/mdadm.conf
NOTE: Examine such a prototype file carefully to ensure that it is correct before using it.
10. Watch the array update progress with the following command:
# cat /proc/mdstat
Commands for single array can be combined, for example:
# mdadm /dev/md1 -f /dev/hda1 -r /dev/hda1
The fdisk(8), sfdisk(8), and parted(8) manpages provide information on examining a disk and partitioning
a new disk.
For more information about Software RAID implemented on the HP XC system, see Chapter 18 (page 211).
21.4.2 Writing a Boot Block to the RAID Disk
To ensure that the disk can be booted, and because the whole disk was replaced, you must write a boot
block to the new disk. The method to use varies by the platform.
For CP6000 Systems
Follow these steps for CP6000 systems:
1. Use the systemconfigurator command as follows:
# /usr/bin/systemconfigurator -runboot -stdin <<EOF
[BOOT]
BOOTDEV = disk1
BOOTDEV2 = disk2
EOF
248 Servicing the HP XC System