How do you access mirrored root disks when booting into single user mode from either network or DVD/CD? Presumably because of luck I have not been forced into this situation. When booting from DVD or network in single user mode your mirrored root disks will not be available.

If you are booting single user mode from an alternative media, probably something fairly bad has already happened to the machine. Unless you feel like creating more problems for yourself do not mount any submirrors manually in read/write mode. You are pretty much going to wreck the whole system. It should not be necessary to explain why.

I found the procedure for activating metadevices in single user mode while booted from DVD, on this mailing list, while looking for something else. But I decided to put it up here, just in case it disappears. Plus, I think it is a very handy procedure. I tested this on Solaris 10, just to see if it works.

Once I booted the system from I DVD, mounted one of the submirrors in RO mode:

# mount -o ro /dev/dsk/c0t0d0s1 /a

After that I copied md.conf file from the submirror into proper location for the currently running kernel - the one loaded from DVD:

# cp /a/kernel/drv/md.conf /kernel/drv/md.conf

Then I unmounted the submirror:

# umount /a

After that I used update_drv command to force the md module to reread the md.conf file I have retrieved from the submirror. In Solaris 9 and Solaris 10 md.conf contains mirror configuration. In Solaris 8 it is in /etc/system file.

# update_drv md
devfsadm: mkdir failed for /dev 0x1ed: Read-only file system
#

And that was it. My mirrors were activated:

# metastat
d0: Mirror
    Submirror 0: d1
      State: Needs maintenance
    Submirror 1: d2
      State: Needs maintenance
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 11839905 blocks (5.6 GB)

d1: Submirror of d0
    State: Needs maintenance
    Invoke: metasync d0
    Size: 11839905 blocks (5.6 GB)
    Stripe 0:
        Device   Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s0        0     No            Okay   Yes


d2: Submirror of d0
    State: Needs maintenance
    Invoke: metasync d0
    Size: 11839905 blocks (5.6 GB)
    Stripe 0:
        Device   Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s0        0     No            Okay   Yes


d10: Mirror
    Submirror 0: d11
      State: Needs maintenance
    Submirror 1: d12
      State: Needs maintenance
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 1220940 blocks (596 MB)

d11: Submirror of d10
    State: Needs maintenance
    Invoke: metasync d10
    Size: 1220940 blocks (596 MB)
    Stripe 0:
        Device   Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s1        0     No            Okay   Yes


d12: Submirror of d10
    State: Needs maintenance
    Invoke: metasync d10
    Size: 1220940 blocks (596 MB)
    Stripe 0:
        Device   Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s1        0     No            Okay   Yes


d70: Mirror
    Submirror 0: d71
      State: Needs maintenance
    Submirror 1: d72
      State: Needs maintenance
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 7727265 blocks (3.7 GB)

d71: Submirror of d70
    State: Needs maintenance
    Invoke: metasync d70
    Size: 7727265 blocks (3.7 GB)
    Stripe 0:
        Device   Start Block  Dbase        State Reloc Hot Spare
        c0t0d0s7        0     No            Okay   Yes


d72: Submirror of d70
    State: Needs maintenance
    Invoke: metasync d70
    Size: 7727265 blocks (3.7 GB)
    Stripe 0:
        Device   Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s7        0     No            Okay   Yes


Device Relocation Information:
Device   Reloc  Device ID
c0t0d0   Yes    id1,sd@SSEAGATE_ST373307LSUN72G_3HZ75X6Y000074380JVB
c1t0d0   Yes    id1,sd@SSEAGATE_ST373307LSUN72G_3HZ9DXR2000075159L9J

Solaris is cool…