BigAdmin System Administration Portal
Community-Submitted Tech Tip
Print-friendly VersionPrint-friendly Version
This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article. Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
 
 

VERITAS Disk Setup

by Joel Andrews

There is a known issue within VERITAS that sometimes occurs when mirroring the root disk to a disk of the same size. A workaround was previously available in Sun Info. Doc. No. 4466429. In this Tech Tip, I provide alternatives for the first and fourth steps outlined in that Sun Info. Doc.

(Note from Editor: A workaround is now available as part of a free patch description on SunSolve for different versions of the Solaris OS. For the Solaris 9 OS, see Patch-ID# 112385-05: VxVM 3.2s9: general patch for Solaris 9.)

I was able to eventually resolve the issue with the original command outlined within the Sun Info. Doc. mentioned above. It turned out that I was in fact missing some vx commands, and vxprint was one. Below I offer an alternative way to arrive at the same answer. I feel that the alternative command is more concise and comprehensive -- It is a command that any competent sys admin will be proficient with, whereas some of the VERITAS commands can be somewhat cryptic. It was through trial and error that I was able to ascertain that the sectors/cylinder number was the correct to use.

Step 1 within the Info. Doc. explains how to determine the size of the source disk's private region.

The command is as follows:

vxprint rootdiskPriv 

This command does not work all of the time. Rather than go into all the reasons why it does not work, I suggest using the following command instead:

prtvtoc /dev/rdsk/c#t#d#s2
(Note: c#t#d#s2 represents the device name.)

Once you run the command, observe the number given for sectors/cylinder. The number representing the sectors/cylinder is the one to use. Important note: The Info. Doc. instructs in step 2 to add one to the number given with regards to the output from the vxprint rootdiskPriv command. For example: If the output of the vxprint rootdiskPriv is 1215; change it to 1216. This will not be necessary with the prtvtoc /dev/rdsk/c#t#d#s2 command. Use the number as it is.

Example: (steps 1 thru 3 of the Info. Doc.)

Note: I have made the needed changes mentioned in the above instructions.

1. Determine the size of the source disk's private region.

Command: (All one line)

prtvtoc /dev/rdsk/c1t1d1s2  
(output) 10176 sectors/cylinder 

2. Use the vxdisksetup program to initialize the target disk.

Command: (All one line)

/usr/lib/vxvm/bin/vxdisksetup -i c1t2d0s2 puboffset=10176 

3. Add newly initialized target disk to the rootdg disk group.

Command: (All one line)

vxdg adddisk rootmirror=c1t2d0 

In the original Info. Doc., there is a fourth step instructing you to continue with normal mirroring of the volumes on the root disk. You can follow the instructions in the doc., but I recommend an alternative method for this fourth step.

Speaking from experience, you should handle the mirroring of the swapvol and rootvol manually. My reasoning is as follows. Because you have had to alter the private region of the target disk (puboffset=xxxxx) manually, there is a chance that you may make a mistake in your entry. I suggest running each mirror separately starting with swapvol. The swapvol is smallest and will only take a few minutes. Once it is done, you can then start mirroring rootvol. If rootvol starts with no errors, your manual change of the private region of the target disk was correct. By doing it this way you will save a lot of time. If you were to use the vxdiskadm command as stated in the original doc, the mirror of the rootvol would be done first by default. Unfortunately, because of the nature of the mirror process, you would not know of an error until the mirror of swapvol began. It can take as long as an hour for rootvol to complete.

Use the following steps in place of step 4 in the original Info. Doc. Also, don't forget to mirror swapvol first and then do rootvol.

Commands:

(To mirror swapvol)

 
vxassist -g rootdg mirror swapvol layout=nostripe alloc="rootmirror" 

Note: Use the GUI or vxtask list to monitor the progress of the mirror.

(To mirror rootvol)

 
vxassist -g rootdg mirror rootvol layout=nostripe alloc="rootmirror" 

Note: Use the GUI or vxtask list to monitor the progress of the mirror.

 


The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource.


BigAdmin