No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FAQ-How to Mirror Disks on Solaris OS

Publication Date:  2012-07-25 Views:  49 Downloads:  0
Issue Description
Q:
How to mirror disks on Solaris OS? 
 
Alarm Information
Null
Handling Process
A:
Background: In the operation manual, the chapter about disk mirroring of the N2000 BMS V200R008 only describes how to perform disk mirroring with two disks on Solaris 8 OS. It does not describe how to perform disk mirroring with four disks.
The N2000 BMS V200R011 provides scripts for mirroring the first and second disks to the later two disks on Solaris 10 OS. But how can you mirror the first disk to the second one and the third disk to the fourth one?
This case describes how to perform disk mirroring flexibly.
Note: This case considers the SUN V440 as an example and describes how to perform disk mirroring with four disks to separately mirror the used disks (disks and ) to disks and . Close the N2000 BMS and the Sybase database, install the disk mirroring software ― DiskSuite4.2.1, and then run the disk mirroring scripts.
Section 1 Mirroring Partitions
Run the root@N2000Server # df -k command to query partitions. The partitions are as follows.
Filesystem               kbytes          used        avail capacity Mounted on
/dev/dsk/c1t0d0s0    37183076  18469581 18341665    51%    /
/dev/dsk/c1t0d0s3    10327372  6231083 3993016    61%    /opt
/dev/dsk/c1t1d0s6    20981641  2634691 18137134    13%    /opt/n2000 
/dev/dsk/c1t0d0s7    14783019     147 14635042     1%    /export/home 
/dev/dsk/c1t1d0s5    49575232  13575128 35504352    28%    /opt/sybase 
Note: The first disk has three partitions. Root partitions /, opt/, and /export/home are installed separately in the partitions of the disk.
The second disk has two partitions. The N2000 BMS and the Sybase database are installed separately in these two partitions.
To synchronize the partitions of the third disk with the partitions of the first disk, run the following command:
#prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t2d0s2
In the preceding command, c0t0d0s2 indicates the existing disk and c0t2d0s2 indicates the mirrored disk.
To synchronize the partitions of the fourth disk with the partitions of the second disk, run the following command:
#prtvtoc /dev/rdsk/c0t1d0s2| fmthard -s - /dev/rdsk/c0t3d0s2
In the preceding command, c0t1d0s2 indicates the existing disk and c0t3d0s2 indicates the mirrored disk.

Section 2 Mirroring Application Disks
To mirror disk c1t1d0s2 (data disk) to disk c1t3d0s2, run the following commands:
#d50 -m d51 d52 1
#d51 1 1 c1t1d0s5
#d52 1 1 c1t3d0s5
#d60 -m d61 d62 1
#d61 1 1 c1t1d0s6
#d62 1 1 c1t3d0s6
#metattach d50 d52 //Perform synchronization
#metattach d60 d62 //Perform synchronization
By running the metastat command, you can query the progress of the synchronizations. The synchronizations take about two hours. After the synchronizations are complete, you can perform operations in section 3.

Section 3: Mirroring the System Disk
To mirror disk c1t0d0s2 (system disk) to disk c1t2d0s2, run the following commands:
#metainit -f d11 1 1 c1t0d0s0
#metainit -f d12 1 1 c1t2d0s0
#metainit d10 -m d11
#metaroot d10 //The preceding two commands must be mounted on the root partitions.
#lockfs -fa
#metainit -f d21 1 1 c1t0d0s1
#metainit -f d22 1 1 c1t2d0s1
#metainit d20 -m d21
#metainit -f d31 1 1 c1t0d0s3
#metainit -f d32 1 1 c1t2d0s3
#metainit d30 -m d31
#metainit -f d41 1 1 c1t0d0s7
#metainit -f d42 1 1 c1t2d0s7
#metainit d40 -m d41
After entering the commands, modify the /etc/vfstab file that is shown as follows:
#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/c1t0d0s1 - - swap - no -
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no -
/dev/dsk/c1t0d0s7 /dev/rdsk/c1t0d0s7 /export/home ufs 2 yes -
/dev/dsk/c1t0d0s3 /dev/rdsk/c1t0d0s3 /opt ufs 2 yes -
/dev/dsk/c1t1d0s6 /dev/rdsk/c1t1d0s6 /opt/n2000 ufs 2 yes -
/dev/dsk/c1t1d0s5 /dev/rdsk/c1t1d0s5 /opt/sybase ufs 2 yes -
swap - /tmp tmpfs - yes -

The /etc/vfstab file should be modified as follows:
#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/d20 - - swap - no -
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no -
/dev/md/dsk/d40 /dev/md/rdsk/d40 /export/home ufs 2 yes -
/dev/md/dsk/d30 /dev/md/rdsk/d30 /opt ufs 2 yes -
/dev/md/dsk/d60 /dev/md/rdsk/d60 /opt/n2000 ufs 2 yes -
/dev/md/dsk/d50 /dev/md/rdsk/d50 /opt/sybase ufs 2 yes -
swap - /tmp tmpfs - yes -
To restart the SUN server, run the following commands:
#sync;sync;sync;sync
# shutdown �y �g0 �i6
After the SUN server is started, you can start the N2000 BMS normally. To synchronize disk c1t0d0s2 and disk c1t2d0s2, run the following commands:
#metattach d10 d12
#metattach d20 d22
#metattach d30 d32
#metattach d40 d42
After the preceding operations are performed, the third disk becomes the mirrored disk of the first disk and the fourth disk becomes the mirrored disk of the second disk. 
 
Root Cause
Null
Suggestions
Null

END