Solaris 10 Disk Mirroring

Has anyone managed to set up disk mirroring in Solaris 10 yet? If so can you point me in the direction of some useful documentation please.

Cheers

Solaris 10 DiskSuite (but I haven't personally set it up - don't have any servers with 10 on them)

An alternative solution could be to use a third-party product such as Veritas Volume Manager (VxVM).

Cheers
ZB

just had a look on the sol10 SVM and it is still the same as with the beloved disksuite... (looking forward to ZFS)
example:

gP

Actually SMC seems much improved since the last time I looked at it, although I couldn't make the web version go. Now using X windows for the first time in x years.......

smc
I just stumbled across this yesterday...bought a book to learn solaris, and it only references this command once.

Everything is launch though GUI...does anyone initiate from command-line anymore?

Most experienced people would suggest that if you can't do something from the command line that you don't know it, and any admin tool that doesn't run from the comand line, or have a command line version is 'broken'. It's not easy to script a gui.

I could probably throw my two pennies in here as I recently mirrored my Solaris 10 system (Intel) via the command line. There are many problems with this, regarding uncontrollable kernel panicking if a disk fails due to the fact the thing is trying to write to the UFS log on the defective disk - but on Intel the workaround provided by Sun doesn't workaround the problem so there are more issues... :rolleyes:

Anyway, I have written everything up in this article in the hope that it'll save others the hours of head scratching that I endured.

Ta,
ZB

Thanks for the guide ZB, I will give it a try next week...

I am running two x4200's on sol 10 and this problem has been killing me. I hope what I find works...if so, I'll do a write up too.

Thanks all.

Solaris 10 internal disks can be mirrored using hardware raid no specific external software is required for that
For example my solaris 10 internal disks are harware mirrored like the following
$ raidctl
RAID Volume RAID RAID Disk
Volume Type Status Disk Status
------------------------------------------------------
c0t0d0 IM OK c0t0d0 OK
c0t1d0 OK

If you have any array then it is a different thing
you can either use Solaris Disk Suite or Veitas Volume Manager
If it is one of the newer arrays though you can use VxVm but sun recommends using the software provided witht the array

That depends entirely on the hardware being used. It is by no means true that Solaris 10 is the enabler for this, Solaris simply provides the tools with which to manipulate some hardware that is capable of RAID.

I have found that the key to setting up RAID 1 with svm (sds) is to CONTIGUOUSLY layout the file systems during "from dvd" install on these x4200's. This has been painful, but its interesting. I still cannot tell how many gigs/megs/k a cylider equals with 8,923 cylinders on a 70G SAS drive.

I did get it all up and running using svm (metadb, metainit, metaroot, etc)

Hi

Isn't supposed that ZFS can help with that task ? I'm trusting in ZFS mirror to configure some of my customer Solaris 10 systems, of course data pools. For OS i still trust in DiskSuite.

Hope this helps

ignore my last post

# Setup the second disk (c1t1d0s2) to be identical as the primary (c1t0d0s2)
prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2

# This creates the metadatabase - you need a free slice with 100mb, we use slice 7
metadb -a -f -c 3 c1t0d0s7
metadb -a -c 3 c1t1d0s7

# Setup Volumes on the primary for /, /var and swap
metainit -f d10 1 1 c1t0d0s0
metainit -f d11 1 1 c1t0d0s1
metainit -f d13 1 1 c1t0d0s3

# Setup Volumes on the secondary for /, /var and swap
metainit d20 1 1 c1t1d0s0
metainit d21 1 1 c1t1d0s1
metainit d23 1 1 c1t1d0s3

# Setup the mirrors
metainit d0 -m d10
metainit d1 -m d11
metainit d3 -m d13

# Make a backup of /etc/vfstab
cp /etc/vfstab /etc/vfstab.orig

# Make the boot disk boot from the mirror (this will modify the /etc/vfstab)
metaroot d0

# add entries for swap and var to /etc/vfstab ( make sure you rem out the old devices)
# Below is what the /etc/vfstab should look like

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
#/dev/dsk/c1t0d0s1 - - swap - no -
#/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
#/dev/dsk/c1t0d0s3 /dev/rdsk/c1t0d0s3 /var ufs 1 no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no -
swap - /tmp tmpfs - yes -

# Run lockfs to clear and flush all data that is dirty.
lockfs -fa

# Halt system (you will now boot off the metadevices)
init 6

# Attach the submirrors
metattach d0 d20
metattach d1 d21
metattach d3 d23

metastat to check the status

Hi Maddhadder71,

# Setup the second disk (c1t1d0s2) to be identical as the primary (c1t0d0s2)
prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2

For the above command, why do you make only slice 2 of the second and primary identical and not other slices?

---------------------------------------------------------------------
# This creates the metadatabase - you need a free slice with 100mb, we use slice 7
metadb -a -f -c 3 c1t0d0s7
metadb -a -c 3 c1t1d0s7

What and Why metadatabase is setup on slice 7?

---------------------------------------------------------------------

# Attach the submirrors
metattach d0 d20
metattach d1 d21
metattach d3 d23

By attaching the two slices of the two drive what does this do?

Slice 2 is the entire disk including all other slices.

The metadatabase describes the setup. We need several copies to survive the loss of a disk. Slice 7 is something of a standard, just like root being slice 0 and swap being slice 1. Slice 2 must be the whole disk, other than that, we could use non-standard slices if we really wanted to. But standards are good.

Attaching a second slice makes it a mirror. The data is written to both slices. Reads can be satified from either slice. And if one slice dies, the data is still available from the remaining slice.

thanks Perderabo!!!

What is the main point of creating the metadatabase ? I understand is for describing the setup but is it for setting up the system disk mirrors?

by executing the command :
# metadb -a -f -c 3 c1t0d0s7

if creating the metadatabase and not mirroring the system disks then what would it use for?

Thanks