[SunHELP] config the mirror raid.

David Loesche DLoesche at yipes.com
Tue Mar 30 10:25:11 CST 2004


Document ID: ID28196
Synopsis: Solstice DiskSuite[TM] - How to mirror the root disk

  _____

Keyword(s):DiskSuite, SDS, configure, configured, configuration,
install, installing, installation

Description



Document Body





Use this procedure to mirror the system disk partitions using Solstice
DiskSuite.

Before attempting this procedure, you must have first created at least 2
state databases (replicas) on unused slices using the metadb command.

#metadb -a -f -c 2 c0t0d0s5 c1t0d0s5

The -a and -f options are used together to create the initial state
database replicas. The -c 2 option puts two state database replicas on
each specified slice, creating a total of four replicas. By spreading
the state database replicas across controllers, you can increase
metadevice performance and reliability.

Also, it is assumed that you have formatted the second disk exactly like
the original root disk. Each corresponding slice on each disk must be
the same size.

For this example, we will be mirroring all the slices on the root disk
(c0t0d0) to another equally sized disk (c1t0d0). You will have to make
the appropriate changes.

For each partition on your root disk (/, /usr, /var, /opt, /export/home,
or any other partition you may have), the following commands must be
run:

1.      For each slice, you must create 3 new metadevices: one for the
existing slice, one for the slice on the mirrored disk, and one for the
mirror. To do this, make the appropriate entries in the md.tab[1] file.
For example, for slice 0, we'll create the following entries:

2.              d10 1 1 /dev/dsk/c0t0d0s0
3.              d20 1 1 /dev/dsk/c1t0d0s0
4.              d0 -m d10

As an example for slice 1, we'll create the following entries in the
md.tab file:

   d11 1 1 /dev/dsk/c0t0d0s1
   d21 1 1 /dev/dsk/c1t0d0s1
   d1 -m d11

Follow this example, creating groups of 3 entries for each slice on the
root disk.

5.      Run the metainit command to create all the metadevices you have
just defined in the md.tab file. If you use the -a option, all the
metadevices defined in the md.tab will be created.

6.              metainit -a -f

The -f is required because the slices on the root disk are currently
mounted.

7.      Modify the entries in the /etc/vfstab file to reflect
metadevices instead of slices. Start off by making a backup copy of the
file:

8.              cp /etc/vfstab /etc/vfstab.pre_sds

Then, edit the /etc/vfstab file to change each slice to the appropriate
metadevice. Do not update the entry for the root filesystem, it will be
changed by the metaroot command in step 4. You will need to edit the
swap, /usr, /var, and any other slices in the same manner. For example,
you would need to change the swap device line from

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


to

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


Make sure that you change the slice to the main mirror (in this case,
d1) and not to the simple submirror (in this case, d11).

9.      Run the metaroot command for the metadevice you designated for
the root mirror. In the example above, we created d0 to be the mirror
device for the root partition, so we would run

10.        metaroot d0

11.  For Solstice DiskSuite versions 4.1 or greater and Solaris 9 LVM it
is necessary to lock filesystems before rebooting, so run

lockfs -fa

12.  Reboot the system. This step is necessary. Do not proceed without
rebooting your system, or data corruption will occur.

13.  After the system has rebooted, you can verify that root and other
slices are under DiskSuite's control by running the

14.          # df -k
15.          # swap -l

commands. The outputs of these commands should reflect the metadevice
names, not the slice names.

16.  Set the dump device to the correct device, using the command

17.          # dumpadm -d swap

Verify that the dump device is set correctly to swap by running the
command

   #dumpadm

18.  Lastly, attach the second submirror to the metamirror device. This
attachment, using the metattach command, must be done for each partition
on the disk, and will start the syncing of data from the current root
disk to the other. To continue our example, to add the mirror for root,
enter the command:

19.          metattach d0 d20

Even though this command returns to the shell prompt immediately, the
syncing process has begun. To follow the progress of this syncing for
this mirror, enter the command

   metastat d0

Although you can run all the metattach commands one right after another,
it is a good idea to run the next metattach command only after the first
syncing has completed. This reduces the amount of head movement on the
disk and can speed up the total time it takes to mirror all the slices
on the disk.

Once you have attached all the submirrors to the metamirrors, and all
the syncing has completed, your root disk is mirrored.





-----Original Message-----
From: sunhelp-bounces at sunhelp.org [mailto:sunhelp-bounces at sunhelp.org]
On Behalf Of viet nguyen
Sent: Tuesday, March 30, 2004 8:16 AM
To: sunhelp at sunhelp.org
Subject: [SunHELP] config the mirror raid.



Hi all,



Please show any reference, how to setup a raid mirror. What software do
i need to setup a raid mirror, Thanks



Viet nguyen.











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

Do you Yahoo!?

Yahoo! Finance Tax Center - File online. File on time.

_______________________________________________

SunHELP maillist  -  SunHELP at sunhelp.org

http://www.sunhelp.org/mailman/listinfo/sunhelp



More information about the SunHELP mailing list