mirroring with disksuite


 
Thread Tools Search this Thread
Operating Systems Solaris mirroring with disksuite
# 1  
Old 11-04-2008
mirroring with disksuite

hi all,
i want to mirror two disks with disksuite under solaris 9 , doses smeone can explain me Briefly the essential steps to do that plz ?

Last edited by lid-j-one; 11-04-2008 at 07:20 AM.. Reason: spelling errors
# 2  
Old 11-04-2008
Mirroring disks with DiskSuite Example

The current partition table of c0t0d0:

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 812 400.15MB (813/0/0) 819504
1 swap wu 813 - 1333 256.43MB (521/0/0) 525168
2 backup wm 0 - 17659 8.49GB (17660/0/0) 17801280
3 unassigned wm 1334 - 1354 10.34MB (21/0/0) 21168
4 var wm 1355 - 8522 3.45GB (7168/0/0) 7225344
5 usr wm 8523 - 14764 3.00GB (6242/0/0) 6291936
6 unassigned wm 14765 - 16845 1.00GB (2081/0/0) 2097648
7 home wm 16846 - 17658 400.15MB (813/0/0) 819504

1. Copy the partition table of the first disk to its mirror.
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2

2. Create at least 2 DiskSuite state database replicas on each disk. A state database replica contains DiskSuite configuration and state information.
# metadb -a -f -c2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t1d0s3

Description of metadb flags:
-a -- adding
-f -- force (needed the first time creating databases)
-c2 -- create 2 databases in each slice

3. Mirror the root slice.
# metainit -f d10 1 1 c0t0d0s0
# metainit -f d20 1 1 c0t1d0s0
# metainit d0 -m d10
# metaroot d0 (Use this command only on the root slice!)

4. Mirror the swap slice.
# metainit -f d11 1 1 c0t0d0s1
# metainit -f d21 1 1 c0t1d0s1
# metainit d1 -m d11

5. Mirror the var slice.
# metainit -f d14 1 1 c0t0d0s4
# metainit -f d24 1 1 c0t1d0s4
# metainit d4 -m d14

6. Mirror the usr slice.
# metainit -f d15 1 1 c0t0d0s5
# metainit -f d25 1 1 c0t1d0s5
# metainit d5 -m d15

7. Mirror the opt slice.
# metainit -f d16 1 1 c0t0d0s6
# metainit -f d26 1 1 c0t1d0s6
# metainit d6 -m d16

8. Mirror the home slice.
# metainit -f d17 1 1 c0t0d0s7
# metainit -f d27 1 1 c0t1d0s7
# metainit d7 -m d17

Run metastat metadevice for information on a metadevice. If you wish to delete a metadevice, run metaclear metadevice.

9. Update /etc/vfstab to mount the mirrors after boot.

/etc/vfstab before changes:

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no logging
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /usr ufs 1 no ro,logging
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /var ufs 1 no nosuid,logging
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /home ufs 2 yes nosuid,logging
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /opt ufs 2 yes nosuid,logging
swap - /tmp tmpfs - yes -

/etc/vfstab after changes:

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no logging
/dev/md/dsk/d5 /dev/md/rdsk/d5 /usr ufs 1 no ro,logging
/dev/md/dsk/d4 /dev/md/rdsk/d4 /var ufs 1 no nosuid,logging
/dev/md/dsk/d7 /dev/md/rdsk/d7 /home ufs 2 yes nosuid,logging
/dev/md/dsk/d6 /dev/md/rdsk/d6 /opt ufs 2 yes nosuid,logging
swap - /tmp tmpfs - yes -

10. Reboot the system.
# lockfs -fa
# init 6

11. Attach the second submirror to the mirror. This will cause the data from the boot disk to be synchronized with the mirrored drive.

# metattach d0 d20
# metattach d1 d21
# metattach d4 d24
# metattach d5 d25
# metattach d6 d26
# metattach d7 d27

You can run metastat to track the mirroring progress.

12. Change the crash dump device to the DiskSuite swap metadevice (Solaris 7 and later).
# dumpadm -d `swap -l | tail -1 | awk '{print $1}'`

13. Determine the physical device path of the mirror disk.
$ ls -l /dev/dsk/c0t1d0s0
lrwxrwxrwx 1 root root 50 Jan 16 10:20 /dev/rdsk/c0t1d0s0 -> ../../devices/pci@1f,0/pci@1,1/ide@3/dad@1,0:a

Replace the major name (e.g. dad) in the physical device path with disk when creating the device alias below.

14. Create a mirror device alias for the mirror disk:
# eeprom "nvramrc=devalias mirror /pci@1f,0/pci@1,1/ide@3/disk@1,0:a"
# eeprom "use-nvramrc?=true"

You can also configure the device alias from the Open Boot (ok) prompt:
nvalias mirror /pci@1f,0/pci@1,1/ide@3/disk@1,0:a

