• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

SVM : How to Use Metadevadm to Maintain Device Relocation Information After Disk Replacement

by admin

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
If using diskset (metaset) then use the “-s [setname]” option for metadevadm and metastat command.

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.

Filed Under: Solaris, SVM Tagged With: disk replacement, metadevadm, SVM

Some more articles you might also be interested in …

  1. Solaris 10 patching with SVM : Traditional method (non-live upgrade)
  2. How to add Additional Storage Space Created from Dynamic LUN Expansion in SVM online
  3. SVM : How to un-encapsulate root disk (SPARC)
  4. SVM root encapsulation and mirroring [SPARC]
  5. Solaris : How to set limit on the maximum number of open files per process
  6. Troubleshooting Solaris IPMP
  7. How to find the space consumed by ZFS snapshots
  8. LDOMs troubleshooting : guest and control domains can not talk to each other but can talk with anyone else on the network
  9. How to configure a vnic on top of a Vlan Tagged Interface and assign the vnic to a Solaris 11 Zone
  10. ZFS destroy error “cannot determine dependent datasets: recursive dependency”

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright