Sponsored Content
Full Discussion: Mirror solaris
Operating Systems Solaris Mirror solaris Post 302080445 by kjbaumann on Tuesday 18th of July 2006 02:54:58 PM
Old 07-18-2006
I just documented mine for Solaris 8. This is using Solstice Disk Suite. The drives are c1t0d0 and c1t1d0. Hope this helps.

Install Solstice disksuite from Solaris Software, disk 2 of 2.
#cd /cdrom/sol_8_202_sparc_2/Solaris_8/EA/products/DiskSuite_4.2.1
1. run ./installer
2. default install (place in /usr/sbin) and allow reboot
Run commands below:
# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
(This causes the mirrored disk to have the exact format as the main root disk).
Run format and check that BOTH internal disks match exactly. If not, this will fail.

BOTH internal drives need to match exactly.

# metadb -a -f c1t0d0s7
# metadb -a c1t1d0s7
# metainit -f d10 1 1 c1t0d0s0
d10: Concat/Stripe is setup
# metainit -f d20 1 1 c1t1d0s0
d20: Concat/Stripe is setup
# metainit d0 -m d10
d0: Mirror is setup
# metaroot d0
# metainit -f d11 1 1 c1t0d0s1
d11: Concat/Stripe is setup
# metainit -f d21 1 1 c1t1d0s1
d21: Concat/Stripe is setup
# metainit -f d13 1 1 c1t0d0s3
d13: Concat/Stripe is setup
# metainit -f d23 1 1 c1t1d0s3
d23: Concat/Stripe is setup
# metainit d1 -m d11
d1: Mirror is setup
# metainit d3 -m d13
d3: Mirror is setup
# metainit -f d14 1 1 c1t0d0s4
d14: Concat/Stripe is setup
# metainit -f d24 1 1 c1t1d0s4
d24: Concat/Stripe is setup
# metainit d4 -m d14
d4: Mirror is setup
# metainit -f d15 1 1 c1t0d0s5
d15: Concat/Stripe is setup
# metainit -f d25 1 1 c1t1d0s5
d25: Concat/Stripe is setup
# metainit d5 -m d15
d5: Mirror is setup
# metainit -f d16 1 1 c1t0d0s6
d16: Concat/Stripe is setup
# metainit -f d26 1 1 c1t1d0s6
d26: Concat/Stripe is setup
# metainit d6 -m d16
d6: Mirror is setup

# echo “set md:mirrored_root_flag=1” >> /etc/system

edit /etc/vfstab. Use the /dev/md/dsk/d0 (or 1/3/4/5/6) instead of c1t0d0s0 (or 1/3/4/5/6)
reboot

run following commands:
# metattach d0 d20
d0: submirror d20 is attached
# metattach d1 d21
d1: submirror d21 is attached
# metattach d3 d23
d3: submirror d23 is attached
# metattach d4 d24
d4: submirror d24 is attached
# metattach d5 d25
d5: submirror d25 is attached
# metattach d6 d26
d6: submirror d25 is attached

Check progress of mirror sync. The mirroring takes 2-3 hours.
# metastat|grep -i progress

While waiting, run metastat -p | tee /etc/lvm/md.tab (captures DiskSuite config)

Then run # dumpadm -d /dev/md/dsk/d1
 

9 More Discussions You Might Find Interesting

1. Solaris

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... (3 Replies)
Discussion started by: deal732
3 Replies

2. Solaris

break solaris mirror

Hi All, How do I break the solaris 8 mirror? And how do I make sure I will point the first hd mirror on reboot. If the first break mirror won't boot. How do I make the copy mirror to boot? Thanks in advance, itik (2 Replies)
Discussion started by: itik
2 Replies

3. Solaris

x86 Sun Machine and Solaris Soft Mirror

Hi everyone, Normally it always easier in Sparc machine, i can set or manually use the boot-device in NVram to boot the mirrored disk. However I have a big trouble about x86 mirror for a long time. I have been doing anything i can: search document, google, ask the others. Recently i did as... (5 Replies)
Discussion started by: tien86
5 Replies

4. Solaris

How to create mirror disk in solaris machine?

hi, I'm newbie in Solaris 10. can someone explain me the steps of how to create mirror disk in Solaris machine. thanks in advance (5 Replies)
Discussion started by: Wong_Cilacap
5 Replies

5. Solaris

Create a boot disk mirror on Solaris 10 x86

I’m setting up a boot disk mirror on Solaris 10 x86. I’m used to doing it on SPARC, where you can copy the partition table using fmthard. My x86 boot disk has 2 primary partitions, a Solaris one and a diagnostic one. Is there a way to copy those 2 primary partitions to the second disk without... (6 Replies)
Discussion started by: TKD
6 Replies

6. Solaris

Solaris patching using mirror disk backup? need help!

hi friends, need help.. it is my first time patching using mirror disk backup approach, not so sure about the steps :confused: how do you detach, patch it, boot it and reattach it ? any kind soul here can advise ? thanks in advance..:) below is the information from my machine: Filesystem ... (3 Replies)
Discussion started by: Exposure
3 Replies

7. Solaris

Healthy mirror on Solaris 10

Dear All I have question and I want some one to answer it .. in Solaris 10 I have two mirrors as below .. c3t0d0s0 & c3t1d0s0 NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ... (1 Reply)
Discussion started by: top.level
1 Replies

8. HP-UX

What is the difference between DRD and Root Mirror Disk using LVM mirror ?

