Birut Patel’s Weblog

May 30, 2008

Dynamic Relocation of HDD’s in Solaris Volume Manager

Filed under: Solaris Volume Manager, Sun Solaris OS — birutpatel @ 1:53 pm

 Dynamic Relocation of HDD’s in Solaris Volume Manager
===========================================

 Let say you have a Solaris 10 box connected to StorEdge S1 Array’s
 having boot disks in it as below.

 Array 1:   Array 2: 

 c0t0d0 (rootdisk) c1t0d0  (mirrordisk)
 c0t1d0 (not in use) c1t1d0  (rootdg)  
 c0t2d0 (rootdg)  c1t2d0  (rootdg) 

 Now you are doing live-upgrade to Solaris 10 on disk c0t1d0, and
 mirroed the disk with c1t0d0 using Solaris Volume Manager. Later
 on decided to move that disk to location c0t0d0. Is it possible
 without breaking the mirror?

 YES, you can do it as Solaris 10 SVM allows HOT Relocation of disk
 similar to Veritas Volume Manager.

 Run metastat and look for field “Reloc”. If it say Yes, that means
 you can relocate the disk.

 d17: Submirror of d7
    State: Okay
    Size: 196437504 blocks (93 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s7          0     No            Okay    Yes

 Device Relocation Information:
 Device   Reloc  Device ID
 c0t1d0   Yes    id1,sd@n5000c5000781e83f
 c1t0d0   Yes    id1,sd@n5000c500078208c7

 Follow the procedure:

 - bring down the machine to ok prompt.
 - swap the disk c0t1d0 with c0t0d0.
 - boot the system up.
 - SVM will update the database automatcally without affecting the
   mirror.
 - verify the state of mirror using metastat.

Working with Solaris Volume Manager

Filed under: Sun Solaris OS — birutpatel @ 10:41 am

How to boot from SDS mirror disk
=======================================

 - c0t0d0 – rootdisk
 - c0t1d0 – mirrordisk

 - Find out the alias if any in eeprom
 - Boot from CD or jumpstart or anyway and mount the S0 of mirror disk.
 
 e.g. # mount /dev/dsk/c0t1d0s0 /mnt

 # vi /mnt/etc/vfstab

 modify all /dev/md/dsk/d0 ,d1, d2, d3 entries back to cxtxdxsx format.

 # vi /etc/system

 comment out rootdev:/pseudo/md@0:0,10,blk entry as below.

 * rootdev:/pseudo/md@0:0,10,blk

 # init 0 :go to ok prompt

 {0} ok boot mirrordisk

System Should come up normally.
Boot from main disk – root disk after mirror detach:
==========================================================

No modification required, system should boot normally

 

How to clear out all meta devices even from root disk:
==========================================================

 - detach mirror
 - clear mirror metadevices (submirrors)
 - modify /etc/vfstab and /etc/system in mirror disk, so incase you have to
   boot from mirror, you can boot from it.
 - modify /etc/vfstab and /etc/system same way as mirror disk, to completely
   clear md devices and change back to ctd format.

 

Blog at WordPress.com.