Friday, January 1, 2010

Veritas Volume Manager FAQ 3

Note that the first 28 questions have answers related to using the command line. Sun do not normally support this method of bottom up creation of volumes. An explanation of why can be seen in Q97. The questions are designed to give you an idea of what goes on in the background. However, if at all possible, use the GUI.

71. How do I change the WWN of a Sparc Storage Array ?

72. When I try to encapsulate the boot disk I get the errornot enough free partitions. Why ?

73. I want to move a Volume out of one dg into another, all the disks in the original dg are part of the Volume. How do I do it ?

74. How do I import diskgroup's on dual ported SSA's ?

75. How do I Start/Stop a disk tray on a SSA ?

76. How do I get a plex out of being in a stale state ?

77. How do I change the hostname info on the private regions ?

78. Can I encapsulate a disk that has no free space for a private region ?

79. How can I get iostat to report the disks as c#t#d# instead of sd# ??

80. How can I get round the errorvolume locked by another utility when trying to detach a plex ?

81. Veritas Volume Manager Disaster Recovery Guide

82. Can I use prestoserve with the SSA ??

83. Can I grow the root filesystem online ??

84. Can I change the hostname of a machine without affecting Volume Manager ??

85. Can I move some Volumes from one dg to another ??

86. Can I test the SOC from the ok prompt ??

87. Can I restore the rootdisk from backup ??

88. Can I make my SparcStation to wait for the SSA to spin up ??

89. Can I move a SSA to a new system and save the data on it ??

90. Can I have a rootdg, without encapsulating a disk ??

91. Can I Increase the Size of the private region, because when I try and add a volume to a dg I getvxvm:vxassist: ERROR: No more space in disk group configuration

92. Cannot import Diskgroup - "No configuration copies"

93. My volume is ENABLED/SYNC but doesn't appear to be a syncing process running (i.e. vxrecover). What do I do ?

94. How can I view the contents of my Private Region ?

95. I need to change the hostname in my Private Regions and my /etc/vx/volboot file. How do I do it ?

96. Veritas has changed my VTOC layout when it encapsulated my rootdisk. How do I recover my original VTOC?

97. My volume won't start. I think it may be due to my volume not on a cylinder boundary. How can I determine if this is true ?

98. Why can't I simply mirror back my seconday rootdisk mirror to my primary rootdisk mirror if my primary disk fails ?

99. How can I make hot-relocation use ONLY spare disks ?

100. How do I enable debug mode on vxconfigd ?

101. How do I disable DMP, dynamic multi-pathing ?

102. How do I take a disk out from under Veritas control ?

103. Volume Manager has relayed out my VTOC after encapsulation. I now need to get back my original VTOC but there is no original in /etc/vx/reconfig.d/disk.d/vtoc. How can I get back my /opt filesystem ?

104. What are the different status codes in a 'vxdisk list' output ?

105. How do I delete a disk from a disk group ?

106. How can I fix "vxvm: WARNING: No suitable partition from swapvol to set as the dump device." ?

107. After an A5000 disk failure, I lost my rootdg and now I getvxvm:vxdisk: ERROR: Cannot get records from vxconfigd: Record not in disk groupwhen I runvxdisk listandvxvm:vxdctl: ERROR: enable failed: System error occurred in the clientwhen I runvxdctl enable. How can I fix it ?

108. After some A5000/Photon loop offline/onlines, my volume now has one plex in STALE state and the other in IOFAIL. How can I fix this ?

109. Is there any VxVM limitation on the number of volumes which can be created on a system ?

110. Configuration copies explained

71. How do I change the WWN of a Sparc Storage Array ?

It has become evident that there are times when it is advantageous to
change the World-Wide Number (WWN) for a particular SPARCstorage Array
(SSA), such as after replacing the array controller. Up until the
release of Solaris 2.4 HW 3/95 this entailed a delicate sequence of
steps to modify the device tree enough to recognize the new array
controller, download the old address and then restore the original
devices and links to the array disks.Now that the SSA drivers are bundled in the O/S (Sol2.4 3/95 and higher)
this operation can be completed much more easily using the cdrom
shell. The only difficulties that present themselves are obtaining the
old WWN and the fact that the cdrom shell does not include the
ssaadm(1M) or ssacli(1M) utilities. Not to worry, we can do this.

The Procedure:
--------------
1) Boot cdrom and mount O/S

ok boot cdrom -sw ; boot the single-user cdrom shell
# mount -o ro /dev/dsk/c0t0d0s0 /a ; provides RO access to "root"

NOTE: In the case of a single large / (no separate /usr, /opt, etc)
this is all you need to mount. Otherwise, also mount 'usr' and 'opt'
on /a/usr and /a/opt. Use the /a/etc/vfstab for reference.

NOTE2: Use of the "-o ro" mount will prevent superblock consistency
problems in the case of mirrored system disks.

2) Obtain old WWN value
# ls -l /a/dev/dsk/cNt0d0s2 ; where N is old controller #
/dev/dsk/c3t0d0s2 ->../../devices/io-unit@f,e1200000/sbi@0,0/
SUNW,soc@1,0/SUNW,pln@b00008000,201831c9/sd@0,0:c
^^^^^^^^^^^^^
The WWN is 12 digits long made up of the first four digits LEFT
of the comma followed by the next eight digits RIGHT after the
comma (zero fill if necessary). In this case "8000201831c9".
If you happen to have the output of "ssaadm display cN" or
"ssacli display cN" handy the "Serial Num:" field shows the
correct WWN value.

3) Locate the new array controller
# ls -l /dev/dsk/c*t0d0s2 | grep NWWN ; where NWWN is the four digits
; appearing in the SSA display
a match will come from controller N

4) Download the old address to the new controller
/a/opt/SUNWssa/bin/ssacli -s -w 8000201831c9 download cN
OR
/a/usr/sbin/ssaadm download -w 8000201831c9 cN

5) Reset the system
# umount
# halt
Press "Reset" on the back of the SSA.
ok boot

This should NOT require a reconfiguration, and should have you right back
where you started before the SSA controller was replaced.

As you might imagine, this position in the cdrom shell, with working
SSA devices and drivers loaded allows you to accomplish many other
tasks as well.
Don Finch
SunService

History:
10/31/95 - Original document.
11/01/95 - Clarified WWN info, per Manuel Cisnero's input (Thanks!)
03/05/96 - Specified read-only mount for /a to avoid problems with
mirrored system disk configurations. Thanks to Bob Deguc
of the NTC for catching this potential gotcha.
- Removed Power-Cycle of SSA, reset is easier and less apt to cause trouble.
72. When I try to encapsulate the boot disk I get the error "not enough free partitions". Why ?

Basically you need 2 free partitions (1 for the public
region, and 1 for the private region). You can't use slice 2 since this
is the whole disk. Effectively this mean's you need 3 free partition's
to encapsulate the disk. You'd have to repartition the disk making sure
there's 2 free partitions, and then try again...
73. I want to move a Volume out of one dg into another, all the disks in the original dg are part of the Volume. How do I do it ?