You may want to add the mirror device alias to the boot-device Open Boot parameter in case of a problem with the standard boot device.

Example:

# eeprom boot-device
boot-device=disk net

In case of a problem with the disk device alias, the system will attempt to boot from the mirror device alias and then the network with the following change.
# eeprom "boot-device=disk mirror net"

From the Open Boot prompt, type boot mirror to boot from the mirror disk.

15. If you only have two internal disks (i.e. the boot disk and mirror disk), consider adding the following parameter to /etc/system to bypass the SVM/DiskSuite "quorum" rule.

set md:mirrored_root_flag = 1

Without this parameter, the system will not boot in multiuser mode if half or fewer of its state database replicas are available.
# 3  
Old 11-04-2008
thank you very much you are the best
# 4  
Old 11-05-2008
Quote:
Originally Posted by incredible
Mirroring disks with DiskSuite Example

The current partition table of c0t0d0:

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 812 400.15MB (813/0/0) 819504
1 swap wu 813 - 1333 256.43MB (521/0/0) 525168
2 backup wm 0 - 17659 8.49GB (17660/0/0) 17801280
3 unassigned wm 1334 - 1354 10.34MB (21/0/0) 21168
4 var wm 1355 - 8522 3.45GB (7168/0/0) 7225344
5 usr wm 8523 - 14764 3.00GB (6242/0/0) 6291936
6 unassigned wm 14765 - 16845 1.00GB (2081/0/0) 2097648
7 home wm 16846 - 17658 400.15MB (813/0/0) 819504

1. Copy the partition table of the first disk to its mirror.
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2

2. Create at least 2 DiskSuite state database replicas on each disk. A state database replica contains DiskSuite configuration and state information.
# metadb -a -f -c2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t1d0s3

Description of metadb flags:
-a -- adding
-f -- force (needed the first time creating databases)
-c2 -- create 2 databases in each slice

3. Mirror the root slice.
# metainit -f d10 1 1 c0t0d0s0
# metainit -f d20 1 1 c0t1d0s0
# metainit d0 -m d10
# metaroot d0 (Use this command only on the root slice!)

4. Mirror the swap slice.
# metainit -f d11 1 1 c0t0d0s1
# metainit -f d21 1 1 c0t1d0s1
# metainit d1 -m d11

5. Mirror the var slice.
# metainit -f d14 1 1 c0t0d0s4
# metainit -f d24 1 1 c0t1d0s4
# metainit d4 -m d14

6. Mirror the usr slice.
# metainit -f d15 1 1 c0t0d0s5
# metainit -f d25 1 1 c0t1d0s5
# metainit d5 -m d15

7. Mirror the opt slice.
# metainit -f d16 1 1 c0t0d0s6
# metainit -f d26 1 1 c0t1d0s6
# metainit d6 -m d16

8. Mirror the home slice.
# metainit -f d17 1 1 c0t0d0s7
# metainit -f d27 1 1 c0t1d0s7
# metainit d7 -m d17

Run metastat metadevice for information on a metadevice. If you wish to delete a metadevice, run metaclear metadevice.

9. Update /etc/vfstab to mount the mirrors after boot.

/etc/vfstab before changes:

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no logging
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /usr ufs 1 no ro,logging
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /var ufs 1 no nosuid,logging
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /home ufs 2 yes nosuid,logging
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /opt ufs 2 yes nosuid,logging
swap - /tmp tmpfs - yes -

/etc/vfstab after changes:

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no logging
/dev/md/dsk/d5 /dev/md/rdsk/d5 /usr ufs 1 no ro,logging
/dev/md/dsk/d4 /dev/md/rdsk/d4 /var ufs 1 no nosuid,logging
/dev/md/dsk/d7 /dev/md/rdsk/d7 /home ufs 2 yes nosuid,logging
/dev/md/dsk/d6 /dev/md/rdsk/d6 /opt ufs 2 yes nosuid,logging
swap - /tmp tmpfs - yes -

10. Reboot the system.
# lockfs -fa
# init 6

11. Attach the second submirror to the mirror. This will cause the data from the boot disk to be synchronized with the mirrored drive.

# metattach d0 d20
# metattach d1 d21
# metattach d4 d24
# metattach d5 d25
# metattach d6 d26
# metattach d7 d27

You can run metastat to track the mirroring progress.

12. Change the crash dump device to the DiskSuite swap metadevice (Solaris 7 and later).
# dumpadm -d `swap -l | tail -1 | awk '{print $1}'`

13. Determine the physical device path of the mirror disk.
$ ls -l /dev/dsk/c0t1d0s0
lrwxrwxrwx 1 root root 50 Jan 16 10:20 /dev/rdsk/c0t1d0s0 -> ../../devices/pci@1f,0/pci@1,1/ide@3/dad@1,0:a

Replace the major name (e.g. dad) in the physical device path with disk when creating the device alias below.

