[Sunhelp] Disk mirroring

Mariappan M marisun27 at hotmail.com
Fri Oct 27 12:57:36 CDT 2000


Here u go. Document for Disksuite is available in docs.sun.com as pdf files. 
I heard there is a bug when we u use gui. Its better to do in command line 
mode..

Mari


Example - SPARC: Creating a Mirror From root (/)
# metainit -f d11 1 1 c0t3d0s0
d11: Concat/Stripe is setup
# metainit d12 1 1 c1t3d0s0
d12: Concat/Stripe is setup
# metainit d10 -m d11
d10: Mirror is setup
# metaroot d10
# lockfs -fa
# reboot
...
# metattach d10 d12
d10: Submirror d12 is attached
# ls -l /dev/rdsk/c1t3d0s0
lrwxrwxrwx   1 root     root          88 Feb  8 15:51 /dev/rdsk/c1t3d0s0 ->
../../devices/iommu at f,e0000000/vme at f,df010000/SUNW,pn at 4d,1080000/ipi3sc at 0,0/i
d at 3,0:a,raw

------------------
Example - Creating a Mirror From /usr

# metainit -f d12 1 1 c0t3d0s6
d12: Concat/Stripe is setup
# metainit d22 1 1 c1t0d0s6
d22: Concat/Stripe is setup
# metainit d2 -m d12
d2: Mirror is setup
(Edit the /etc/vfstab file so that /usr references the mirror)
# reboot
...
# metattach d2 d22
d2: Submirror d22 is attached


The -f option forces the creation of the first concatenation, d12, which 
contains the mounted file system /usr on /dev/dsk/c0t3d0s6. The second 
concatenation, d22, is created from /dev/dsk/c1t0d0s6. (This slice must be 
the same size or greater than that of d12.) The metainit command with the -m 
option creates the one-way mirror d2 using the concatenation containing 
/usr. Next, the /etc/vfstab file must be edited to change the entry for /usr 
to reference the mirror. For example, the following line:


/dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6 /usr ufs 1 yes -


should be changed to:


/dev/md/dsk/d2 /dev/md/rdsk/d2 /usr ufs 1 yes -


After a reboot, the second submirror d22 is attached to the mirror, causing 
a mirror resync. (The system verifies that the concatenations and the mirror 
are set up, and that submirror d22 is attached.)

Example - Creating a Mirror From swap

# metainit -f d11 1 1 c0t0d0s1
d11: Concat/Stripe is setup
# metainit d21 1 1 c1t0d0s1
d21: Concat/Stripe is setup
# metainit d1 -m d11
d1: Mirror is setup
(Edit the /etc/vfstab file so that swap references the mirror)
# reboot
...
# metattach d1 d21
d1: Submirror d21 is attached


The -f option forces the creation of the first concatenation, d11, which 
contains the mounted file system swap on /dev/dsk/c0t0d0s1. The second 
concatenation, d21, is created from /dev/dsk/c1t0d0s1. (This slice must be 
the same size or greater than that of d11.) The metainit command with the -m 
option creates the one-way mirror d1 using the concatenation containing 
swap. Next, if there is an entry for swap in the /etc/vfstab file, it must 
be edited to reference the mirror. For example, the following line:


/dev/dsk/c0t0d0s1 - - swap - no -


should be changed to:


/dev/md/dsk/d1 - - swap - no -


After a reboot, the second submirror d21 is attached to the mirror, causing 
a mirror resync. (The system verifies that the concatenations and the mirror 
are set up, and that submirror d21 is attached.)


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.






More information about the SunHELP mailing list