In this example we will be moving a volume called "data_vol01"
from a disk group called "old_dg" to a disk group called "new_dg"
and all the disks in disk group "old_dg" are part of this volume
we're also assuming that the diskgroup "new_dg" already exists...the volume is a stripe consisting of 2 disks......

1. list the group that you want to take the volume from..
# vxprint | grep old_dgc2t0d0s2 sliced martin01 old_dg online
c2t1d0s2 sliced martin02 old_dg online2. umount the volume...
# umount /martin13. Display the Configuration
# vxprint -ht -g old_dg| dg | old_dg | default | default | 57000 | 818174277.1121.p4m-ods |

dmmartin01c2t0d0s2sliced15194152640-
dmmartin02c2t1d0s2sliced15194152640-
vdata_vol01fsgenENABLEDACTIVE1024000SELECTdata_vol01-01
pldata_vol01-01data_vol01ENABLEDACTIVE1024496STRIPE2/128RW
sdmartin01-01data_vol01-01martin0105122400/0c2t0d0ENA
sdmartin02-01data_vol01-01martin0205122401/0c2t1d0ENA4. Get the volume config and store it in the file /tmp/movers
# vxprint -hmQq -g old_dg data_vol01 > /tmp/movers5. Stop the Volume
# vxvol -g old_dg stop data_vol016. Remove the volume from the configuration database in that dg
# vxedit -g old_dg -r rm data_vol017. Remove the 1st disk from the disk group
# vxdg -g old_dg rmdisk martin018. Too remove the last disk you have to deport it....
# vxdg deport old_dg9. As the disk group new_dg already exists we don't have to bother
issuing the "vxdg init new_dg martin01=c2t0d0s2" command10. We just add the two disks.....
# vxdg -g new_dg adddisk martin01=c2t0d0s2
# vxdg -g new_dg adddisk martin02=c2t1d0s211. Reload the volume configuration stored in /tmp/movers
# vxmake -g new_dg -d /tmp/movers12. Re-start the volume
# vxvol -g new_dg init active data_vol0113. Mount the volume & check it's ok.....
# mount /dev/vx/new_dg/data_vol01 /martin1
# cd /martin1
# ls -l
total 414592
-rw-r-r- 1 root other 2420736 Dec 5 14:03 etc.dir
-rw------T 1 root other 209715200 Dec 5 14:02 hello
drwx------ 2 root root 8192 Dec 5 14:01 lost+found14. You now need to edit /etc/vfstab so the mount point is correct....

74. How do I import diskgroup's on dual ported SSA's ?

If SSA linked to two systems and one system fails

To list groups out there
# vxdiskadm
8 Enable access to (import) a disk group
list To force the import of a disk group
# vxdg -fC import disk_group To start the volumes
# vxvol -g disk_group -f start vol01 vol02 vol03 etc.. To mount volumes
# mount /dev/vx/dsk/disk_group/vol01 /data01To bring in rootdg disks on SSA into different group
# vxdg -tC -n "" import ""

75. How do I Start/Stop a disk tray on a SSA ?

Here's how to spin down and start up a disk try...

# ssaadm stop -t c

for example "ssaadm stop -t 2 c3", will stop the 2nd tray on a ssa on controller 3

to restart the tray you use

# ssaadm start -t c

for example "ssaadm start -t 2 c3", will start the 2nd tray on a ssa on controller 3

76. How do I get a plex out of being in a stale state ?

If you have a situation where one of the plexes has gone stale
in a Volume, the following *should* re-enable the plex and get you going
again....
# umount /filesystem - umount filesystem

# vxvol -g stop - Stop the Volume

# vxplex -g dis - Dissociate plex from volume

# vxvol -g -f start - Re-start volume

# vxplex -g att - re-attach plex to volume

77. How do I change the hostname info on the private regions ?
If you want it permanent, do this:see man vxdctl,

# vxdctl hostid
# vxdctl init

this will change the information on the private regions of all disks under VxVm control.
78. Can I encapsulate a disk that has no free space for a private region ?

You can encapsulate a partition with no private slice as follows :

c1t5d0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 - 20 10.34MB (21/0/0) 21168
1 unassigned wu 0 0 (0/0/0) 0
2 backup wm 0 - 2035 1002.09MB (2036/0/0) 2052288
3 unassigned wu 0 0 (0/0/0) 0
4 unassigned wu 21 - 41 10.34MB (21/0/0) 21168
5 unassigned wu 0 0 (0/0/0) 0
6 unassigned wu 0 0 (0/0/0) 0
7 unassigned wm 2032 - 2035 1.97MB (4/0/0) 4032# prtvtoc /dev/rdsk/c1t5d0s2

*

FirstSectorLast
* PartitionTagFlagsSectorCountSectorMount Directory
000002116821167
2500020522882052287
4001211682116842335
7000204825640322052287


The following 4 commands adds disk c1t5d0s0 under VM control with no private
region, c1t5d0s0 is added as disk datadg04 in the datadg diskgroup

the vxassist and mount commands just prove everything works ok

# vxdisk -g datadg define c1t5d0s0 type=nopriv# vxdg -g datadg adddisk datadg04=c1t5d0s0

# /usr/sbin/vxassist -g datadg -U fsgen make vol01 10584k layout=nolog datadg04

# /usr/sbin/mount /dev/vx/dsk/datadg/vol01 /d4

79. How can I get iostat to report the disks as c#t#d# instead of sd# ??

In Solaris 2.6 you will have the command iostat -xn, till then....
p4m-ods% iostat -x 30
extended disk statistics
disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b
fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
sd1 0.0 0.0 0.0 0.1 0.0 0.0 27.8 0 0
sd12 0.0 0.0 0.0 0.0 0.0 0.0 16.7 0 0
sd24 0.0 0.0 0.0 0.0 0.0 0.0 9.4 0 0
sd29 0.0 0.0 0.0 0.0 0.0 0.0 4.2 0 0
sd3 0.0 0.0 0.0 0.3 0.0 0.0 47.9 0 0
sd32 0.0 0.0 0.0 0.0 0.0 0.0 10.6 0 0
sd34 0.0 0.0 0.0 0.0 0.0 0.0 10.6 0 0
sd39 0.0 0.0 0.0 0.0 0.0 0.0 15.6 0 0
sd7 0.0 0.0 0.0 0.0 0.0 0.0 10.5 0 0
p4m-ods%

Well you have to look at /etc/path_to_inst and work it out this way....

or you can use these 2 scripts written by Bede.Seymour@corp

--------------------------- iostatctbl.sh -------------------------

#!/bin/sh
# iostatctbl.sh
#
# ("IOSTAT Create TaBLe")
# Script that creates a mapping between BSD/UCB names and SVR4 names
# of disk devices
rm -f /tmp/iostatctbl.tmp /var/tmp/iostatctbl.out

ls -l /dev/rdsk/*s0 > /tmp/iostatctbl.tmp

iostat -x | tail +3 | nawk '

Unknown macro: { dnameucb=$1 ucbprefix=substr(dnameucb,1,match(dnameucb,"[0-9]")-1) inst=substr(dnameucb,match(dnameucb,"[0-9]")) grepcmd=sprintf("grep "/%s@" /etc/path_to_inst | grep " %s$"n",ucbprefix,inst) printf("%s",dnameucb) system(grepcmd) }

' | nawk ' BEGIN

Unknown macro: {FS="""}
Unknown macro: { printf("%s ",$1) newgrepcmd=sprintf("grep %s /tmp/iostatctbl.tmpn",$2) system(newgrepcmd)}' | nawk '{ split($10,carray,"/") print $1,carray[4]}' > /var/tmp/iostatctbl.out\ \ echo "Table created - see /var/tmp/iostatctbl.out"rm -f /tmp/iostatctbl.tmpexit 0 --------------------------------- iostatx -------------------------------- #!/bin/sh\#\# iostatx - do iostat -x but substitute ucb names for svr4 names ./iostatctbl.shmv /var/tmp/iostatctbl.out /var/tmp/iostatctbl.out.oldcat /var/tmp/iostatctbl.out.old | sed s/fd0//g > /var/tmp/iostatctbl.out iostat -x 10 | nawk 'BEGIN{ i=1 ucblist="" while (getline Entry <"/var/tmp/iostatctbl.out"){ split(Entry,earray," ") ucbname=earray[1] svr4name[ucbname]=substr(earray[2],1,6) ucblist=sprintf("%s %s",ucblist,ucbname) }

}

Unknown macro: { if (match(ucblist,$1) != 0) printf("%-7s%sn",svr4name[$1],substr($0,8)) else print }

' exit 0
Save the 2 files and issue the command ./iostat and you'll get something looking like this.....
}p4m-ods% ./iostatx
Table created - see /var/tmp/iostatctbl.out
extended disk statistics
disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b
fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
c0t1d0 0.0 0.0 0.0 0.1 0.0 0.0 27.8 0 0
c1t1d0 0.0 0.0 0.0 0.0 0.0 0.0 16.7 0 0
c1t2d0 0.0 0.0 0.0 0.0 0.0 0.0 9.4 0 0
c1t3d0 0.0 0.0 0.0 0.0 0.0 0.0 4.2 0 0
c0t3d0 0.0 0.0 0.0 0.3 0.0 0.0 48.0 0 0
c1t3d3 0.0 0.0 0.0 0.0 0.0 0.0 10.6 0 0
c1t4d0 0.0 0.0 0.0 0.0 0.0 0.0 10.6 0 0
c1t5d0 0.0 0.0 0.0 0.0 0.0 0.0 15.6 0 0
c1t0d0 0.0 0.0 0.0 0.0 0.0 0.0 10.5 0 0
80. How can I get round the error volume locked by another utility when trying to detach a plex ?
I have found a way to clear the following error message WITHOUT
rebooting the machine or stopping access to any veritas volumes.vxvm:vxplex: ERROR: Plex vol01-02 in volume vol01 is locked by another utility

$ vxprint vol01

Disk group: datadg | TY | NAME | ASSOC | KSTATE | LENGTH | PLOFFS | STATE | TUTIL0 | PUTIL0 |

vvol01fsgenENABLED3072384-ACTIVEATT1-
plvol01-01vol01ENABLED3072384-ACTIVE--
sdtrash02vol01-01ENABLED10241280---
sdtrash01vol01-01ENABLED10241280---
sdtrash03vol01-01ENABLED10241280---
plvol01-02vol01ENABLED3072448-TEMPATT-
sddatadg05-01vol01-02ENABLED15361920---
sddatadg04-01vol01-02ENABLED15361920---If you look at the TUTIL field you can see some flags set, what you need to do is clear these flags,
Hence if we try to detach the plex now we get the error

$ vxplex -g datadg det vol01-02
vxvm:vxplex: ERROR: Plex vol01-02 in volume vol01 is locked by another utility

the procedure to get this volume back up and running would be as
follows

$ vxmend clear tutil vol01-02
$ vxmend clear tutil vol01
$ vxplex -g datadg det vol01-02
$ vxrecover -s

Hey presto everything is back as it should be.81. Veritas Volume Manager Disaster Recovery

When to use this guide :

This guide will be useful when a customer has experienced file system corruption and is no longer
able to boot the system. If this system was under Volume Manager control (i.e encapsulated) and the
customer had data volumes in the root disk group, then this procedure is designed to help you recover
the configuration.

Step 1 : booting from underlying devices

o boot from cdrom to get a memory resident Solaris kernel

ok boot cdrom -sw

o the following steps needs to be followed to return to underlying devices

# mount /dev/dsk/c0t0d0s0 /a (where c0t0d0 is the system disk)
# cd /a/etc
# cp /etc/prevm.vfstab vfstab

- modify /etc/system and comment out the following lines

rootdev:/pseudo/vxio@0:0
set vxio:vol_rootdev_is_volume=1

# cd /a/etc/vx/reconfig.d/state.d
# rm root-done
# touch install-db

- note that install-db should be the only file in this directory

# cd /
# umount /a
A

ok boot

o At this point the customer could simply restore his filesystems from backups.
If this is possible, then restoring the data may be all that is required. This will
put back the modifications which we have made and all should be well. All that
will be required after the data restore is to reboot the machine. No modifications
will have been made to the Volume Manager configuration.

Step 2 : Re-enabling the Volume Manager configuration

o If the customer needs to re-install the Solaris OS, then we get a little more involved.
The customer will also have to install the Volume Manager software. This is still OK
since we will not be affecting his other data in rootdg.

- install the Solaris OS
- install the Volume Manager software
- install the relevant OS/Volume Manager patchespatch matrix
- reboot


o If we are lucky, the following set of commands may bring back our Volume Manager configuration.
However it is not guaranteed to work every time.

# rm /etc/vx/reconfig.d/state.d/install-db
# vxiod set 10
# vxconfigd -d
# vxdctl init
# vxdctl enable

# init 6

o If this has brought back the Volume Manager configuration, the we should be able to list the
disks/configuration.

# vxprint -Ath
# vxdisk list

You may have to start the volumes before being able to fsck/moun them.

# vxvol -g start vol01

# fsck -n /dev/vx/rdsk//vol01

# mount -r /dev/vx/dsk//vol01 /mnt

o If it hasn't brought back the configuration, then we will need to create a new rootdg, temporarily
import the old rootdg and then export the volumes to a new disk group. This is quite an involved
procedure and you should inform the customer that this may take some time.

Step 3 : Re-encapsulating a new rootdg

o Firstly we need to do an encapsulation of the root disk. To do this, we must first return to
underlying devices as described in Step 1 above. Once this has completed, run the following :

# vxinstall

o Please use with caution. Use the "custom" installation; if your root disks in on controller 0 (c0),
when 'c0' disks are listed, tell vxinstall to do them individually; select 'encapsulation' for the bootable
disk only; select 'leave these disks alone' for all the rest on 'c0'. For all other controllers that are be
listed, tell vxinstall to 'leave these disks alone'. DO NOT BREAK OUT OF THIS UTILITY] (i.e.: control-C).
This will place the bootable disk as a rootdg disk and when the vxinstall is finished it will tell you to
reboot the system.

o When the system is rebooted, we will now have a new rootdg which simply contains our system disk.
Our next step is to import the old rootdg into our new rootdg and recover our volumes.


Step 4 : Importing the old rootdg


o Now we must first get the disk group ID. This is done with the command :

# vxdisk -s list


o This should give us something similar to :

dgname: rootdg
dgid: 793279366.1025.npgts59


o This information is then used to import the original rootdg into our new rootdg :

# vxdg -tC -n import 793279366.1025.npgts59


- where -t indicates a temporary import name
- where -C clears import locks
- where -n specifies a temporary name for the rootdg to be imported so that it does
not conflict with the existing rootdg

o Sometimes this may fail with the error : disk c0t0d0s2 names rootdg but groupid differs.
We may also see the error on reboot regarding : insufficient config copies. This is because
Volume Manager can still only see the system disk (and perhaps mirror) in rootdg but no
other disks.

This can be resolved by using the -f flag (force) with the import.

# vxdg -tfC -n import 793279366.1025.npgts59

o The rootdg should now hold the new rootdg and the old rootdg using a different name.


Step 5 : Recovering the data in old rootdg permanently


o At this point, if we rebooted the machine, we would loose our temporary imported old rootdg.
We need a way of keeping this diskgroup permanent. At this point we would suggest to our
customer to keep these volumes seperate from the rootdg, i.e. keep them in a datadg. Why ?
well from a support point of view, it makes recovery much easier.

o To do this, we first of all get a listing of the configuration as it is at the moment :

# vxprint -vpshmQq -g vol01 vol02 .... > /tmp/vxprint.list

# vxdisk list > /tmp/vxdisk.list

o Now that we have this configuration information, we deport the old rootdg and create a
brand new diskgroup,

# vxdg deport

o Now that the disk group is deported again, we must place the disks which were originally in the rootdg
into this new disk group. Referring to our /tmp/vxdisk.list file, ensuring the disks are using their
original accessname :

# vxdg init disk1=c1t0d0s2

o Add each of the other disks back into the diskgroup as folows :

# vxdg -g adddisk disk?=c?t?d?s2

o Repeat this for every disk in the disk group. Now, we remake our volume configuration.

# vxmake -g -d /tmp/vxprint.list

o Next step is to restart the volumes. This step may or may not be necessary.

# vxvol -g start vol01

o Repeat this step for every volume. The 'startall' option sometimes doesn't appear to work at this point.

o Finally, simply fsck the volumes and mount them.

# fsck -n /dev/vx/rdsk//vol01

# mount -r /dev/vx/dsk//vol01 /mnt

o If this is successful, then you simply configure the /etc/vfstab to reflect the changes and that completes
the recover.

o Remember to remove the /etc/vx/reconfig.d/state.d/install-db file as on reboot you may run into
problems such as "illegal vminor encountered".


Veritas Volume Manager - Miscellaneous

----82. Can I use prestoserve with the SSA ?

Yes you can. Follow this procedure :

exclude: drv/pr

2. edit /etc/init.d/vxvm-startup2
add

modload /kernel/drv/pr
presto -p > /dev/null

3. edit /etc/init.d/prestoserve

replace presto -u

with presto -u filesystems.....

NOTE: don't prestoserve / , /usr, /var, acceleartion of these filesystems
could lead to data corruption since the filesystems checks for / /usr,
/usr/kvm, /var and /var/adm will precede the flushing of prestoserve buffers

if you're using ODS see bug 121971383. Can I grow my root filesystem online ?

Yes you can. Here's what I did. I only had a root filesystem. On machines with /usr, /opt, /var you will have to
repeat certain stages but it should work the same.

Total disk cylinders available: 1151 + 2 (reserved cylinders)
PartTagFlagCylindersSizeBlocks

0rootwm0-1058372.30MB(1059/0/0)
1swapwu1061-115031.64MB(90/0/0)
2backupwm0-1150404.65MB(1151/0/0)
3-wu0-1150404.65MB(1151/0/0)
4-wu1059-10600.70MB(2/0/0)
5unassignedwm00(0/0/0)
6unassignedwm00(0/0/0)
7unassignedwm00(0/0/0)
Total disk cylinders available: 2733 + 2 (reserved cylinders)
PartTagFlagCylindersSizeBlocks
0rootwm0-13471000.47MB(1348/0/0)
1swapwu1348-147796.48MB(130/0/0)
2backupwu0-27321.98GB(2733/0/0)
3-wu00(0/0/0)
4-wu00(0/0/0)
5unassignedwm00(0/0/0)
6unassignedwm00(0/0/0)
7unassignedwm1478-2732931.45MB(1255/0/0)

newfs the root filesystem.

install a boot block on the disk.
# /usr/sbin/installboot /usr/lib/fs/ufs/bootblk /dev/rdsk/c?t?d?s0

nvalias ssa /iommu/sbus/SUNW,soc@3,0/SUNW,pln@a0000000,777ec6/SUNW,ssd@0,0

set the boot-device from the ok prompt
setenv boot-device ssa

Remove the old rootvol and swapvol which are there but not mounted

choose: Encapsulate one or more disks
follow instructions

# df -k

FilesystemkbytesusedavailcapacityMounted on
/dev/vx/dsk/rootvol96258220248266385023%/
/proc0000%/proc
fd0000%/dev/fd
swap9075216907360%/tmp

To remove these disks
(select the disk)
ADVANCED OPS=>DISK GROUP=>REMOVE DISKS
(/usr/sbin/vxdg -g rootdg rmdisk diskname)


84. Can I change the hostname of a machine without affecting Volume Manager ?

Here is what I have done to sucessfully reassociate a rootdg with a machine....

1) Find a disk in the rootdg.......

map flag 15 to the appropriate slice on disk
and plug that slice into the vxprivutil

2) Run the vxprivutil on the private region of the disk in rootdg.....

diskid: 794106338.2119.maggie
group: name=unix2dg id=795205483.1201.schwing
flags: private autoimport
hostid: schwing
version: 2.1
iosize: 512
public: slice=4 offset=0 len=2050272
private: slice=3 offset=1 len=2015
update: time: 795465445 seqno: 0.45
headers: 0 248
configs: count=1 len=1456
logs: count=1 len=220

3) Notice the hostid in the private region, I want it to belong to "maggie" not
"schwing".
4) So I change the hostid.......

5) Run the procedure in Appendix E................


85. Can I move Volumes from one diskgroup to another ?

Moving Populated Volume Manager Disks between Disk Groups
=========================================================
Roger B.A. Klorese 10/20/94

This is Totally UNSUPPORTED, but it is possible !!!

below is an example of how to do it.....

1) Assume I intend to move volumes vol02 and vol04 from the disk group olddg to a new group, newdg.

# dd of=/dev/vx/rdsk/olddg/vol02 conv=sync
This is the content of vol02.
^D
0+1 records in
1+0 records out

# dd of=/dev/vx/rdsk/olddg/vol04 conv=sync
This is the content of vol04.
^D
0+1 records in
1+0 records out

# dd if=/dev/vx/rdsk/olddg/vol02 count=1
This is the content of vol02.
1+0 records in
1+0 records out

# dd if=/dev/vx/rdsk/olddg/vol04 count=1
This is the content of vol04.
1+0 records in
1+0 records out

2) Get a list of disks in the disk group you intend to split.

3) Get the configuration.

dg olddg 782676710.2488.dustbuster

dm olddg01 c1t0d0s2 sliced 2015 2050272 /dev/rdsk/c1t0d0s4 -
dm olddg02 c1t2d0s2 sliced 2015 2050272 /dev/rdsk/c1t2d0s4 -
dm olddg03 c1t4d0s2 sliced 2015 2050272 /dev/rdsk/c1t4d0s4 -
dm olddg04 c1t1d0s2 sliced 2015 2050272 /dev/rdsk/c1t1d0s4 -
dm olddg05 c1t5d0s2 sliced 2015 2050272 /dev/rdsk/c1t5d0s4 -
dm olddg06 c1t0d1s2 sliced 2015 2050272 /dev/rdsk/c1t0d1s4 -
dm olddg07 c1t2d1s2 sliced 2015 2050272 /dev/rdsk/c1t2d1s4 -
dm olddg08 c1t4d1s2 sliced 2015 2050272 /dev/rdsk/c1t4d1s4 -
dm olddg09 c1t1d1s2 sliced 2015 2050272 /dev/rdsk/c1t1d1s4 -
dm olddg10 c1t5d1s2 sliced 2015 2050272 /dev/rdsk/c1t5d1s4 -

v vol01 gen ENABLED ACTIVE 4194304 SELECT -
pl vol01-01 vol01 ENABLED ACTIVE 4194304 CONCAT - RW
sd olddg01-01 vol01-01 olddg01 0 2050272 0 -
sd olddg02-01 vol01-01 olddg02 0 2050272 2050272 -
sd olddg03-01 vol01-01 olddg03 0 93760 4100544 -

v vol02 fsgen ENABLED ACTIVE 2050268 SELECT -
pl vol02-01 vol02 ENABLED ACTIVE 2050268 CONCAT - RW
sd olddg08-01 vol02-01 olddg08 0 4 LOG -
sd olddg08-02 vol02-01 olddg08 4 2050268 0 -
pl vol02-02 vol02 ENABLED ACTIVE 2050268 CONCAT - RW
sd olddg09-01 vol02-02 olddg09 0 4 LOG -
sd olddg09-02 vol02-02 olddg09 4 2050268 0 -

v vol03 fsgen ENABLED ACTIVE 1024000 SELECT -
pl vol03-01 vol03 ENABLED ACTIVE 1024000 CONCAT - RW
sd olddg10-01 vol03-01 olddg10 0 1024000 0 -

v vol04 fsgen ENABLED ACTIVE 4194304 SELECT vol04-01
pl vol04-01 vol04 ENABLED ACTIVE 4194304 STRIPE 4/128 RW
sd olddg04-01 vol04-01 olddg04 0 1048576 0/0 -
sd olddg05-01 vol04-01 olddg05 0 1048576 1/0 -
sd olddg06-01 vol04-01 olddg06 0 1048576 2/0 -
sd olddg07-01 vol04-01 olddg07 0 1048576 3/0 -

4) Determine which disks contain the volumes to be moved. Insure that all
volume allocations are self-contained in the set of disks to be moved.
In this case, my volumes are contained on disks olddg04 through olddg09,
with no unassociated plexes or subdisks, and no allocations which cross
out of this set of disks.
5) Save the configuration, in a format that can be plugged back into
the vxmake utility. Specify all volumes on the disks in question (plus
any unassociated plexes and their child subdisks, plus any unassociated
subdisks).

6) Unmount the appropriate file systems, and/or stop the processes
which hold the volumes open.
7) Stop the volumes.

8) Remove from the configuration database the definitions of the
structures (volumes, plexes, subdisks) to be moved. (NOTE that this
does not affect your data.)

9) Remove the disks from the original diskgroup.

10) Initialize the new diskgroup using one of your disks. DO NOT
reinitialize the disk itself. (vxdisk init). (If you are moving the disks
to a disk group that already exists, skip this step.) It is simplest to
keep their old names until a later step.

11) Add the rest of the moving disks to the new disk group.

12) See the disks in the new disk group.

13) Reload the object configuration into the new disk group.

14) Bring the volumes back on-line.

15) Observe the configuration of the new disk group.

dg newdg 782682285.2491.dustbuster

dm olddg04 c1t1d0s2 sliced 2015 2050272 /dev/rdsk/c1t1d0s4 -
dm olddg05 c1t5d0s2 sliced 2015 2050272 /dev/rdsk/c1t5d0s4 -
dm olddg06 c1t0d1s2 sliced 2015 2050272 /dev/rdsk/c1t0d1s4 -
dm olddg07 c1t2d1s2 sliced 2015 2050272 /dev/rdsk/c1t2d1s4 -
dm olddg08 c1t4d1s2 sliced 2015 2050272 /dev/rdsk/c1t4d1s4 -
dm olddg09 c1t1d1s2 sliced 2015 2050272 /dev/rdsk/c1t1d1s4 -

v vol02 fsgen ENABLED ACTIVE 2050268 SELECT -
pl vol02-01 vol02 ENABLED ACTIVE 2050268 CONCAT - RW
sd olddg08-01 vol02-01 olddg08 0 4 LOG -
sd olddg08-02 vol02-01 olddg08 4 2050268 0 -
pl vol02-02 vol02 ENABLED ACTIVE 2050268 CONCAT - RW
sd olddg09-01 vol02-02 olddg09 0 4 LOG -
sd olddg09-02 vol02-02 olddg09 4 2050268 0 -

v vol04 fsgen ENABLED ACTIVE 4194304 SELECT vol04-01
pl vol04-01 vol04 ENABLED ACTIVE 4194304 STRIPE 4/128 RW
sd olddg04-01 vol04-01 olddg04 0 1048576 0/0 -
sd olddg05-01 vol04-01 olddg05 0 1048576 1/0 -
sd olddg06-01 vol04-01 olddg06 0 1048576 2/0 -
sd olddg07-01 vol04-01 olddg07 0 1048576 3/0 -

16) Test the data. Remember that the device names have changed to refer
to newdg instead of olddg; you'll need to modify /etc/vfstab and/or your
database configurations to reflect this. Then you'd mount your file
systems, start your database engines, etc.

17) Note that the original database is intact, though the disk naming is
a bit odd. You *can* rename your disks and their subdisks to reflect the
change. This is optional.

dg olddg 782676710.2488.dustbuster

dm olddg01 c1t0d0s2 sliced 2015 2050272 /dev/rdsk/c1t0d0s4 -
dm olddg02 c1t2d0s2 sliced 2015 2050272 /dev/rdsk/c1t2d0s4 -
dm olddg03 c1t4d0s2 sliced 2015 2050272 /dev/rdsk/c1t4d0s4 -
dm olddg10 c1t5d1s2 sliced 2015 2050272 /dev/rdsk/c1t5d1s4 -

v vol01 gen ENABLED ACTIVE 4194304 SELECT -
pl vol01-01 vol01 ENABLED ACTIVE 4194304 CONCAT - RW
sd olddg01-01 vol01-01 olddg01 0 2050272 0 -
sd olddg02-01 vol01-01 olddg02 0 2050272 2050272 -
sd olddg03-01 vol01-01 olddg03 0 93760 4100544 -

v vol03 fsgen ENABLED ACTIVE 1024000 SELECT -
pl vol03-01 vol03 ENABLED ACTIVE 1024000 CONCAT - RW
sd olddg10-01 vol03-01 olddg10 0 1024000 0 -

# vxedit rename olddg10 olddg04

# vxprint -g olddg -s -e "name~/olddg10/"
TYPE NAME ASSOC KSTATE LENGTH COMMENT
sd olddg10-01 vol03-01 - 1024000

# vxedit rename olddg10-01 olddg04-01

# vxprint -g olddg -ht
DG NAME GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN PUBPATH FLAGS
V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WDTH MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF FLAGS

dg olddg 782676710.2488.dustbuster

dm olddg01 c1t0d0s2 sliced 2015 2050272 /dev/rdsk/c1t0d0s4 -
dm olddg02 c1t2d0s2 sliced 2015 2050272 /dev/rdsk/c1t2d0s4 -
dm olddg03 c1t4d0s2 sliced 2015 2050272 /dev/rdsk/c1t4d0s4 -
dm olddg04 c1t5d1s2 sliced 2015 2050272 /dev/rdsk/c1t5d1s4 -

v vol01 gen ENABLED ACTIVE 4194304 SELECT -
pl vol01-01 vol01 ENABLED ACTIVE 4194304 CONCAT - RW
sd olddg01-01 vol01-01 olddg01 0 2050272 0 -
sd olddg02-01 vol01-01 olddg02 0 2050272 2050272 -
sd olddg03-01 vol01-01 olddg03 0 93760 4100544 -

v vol03 fsgen ENABLED ACTIVE 1024000 SELECT -
pl vol03-01 vol03 ENABLED ACTIVE 1024000 CONCAT - RW
sd olddg04-01 vol03-01 olddg04 0 1024000 0 -

18) Do the same for the disks in newdg and their subdisks.

# vxprint -g newdg -e "name~/olddg/"
TYPE NAME ASSOC KSTATE LENGTH COMMENT
sd olddg04-01 vol04-01 - 1048576
sd olddg05-01 vol04-01 - 1048576
sd olddg06-01 vol04-01 - 1048576
sd olddg07-01 vol04-01 - 1048576
sd olddg08-01 vol02-01 - 4
sd olddg08-02 vol02-01 - 2050268
sd olddg09-01 vol02-02 - 4
sd olddg09-02 vol02-02 - 2050268

# vxedit rename olddg04 newdg01
# vxedit rename olddg05 newdg02
# vxedit rename olddg06 newdg03
# vxedit rename olddg07 newdg04
# vxedit rename olddg08 newdg05
# vxedit rename olddg09 newdg06
# vxedit rename olddg04-01 newdg01-01
# vxedit rename olddg05-01 newdg02-01
# vxedit rename olddg06-01 newdg03-01
# vxedit rename olddg07-01 newdg04-01
# vxedit rename olddg08-01 newdg05-01
# vxedit rename olddg09-01 newdg06-01
# vxedit rename olddg08-02 newdg05-02
# vxedit rename olddg09-02 newdg06-02

# vxprint -g newdg -ht
DG NAME GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN PUBPATH FLAGS
V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WDTH MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF FLAGS

dg newdg 782682285.2491.dustbuster

dm newdg01 c1t1d0s2 sliced 2015 2050272 /dev/rdsk/c1t1d0s4 -
dm newdg02 c1t5d0s2 sliced 2015 2050272 /dev/rdsk/c1t5d0s4 -
dm newdg03 c1t0d1s2 sliced 2015 2050272 /dev/rdsk/c1t0d1s4 -
dm newdg04 c1t2d1s2 sliced 2015 2050272 /dev/rdsk/c1t2d1s4 -
dm newdg05 c1t4d1s2 sliced 2015 2050272 /dev/rdsk/c1t4d1s4 -
dm newdg06 c1t1d1s2 sliced 2015 2050272 /dev/rdsk/c1t1d1s4 -

v vol02 fsgen ENABLED ACTIVE 2050268 SELECT -
pl vol02-01 vol02 ENABLED ACTIVE 2050268 CONCAT - RW
sd newdg05-01 vol02-01 newdg05 0 4 LOG -
sd newdg05-02 vol02-01 newdg05 4 2050268 0 -
pl vol02-02 vol02 ENABLED ACTIVE 2050268 CONCAT - RW
sd newdg06-01 vol02-02 newdg06 0 4 LOG -
sd newdg06-02 vol02-02 newdg06 4 2050268 0 -

v vol04 fsgen ENABLED ACTIVE 4194304 SELECT vol04-01
pl vol04-01 vol04 ENABLED ACTIVE 4194304 STRIPE 4/128 RW
sd newdg01-01 vol04-01 newdg01 0 1048576 0/0 -
sd newdg02-01 vol04-01 newdg02 0 1048576 1/0 -
sd newdg03-01 vol04-01 newdg03 0 1048576 2/0 -
sd newdg04-01 vol04-01 newdg04 0 1048576 3/0 -
#


86. Can I test the SOC card from the OK prompt ?

from open boot prom

OK>" /io-mmu@f---xx" select-dev
OK>soc-selftest

Output from command: there is a space between the " and the iommu path"

<#0> ok " /io-unit@f,e0200000/sbi@0,0/SUNW,soc@3,0" select-dev
<#0> ok soc-selftest
Selftest in progress...
checking forward pattern...
checking reverse pattern...
SOC External memory Test -- Passed
SOC POST Test -- Passed
test communications bits
test communications parameters
test communications parameters sram
test idle bit
test slave error bit
SOC Register Test -- Passed
SOC Port A Internal Transmit/Receive Test -- Passed
SOC Port B Internal Transmit/Receive Test -- Passed
SOC Port A OLC Transmit/Receive Test -- Passed
SOC Port B OLC Transmit/Receive Test -- Timeout reached waiting for SOC
Failed
<#0> ok87. Can I restore the rootdisk from backup ?

Providing only the boot disk is in the rootdg you can do the following...

1. restore data and installboot block

2. copy /etc/vfstab, and in the current vfstab, comment out all veritas mount points..

3. arrange vfstab so it mounts the /dev/dsk and /dev/rdsk dev's only
change

4. comment out the volume manager stuff in /etc/system, see below

5. touch /etc/vx/reconfig.d/state.d/install-db
6. reboot

7. run vxinstall, encapsulated the boot disk only !!

8. reboot

9. copy back the original /etc/vfstab

10. mountall

11. re-mirror rootdisk if required.

88. Can I make my SparcStation wait for the SSA to spin up ?

This program will be stored in the Boot PROM of the Sparc Station's
(non-volatile memory - NVRAM ), and will delay the boot sequence for 80 seconds.

This delay will give sufficient time for the power-on confidence test of the
SPARC Storage Array to be completed before the boot is attempted.

The program is written in the Forth programming language, as used by the Boot
PROM, and is entered using the "nvedit" editor.

at the "ok" boot prompt :

The non-volatile memory has probably already been programmed with a device
alias for the SSA (so that a boot command of "boot ssa" can be used, instead
of a complex full device name ).

To check this, enter

ok devalias <<< this will give a list of the standard aliases, and there probably
will be an additional one for the SSA

ok printenv use-nvramrc? <<<>

IF NOT, enter

ok setenv use-nvramrc? true

Then start the nvedit editor :

ok nvedit <<< this will display line 0 of the NVRAM memory, which will
probably contain the original command used to set up the
SSA device alias, such as :

0: devalias ssa /io-unit......etc.....etc

To leave this line undisturbed, enter Ctrl N ( = move to next line in
Editor )

You will then get line number 1 , which should be a blank line.

Enter the commands for the delay program ( 8 lines ), exactly as follows :

( " ^ " equals "spacebar" ) ( " C/R " equals "return" )

ok nvstore <<>

ok nvramrc eval << this will execute the stored program, i.e. the delay
will start, and count up to 79 on the screen, to test
that the program was keyed in correctly. It will not
boot the SSA at this point.


Then the system can be rebooted, from the SSA, including the delay, by entering :

ok reset

( In case of any errors whilst keying-in the program, here are some useful
command for the nvedit editor :

Ctrl B Back one character
Ctrl F Forward one character
Del Delete the previous character
Ctrl K Delete the next line
Ctrl N Move to next line
Ctrl P Move to previous line
Ctrl L List all lines
Ctrl C Exit the editor. )

89. Can I move a SSA to a new system and preserve the data ?

OK. It's easy to do and it's even documented (incompletely, but...)
in the SSA Volume Manager System Administrator's Guide (802-1242-10),
Appendix B, Topic 7 Reinstallation Recovery.

In essence, it's easiest if you already have a rootdg on the receiving system
and the volumes in question are in some other group. Nevertheless, I didn't
have that luxury so here is what to do. This also assumes I'm not going
to need to use the existing system after the SSA is moved or I'm going to
reinstall it. I also am not going to have an encapsulated root on the receiving
system, at least not initially.

Target System:

Receiving System (with same host name):

You should now issue "vxdisk list", "vxprint -SA", and "vxprint -g groupname"
to insure that all your disks are seen and that the configuration is
recognized.

The next parts are undocumented but necessary in order to automate startup
and update vfstab entries.

10. Change to multi-user status. (CTRL-D)
11. Bring up openwin and start vxva (volume manager)
12. Select world or group view.
13. Select volume to mount (refer to vxprint -SA)
14. Select Advanced->Volume-Start or START-all
15. Select Basic->Filesystem->Mount
16. Fill in pop-up menu for volume's mountpoint and select mount at startup
17. Do the same for all other volumes necessary.
18. Your mountpoints have now been created and the entries recreated in
/etc/vfstab.
90. Can I have a rootdg without encapsulating the root disk ?

SRDB ID: 11136

SYNOPSIS: How to setup a rootdg without encapsulating a disk

DETAIL DESCRIPTION:

In many cases it is not desirable to encapsulate a disk (usually the
bootdisk) to set up a rootdg disk group. The rootdg disk group is
mandatory with current releases of VXVM, this procedure bypasses
the need to encapsulate a disk but still allows a rootdg.

The procedure is as follows:

1. Set the initial operating mode to disable. This disables
transactions and creates the rendevous file install-db,
for utilities to perform diagnostic and initialization
operations.

vxconfigd -m disable

Verify with ps afterward:

(ps -ef | grep vxconfigd)

2. Initialize the database:

vxdctl init

3. Make the rootdg disk group:

vxdg init rootdg

4. Add a simple slice (usually about two cylinders in size):

vxdctl add disk cWtXdYsZ type=simple

Note: A warning message will appear here.

5. Add disk records:

vxdisk -f init cWtXdYsZ type=simple

6. Add slice to rootdg:

vxdg adddisk cWtXdYsZ

7. Enable transactions:

vxdctl enable

8. Remove this file; the volume manager will not activate if this
file exists.

rm /etc/vx/reconfig.d/state.d/install-db

91. Can I increase the size of the private region ?

The private region of a disk is specified by using the privlen option to the vxdisksetup
cammand. For example,

# vxdisksetup -i c1t0d0 privlen=2048

92. Cannot import Diskgroup - "No configuration copies"

This is a very rare occurrance, but is one of the most frustrating.

Why did this happen ?

The private data regions are accessed frequently by the Veritas kernel,
it is always updating status information in the private regions.
We cannot say exactly what causes this, nither can we definitively state
that all the private regions were totally bad.

What we can say is that this is very rare.
We have not been able to reproduce it, so it isn't easy to pinpoint for a
complete fix that would prevent it from ever happening.
The only way we can reproduce it is to physically overwrite all the private
regions on all the disks.
If even one disk is not overwritten, it can and will pull in the diskgroup.

How do we over come the problem
-------------------------------

The following proceedure needs an existing rootdg and volume manager running,
so it is not applicable for a lost rootdg.

To reconstruct the configuration
--------------------------------

To get the configuration back we would like to use a copy of the configuration
that was taken when the system was running ok with the commands.

# vxprint -hmQqspv -D - > //
# vxdisk list

This last command gives you a list of access name and media name
pairs.

If this happens and the customer does not have copies of the configuration
when the system was good, we have in tha past run the following command.
If this method is used the customer has to be able to check the configuration
and data as there is no garrantee that this is latest configuration.

# /etc/vx/diag.d/vxprivutil dumpconfig /dev/rdsk/cXtXdXs2 | \
vxprint -hmQqspv -D - > //

NB. You may well have to grep out the access name and media name
pairs from the output file.

Once you have the configuration from above you can create the group as follows.

Create the new disk group
-------------------------

NB. Disk names MUST correspond to the same disks exactly as they were
originally (see you backup copy vxdisk list output).
We also need a list of the names which equate to the physical disks,
this can be obtained be keeping the output from 'vxdisk list' or
it will have to be grep'ed out of the tempory file.


. Initalise the diskgroup, using one of the disks from the lost disk
group.

# vxdg init =
NB. Substitute the disk group, disk access name and media name
from the saved vxdisk list output.
Example
# vxdg init datadg disk01=c2t0d0s2

. Add in the rest of the disks.

# vxdg -g new_data_dg adddisk = [other disks]

. Recreate the volume(s) configuration from the configuration file.

# vxmake -g -d //

NB. If this fails saying input file too large, then split the
file up and run the above for each one.
In most cases it works, its just for very large configurations
and then we have only split it into two pieces.

You can use the above command with the -V option which will
go through the motions but not actually do anything.

. Now bring the volumes back online.

# vxvol -g startall



93. My volume is ENABLED/SYNC but doesn't appear to be syncing. What do I do ?
#vxvol -f -g [dg] resync [vol]

This will force the volume to resync.

94. How can I view the contents of my Private R egion ?

95. I need to change the hostname in my Private Regions and my /etc/vx/volboot file. How do I do it ?


96. Veritas has changed my VTOC layout when it encapsulated my rootdisk. How do I recover my original VTOC?

97. My volume won't start. I think it may be due to my volume not on a cylinder boundary. How can I determine if this is true ?
This block should then be divisable into the length and offset value which you get for a volume in a vxprint output from Veritas. If the offset value for the volume is not devisable by the number of blocks per cylinder found above, then the volume does not start on a cylinder boundary. If the length is not divisable by the number of blocks per cylinder, then it doesn't end on a cylinder boundary.

Note that on occasions, you will be left with an extra block. This is normal and is believed to be used for disk label preservation.

98. Why can't I simply mirror back my seconday rootdisk mirror to my primary rootdisk mirror if my primary disk fails ?
So, I think you now can guess what will happen when you resync your secondary mirror back to the primary. The private region gets written to the beginning of your disk, offsetting all your filesystems and rendering your saved VTOC as useless. Now you can never go back to underlying devices. Because of this, upgrades and future recoveries may not be possible.

There is an infodoc which details an alternate method using the vxmksdpart which can be used for putting back the VTOC on the mirrored root disk. The infodoc is 14820.

99. How can I make hot-relocation use ONLY spare disks ?
Beginning with SEVM 2.4, if the following value is set in the file '/etc/default/vxassist':

100. How do I enable debug mode on vxconfigd ?

101. How do I disable DMP, dynamic multi-pathing ?
INFODOC ID: 18314
STATUS: Issued

SYNOPSIS: How to disable dmp
DETAIL DESCRIPTION:

This infodoc will explain the 7 steps to disable DMP

*****NOTE*******
before these steps are done

1. umount all file systems created on volume manager volumes

2. Stop the Volume Manager (vxdctl stop)

Then continue:

3. Remove the vxdmp driver

forceload: drv/vxdmp


101. How do I take a disk out from under Veritas control ?
The vxdiskunsetup command undoes the configuration setup by vxdisksetup and makes the specified disks unusable by the Volume Manager. It can be applied only to disks that are not in active use within an imported disk group.

Note that the disk must not be a member of any disk group when this is done. To remove a disk from a diskgroup, see the answer to question 105.

103. Volume Manager has relayed out my VTOC after encapsulation. I now need to get back my original VTOC but there is no original in /etc/vx/reconfig.d/disk.d/vtoc. How can I get back my /opt filesystem ?

PartitionTagFlagsSectorCountSectorMount Directory
02000410400410399
11401041541604154159
2500041541604154159
470012403208192802059599
5400205960010244803084079
71501415264015204154159

Because of the sizes, we can see that slice 7 is the private region and that slice 1 is the public region. The private region has a tag of 15, the public region has a tag of 14. Now check the /etc/vfstab to see where /opt was originally mounted :

Now checking the rootvol volume from the vxprint -Ath output. We know that that root starts at 0 and ends at 410399. Add 1 to this gives us 410400. This takes into consideration the boot block cylinder. No other offset is required as the Private Region is at the end of the disk in this case.

SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
sdrootdisk-01rootvol-01rootdisk04103991c1t12d0ENA

So we now know the Veritas Private Region is not at the start of the disk. Now we check vxprint -Ath for optvol as we need to know where it starts.

VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX
PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE
SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE
voptfsgenENABLEDACTIVE819280ROUND-
plopt-02optENABLEDACTIVE819280CONCAT-RW
sdrootmirror-02opt-02rootmirror10244808192800c3t14d0ENA
plopt-01optENABLEDACTIVE819280CONCAT-RW
sdrootdisk-05opt-01rootdisk4210398192800c1t12d0ENA

From the above we can tell that opt-01 starts at 421039 and has a length of 819280. Add one 421039 gives us 421040 so this the start cylinder for /opt.

Now to find the end cylinder 421040 + 819280 = 1240320. So 1240320 is the end cylinder for opt.

Now label slice 3 as 421040 to 1240320.

One labeled this fsck -n /dev/rdsk/c1t12d0s3 says last mounted as opt.

104. What are the different status codes in a 'vxdisk list' output ?


105. How do I remove a disk from a diskgroup ?

106. How can I fix "vxvm: WARNING: No suitable partition from swapvol to set as the dump device." ?
16646

107. After an A5000 disk failure, I lost my rootdg and now I get vxvm:vxdisk: ERROR: Cannot get records from vxconfigd: Record not in disk group when I run vxdisk list and vxvm:vxdctl: ERROR: enable failed: System error occurred in the client when I run vxdctl enable. How can I fix it ?

108. After some A5000/Photon loop offline/onlines, my volume now has one plex in STALE state and the other in IOFAIL. How can I fix this ?

109. Is there any VxVM limitation on the number of volumes which can be created on a system ?

This value can be changed by inserting the following line in /etc/systems :

On 2.6 systems the max minor number is 0x3fff (decimal 262143). Please
check the 2.5.1 max minor number info. I think they are the same.

110. Configuration copies explained
You can set the number by using :

when creating a new diskgroup or by vxedit on an existing diskgroup. e.g.

Labels


No comments:

Post a Comment