solaris SVM newbie question - simply scenarios required to testing mirror

solaris SVM newbie question - simply scenarios required to testing mirror

Post by terry433ii » Sat, 26 Aug 2006 23:19:56


I'm trying to put together a README for SVM (basic stuff). I did some
messing with the metainit() commands to create metadevices....but have
no idea how to actually use
and test them. I just want to demonstrate how a RAID1 mirror works
(e.g. write
data to metadevice and then take one underlying disk offline to prove
the second disk has the data), see below for my efforts so far :-

My setup is as follows :-
platform = Sun-Fire-V890 with 5 disks running solaris9

// setup single strip metadevice
root@petrolhead> metainit d21 1 1 c1t2d0s2
d21: Concat/Stripe is setup

// ditto for 2nd metadevice
root@petrolhead>metainit d22 1 1 c1t4d0s2

//setup mirror
root@petrolhead>metainit d20 -m d21
d20: Mirror is setup

//setup filesystem on new metadevice
root@petrolhead>newfs /dev/md/rdsk/d20

So now I have /dev/md/rdsk/d20 metadevice which consists of 2 disks,
how
can I test that the mirroring works, what would be an easy yet
informative demo
to write data to this and then display the mirroring functionality of
SVM........any input appreciated.
 
 
 

solaris SVM newbie question - simply scenarios required to testing mirror

Post by j.goerk » Sat, 26 Aug 2006 23:44:12


You haven't attached the other half of the mirror yet:
root@petrolhead>metattach d20 d22

You can always check the current status with
root@petrolhead>metastat | more

and the configuration with
root@petrolhead>metastat -p

Jens
--
Jens Goerke, mobilcom Server Systeme
Postadresse: Mobilcom, Hollerstr. 126, 24782 Buedelsdorf
Besucheradresse: Am Friedrichsbrunnen, Ahlmannhallen
Tel: +49-(0)4331-69-5505 Fax: +49-(0)4331-69-5588

 
 
 

solaris SVM newbie question - simply scenarios required to testing mirror

Post by toby » Sun, 27 Aug 2006 00:27:24


I was thinking about something similar this week (fault injection so
that I could simulate recovery). But I was reasonably satisfied by
experiments such as
- taking the submirrors on one disk offline
- (pulling the disk)
- replacing the disk later and putting the submirrors online again
(Similar to a backup scenario. I have two questions for the gurus
though - why isn't a "lockfs -f" recommended before metaoffline? I
realise that lockfs on the root filesystem isn't a good idea, but
doesn't "lockfs -f" just flush without taking a lock? The man page did
not seem to clarify.)

I also tried a "recovery" sequence, similar to:
- detach submirrors
- delete metadbs
- (pull disk and replace)
- format/layout slices
- recreate metadbs
- metareplace -e (my actual test used metadetach+metaclear before
format, and metainit here)
- metattach

I need to redo the recovery test with a brand new disk.

Corrections from SVM savants welcome. I now have to work out how a ZFS
mirrored pool affects the recovery steps. :)
 
 
 

solaris SVM newbie question - simply scenarios required to testing mirror

Post by Dave Litte » Sun, 27 Aug 2006 01:08:33


Have your read through the RAID 1 information in the Solaris Volume
Manager Administration Guide?

[deletia]

Would it be simple enough to just take one of the submirrors offline?


Dave
 
 
 

solaris SVM newbie question - simply scenarios required to testing mirror

Post by js » Fri, 01 Sep 2006 08:57:22


Assuming the above commands you gave are complete, you only have attached
the submirror d21 to d20. You have not attached the d22 to d20.

Thus, you don't really have a mirror. Your mirror only consists of 1
submirror.