This article describes the method used to maintain device relocation information for Solaris Volume Manager (SVM). Device relocation information is based on device IDs, and care must be taken to ensure that it is updated when a disk is replaced. Device IDs are unique identifiers branded to all disk drives and LUNs (SCSI, fibre channel, SAS, etc.). Every time a disk is incorporated into SVM, this identifier is read and stored in the replica database. This allows SVM to access the disk by its device ID, as opposed to its device name. The previous practice of accessing drives by device names, such as c2t4d3s0, allowed the possibility of a problem if these names changed during a reboot. Device ID provides a static, constant access name which persists for the life of the disk.
Updating device relocation information
1. It is possible to disable device relocation information. To verify that it is in use on your system, use the metastat command. If it is enabled, information for each disk will appear at the very end of metastat output.
# metastat ...... Device Relocation Information: Device Reloc Device ID c2t5d0 Yes id1,ssd@n20000020370f4166 c2t4d0 Yes id1,ssd@n20000020370f3c05 c0t9d0 Yes id1,sd@SSEAGATE_ST39173W_SUN9.0GLMD69076000079291K9W c0t10d0 Yes id1,sd@SSEAGATE_ST39173W_SUN9.0GLMD7772800007930HKZ1
2. After a disk replacement, the device ID of the new disk must be updated. Since SVM takes its information from Solaris, you must be sure that Solaris sees the new device. This is obvious with the replacement of fibre channel and SAS disks when you view the device name.
# ls -l (before) /dev/rdsk/c2t6d0s2 -> ../../devices/pci@8,600000/pci@1/SUNW,qlc@4/fp@0,0/ssd@w21000020370f46c5,0:c,raw
# ls -l (after) /dev/rdsk/c2t6d0s2 -> ../../devices/pci@8,600000/pci@1/SUNW,qlc@4/fp@0,0/ssd@w21000020370f4166,0:c,raw
3. Use the metadevadm command to update device relocation information. In the example below, the device relocation information change parallels that seen in the device names above. This is an indication that the metadevadm procedure succeeded.
# metadevadm -u c2t6d0 Updating Solaris Volume Manager device relocation information for c2t6d0 Old device reloc information: id1,ssd@n20000020370f46c5 New device reloc information: id1,ssd@n20000020370f4166
4. Device ID updates for SCSI disks are less obvious, because the device name will not change after the disk is replaced.
# ls -l (before) /dev/dsk/c0t9d0s2 -> ../../devices/pci@8,700000/scsi@5/sd@9,0:c
# ls -l (after) /dev/dsk/c0t9d0s2 -> ../../devices/pci@8,700000/scsi@5/sd@9,0:c
5. Because the device names don’t change, you can reliably verify if device relocation information has been correctly updated by examining the output of metadevadm, or by comparing current and previous output of metastat.
# metadevadm -u c0t9d0 Updating Solaris Volume Manager device relocation information for c0t9d0 Old device reloc information: id1,sd@SSEAGATE_ST39173W_SUN9.0GLMD69076000079291K9W New device reloc information: id1,sd@SSEAGATE_ST39173W_SUN9.0GLMD69076000079291K9W
6. If metadevadm command is not used, SVM will fail the disk as soon as Solaris recognizes the new device ID. This usually occurs during a reboot. The following message is logged :
Jun 22 18:22:57 host1 metadevadm: [ID 209699 daemon.error] Invalid device relocation information detected in Solaris Volume Manager
The primary cause for this error is an improper disk replacement procedure.