Vous êtes sur la page 1sur 5

Sample Veritas commands Page 1 of 5

Sample veritas commands and their meaning

Listed below is a selection of standard varitas volume manager commands and there meaning
If you think i should add any commands or more indepth expllanations then please send me an e-mail.
e-mail: neville_seed@yahoo.com

Command Meaning
Interactive front end to the vxdisk program
vxdiskadmin

command to remove a grayed out or obsolete disk, or remove a disk from


vxdisk rm disk99
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? Allow a disk to be imported after a server crash.
s?
vxdisk rm c?t?d? remove a disk so that it is no longer under volume manager control
vxdiskadd c?t?d? add or bring a disk under volume manager control
or It might help to newfs the s2 slice of the disk and perform a vxdctl enable
vxdisksetup -i c?t?d? to get it to add a disk

vxassist make neville


make a volume called neville of size 100m using any available disk
100m
vxassist make neville
make a volume called neville to be 100m big using the disk disk99.
100m disk99
vxassist mirror neville Uses the disks disk99 and disk88 to make a mirror on the volume called
disk99 disk88 neville
vxassist mirror neville 50m
make a 50 mb mirror called neville using any two free disks
layout=mirror
vxassist make neville 50m
layout=mirror disk99 make a 50mb mirror using the two disks disk99 and disk88
disk88
xvassist make neville 50m
layout=mirror,stripe,log make a 50mb stripe disk using disks disk99 and disk88 and mirror this on
disk99 disk88 disk77 a stripped mirror using disk77 and disk66 and use a log subdisk
disk66
vxassist make neville make a 100mb raid5 volume called neville on any free disk
100m layout=raid5
vxassist -g rootdg mirror In the disk group rootdg mirror volume vol99 to vol88
vol99 vol88
mirrior the disk neville on any free disk
vxassist mirror neville

vxassist naxsize This shows the largest stripe you can have on the system i.e.

http://www.geocities.com/arndike/veritas-commands.html?200823 11/23/2008
Sample Veritas commands Page 2 of 5

layout=stripe Maximum volume size: 18952192 (9254Mb)


vxassist naxsize This shows the largest raid5 partition you can have on the system
layout=raid5 Maximum volume size: 18952192 (9254Mb)
vxassist growto neville grow the size of the volume neville to 2000 512byte sectors
2000
vxassist growby neville grow the size of the volume neville by 2000 512byte sectors
2000
vxassist shrinkto neville shrink the volume neville to 2000 512byte sectors
2000
vxassist shrinkby neville shrink the volume neville by 2000 512byte sectors
2000
vxassist move neville ! move the volume neville to any ouhter disk except disk99
disk99
shows how much the volume can be grown by i.e.
vxassist maxgrow volume-
Volume volume-name can be extended by 9476096 to: 12549992
name
(6127Mb+1896 sectors
vxassist addlog volume-
create a log disk for a raid5 or mirror of the volume volume-name
name

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

vxstat -d report disk statistics

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

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

vxdg -g homedg rmdisk from the disk group homedg remove the disk disk99
disk99
vxdg -g homedg adddisk
in the disk group homedg add the physical disk c0t0d0 calling it disk99
disk99=c0t0d0
xvdg free display free space on the disks

http://www.geocities.com/arndike/veritas-commands.html?200823 11/23/2008
Sample Veritas commands Page 3 of 5

vxsd aslog disk-name


add a log disk disk-name to the volume volume-name
volume-name

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

vxvol rdpol prefer volume-


set a prefered plex to read from
name plex-name
vxvol rdpol round neville sets a round robin read policy on the volume neville
vxvol -g disk-group
will stop the volume volume-mane in the group disk-group
volume-name
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- sets the plex to a clean state so thet you can start the volume and aceess
name data

ssaadm display -p c? show disk iops


ssaadm -t 1|2|3 stop|start
stop or start the controller controller. this effectivly stops whole disk trays.
controller

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


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

http://www.geocities.com/arndike/veritas-commands.html?200823 11/23/2008
Sample Veritas commands Page 4 of 5

vxdctl mode / enable / the enabled mode. to check this use the command vxdctl mode if it is not
disable enabled enable it.
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
vxiod
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)
This is the main deamon and needs to be running all the time. It is started
vxconfigd
at boot time.

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
vxprint -ht 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)

http://www.geocities.com/arndike/veritas-commands.html?200823 11/23/2008
Sample Veritas commands Page 5 of 5

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 display information about volumes
or
xvrpint -vt
vxprint -l plex-name
or display information about plex(es)
vxprint -lp
vxprint -l diskname-??
or display information about Subdisks
vxprint -st
vxprint -t -v -e
'aslist.aslist.sd_disk="boot- list all the volumes on the boot disk boot-disk-name
disk-name"'

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

http://www.geocities.com/arndike/veritas-commands.html?200823 11/23/2008

Vous aimerez peut-être aussi