Escolar Documentos
Profissional Documentos
Cultura Documentos
com
• Wikis Home
Search
Quick Search
• Browse
o Pages
o Blog
o Labels
o Attachments
o Bookmarks
o Advanced
o Confluence Gadgets
• Log In
• Sign Up
• Help
o Help Wiki
o Contact Wiki Admin
• Report an Issue
o Report a Wiki Space Issue
o Report a Site Wide Issue
1. Wikis Home
2. share-ext (Marco CIAMBRA Tech Space)
3. Veritas Volume Manager - Volume Manager FAQ - Classic commands
• Tools
o Attachments (0)
o Page History
o Restrictions
o Info
o Link to this Page…
o View Wiki Markup
----
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.
----
10. What this volume looks like from a vxprint -Ath output during mirror sync ?
11. What this volume looks like from a vxprint -Ath output after mirror ?
15. What this volume looks like from a vxprint -Ath output during attach ?
16. What does this volume look like from a vxprint -Ath output after attach ?
22. How does the vxprint -Ath for a RAID 5 volume look during the build ?
23. How does the vxprint -Ath for a RAID 5 volume look after the build ?
----
30. How do I redirect mail to be sent to another user instead of root in the event of a failure &
hot spare replacement ?
31. How do I force a disk back into it's original configuration after it has been hot-spared ?
35. How can I find out which physical disks are in a disk group ?
37. How do I move all the subdisks from one physical disk to another disk ?
45. Where can I get the latest SSA Matrix - (Patches & Compatibility) ?
54. How can I add more swap from another disk under Veritas ?
61. How can I clear the message 'volume ? is locked by another utility' ?
66. How can I clone a Sparc Storage Array which is under Veritas control ?
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 ?
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 ?
84. Can I change the hostname of a machine without affecting Volume Manager ??
89. Can I move a SSA to a new system and save the data on it ??
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
93. My volume is ENABLED/SYNC but doesn't appear to be a syncing process running (i.e.
vxrecover). What do I do ?
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 ?
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 ?
10. What this volume looks like from a vxprint -Ath output during mirror sync ?
V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
v vol01 fsgen ENABLED ACTIVE 4305279 SELECT -
pl vol01-01 vol01 ENABLED TEMPRMSD 4306160 CONCAT - WO
sd disk04-01 vol01-01 disk04 0 153520 0 c1t1d0 ENA
sd disk03-01 vol01-01 disk03 0 4152640 153520 c1t4d0 ENA
pl pl-01 vol01 ENABLED ACTIVE 4305279 CONCAT - RW
sd disk01-01 pl-01 disk01 0 4152639 0 c1t5d0 ENA
sd disk02-01 pl-01 disk02 0 152640 4152639 c1t3d0 ENA
11. What this volume looks like from a vxprint -Ath output after mirror ?
15. What this volume looks like from a vxprint -Ath output during attach ?
16. What does this volume look like from a vxprint -Ath output after attach ?
18. What does this volume look like from a vxprint -Ath output after attach ?
V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
v vol01 fsgen ENABLED ACTIVE 2000000 SELECT -
pl Cor-Plex vol01 ENABLED ACTIVE 2000000 CONCAT - RW
sd disk-01 Cor-Plex disk01 0 1000000 0 c1t5d0 ENA
sd disk-02 Cor-Plex disk02 0 1000000 1000000 c1t3d0 ENA
pl Cor-Plex-2 vol01 DETACHED STALE 2000000 CONCAT - RW
sd disk-01-2 Cor-Plex-2 disk01 1000000 1000000 0 c1t5d0 ENA
sd disk-02-2 Cor-Plex-2 disk02 1000000 1000000 1000000 c1t3d0 ENA
This returns the maximum size (8304640) of the volume which can be used in the following
command.
23. How does the vxprint -Ath for a RAID 5 volume look after the build ?
A mail message will have been sent to root (by default) indicating
that a hot relocation has taken place.
30. How do I redirect mail to be sent to another user instead of root in the event of a
failure & hot spare replacement ?
31. How do I force a disk back into it's original configuration after it has been hot-spared
?
where disk05 is the 'relocated to' disk and disk02 is the 'relocated from' disk
Of course, before moving any relocated subdisks back, ensure the disk thatexperienced the
failure has been fixed.
/usr/sbin/vxdctl enable
35. How can I find out which physical disks are in a disk group ?
37. How do I move all the subdisks from one physical disk to another disk ?
Yes. Volume manger will build a mirror and do a full sync of the original disk to the new disk.
No. Hot-spares only act as replacements for other disk in the same disk group.
This rest of this section is designed to give you an idea of various disk management tips and
hints for Volume Manager.
How DRL's work When the system is rebooted after a 'non-graceful' shutdown, volume
manager needs to syncronize the plexes to guarantee that both mirrors are identical. It does this
by reading each and every block and copying the data to the "other" plex. Obviously, this will
take a long time. If there's a DRL attached to the volume, volume manager will only have to
'sync' the regions which are dirty. Since it works on a "region" basis, the resync times are greatly
reduced, in most cases, but not necessarily all cases.
Performance
The performance difference you may notice during normal operation may be due to the updates
in the log. There is some amount of overhead involved, though normally it is minimal.
41. EARLYNOTIFIER_ALERT_RAID-5
The EARLYNOTIFIER_ALERT_RAID-5 says:
For non-typical RAID-5 configurations which have the following characteristics:
- a RAID-5 column which is split into multiple subdisks where the subdisks do NOT end and
begin on a stripe-unit aligned boundary
- and a RAID-5 reconstruction operation was performed.Data corruption can be present, in the
region of the RAID-5 column where the split subdisks align.
So for a preventive action I want to verify the customers RAID-5 configurations. ( using explorer
results )
This can be done as follows.
Here's an example:A. Good case
Case-1:
# vxprint -g kuro -hqvt
Subdisk size is multiple of stripe width. So you don't worry about this.
Case-2:
# vxprint -g kuro -hqvt
Subdisk is concatanated, but still they're matched with stripe size boundary. Also you don't
worry about this.
Case-1:
# vxprint -g kuro -hqvt
This means the last stripe unit of "kuro01-01" contains only 16 blks. This means this bottom
section isn't aligned stripe size. As the result, the first 16 blks in "kuro05-01" is used for this
stripe. You need to pay attention to this configuration. The Early Notifier tells us this.
Case-2:
# vxprint -g kuro -hqvt
In both the above cases non-redundant data is not moved to the newly
aquired disc space, be it a complete disc or sub-disc failure. This
operation becomes the function of the systems operator...
A dead disc type failure is pretty much the same, with all the
operations failing on the bad disc.
To mount volumes
# mount /dev/vx/dsk/disk_group/vol01 /data01
Once enlarged, if ANY failed disk is replaced by use of normal means the dfault region size will
be on the new device, thus forcing the entire group to default back to that size.
Lastly, if the customer ever in the future runs 'vxdiskadm' to initialize a new disk, it'll put the
default (small) private area on the disk. This won't work, cause all the disks in the dg HAVE to
have the larger private area. So for the rest of this guys life he needs to run vxdisksetup with the
appropriate parameters to give the disk the larger private area.
Options
They should look into just putting any new volumes and disks into a new diskgroup.Split the
disk group that has the problem up, move some of the volumes out to a different disk group, so
that they do not run into problems under live running conditions. As the Veritas volume manager
requires space in the private region for say when it has to use hot sparing/relocation etc... Only
where necessary use enlarged private regions.
45. Where can I get the latest SSA Matrix - (Patches & Compatibility) ?
SSA Matrix - (Patches & Compatibility)
46. Where can I get Demo License for VxVM (2.6) ?
Demo License for VxVM (2.6)
# vxconfigd -m disable
# ps -ef | grep vxconfigd
NB. If the above command fails its probably because vxconfigd is already running.
Just kill off vxconfigd and re-run the above command again or alternatively try vxconfigd -k
which kills the daemon and restarts it.
Initialise database
# vxdctl init Make new rootdg group
# vxdg init rootdg Add a simple slice
# vxdctl add disk c0t3d0s7 type=simple
vxvm:vxdctl: WARNING: Device c0t3d0s7: Not currently in the configuration Add disk record
# vxdisk -f init c0t3d0s7 type=simple Add disk name to rootdg disk group
# vxdg adddisk c0t3d0s7 Enable transactions
# vxdctl enable Remove file
# rm /etc/vx/reconfig.d/state.d/install-db
Dump device
Primary swap needs to be a phyiscal partition. This is not to say it cannot be under vertias
control.
This is because in the event of a panic VM doesn't support volumes as dump devices.
It gets it from a physical slice initially which is then is changed to a vertias volume.
During the startup from /etc/rcS.d/S35vxvm-startup1 it executes the following.
We do not support a striped primary swap device. This could be made smaller than memory.
We advise this to be at least the same size as his systems memory, so that crash dumps can be
taken. - not really relevant to Enterprise class systems
Maximum limit
Up to a max of 2GB.
All core dumps will be truncated to 2GB, and in fact a partition over 2GB is a problem for
'savecore'.
The core dump is copied to the _end_ of the primary swap partition,
and savecore can't read it because it can't seek over 2GB.
Veritas finds the 'real' partition that the swapvol maps to and uses this for the 'dumpdevice' ( for
core dumps ).
If there is not direct mapping, then this will break and the system will have not dumpdevice.
Although this was done on a raid5 volume, the same could be done for any type of volume.
We created a raid5 volume that was imediately seen to be the wrong size.
By running the following commands ment we can have another
go at creating it the correct size, without having to wait
for it to finish the raid5 setup.// Find the id of the process creating the raid5 volume.
# ps -ef
// Clear the tutil and putil fields (we want dashes in the fields).
// These fields can be seen by running vxprint.
// May only have to do it for the plex.
# vxmend clear tutil0 vol01-01
# vxmend clear tutil0 vol01
You can use the following command to turn the flag off if you think it got turned
on due to a transient error. VXVM 2.3 GUI also has a checkbox for this functionality.
# vxedit set failing=off disk05 51. How do I move disks from one disk group to another ?
NB.
If these disks are going into an existing disk group then
you do not need to initialise the disk group and the disk
names must be different,
eg If you have c1t0d0s2=disk01 then the disk group you
are moving the disk into must not have a disk01.
ii) Get a list of disks in the disk group you intend to split.
iv) 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.
vi) Unmount the appropriate file systems, and/or stop the processes
which hold the volumes open.
xi) Add the rest of the moving disks to the new disk group.
xvi) 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.
xvii) 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.
# vxprint -g newdg -s
- When rebooting, you might have to specify a disk if the disk is not
the default boot disk, instead of init 6.
Sequence:
Boot from CD-ROM to convert back to underlying devices and stop Volume
Manager.
Boot from cdrom
>ok boot cdrom -sw
# fsck /dev/rdsk/c0t3d0s0
FILE SYSTEM STATE IN SUPERBLOCK IS WRONG; FIX? y
# mount /dev/dsk/c0t3d0s0 /a
Edit vfstab file to replace any of the system partition entries with
entries for the underlying partitions.
Also remove/convert/hash out, any other entries to vx devices.
# vi /a/etc/vfstab
# cd /
# umount /a
# fsck /dev/rdsk/c0t3d0s0
When you have volume manager up and running, you need to run the following
command for each disk group.
# vxprint -hmQqsvp -g dg > /directory-path/filenameWe also need a list of the names which
equate to the physical disks,
this can be obtained be keeping the output from
# vxdisk list
Initalise the diskgroup, using one of the disks from the lost disk
group.
# vxdg init dg access name=medianameNB. Substitute the disk group, disk access name and
media name
from the saved vxdisk list output. e.g.
# vxdg init datadg disk01=c2t0d0s2Add 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 dg -d /directory-path/filename
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.
You may have to bring the volume back online (each vol must be done
one at a time).
# vxvol -g init active 54. How can I add more swap from another disk under Veritas ?
#!/bin/sh
#
# /etc/rcS.d/S35newdumpdevice
#
# Author: Bede Seymour (bede.seymour@Eng.Sun.COM)
#
# Created: Wed Apr 30 14:41:09 EST 1997
#
# This script *MUST* come before /etc/rcS.d/S40standardmounts.sh !!!
#
# This only works because the swapadd/swap -a command only edits the
# dumpvp vnode ptr in the kernel if not already set.
#
# Set DUMPDEV to the device/slice on which you would like to dump.
#
# set defaults
PATH=/sbin:/etc:/bin:/usr/sbin:/usr/bin:/usr/ucb ; export PATH
PROG=`basename $0` ; export PROG
DUMPDEV="/dev/dsk/c0t0d0s1" ; export DUMPDEV
echo "$
: configuring $
swap -d $
echo "$
Veritas Utilities and Scripts (Unsupported) - Australian 'Spider' server 60. What can the
vxprivutil command be used for ?
Check the consistancy of the information in the private region try the following:
# /etc/vx/diag.d/vxprivutil dumpconfig /dev/rdsk/c?t?d?s2 > /tmp/vx.output
# cat /tmp/vx.output | vxprint -Ath -D -or
# cat /tmp/vx.output | vxprint -vpshm -D - > /tmp/vxprint.vpshm
# vxmake -g diskgroup -d /tmp/vxprint.vpshm
You should see a normal vxprint output. 61. How can I clear the message 'volume ? is
locked by another utility' ?
If you look at the TUTIL0 in a vxprint you will see that there are
some flags set call ATT, all you need to do is to clear them. 62. How can I clear subdisks
which are in IOFAIL state ?
NOTE:-
Before you start make sure you have an output of
$ vxprint -Ath
In this example it is the rootdisk which has had this problem, hence
where DISK is rootdisk, DISKOFFS is 0 and LENGTH is 1919231The DISK, DISKOFFS and
LENGTH can be found from the vxprint -th output
where n is the position in the stripe, this again can be determined from the vxprint -th output.
for subdisk datadg08-01 the -l number would be 2 (STRIPE 2/0)
for subdisk datadg06-01 the -l number would be 0 (STRIPE 0/0)| V | NAME | USETYPE |
KSTATE | STATE | LENGTH | READPOL | PREFPLEX |
Once the re-sunc has finished then everything should be back to normal.
This section deals more specifically with issues related to Veritas Volume Manager and the
Sparc Storage Array
We had a customer who installed Solaris 2.5 on top of Vm 2.1.... This is not a supported config,
because it does not work. This left the customer in a position of not being able to get his system
back up. After jumping thru some hoops the customer was back up on line. This to point out a
few things to try and save others from the same or similar problems....
o The Vm 2.1.1 binaries for Solaris 2.3 and 2.4 are NOT the same as the binaries for Solaris 2.5.
o This a departure from the past, due to some other problems (to be solved in the next release).
o This also means that the Vm 2.1 binaries will NOT work with Solaris 2.5...
o If you are going to use Solaris 2.5 and Vm, it MUST be Vm 2.1.1(release)....
o If a customer upgrades Vm to 2.1.1 on either Solaris 2.3 or 2.4 and then decides to go to
Solaris 2.5, caution should be taken. As mentioned above the Vm 2.1.1 binaries for Solaris
2.3/2.4 and 2.5 are not the same, so both Vm and Solaris need to be upgraded in this case.
o The upgrade procedures for Vm 2.1.1 provided with the CD, do not cover this situation, a
procedure needs to be developed and tested to handle this.
If write error:
Try to read & write the private region on the disk.
Else:
The whole disk is almost surely bad.
Consider disk failed, and initiate hot spare.
Note that it takes a little while to go through all this, doing extra
I/O's to make sure the disk has really failed, waiting for commands to
time out, etc. This is why you don't see hot spares kick in instantaneously.
Volume Manager is trying to make sure that the disk really is bad. This
is Good. You don't want to start swapping in hot spares unless the disk
is really bad.
So, if Vol Mgr decides to kick in a hot spare, it proceeds to build the
appropriate subdisk(s), plex(es), and volume(s) that were on the failed
disk onto the hot spare. It then populates the subdisks with the data
that was on the failed disk.
If all you had on the failed disk was 100MB of volume stuff, then that's
all that gets written to the hot spare. It doesn't write the whole disk
unless it has to.
Look at this example Failures have been detected by the VERITAS Volume Manager:
failed plexes:
ukdb00-01
ukdb02-01
ukdb03-01
ukdb04-01
No data appears to have been lost.
The line "No data appears to have been lost." inidcates this, and inform's root
that he needs to decide what to do
1. try and re-attach disk and see if he has a geniune h/w Error or
2. replace faulty disk, and rebuild the mirror
as it encountered problems, and needs attention (this is better than ODS which just sits there
until,
you issue a metastat command too see whats happening)
DETAIL DESCRIPTION:
SOLUTION SUMMARY:
* Select two unused slices on the disk and verify that these are
unassigned, 0 (zero) length slices. If there aren't any unused
slices, then they must be made; i.e., if all seven allocated slices
of the disk have been used, the disk cannot be encapsulated.
These two unused slices will become the Volume Manager's private
and public regions.
* Next, try to "steal" two cylinders (at least 2MB are needed) from
the last used slice. It is best to use the two cylinders (or
the amount needed) at the end of the disk. These are not set up
as a slice, they are just not part of the last allocated slice.
This means if slice "g" is the last used slice and extends all the way
to the last cylinder, for example, cylinder number 1254, make
this slice stop at cylinder 1252 instead. This area will be used
by the Veritas software to hold its private region data.
* Encapsulate the disk by running the following from the command line:
# vxdiskadm
2) copy the vxprint.out file and the vxawk script to the new site.
3) install the SSA according to the instructions including running the vxinstall script.
# ./vxscript
# vxva &
8) use the select followed by mutiple adjust mouse buttons to select all the volumes.
:/usr/sbin:/usr/lib/vxvm/bin"
print "export PATH"
print "set -x"
print ""
print "vxconfigd -k"
print ""
{color:#3366ff}}
# NEED TO DO REMAINING.
$1 == "sd" {
split( $7, col, "/" )
print "vxmake sd " $2 " disk=" $4 " offset=" $5 " len=" $6 " column=" col[1]
print ""
if( plex[$3] == "" )
plex[$3] = $2
else
plex[$3] = plex[$3] "," $2
{color:#3366ff}}
$1 == "pl" {
if( $7 == "STRIPE" )
{
split( $8, f, "/" )
tag = " st_width=" f[2] " sd_num=" f[1]
}
else
{
tag=""
}
output = "vxmake plex " $2 " kstate=" $4 " state=" $5
output = output " len=" $6 " iomode=" $9 tag " sd=" plex[$2]
print output
print ""
if( vol[$3] == "" )
vol[$3] = $2
else
vol[$3] = vol[$3] "," $2
{color:#3366ff}}
$1 == "v" {
output = "vxmake vol " $2 " use_type=" $3 " kstate=" $4
output = output " state=" $5 " len=" $6 " read_pol=" $7
output = output " plex=" vol[$2]
print output
print ""
{color:#3366ff}}
{}
67. How to import rootdg from another host ?
Note: you *can* import the rootdg from system 1 on system 2 with a click
or two from the vxvm GUI after you move the array, however, you will have
to do some serious handwaving to move the array back to its original
configuration.From the Veritas System Administrators Guide, Release 2.0/Jan 95,section 3.7.4.1
Renaming Disk Groups
The following set of steps can be used to temporarily move the rootdg disk group from one host
to another
(for repair work on the root volume, forinstance) and then move it back:
1) On the original host, identify the disk group ID of the rootdg disk group to be import to the
other host:
# vxdisk -s list
This command results in output that includes disk group information similar to the following.
dgname: rootdg
dgid: 774226267.1025.tweety
2) On the importing host, import and rename the rootdg disk group as
follows:
where -t indicates a temporary import name; -C clears import locks; -n specifies a temporary
name for the rootdg to be imported (so that it does not conflict with the existing rootdg); and
"diskgroup" is the disk group ID of the disk group being imported (774226267.1025.tweety,for
example).
If a reboot or crash occurs at this point, the temporarily-imported disk group will become
unimported and will require a reimport.
3) After the necessary work has been done on the imported rootdg, deport it back to its original
host as follows:
where newhost_id is the hostid of the system whose rootdg is being returned (this is the system's
namd, which can be confirmed with the command uname -n). This command removes the
imported rootdg from the importing host and returns locks to its original host. The originalhost
will then autoimport its rootdg on its next reboot.
vxplex -g Daviddg dis vol02-01 (this also sets the volume size to 0 by itself)
vxvol -g Daviddg set len=0 vol02 ( not for command line you need to do this manually)
Note there is an error at this point when it tries to do a vxpvol set len
command. (I don't get the error when I use the command line interface though)
On the command line I did this which deleted the subdisks too.
# vxedit -g Daviddg -rf rm vol01-01
Before:
# df -k /foobar
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/Daviddg/vol01 96143 9 86524 0% /foobar
I have done this with files on a volume, and fsck'd the disk afterwards and it all seems fine.
YOU MUST take
backups in case things go wrong, and althoughthis works in the lab I am sure you
understand I cannot
say this will work for you, although someone from Veritas has looked over this.
69. How do I boot from a SSA ?
you need the following: Fcode 1.33 on the sbus card.
Firmware 1.9 in the array.
Optical Modules rev -03.
2.4 Hardware 3/95.
lower rev OS: not got the soc or pln drivers bundled so can't
find the array at boot.
The new firmware is supplied with both SSA 2.0 and 2.1 cd's, the fcode
and the program to check / update this is only with the 2.1 cd.
fc_update [return] will check for SOC cards and bring them
all to the current fcode revision, asking for confirmation
on each one.
During the install you will be offered the chance to put the OS onto
any of the array disks, along with any other disks on the system
under the "c0t0d0" naming scheme.
To get the boot device, do not reboot after the install has finished,
instead cd into /dev/dsk, and use ls -l on the boot device. This will
show the full symlink to the /devices entry for the array disk. Remove
the initial "/devices" and the tailing ":a" (for slice 0) and this is
your boot device.
To store the boot device into the eeprom, shutdown the system and use
nvedit. eg for an example ss1000, booting from an array connected to
the SOC in sbus slot 3 on the first system board, with the world address
"a0000000,740d10"
nvedit [return]
0 devalias ssa /io-unit@f,e0200000/sbi@0,0/SUNW,soc@3,0/
SUNW,pln@a0000000,740d10/SUNW,ssd@0,0 [return]
1 [ctrl-c]
nvstore [return]
reset
Say for example you had a volume you wanted to use with sybase
then you'd issue a command something like this.... # vxedit set user=sybase group=sybase
mode=600 /dev/vx/dg/volumename
volume manager will set this everytime upon bootup.
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
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.
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 ?
for example "ssaadm stop -t 2 c3", will stop the 2nd tray on a ssa on controller 3
for example "ssaadm start -t 2 c3", will start the 2nd tray on a ssa on controller 3
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
# vxplex -g <dg name> dis <plex name> - Dissociate plex from volume
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 ?
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
The following 4 commands adds disk c1t5d0s0 under VM control with no private
region, c1t5d0s0 is added as disk datadg04 in the datadg diskgroup
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....
#!/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
' 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 |
Hey presto everything is back as it should be.81. Veritas Volume Manager Disaster
Recovery
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.
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
# cd /
# umount /a
<STOP> 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.
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.
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 <hostname>
# 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.
# fsck -n /dev/vx/rdsk/<datadg>/vol01
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.
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.
o Now we must first get the disk group ID. This is done with the command :
# vxdisk -s list
dgname: rootdg
dgid: 793279366.1025.npgts59
o This information is then used to import the original rootdg into our new 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.
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 Now that we have this configuration information, we deport the old rootdg and create a
brand new diskgroup,
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 :
o Add each of the other disks back into the diskgroup as folows :
o Repeat this for every disk in the disk group. Now, we remake our volume configuration.
o Repeat this step for every volume. The 'startall' option sometimes doesn't appear to work at
this point.
# fsck -n /dev/vx/rdsk/<datadg>/vol01
o If this is successful, then you simply configure the /etc/vfstab to reflect the changes and
that completes
the recover.
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
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.
Remove the old rootvol and swapvol which are there but not mounted
# df -k
84. Can I change the hostname of a machine without affecting Volume Manager ?
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.......
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
dg olddg 782676710.2488.dustbuster
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).
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.
13) Reload the object configuration into the new disk group.
dg newdg 782682285.2491.dustbuster
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
dg olddg 782676710.2488.dustbuster
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
dg newdg 782682285.2491.dustbuster
Output from command: there is a space between the " and the iommu path"
2. copy /etc/vfstab, and in the current vfstab, comment out all veritas mount points..
5. touch /etc/vx/reconfig.d/state.d/install-db
6. reboot
8. reboot
10. mountall
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.
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 ).
IF NOT, enter
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 :
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 :
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 ?
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:
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.
DETAIL DESCRIPTION:
vxconfigd -m disable
vxdctl init
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
The private region of a disk is specified by using the privlen option to the vxdisksetup
cammand. For example,
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.
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.
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.
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.
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.
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.
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.
*****NOTE*******
before these steps are done
Then continue:
forceload: drv/vxdmp
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 ?
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.
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.
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.
104. What are the different status codes in a 'vxdisk list' output ?
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 ?
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.
Labels parameters
Labels
vxvm vxvm Delete
Enter labels to add to this page:
Add Done
Comments (1)
• Hide Comments Show Comments
• Collapse All Collapsing… Expanding… Expand All
1.
Oct 14
kal-kal says:
Really helpful....
Really helpful....
o Permalink
The individuals who post here are part of the extended Sun Microsystems community and they
might not be employed or in any way formally affiliated with Sun Microsystems. The opinions
expressed here are their own, are not necessarily reviewed in advance by anyone but the
individual authors, and neither Sun nor any other party necessarily agrees with them.