Disk Mirror in Solaris 9 via Solaris Volume Manager

Hello,

I am trying to do mirror in solaris 9. I have total 0-7 disks

4 5 6 7
0 1 2 3

Drive 0 and Drive 4 = Boot Drives

Need to Mirror following drives.

Drive 1 and Drive 5 = Need to mirror

Drive 1 was mounted on: /prod1, /prod2, /prod3, /prod4, /prod5.

Then i have umount from /prod1----/prod5.

I have done following steps.

metadb -a -f /dev/dsk/c1t1d0s7
metadb -a -f /dev/dsk/c1t5d0s7

2)

metainit -f d100 1 1 c1t1d0s0
metainit -f d101 1 1 c1t5d0s0
metainit d0 -m d100
metattach d0 d101

3)

newfs /dev/md/rdsk/d0

4)

mount -F ufs /dev/md/dsk/d0 /prod1

Now, target 5 is submirror with target 1 mirror. Do i need to submirror drive 1 also, in order to mirror each other?

for example:

metainit -f d102 1 1 c1t5d0s0
metainit -f d103 1 1 c1t1d0s0
metainit d1 -m d102
metattach d1 d103

Let me know.

Thanks

Adeel

no, that's not necessary.

metainit -f d100 1 1 c1t1d0s0
metainit -f d101 1 1 c1t5d0s0
this creates the meta-devices

metainit d0 -m d100
here you define that d0 is a mirror which contains d100 as a submirror. but right now, it's only a one-side mirror...

metattach d0 d101
here you attach the second half of the mirror.

gP

can i do two side mirror aslo?

-deal732

if you mean "metainit d0 -m d100 d101 1" to create the mirror in one command, well, i've tried it once and yes, it worked, but the man page says:

 mirror -m submirror
       Specifies the metadevice name of the  mirror.  The  -m
       indicates  that the configuration is a mirror. submir-
       ror is a metadevice \(stripe  or  concatentation\)  that
       makes  up  the  initial one-way mirror. Volume Manager
       supports a maximum of four-way mirroring. When  defin-
       ing mirrors, first create the mirror with the metainit
       command as a one-way mirror.  Then  attach  subsequent
       submirrors  using  the  metattach command. This method
       ensures that Volume Manager properly  syncs  the  mir-
       rors.  \(The  second  and any subsequent submirrors are
       first created using the metainit command.\)

regards pressy