• 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 Use ‘zpool split’ to Split rpool in solaris 11 (x86/x64)
  2. Troubleshooting solaris 10 boot issues related to SMF and milestones
  3. Creating network interface alias for network boot or jumpstart installation at OBP
  4. Solaris Volume Manager (SVM) : Growing mirrored metadevices online
  5. Solaris : How To Create and Mount NFS share that is Restricted to Certain Hosts
  6. SVM – How to create Soft Partitions
  7. How to mount the zfs rpool while booted from CD [SPARC]
  8. What is SUID, SGID and Sticky bit ?
  9. Understanding Special Permissions (setuid, setgid, sticky bit) in Solaris
  10. How to set OBP Variables from the ALOM/ILOM

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright