You are on page 1of 5

[How To] Mirror Root Disk with Solaris Volume Manager (SVM) | UNIX Note

http://www.unixnote.com/2010/06/how-to-mirror-root-disk-with-solaris-volume-manager-svm.html[13/10/2013 07:23:25 a. m.]


RSS Feed
[How To] Mirror Root Disk with Solaris Volume Manager
(SVM)
by andy under Backup, Filesystem, Tips, Tutorial, UNIX, Volume Manager
As UNIX Systems Administrators, we want our systems up and running 24 hours a day, 7 days a week.
Though this could be achievable with the UNIX Operating Systems, we cannot set aside the fact that our
hardware equipments is prone to wear and tear. One notable point of failure if our root or boot disks. Once
it dies out our only way is thru our backup and restore it. But there is another way that we could prevent
this if we have a spare identical disk as our root disk. We can have a redundant machine by having our
root disks mirrored and make our system much reliable and omit this point of failure. Here are the step-by-
step how to guide in mirroring our root/boot disk using the Solaris Volume Manager (SVM).
Assumptions:
HDD0 - c0t 0d0 ( Pr i mar y di sk)
HDD1 - c0t 1d0
Partitions of HDD0:
/ - c0t 0d0s0
swap - c0t 0d0s1
backup - c0t 0d0s2 ( t hi s r epr esent s t he whol e di sk)
/ var - c0t 0d0s3
/ opt - c0t 0d0s4
unassi gned - c0t 0d0s7 ( t hi s woul d be used t o st or e our met adbs)
Make HDD1s partition table the same as HDD0:
r oot @sol ar i s# pr t vt oc / dev/ r dsk/ c0t 0d0s2 | f mt har d - s - / dev/ r dsk/ c0t 1d0s2
Create at least 2 (tough i prefer 3 which i will be using) state databases on each disk.
r oot @sol ar i s# met adb - af c 3 c0t 0d0s7 c0t 1d0s7
whereas:
- a = add st at e dat abase
- f = f or ce ( t hi s i s needed f or HDD0 whi ch i s mount ed)
- c # = number of st at e dat abases i n each sl i ce
Initialize each disk.
HDD0
r oot @sol ar i s# met ai ni t - f d10 1 1 c0t 0d0s0
r oot @sol ar i s# met ai ni t - f d11 1 1 c0t 0d0s1
r oot @sol ar i s# met ai ni t - f d13 1 1 c0t 0d0s3
r oot @sol ar i s# met ai ni t - f d14 1 1 c0t 0d0s4
HDD1
r oot @sol ar i s# met ai ni t - f d20 1 1 c0t 1d0s0
r oot @sol ar i s# met ai ni t - f d21 1 1 c0t 1d0s1
r oot @sol ar i s# met ai ni t - f d23 1 1 c0t 1d0s3
r oot @sol ar i s# met ai ni t - f d24 1 1 c0t 1d0s4
Initialize the mirrors.
r oot @sol ar i s# met ai ni t d0 - md10
r oot @sol ar i s# met ai ni t d1 - md11
r oot @sol ar i s# met ai ni t d3 - md13
r oot @sol ar i s# met ai ni t d4 - md14

Categories
Backup
Filesystem
Gadgets
Hardware
Internet
IT News
Scripting
Site News
Storage
Technology
Tips
Tools
Tutorial
UNIX
Volume Manager
Advetisement
7
Jun/10
Ads not by this site
Home About Privacy Policy Sitemap
Search UNIX Note!
Search
[How To] Mirror Root Disk with Solaris Volume Manager (SVM) | UNIX Note
http://www.unixnote.com/2010/06/how-to-mirror-root-disk-with-solaris-volume-manager-svm.html[13/10/2013 07:23:25 a. m.]
Metaroot and editing of /etc/vfstab to boot to our mirror.
r oot @sol ar i s# cat / et c/ vf st ab ( t o check vf st ab bef or e met ar oot )
#devi ce devi ce mount FS f sck mount mount
#t o mount t o f sck poi nt t ype pass at boot opt i ons
#
f d - / dev/ f d f d - no -
/ pr oc - / pr oc pr oc - no -
/ dev/ dsk/ c0t 0d0s1 - - swap - no -
/ dev/ dsk/ c0t 0d0s0 / dev/ r dsk/ c0t 0d0s0 / uf s 1 no -
/ dev/ dsk/ c0t 0d0s3 / dev/ r dsk/ c0t 0d0s3 / var uf s 1 no -
/ dev/ dsk/ c0t 0d0s4 / dev/ r dsk/ c0t 0d0s4 / opt uf s 1 no -
/ devi ces - / devi ces devf s - no -
ct f s - / syst em/ cont r act ct f s - no -
obj f s - / syst em/ obj ect obj f s - no -
swap - / t mp t mpf s - yes -
r oot @sol ar i s# met ar oot d0 ( onl y use t hi s f or t he r oot sl i ce)
r oot @sol ar i s# cat / et c/ vf st ab ( t o check vf st ab af t er met ar oot )
#devi ce devi ce mount FS f sck mount mount
#t o mount t o f sck poi nt t ype pass at boot opt i ons
#
f d - / dev/ f d f d - no -
/ pr oc - / pr oc pr oc - no -
/ dev/ dsk/ c0t 0d0s1 - - swap - no -
/ dev/ md/ dsk/ d0 / dev/ md/ r dsk/ d0 / uf s 1 no -
/ dev/ dsk/ c0t 0d0s3 / dev/ r dsk/ c0t 0d0s3 / var uf s 1 no -
/ dev/ dsk/ c0t 0d0s4 / dev/ r dsk/ c0t 0d0s4 / opt uf s 1 no -
/ devi ces - / devi ces devf s - no -
ct f s - / syst em/ cont r act ct f s - no -
obj f s - / syst em/ obj ect obj f s - no -
swap - / t mp t mpf s - yes -
r oot @sol ar i s# vi / et c/ vf st ab ( t o edi t t he vf st ab t o boot t o our mi r r or )
#devi ce devi ce mount FS f sck mount mount
#t o mount t o f sck poi nt t ype pass at boot opt i ons
#
f d - / dev/ f d f d - no -
/ pr oc - / pr oc pr oc - no -
/ dev/ md/ dsk/ d1 - - swap - no -
/ dev/ md/ dsk/ d0 / dev/ md/ r dsk/ d0 / uf s 1 no -
/ dev/ md/ dsk/ d3 / dev/ md/ r dsk/ d3 / var uf s 1 no -
/ dev/ md/ dsk/ d4 / dev/ md/ r dsk/ d4 / opt uf s 1 no -
/ devi ces - / devi ces devf s - no -
ct f s - / syst em/ cont r act ct f s - no -
obj f s - / syst em/ obj ect obj f s - no -
swap - / t mp t mpf s - yes -
Reboot the system
r oot @sol ar i s# l ockf s - f a
r oot @sol ar i s# shut down - y - g0 - i 6
Attach the sub-mirrors to the mirror.
r oot @sol ar i s# met at t ach d0 d20
r oot @sol ar i s# met at t ach d1 d21
r oot @sol ar i s# met at t ach d3 d23
r oot @sol ar i s# met at t ach d4 d24
Monitor the progress of the syncing process
r oot @sol ar i s# whi l e t r ue; do met ast at | gr ep %; sl eep 3; cl ear ; done
Change the core dump directory
r oot @sol ar i s# dumpadm( bef or e changi ng)
Dump cont ent : ker nel pages
Dump devi ce: / dev/ dsk/ c0t 0d0s1 ( swap)
Savecor e di r ect or y: / var / cr ash/ e3500
Savecor e enabl ed: yes
r oot @sol ar i s# dumpadm- d swap
Dump cont ent : ker nel pages
Dump devi ce: / dev/ md/ dsk/ d1 ( swap)
Savecor e di r ect or y: / var / cr ash/ e250
Savecor e enabl ed: yes
Update the boot-device parameter to boot to either HDD0 or HDD1
Check the physical device path of both disk
r oot @sol ar i s# l s - l / dev/ dsk/ c0t ?d0s0
l r wxr wxr wx 1 r oot r oot 41 J un 5 16: 49 / dev/ dsk/ c0t 0d0s0 - >
. . / . . / devi ces/ pci @1f , 4000/ scsi @3/ sd@0, 0: a
l r wxr wxr wx 1 r oot r oot 41 J un 5 16: 49 / dev/ dsk/ c0t 1d0s0 - >
. . / . . / devi ces/ pci @1f , 4000/ scsi @3/ sd@1, 0: a
Change the major name (in this case sd) to disk for the boot-device. Setting the boot-device can be done
on the Solaris or the Open Boot (ok) prompt.
Solaris
r oot @sol ar i s# eepr om" nvr amr c=deval i as r oot di sk0
/ pci @1f , 4000/ scsi @3/ di sk@0, 0: a
deval i as r oot di sk1 / pci @1f , 4000/ scsi @3/ di sk@1, 0: a"
r oot @sol ar i s# eepr om" use- nvr amr c?=t r ue"
r oot @sol ar i s# eepr omboot - devi ce
boot - devi ce=di sk net
r oot @sol ar i s# eepr om" boot - devi ce=r oot di sk0 r oot di sk1 net "
Archives
J une 2012
May 2012
April 2012
March 2012
February 2012
J anuary 2012
December 2011
November 2011
October 2011
September 2011
August 2011
J uly 2011
J une 2011
May 2011
November 2010
J une 2010
May 2010
April 2010
J anuary 2009
Social
Follow Andy
Follow UNIX Note!
Ping UNIX Note!
Blogroll
I J ust Blog
Sugar Coated Delusions
Popular on UNIX Note!
hp ilo commands
ilom cheat sheet
ufsrestore
AIX extend filesystem
wtmpx
hpilo commands
ilo ssh
ilo commands
solaris split
solaris wtmpx
wtmpx solaris 10
sunsolve
ufsdump solaris
UNIX LOGO
extend filesystem aix
Feed UNIX Note!
Subscribe in a reader
[How To] Mirror Root Disk with Solaris Volume Manager (SVM) | UNIX Note
http://www.unixnote.com/2010/06/how-to-mirror-root-disk-with-solaris-volume-manager-svm.html[13/10/2013 07:23:25 a. m.]
Open Boot (ok) prompt
ok nval i as r oot di sk0 / pci @1f , 4000/ scsi @3/ di sk@0, 0: a
ok nval i as r oot di sk1 / pci @1f , 4000/ scsi @3/ di sk@1, 0: a
ok pr i nt env boot - devi ce
boot - devi ce di sk net
ok set env boot - devi ce r oot di sk0 r oot di sk1 net
Lastly, because of the behavior of SVM (the rule half +1 state database, so we could boot into the OS) we
need to add a parameter on /etc/system
r oot @sol ar i s# echo " set md: mi r r or ed_r oot _f l ag=1" >> / et c/ syst em
Readers who found this post were searching for:
svm mirror root disk
solaris mirror root disk
root mirroring in svm
svm root mirroring
svm cheat sheet
root mirroring in solaris 10
solaris 10 mirror root disk
root disk mirroring in solaris 10
solaris volume manager cheat sheet
solaris svm mirror root
c0t0d0s0, metadb, metaroot, metastat, OBP, ok prompt, Oracle Solaris, Solaris, SVM, UFS, vfstab
Related posts
Add EMC Storage in Solaris under VxVM
Integrated Lights Out Manager (ILOM) CLI Cheat Sheet
[How To] Restore Solaris with ufsrestore
[How To] Backup Solaris with ufsdump
[Solaris Tip] SVM Soft Partition Basics
Comments