what is the difference between DRD and Root Mirror Disk using LVM mirror ? (3 Replies)
Discussion started by: maxim42
3 Replies

9. Solaris

Solaris 9 x86 check disk mirror status

We have Proliant DL380 G2 running Solaris 9 x86 There are 6 physical disks installed which I believe are mirrored at hardware level to 3 sets to present 3 disks to the OS. Is there any way to check the mirror status at OS level ? I am guessing not and it may need a trip to site as we have no... (4 Replies)
Discussion started by: frustrated1
4 Replies
metarename(1M)						  System Administration Commands					    metarename(1M)

NAME
metarename - rename metadevice or switch layered metadevice names SYNOPSIS
/usr/sbin/metarename [-s setname] metadevice1 metadevice2 /usr/sbin/metarename [-s setname] [-f] -x metadevice1 metadevice2 /usr/sbin/metarename -h DESCRIPTION
There are two ways to use metarename, one with and one without the -x option. The first method (without -x) renames an existing metadevice to a new name. This makes managing the metadevice namespace easier. The metadevice being renamed cannot be mounted or open, nor can the new name already exist. For example, to rename a metadevice that contains a mounted file system, you would first need to unmount the file sys- tem. With the second way to use metarename, using the -x option, metarename switches (exchanges) the names of an existing layered metadevice and one of its subdevices. In Solaris Volume Manager terms, a layered metadevice can be either a mirror or a trans metadevice. The -x option enables you to switch the metadevice names of a mirror and one of its submirrors, or a trans metadevice and its master device. metarename -x makes it easier to mirror or unmirror an existing stripe or concatenation, and to remove a trans device. When used to mirror an existing stripe or concatenatation, you must stop access to the device. For example, if the device contains a mounted file system, you must first unmount the file system before doing the rename. You can also use the metarename -x command to untrans a trans metadevice from an existing device. This applies only to the master device. You cannot remove a logging device with metarename. Before you can rename a trans device, you must detach the logging device. Then you must stop access to the trans metadevice itself. You cannot rename or switch metadevices that are in an error state or that have subcomponents in an error state, or metadevices actively using a hot spare replacement. You can only switch metadevices that have a direct child/parent relationship. You could not, for example, directly exchange a stripe in a mirror that is a master device with the trans metadevice. You must use the -f flag when switching members of a trans metadevice. Only metadevices can be switched, not slices. OPTIONS
The following options are supported: -f Force the switching of trans metadevice members. -h Display a help message. -s setname Specifies the name of the diskset on which metarename will work. Using the -s option will cause the command to perform its administra- tive function within the specified diskset. Without this option, the command will perform its function on the local metadevices. -x Exchange the metadevice names metadevice1 and metadevice2. metadevice1 Specifies the metadevice to be renamed or switched. metadevice2 Specifies the target metadevice name for the rename or switch operation. EXAMPLES
Example 1: Renaming a Metadevice This example renames a metadevice named d10 to d100. Note that d100 must not exist for the rename to succeed. # metarename d10 d100 Example 2: Creating a Two-Way Mirror This example creates a two-way mirror from an existing stripe named d1 with a mounted file system, /home2. # metainit d2 1 1 c13d0s1 # metainit -f d20 -m d1 # umount /home2 # metarename -x d20 d1 # metattach d1 d2 # mount /home2 First, a second concatenation d2, is created. (d1 already exists.) The metainit command creates a one-way mirror, d20, from d1. Next, you umount the file system and switch d1 for d20, making d1 the top-level device (mirror). You attach the second submirror, d2, to create a two-way mirror. Lastly, you remount the file system. Example 3: Mounting a Mirrored File System on Stripe This example takes an existing mirror named d1 with a mounted file system, and ends up with the file system mounted on a stripe d1. # umount /fs2 # metarename -x d1 d20 # metadetach d20 d1 # metaclear -r d20 # mount /fs2 First, you unmount the file system, then switch the mirror d1 and its submirror d20. This makes the mirror into d20. Next, you detach d1 from d20, then delete the mirror d20 and its other submirror. You then remount the file system. Example 4: Deleting a Trans Metadevice This example deletes a trans metadevice named d10 while its mount point is /myhome. The master device, which is a stripe, is named d2. The logging device, also a stripe, is named d5. # umount /myhome # metadetach d10 # metarename -f -x d10 d2 # metaclear d2 # metaclear d5 # fsck /dev/md/dsk/d10 # mount /myhome You umount the file system first, then detach the trans metadevice's logging device. The trans metadevice is switched with the master device, making the trans metadevice d2 and the underlying stripe d10. You clear the trans metadevice d2 and the logging device d5. d10 must be fsck'd, and then the file system is remounted. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmdu | +-----------------------------+-----------------------------+ SEE ALSO
mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metarecover(1M), metareplace(1M), metaroot(1M), metaset(1M), metassist(1M), metastat(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4), mddb.cf(4), md.tab(4), attributes(5), md(7D) Solaris Volume Manager Administration Guide LIMITATIONS
Renaming and exchanging metadevice names can only be used for metadevices. A physical slice cannot be renamed to a metadevice, nor can a metadevice be exchanged with a physical slice name. Metadevice names are strings of the pattern d<xyz> where xyz is a value between 0 and 8192. You cannot use logical names for metadevices. NOTES
Trans metadevices have been replaced by UFS logging. Existing trans devices are not logging--they pass data directly through to the under- lying device. See mount_ufs(1M) for more information about UFS logging. SunOS 5.10 8 Aug 2003 metarename(1M)
All times are GMT -4. The time now is 10:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy