• 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 set boot device at OBP for mirrored root disk

by admin

The Open Boot PROM(OBP) aliases in solaris SPARC environments are created to simplify the access to hardware devices using user friendly names. They can be used in place of the full OBP hardware path at the “ok” prompt. The post discusses the procedure to set the Open Boot Prom (OBP) environment for SPARC systems properly if system is mirrored with Solaris Volume Manager (SVM).

The terms “primary” and “secondary” are often applied to SVM boot disks. In practice neither disk is primary. The data is written to both simultaneously and read from both, usually in round robin fashion. The term primary can be accurately used to refer to the disk which was the original first submirror, so that the secondary disk acquired its content by SVM mirroring. The other context in which one disk can be said to be primary is in discussing which disk was specified when booting the system, as initially a single disk is always responsible for starting the boot process.

1. Identify the root disk and mirror disk

To identify the root and mirror disk used for the meta device for / (root) file system :

# df -lh /
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d10         12G   5.1G   6.3G    45%    /

Look for the mirror setup and find the submirrors constituting the mirror d10.

# metastat -p d10   
d10 -m d11 d12 1
d11 1 1 c0t0d0s0
d12 1 1 c0t1d0s0

2. Identify device path of physical disk

From the output of the metastat command output get the 2 disks and find the physical device path of the disks.

# ls -l /dev/dsk/c0t0d0s0
lrwxrwxrwx   1 root     root          47 Dec  8  2011 /dev/dsk/c0t0d0s0 -> ../../devices/pci@1c,600000/scsi@2/sd@0,0:a,raw
# ls -l /dev/dsk/c0t1d0s0
lrwxrwxrwx   1 root     root          47 Dec  8  2011 /dev/dsk/c0t1d0s0 -> ../../devices/pci@1c,600000/scsi@2/sd@1,0:a,raw

or at OBP

ok show-disks
a) /pci@1c,600000/scsi@2,1/disk
b) /pci@1c,600000/scsi@2/disk

3. Setup alias at OBP

Once we know the physical path of the disks, we can set an user friendly alias name for both the root disk and mirror disk at ok prompt.

ok> nvalias rootdisk /pci@1c,600000/scsi@2/disk@0,0:a
ok> nvalias rootmirror /pci@1c,600000/scsi@2/disk@1,0:a

4. Setup boot-device and diag-device in OBP

We would also need to set boot device as the 2 disk device aliases we just created to boot.

ok> setenv boot-device rootdisk rootmirror
ok> printenv boot-device

Add also to diag-device ,because if diag-switch is set then diag-device is used for booting instead of boot-device variable.

ok> setenv diag-device rootdisk rootmirror

5. Try booting from each device alias

The final verification step is to try booting from each device alias we created. This also verifies that the system boots from both the submirrors of the SVM mirror.

ok> boot rootdisk
# init 0
ok> boot rootmirror

Filed Under: Solaris, SVM

Some more articles you might also be interested in …

  1. How to Check Solaris Release and Default Kernel Version
  2. How to configure passwordless ssh in Solaris
  3. How to force a crash dump on T1000/T2000 servers from ALOM
  4. M8000 / M9000 : How to update XCP firmware (XSCF firmware upgrade)
  5. Solaris Performance troubleshooting : Disk (I/O) performance issues
  6. A beginners guide to Solaris Multipathing Software (MPxIO or STMS)
  7. Solaris : how to truncate the wtmpx file
  8. Beginners Guide to Solaris 11 Image Packaging System (IPS)
  9. Complete hardware reference : T1000 / T2000 / T5120 / T5140 / T5220 / T5240 / T5440
  10. How to identify the HBA cards/ports and WWN in Solaris

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