14. Create a mirror device alias for the mirror disk:
# eeprom "nvramrc=devalias mirror /pci@1f,0/pci@1,1/ide@3/disk@1,0:a"
# eeprom "use-nvramrc?=true"

You can also configure the device alias from the Open Boot (ok) prompt:
nvalias mirror /pci@1f,0/pci@1,1/ide@3/disk@1,0:a

You may want to add the mirror device alias to the boot-device Open Boot parameter in case of a problem with the standard boot device.

Example:

# eeprom boot-device
boot-device=disk net

In case of a problem with the disk device alias, the system will attempt to boot from the mirror device alias and then the network with the following change.
# eeprom "boot-device=disk mirror net"

From the Open Boot prompt, type boot mirror to boot from the mirror disk.

15. If you only have two internal disks (i.e. the boot disk and mirror disk), consider adding the following parameter to /etc/system to bypass the SVM/DiskSuite "quorum" rule.

set md:mirrored_root_flag = 1

Without this parameter, the system will not boot in multiuser mode if half or fewer of its state database replicas are available.


Grate incredible...... Good info......
Really appriciate.....Smilie

Thanks....Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Disksuite question

Hello all, I have a Solaris Disksuite question :- I will be adding 4 new drives to an E250 server and need will be configuring 2 striped volumes each consisting 2 new disks with SVM. In the end i will have 2 volumes each of 72gb. So in effect i will have 1 volume called D7 and another volume... (6 Replies)
Discussion started by: commandline
6 Replies

2. Solaris

disksuite mirroring d0 to d2 and d1 to d3

I have a SOlaris 10 v240 server. I'm installing disksuite to mirror the root drive D0 to D2. I also have one partition on disk 1 that I want to mirror to D3. I am not using ZFS right now. Can I add that to my initial mirroring configuration or can I only mirror 1 drive to 1 drive? Can I... (2 Replies)
Discussion started by: csross
2 Replies

3. Solaris

Looking for Solstice DiskSuite 4.2

Hi all, Do you know where I can download Soltice Disksuite 4.2 for Solaris 2.6 ? I haven't the CD labeled “Solaris Server Intranet Extensions 1.0” . Thanks in advance for your precious help. Bests Regards Hosni (2 Replies)
Discussion started by: hosni
2 Replies

4. Solaris

DiskSuite dilemma

Hello, We have this system a SunFire 280R running Solaris 8 Generic_117350-46. It has 2 36GB disks in it. They are mirrored with DiskSuite 4.2.1. When we execute a metastat all the devices report an Okay status, but when we go into metatool everything is in the Critical (maintenance)... (4 Replies)
Discussion started by: mgb
4 Replies

5. Solaris

DiskSuite mirroring on x86 ?

Hi there , I have a 4 disk SunFire X4100 (x86) and my customer has specified that they want their disks to be in a mirrored configuration ....my understanding was that DiskSuite (or whatever its called now) didnt support x86, is this the case and if so, does anybody know of any options (preferably... (6 Replies)
Discussion started by: hcclnoodles
6 Replies

6. UNIX for Dummies Questions & Answers

Solaris 10 disksuite

We recently got a third party in to upgrade our solaris 8 sparc server to solaris 10. A few month later I now have a disk mirror problem that I would normally fix by going into the GUI screen "metatool" It appears that the third party didn't install disksuite after the upgrade. Does anyone know... (10 Replies)
Discussion started by: miredale
10 Replies

7. UNIX for Dummies Questions & Answers

disksuite with no free partitions

I have a live server and I want to mirror the root drive (c1t0d0) to drive 2 (c1t2d0). I have maybe one free slice. I've read that I can take from swap to use for the replicas? 1) How is that done? 2) If I have no free partitions, how can I use swap for both replicas? 3) Can this be... (0 Replies)
Discussion started by: csgonan
0 Replies

8. UNIX for Dummies Questions & Answers

disksuite and raidctl used together

I have a live Sunfire v440 server with 4 drives and I want to mirror drive 0 & 1 to 2 & 3. The on-board raid controller only allows for 1 live mirror. I was thinking of disksuite, but unfortunately the second disk is just one large partition with no free slices. I was thinking of using... (0 Replies)
Discussion started by: csgonan
0 Replies

9. Solaris

Solstice DiskSuite

Has anybody every used Solstice DiskSuite? I am having trouble setting it up. I installed it without a problem, but do I really have to blow away the drives on the D1000 just to create a metastate database? (8 Replies)
Discussion started by: hshapiro
8 Replies

10. UNIX for Dummies Questions & Answers

Disksuite questions

Is this correct if I have to create 2 partions of 100 Gigs each? (spread accross (6) 36 Gig drives) AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@1f,4000/scsi@3/sd@0,0 1. c0t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> ... (10 Replies)
Discussion started by: finster
10 Replies
Login or Register to Ask a Question