Mirror the root disk


 
Thread Tools Search this Thread
Operating Systems Solaris Mirror the root disk
# 1  
Old 02-02-2010
Mirror the root disk

Hi all

I wish to mirror for the root disk, but last time i do, make the server cannot boot up. Smilie So this time, hope you guys can assist me on it. =)
At the last code, is the step i wish to do. Please help to check and correct me if got any wrong.

Code:
root@leo # format </dev/null
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a73c58,0
       1. c1t1d0 <SEAGATE-ST314670FSUN146G-0354 cyl 14087 alt 2 hd 24 sec 848>
          /pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a75d1b,0
......
......
Specify disk (enter its number):

I will like to mirror this two disk. Currently the OS is installed in the c1t0d0
Code:
root@leo # vi /etc/vfstab
"/etc/vfstab" 13 lines, 460 characters
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c1t0d0s1       -       -       swap    -       no      -
/dev/dsk/c1t0d0s0       /dev/rdsk/c1t0d0s0      /       ufs     1       no
-
swap    -       /tmp    tmpfs   -       yes     -
/devices        -       /devices        devfs   -       no      -
ctfs            -       /system/contract        ctfs    -       no      -
objfs           -       /system/object  objfs   -       no      -
sharefs         -       /etc/dfs/sharetab       sharefs -       no      -
~

Below is the c1t0d0
Code:
Warning: Current Disk has mounted partitions.
/dev/dsk/c1t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1t0d0s1 is currently used by swap. Please see swap(1M).
partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 - 11670      113.26GB    (11671/0/0) 237528192
  1       swap    wu   11673 - 14086       23.43GB    (2414/0/0)   49129728
  2     backup    wm       0 - 14086      136.71GB    (14087/0/0) 286698624
  3          -    wu       0 - 14086      136.71GB    (14087/0/0) 286698624
  4          -    wu   11671 - 11672       19.88MB    (2/0/0)         40704
  5 unassigned    wm       0                0         (0/0/0)             0
  6 unassigned    wm       0                0         (0/0/0)             0
  7 unassigned    wm       0                0         (0/0/0)             0

Below is the c1t1d0
Code:
partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       2 - 11672      113.26GB    (11671/0/0) 237528192
  1       swap    wu   11673 - 14086       23.43GB    (2414/0/0)   49129728
  2     backup    wu       0 - 14086      136.71GB    (14087/0/0) 286698624
  3          -    wu       2 - 14086      136.69GB    (14085/0/0) 286657920
  4          -    wu       0 -     1       19.88MB    (2/0/0)         40704
  5 unassigned    wm       0                0         (0/0/0)             0
  6 unassigned    wm       0                0         (0/0/0)             0
  7 unassigned    wm       0                0         (0/0/0)             0

Is it my below step correct ? kindly advise me =)
Code:
# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
# metadb -a -f -c2 /dev/dsk/c1t0d0s4 /dev/dsk/c1t1d0s4
Mirror the root slice.
# metainit -f d10 1 1 c1t0d0s0
# metainit -f d20 1 1 c1t1d0s0
# metainit d0 -m d10
# metaroot d0
Mirror the swap slice.
# metainit -f d11 1 1 c1t0d0s1
# metainit -f d21 1 1 c1t1d0s1
# metainit d1 -m d11
Update /etc/vfstab
Reboot the system.
# metaroot d0
# lockfs -fa
# init 6
After reboot
# metattach d0 d20
# metattach d1 d21

# 2  
Old 02-03-2010
Correct. try to give at least 50mb for your metadb and have 3 replicas at least, for good practise.
And also remember to change your dump device :- dumpadm -d /dev/md/dsk/d1 and eeprom to point boot-device to "disk disk1"
# 3  
Old 02-03-2010
Quote:
Originally Posted by incredible
Correct. try to give at least 50mb for your metadb and have 3 replicas at least, for good practise.
And also remember to change your dump device :- dumpadm -d /dev/md/dsk/d1 and eeprom to point boot-device to "disk disk1"

# dumpadm -d /dev/md/dsk/d1
the dump device is the swap device ?

erm... how about the eeprom??? Smilie
# 4  
Old 02-03-2010
yes, dump device is the swap space
#eeprom boot-device?="disk disk1"

Btw, is your 2 disks of the same size? Did you get any errors when you did prtvtoc? Why aren't the disks of the same type? Just noticed that..
# 5  
Old 02-03-2010
You should install a bootblock on the second disk. On a SPARC machine you use:
Code:
/usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0

I think the bootblock is not covered by the SVM sync process.

Last edited by hergp; 02-03-2010 at 03:25 AM.. Reason: correct typo
# 6  
Old 02-03-2010
erm... because previously the two devices is in the veritas group.
may i need to newfs the c1t1d0 first before i create the mirror
# 7  
Old 02-03-2010
You do not need to create a filesystem on the second disk. The resync process will copy the filesystem from the first disk block by block.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Mirror root disk - V490

Got a V490 with one existing root disk. Other disk slot was never populated. Want to ensure we've got disk mirroring. Currently vfstab mounts the physical disk - no mirroring set up. Whats best way to achieve this without losing current disk? (1 Reply)
Discussion started by: psychocandy
1 Replies

2. Solaris

How to detach root mirror pool?

I have to do patching in single user mode in solaris 10 zfs root pool. Before that I have to detach the root mirror pool so that if patching fails then I can boot from detached root mirror pool. Please let me know how can I detach root pool bash-3.2# zpool status pool: rpool state: ONLINE... (5 Replies)
Discussion started by: hb00
5 Replies

3. HP-UX

What is the difference between DRD and Root Mirror Disk using LVM mirror ?

what is the difference between DRD and Root Mirror Disk using LVM mirror ? (3 Replies)
Discussion started by: maxim42
3 Replies

4. AIX

Clone or mirror your AIX OS larger disk to smaller disk ?

hello folks, I have a 300GB ROOTVG volume groups with one filesystem /backup having 200GB allocated space Now, I cannot alt disk clone or mirrorvg this hdisk with another smaller disk. The disk size has to be 300GB; I tried alt disk clone and mirrorvg , it doesn't work. you cannot copy LVs as... (9 Replies)
Discussion started by: filosophizer
9 Replies

5. Solaris

OBP - root / mirror disk syntax

Hi all Can someone explain to me the different syntax regarding how root / mirror disks are represented. I never truely understand the namely / device tress etc. Let me give you an example. On one my my servers, the root and mirror drives are :- A domain on a sunfire 6800 :- ... (6 Replies)
Discussion started by: sbk1972
6 Replies

6. Solaris

Root Mirror is broken

Hi all, Root mirror is broken under veritas control. so could you please help me how to boot the system now step by step procedure. i really thankful to all. regards krishna (3 Replies)
Discussion started by: murthy76
3 Replies

7. UNIX for Dummies Questions & Answers

why need to mirror disk if we had backups ?

hi.. newbie here, just wonder why there is a need for mirroring in some servers whereby we already had backups by cron jobs ? (4 Replies)
Discussion started by: Exposure
4 Replies

8. UNIX for Dummies Questions & Answers

disk suite to mirror both d0 and d2

I have 2 drives on a sun solaris 8 server that is a live server. I am putting in an additional 2 drives and want to mirror the the first 2. I was thinking of using disksuite but one drive is the root drive with 1 maybe 2 free paritions. The other is only one partition (36G). I was wondering... (2 Replies)
Discussion started by: csgonan
2 Replies

9. HP-UX

HP UX Disk Mirror

Being somewhat extremely new to Unix, I have just had a system crash One of my Volume Groups has crashed However, this Volume Group is actually mirrored How do I switch to use the mirrored copy? Any assistance greatly appreciated Thanks (1 Reply)
Discussion started by: cobdeng
1 Replies
Login or Register to Ask a Question