VERITAS Commands : Quick Refference


Veritas Command Reference



Command
Meaning
vxdiskadmin
Interactive front end to the vxdisk program
vxdisk rm disk99
command to remove a grayed out or obsolete disk, or remove a disk from a disk group. In this example disk99
vxdisk list
List all disks under volume manager control and give there status.
vxdisk clearimport c?t?d?s?
Allow a disk to be imported after a server crash.
vxdisk rm c?t?d?
remove a disk so that it is no longer under volume manager control
vxdiskadd c?t?d?
or
vxdisksetup -i c?t?d?
add or bring a disk under volume manager control
It might help to newfs the s2 slice of the disk and perform a vxdctl enable to get it to add a disk


vxassist make neville 100m
make a volume called neville of size 100m using any available disk
vxassist make neville 100m disk99
make a volume called neville to be 100m big using the disk disk99.
vxassist mirror neville disk99 disk88
Uses the disks disk99 and disk88 to make a mirror on the volume called neville
vxassist mirror neville 50m layout=mirror
make a 50 mb mirror called neville using any two free disks
vxassist make neville 50m layout=mirror disk99 disk88
make a 50mb mirror using the two disks disk99 and disk88
xvassist make neville 50m layout=mirror,stripe,log disk99 disk88 disk77 disk66
make a 50mb stripe disk using disks disk99 and disk88 and mirror this on a stripped mirror using disk77 and disk66 and use a log subdisk
vxassist make neville 100m layout=raid5
make a 100mb raid5 volume called neville on any free disk
vxassist -g rootdg mirror vol99 vol88
In the disk group rootdg mirror volume vol99 to vol88
vxassist mirror neville
mirrior the disk neville on any free disk
vxassist naxsize layout=stripe
This shows the largest stripe you can have on the system i.e.
Maximum volume size: 18952192 (9254Mb)
vxassist naxsize layout=raid5
This shows the largest raid5 partition you can have on the system
Maximum volume size: 18952192 (9254Mb)
vxassist growto neville 2000
grow the size of the volume neville to 2000 512byte sectors
vxassist growby neville 2000
grow the size of the volume neville by 2000 512byte sectors
vxassist shrinkto neville 2000
shrink the volume neville to 2000 512byte sectors
vxassist shrinkby neville 2000
shrink the volume neville by 2000 512byte sectors
vxassist move neville !disk99
move the volume neville to any ouhter disk except disk99
vxassist maxgrow volume-name
shows how much the volume can be grown by i.e.
Volume volume-name can be extended by 9476096 to: 12549992 (6127Mb+1896 sectors
vxassist addlog volume-name
create a log disk for a raid5 or mirror of the volume volume-name


vxtrace volume-name
traces all the I/O on the selected volume


vxstat -d
report disk statistics


vxedit -g rootdg rename disk99 disk88
rename the disk disk99 to be called disk88 in the group rootdg
vxedit -g homedg set spare=on disk99
set disk99 in the group homedg to ba a hot spare
vxedit set user=red group=green mode=0666 neville
sets the user to red, the group to green and the mode rw-rw-rw on the volume neville
vxedit -rf rm neville
remove a volume called neville and any plex(es) and subdisks
vxedit set comment"testing" subdisk01-01
set the comment field of sunbisk subdisk01-01 to testing


vxmirror rootdisk disk99
mirror all the volumes on the disk rootdisk to the disk disk99


vxdg -g homedg rmdisk disk99
from the disk group homedg remove the disk disk99
vxdg -g homedg adddisk disk99=c0t0d0
in the disk group homedg add the physical disk c0t0d0 calling it disk99
xvdg free
display free space on the disks
vxsd aslog disk-name volume-name
add a log disk disk-name to the volume volume-name


vxsd mv subdisk-99 sundisk-88
move the contents of subdisk-99 to subdisk-88 then move subdisk-88 to the plex where subdisk-99 was. this leaves subdisk-99 free for whatever.
vxsd join subdisk-88 subdisk-77 subdisk-99
joins subdisk-88 and subdisk-77 to create the new bigger subdisk-99


vxvol rdpol prefer volume-name plex-name
set a prefered plex to read from
vxvol rdpol round neville
sets a round robin read policy on the volume neville
vxvol -g disk-group volume-name
will stop the volume volume-mane in the group disk-group
vxvol maint neville
puts the volume neville into maintainance mode


vxplex att neville plex-01
attaches the plex plex-01 to the volume neville


vxmend off plex-name
sets the plex plex-name offline
vxmend on plex-name
sets the plex plex-name on
vxmend fix clean plex-name
sets the plex to a clean state so thet you can start the volume and aceess data


ssaadm display -p c?
show disk iops
ssaadm -t 1|2|3 stop|start controller
stop or start the controller controller. this effectivly stops whole disk trays.


vxrecover -s volume-name
will start recovery on the volume volume-name
vxrecover -s
will start recovery on all volumes
vxrecover -b volume
this will bring the plexes bacl online. the -b means background mode


vxinfo volume-name
usefull info about the volume. usefull if it wont come up.


vxmake plex plex-name sd=sub-disk-name
make a plex called plex-name using the subdisk sub-disk-name
vxmake sd sub-disk-name disk-name,0,10000
this will make a subdisk called sub-disk-name at the beginning of the disk disk-name of size 10000 blocks.
if you wanted to put another sub-disk on this disk then you would have an offset of the size of the previous sub-disk ie 10000 e.g.
vxmake sd sub-disk-name2 disk-name,10000,20000
Daemons

vxdctl mode / enable / disable
When doing any disk configurations check that the vxconfigd daemon is in the enabled mode. to check this use the command vxdctl mode if it is not enabled enable it.
vxiod
This is the daemon that allows for extended I/O calls without blocking calling processes.
As this is a kernel thread you cannot see it with ps hense you have to use the vxiod command to see if it is running.
use the command vxiod set X to set the number of threads where X is the desired number (usually 10)
vxconfigd
This is the main deamon and needs to be running all the time. It is started at boot time.


vxprint -ht
You will get a display about the volumes something
like :-
 
Disk group: rootdg
 
 
DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
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
 
dg rootdg       default      default  0        902269639.1025.taupo
 
dm disk02       c0t1d0s2     sliced   3590     17678493 -
dm rootdisk01   c3t5d0s2     sliced   3590     17678493 -
 
v  rootvol      root         ENABLED  ACTIVE   1027026  ROUND     -
pl rootvol-01   rootvol      ENABLED  ACTIVE   1027026  CONCAT    -        RW
sd disk02-01    rootvol-01   disk02   0        1027026  0         c0t1d0s2 ENA
pl rootvol-02   rootvol      ENABLED  ACTIVE   1027026  CONCAT    -        RW
sd rootdisk01-01 rootvol-02  rootdisk01 0      1027026  0         c3t5d0   ENA
 
v  swapvol      swap         ENABLED  ACTIVE   2050461  ROUND     -
pl swapvol-01   swapvol      ENABLED  ACTIVE   2050461  CONCAT    -        RW
sd disk02-02    swapvol-01   disk02   1027026  2050461  0         c0t1d0s2 ENA
pl swapvol-02   swapvol      ENABLED  ACTIVE   2050461  CONCAT    -        RW
sd rootdisk01-02 swapvol-02  rootdisk01 1027026 2050461 0         c3t5d0   ENA
 
v  usr          fsgen        ENABLED  ACTIVE   2050461  ROUND     -
pl usr-01       usr          ENABLED  ACTIVE   2050461  CONCAT    -        RW
sd disk02-03    usr-01       disk02   3077487  2050461  0         c0t1d0s2 ENA
pl usr-02       usr          ENABLED  ACTIVE   2050461  CONCAT    -        RW
sd rootdisk01-03 usr-02      rootdisk01 3077487 2050461 0         c3t5d0   ENA
 
v  var          fsgen        ENABLED  ACTIVE   3073896  ROUND     -
pl var-01       var          ENABLED  ACTIVE   3073896  CONCAT    -        RW
sd disk02-04    var-01       disk02   5127948  3073896  0         c0t1d0s2 ENA
pl var-02       var          ENABLED  ACTIVE   3073896  CONCAT    -        RW
sd rootdisk01-04 var-02      rootdisk01 5127948 3073896 0         c3t5d0   ENA
 
 
 
This says that in the group rootdg there are 4 volumes,
those being rootvol, swapvol, usr and var.
 
An example of a volume will be var.  This says that the 
volume is made up of 2 plexes called var-01 and var-02.
In tern the plex var-01 is made up of the subdisk
disk02-04 and the plex var-02 is made up of the subdisk 
rootdisk-04.
 
The filesystem types of the volumes in this group are :-
rootvol                     root          (root filesystem)
swapwol                  swap        (swap file system)
/usr                         fsgen       (generic filesystem)
/var                         fsgen   (generic filesystem)
 
other posssible filsystem types are gen and raid5
vxprint -l volumename
or
vxprint -vl
or
xvrpint -vt
display information about volumes
vxprint -l plex-name
or
vxprint -lp
display information about plex(es)
vxprint -l diskname-??
or
vxprint -st
display information about Subdisks
vxprint -t -v -e 'aslist.aslist.sd_disk="boot-disk-name"'
list all the volumes on the boot disk boot-disk-name


vxmksdpart -g rootdg diskpart 1 0x03 0x01
Rebuild the partition table after recovering from a root disk failure.
This is after re-mirroring the disk

Post a Comment

0 Comments