Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SVM/Disksuite question

Status
Not open for further replies.

MorganGreylock

Programmer
Jan 30, 2001
223
US
I have an external disk array (with 12 disks) and I'm trying to create a RAID device using SVM. I basically want a single "volume" of 6 disks, mirrored with the other 6 disks, to create one very large filesystem. I tried creating the metadevice (with metainit) and just put all the devices in the same statement, but it ended up making a 7MB mirror. (These are 36GB disks.)

Not sure what I did wrong here, but I haven't been able to find any documentation online about how to do this.

Again, this is what I'm looking for:

Local disk 1 - root disk
Local disk 2 - root mirror
(the above two disks are set up already and working fine in SVM)

Array Disk 1 -> Disk 6 = /data filesystem
Array Disk 7 -> Disk 12 = /data mirror
(this is what isn't working).

Thanks in advance for any responses.
 
Did you create one large slice occupying the whole disk on all the disks you are trying to use ?
 
Yes, however I did create a very small (~2 cylinder) slice to hold the metadb information, aside from that I used the entire disk. Does it matter which slice is used for the large slice?
 
The number doesn't matter, except if you are striping and you did not put the metadb on the end, you cannot stripe the whole disk. By convention, s2 is the whole disk, but as long as the stripes sub devices are the same size you can specify this when metainiting.
For instance, one could use s6 for the metadb's (last 2 cylinders) and s7 for everything else. Then you would just use the s7 devices to stripe.
The other option is to use concatenated metadevices but I think the performance will suffer.

If it made a 7MB metadevice, your partition tables on ALL your devices have to be off. Settle on one format, and use prtvtoc pipe to format to write the same one to all devices.

So suppose we used s7 as the data device

It would be
metainit d101 1 6 cXtYd0s7 cXtY1d1s7 ... cXtYd5s7
(you can add the -i option to specify the interlace factor)

where d101 is arbitrary, and a list of 6 disk partitions. Remember, this initializes those partitions. (this example would use drives 0-5)

Now create the second metadevice, exactly the same except with a different metadevice number and slicing:

metainit d102 1 6 cXtYd6s7 cXtYd7s7 ... cXtYd11s7

and this one drives 6-11.

Now create another metadevice, which is just a mirror:

metainit d100 -m d101
and attach the second device to the same mirror

metattach d100 d102

metastat d100 will tell you the status.

When the mirror is reattaching, the mirror devices will be in sync mode. I wait until I get OKAY state before doing operations, my preference.

Then you can newfs using the metadevice
newfs /dev/md/rdsk/d100
and restore your data.

THIS IS FROM MEMORY, SO PLEASE CONFIRM, there are plenty of links on "Solaris Volume Manager" or disksuite.

eugene





 
Thanks for the instructions... from what I recall, I think that's basically what I did. I took the vtoc from the first disk (which had cylinder 0-1 (the first two cylinders) and created the s3 partition to store the metadb info, then used s0 (I think) for cylinders 2-24619 or whatever)

The rest of the commands look very familiar, I think that's pretty much what I did, but I'll go over it again to make sure that I used the correct syntax. Thanks again.
 
Yeah, check with metastat on the creation of each metadevice. If something looks wrong, it probably is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top