Ads not by this site
Comment using... Post to Facebook
Nagarani Kasturi
good stuff
Reply Like May 9 at 11:45pm

Reply using...
Vinodbabu Bande Acharya Nagarjuna University
simple & perfect.
Reply Like J anuary 30 at 6:04am
Comment
Add a comment...
Like
Reply
Add a Reply...
Like
[How To] Mirror Root Disk with Solaris Volume Manager (SVM) | UNIX Note
http://www.unixnote.com/2010/06/how-to-mirror-root-disk-with-solaris-volume-manager-svm.html[13/10/2013 07:23:25 a. m.]
Recent Posts
Check Runlevel on UNIX Servers
Add EMC Storage in Solaris under VxVM
Extend Filesystem under VxVM
Change EMC Powerpath Failover Policy on UNIX
Systems
Import Disk Group (DG) in VxVM
How to use snap command on AIX
Fix Garbled Solaris Console
We Sun Solve! solves SunSolve
Integrated Lights Out Manager (ILOM) CLI Cheat
Sheet
Unix or Linux Crontab Headers
Dennis Richie, one of the creators of UNIX and C
has died
Printer Management on AIX
Sun StorEdge A1000 Battery Replacement
Procedure
Clearing FMA faults on Oracle/Sun Fire
T1000/T2000
Install EMC PowerPath License on UNIX
Systems
Tags
AIX alom Android bash c0t0d0s0 chksum
CLARiiON cli console digest EMC gzip High
Availability HowTo HP HP-UX IBM
iLO iOS J FS Linux LVM md5 NBU OBP
OpenSolaris Oracle Oracle Solaris
OSX PowerPath RSC SC SDS sh
Solaris Solaris Cluster split SVM tar
UFS ufsdump UNIX VxFS VxVM ZFS
Links
CleverPlugins
Free Short URL Service
Shareaholic
Sonic Run
We Sun Solve!
Random Search Terms
get hardware info solaris 10, whats sun solaris
partition for, m9000 cheat sheet, aix extend lv,
solaris root disk mirroring, add space to aix
filesystem, space not released in solaris, hp ilo cli
commands, how to find ilo hp ip address solaris,
solaris restore from ufsdump, linux aix jfs,
powerpath remove dead symmetrix, backup with
ufsdump in linux, how do you remove dead san
paths in sun, file split & merge command in unix,
extend fs in aix, how can i reboot from solaris
console, integrated lights out manager commands,
extend lv in aix, how to detach the svm Mirror if
server Boot from CD, solaris command to find ip,
hp get ilo details from unix, increase filesystem in
aix, to delete error from fmadm faulty, solaris
volume manager unix note
Thanks to Templates Next | Powered by Andy Bernardino
Copyright 2010 UNIX Note. All rights reserved.

Reply using...
Bhanu Kumar Specialist at IBM Hyderabad
Good one
Reply Like September 14, 2012 at 3:11am

Reply using...
Anjan Mukherjee Calcutta, India
Really helpfull
Reply Like August 2, 2012 at 4:12pm
Abani J ana VS
it is not true ...............
Reply Like August 3, 2012 at 2:56am
Anjan Mukherjee Calcutta, India
kano dada......
Reply Like August 3, 2012 at 5:23pm
Ads not by this site
Ads not by this site
Reply
Add a Reply...
Like
Reply
Add a Reply...
Like
Like
Like
[How To] Mirror Root Disk with Solaris Volume Manager (SVM) | UNIX Note
http://www.unixnote.com/2010/06/how-to-mirror-root-disk-with-solaris-volume-manager-svm.html[13/10/2013 07:23:25 a. m.]
Ads not by this site
Ads not by this site

You might also like