Вы находитесь на странице: 1из 9

vxprint--------------------To display the object status

vxdiskadm------------------Text based admin utitlity


vxdisksetup----------------To bring the disk under vxvm control
vxdiskadd------------------To add the disk to vxvm by using the text based utility
vxdg-----------------------disk group admin commanad
vxdisk---------------------disk admin command
vxvol----------------------volume admin command
vxplex---------------------plex admin command
vxsd-----------------------subdisk admin command
vxassist-------------------Volume admin command
vxedit---------------------object editing command
vxmake---------------------object creating command
vxrecover------------------will do the plex or subdisk recovery
vxmend---------------------pl
vxtask---------------------To list the running vxvm tasks
vxmirror-------------------To mirror the volume
vxrootmir------------------To mirror the root volume
vxresize-------------------To resize the volume and the filesystem
vxencap--------------------To encapsulate a disk
vxinfo---------------------List the volume status
vxstat---------------------Display the i/o activities on objects
vxtrace--------------------
vxbootsetup----------------
vxconfigd------------------Configuration daemon
vxiod----------------------IO daemon
vxdctl---------------------Configuration daemon controll command
vxevac---------------------To evacuate a disk
vxnotify-------------------To notify about the object failures
vxreattach-----------------To reattach a disk
vxserial-------------------
vxsparecheck---------------To check the availability of the spare disk
vxunroot-------------------
plexrec--------------------
vxconfigbackup-------------
vxcdsconvert---------------
vxconfigbackupd------------
vxbootsetup----------------
vxfsconvert----------------

# vxlicense -c ----> To install the license.


# vxlicense -p ---->To print the details of the installed license.

# vxlicrep ---------To display the license details


# vxlicinst --------To install a new license
# vxlictest --------To test the installed license

To display the native OS device name of the VM disk

# vxdisk path |egrep diskname

The default size of the private region of a VM disk in VXVM5.0 is 32MB.

# vxdmpadm getctrl all ----->To get information about the physical controller.
To list all volumes on your primary boot disk, use the command:
# vxprint -t -v -e�aslist.aslist.sd_disk="boot_disk"�

To mirror only those file systems on the root disk that are required to boot
the system, run the following command:

# /etc/vx/bin/vxrootmir altboot_disk

To define an alternate boot disk

ok nvramrc=devalias vx-altboot_disk
or
# eeprom nvramrc=devalias vx-altboot_disk

To mirror other file systems on the root disk

# vxassist mirror homevol alternate_disk

To remove the mirror from the root disk,remove the plexes from the disks
other than the root disk

# vxplex -r rm dis plx1 plx2 plx3(all plx* are plex names)


# vxunroot

To check whether the extened copy service is enabled or not(Direct disk to


disk copy)
# vxprint -l disk03

To Remove the Disks:

First stop the volume and move to some other disk in that dg.
After that remove the disk from the dg by using the command:

# vxdg rmdisk diskname.


Then remove the disk from the VXVM controll.

# vxdiskunsetup devicename

To move the volume to some other disk in the dg execute the command:

# vxassist move mktg !mktg01--->will move the volume mktg to a disk other than
mktg01

We can use the vxedit command to rename a disk:(It will not rename the
corresponding subdisks)

# vxedit rename diskold disknew

We can reserve the disk,so the vxassist command will not make use of that
particular disk unless we specifies the disk name while creating the new volume.

# vxedit set reserve=on,off diskname

To set the DefaultDG for the VXVM we can set the variouble VXVM_DEFAULTDG or

# vxdctl defaultdg dgname

We can display the defaultdg and the bootdg by the commands:


# vxdg defaultdg
# vxdg bootdg

Prior to Vxvm Ver4.0 the system installed with vxvm will automatically
creates a default disk group which is rootdg.But in later versions it is not
necessary to create the diskgroup while installing the vxvm.We need to create the
Dg only at the time of disks are placing under the controll of vxvm.

CDS----Crossplatform Disk Sharing

To get the information about the existing disk groups:

# vxdg list

# vxdg list dgname

For getting the disk id and the dgid:


# vxdisk -s diskname

For getting the freespace in the DG


# vxdg free dgname

To add a new disk to volume manager we can use:


# vxdiskadm or

# vxdiskadd devicename Both will invoke the text based utility(vxdiskadm)

We can use the command line utility also:

# vxdisksetup -i devicename -----will place the disk under the vxvm controll.

# vxdg init dgname set cds=on|off diskname=devicename------by default the cds


option is on.

# vxdg -g dgname adddisk diskname=devicename-----To add disk to an existing dg.

To remove the disk from the DiskGroup:


# vxdg -g dgname rmdisk diskname------Use -k if subdisks are there in the disk.

To remove the disk from the controll of the VXVM


# vxdiskunsetup devicename

To stop the volume in a diskgroup


# vxvol -g dgname stopall

To start all volumes in a disk group


# vxvol -g dgname startall

To deport a diskgroup
# vxdg -g dgname deport

To import a diskgroup
# vxdg -g dgname import

To rename the dg during import


# vxdg -t -n newdgname import dgname----t argument is for temporary rename,the
name will not persist across the reboots.We can use the -c option to unlock the
import lock.

To rename the dg while doing the deport


# vxdg -h hostname -n newdgname deport dgname-----This will import the dg
automatically in the newdgname while the alternate host reboots.

To clear the locks on a specific set of devices

# vxdisk clearimport devicename

# vxdg -c import dgname

# vxdg -f import dgname --------To frocefully import the dg

To move the self contained objects from one dg to another.


# vxdg -o expand move sourcedg targetdg diskname--This will move the disk and if
any other disk which containing any volumes which is shared by the particular
disk.

To disable a disk group


# vxdg deport dgname

To destroy a disk group


# vxdg destroy dganame

We can recover a destryed diskgroup by using the diskgroupid


# vxdisk -s list diskname -----will show the diskgroup id

# vxdg import dgid-----By using the dgid we can import the dg

To display the version of the dg

# vxdg list dgname or

# vxprint -l

To upgrade a diskgroup
# vxdg upgrade dgname

By default the disk group is created with the highest version available with
that release of the VXVM.In some cases we need to to create the dg with lower
versions:

# vxdg -T 40 init newdg newdg01=c0t3d0s2.

We can create the subdisk by using the command:


# vxmake -g dgname sd sdname diskname,offset,length

# vxprint -st ----->Will display the information about all subdisks

# vxprint -l subdisk -------> will display the detailed information about the
specified subdisk.

We can move the subdisks by using the vxsd command:


# vxsd -g dgname mv s_sdisk d_sdisk-----The attached plex will dissociated the
source the sd from plex and will attach the destination sd with the plex.
We can split the subdisks also.
# vxsd -g dgname -s size split s_sdisk d_sdisk1 d_sdisk2--->The size should be the
size of the d_sdisk1

We can join subdisks using the vxsd:


#vxsd -g dgname sd join sd1 sd2 sd3 sd4 sdtarget--->will join the sd1..sd4 to
sdtarget.

We can attach the subdisks to the plexes at the time of creation:


# vxmake -g gdname plex plexname sd=sd1,sd2,sd3,sd4----

We can also attach(associate) the subdisks to the existing plexes


# vxsd -g dgname assoc plexname sd1 sd2 sd3 sd4

We can attach log subdisks to the existing plex:


# vxsd -g dgname aslog plexname sdname

We can also use the vxassist command for attaching the log plex
# vxassist -g dgname addlog volume disk----this will automatically creates the
subdisk and attches to the plex.

We can detach the subdisks from the existing plexes by using the command
vxsd
# vxsd -g dgname dis sdname ---->will remove the subdisk from the associated plex
in dg.

We can remove the subdisk from the plex:

# vxedit -g dgname rm subdisk

We can create plexes using the command:


# vxmake -g dgname plex plexname sd=sd1,sd2,sd3

we can create the striped plex by specifying the plex type

# vxmake -g dgname plex plexname layout=stripe ncolumn=3 stwidth=128


sd=sd1,sd2,sd3

For listing plex information


# vxprint -pt ------List the info about the plexes
# vxprint -l plexname -----will list the detailed info about the plex.

We can attach a plex with the volume by using the command:


# vxplex -g dgname att volname plexname

We can also create the attach the while creating the volume
# vxmake -g dgname -U fsgen vol volanme plex=plename1,plexname2

We can keep the plexes in offline state by using the command :


# vxmend -g dgname off plexname1 plexname2

We can temporarily detach a plex from a volume


# vxplex -g dgname det plexname

We can reattach the plex to an ONLINE volume:


# vxplex -g dgname att volname plexname
# vxmend -g dgname on plexname
If the output of the vxinfo command shows the volume is unstartable we have
to set the state of one of the plex as CLEAN:
# vxmend fix clean plexname-----This will set the plex state as CLEAN
# vxvol start volname ------>will start the volume

We can move the contents of one plex to another :


# vxplex -g dgname mv oldplex newplex

We can copy the contents of the volume to another plex:


# vxplex -g dgname cp volname plexname -----This will copy the contents of the
volume to the newplex

We can dissociate and remove the plex from the volume in a single stretch:
# vxplex -g dgname -o rm dis plexname----This will do the removal in single step
# vxplex -g dgname dis plex
# vxedit -g dgname -r rm plexname

We can create the Volumes by using the advanced approach(vxmake) or by the


assisted approach.

# vxassist -g dgname make volname size----->The default values for the vxassist
will be specified in the /etc/default/vxassist fiel.We can display that by using
the command
# vxassist help showattrs

# vxassist -g dgname maxsize layout=raid5---->will display the maximum size of the


raid5 volume which can be created in the DG.

We can create the volumes on specified disk by specifying the disk name in
the vxassist.

# vxassist -b -g dgname make volname size diskname1 diskname2


# vxassist -b -g dgname make volname size \!diskname ---->will exclude the
diskname while creating the volume.
# vxassist -b -g name make volname size \!ctlr:c2--->will exclude all the disks
from the controller c2.

We can create the mirrord volumes by using the vxassist command:

# vxassist -g dgname make volname size layout=mirror nmirror=2----will create a


mirrored volume with two associated plex.
# vxassist -g dgname make volname size layout=mirror logtype=drl nlog=2---will
create the mirror with DRL plex.
# vxassist -g dgname make volname size layout=strpe stripeunit=32k ncol=5----will
create the striped volume of 5 stripes.
# vxassist -g dgname make volname size layout=raid5 nlog=2 ----will create the
raid5 volume with 2 raid5 logs

While we creating the volumes using the vxassist it will initiate the
volumes after creating(we can disable this by specifying the init=none).Using the
-b option with the vxassist will do the initialisation of the volumes in
background.We can use the init=active option also for the same purpose.It will
prevent the empty data plexes in a mirror from syncing.

# vxassist -b -g dgname make volname size layout=mirror----> The -b option in this


example will do all the synchronisation in the background.
# vxassist -g dgname make volname size layout=mirror init=active--->will fill all
the stripes in the volume with zeros in the background.NO need to give the -b
option.

# vxassist -g dgname make volname size layout=raid5 init=zero-----will also do the


above.

We can use the vxmake command also for creating volumes:

# vxmake -g dgname plex plexname layout=raid5 ncolumn=4 stwidth=32k


sd=sd1,sd2,sd3,sd4

we can create the plex without specifying the subdisks and later we can add
sd by using the vxsd command:

# vxmake -g dgname plex plexname layout=raid5 ncolumn=4 stwidth=32k---If no


subdisks are specified the ncolumn should be specified.

# vxsd -g dgname assoc plexname sd1,sd2,sd3,sd4----This will attach the subdisks


to the plex.

Now we can create the new volume and attach the plexes to the volume:

# vxmake -g dg -U fsgen vol volname plex=plex1,plex2,plex3-----will create the


raid volume.

# vxvol start volname------>will start initialise and start the volume


# vxvol -g dgname init enable volname----->will enable the will not intitialize
# vxvol -g dgname init active volname----->will initialise the volume
# vxvol -g dgname init zero volname------>will zeros the volume
While creating a task we can tag the with a tag identifier,so we can easily
track the task and all the child which will be created by the parent task will
also inherite the tag.
# vxrecover -g dgname -t tagname -b volname----->will tag the tagname to the task.

# vxtask list---->To list all the vxvm tasks running on the system.-h option cna
be used to display the information about the child tasks also.
# vxtask -p list----->For listing the paused tasks
# vxtask -i tagnamw list ----> will list the tasks with the tagname
# vxtask resume taskid(or tasktag)---->will resume the paused task.
# vxtask pause taskid---> will pause the task.
# vxtask monitor taskid----->will monitor the process
# vxtask abort revoerall---->will abort the process
# vxvol stop volumename ------>will stop the volume.
# vxvol stopall------WIll stop all the volume
# vxvol -g dgname maint volume ------>will put the volume offline
# vxvol start volname ----->will start the volume.
# vxvol startall ---->will start all the volumes
# vxrecover -s volname ----> will also start the volume.
# vxrecover -s -----> to start all the disabled volumes

# vxassist -g dgname mirror volname ----> To mirror the existing volume


We can create the mirror by creating another plex and by attching it with
the existing volume:
# vxmake -g dgname plex plexname sd=sd1,sd2....----->will create the new plex
# vxplex -g dgname att volname plexname---->will attach the new plex with the
volume.
# vxmirror -g dgname -a ----->will mirror all the existing volumes in the dg
# vxmirror -g dgname -d yes--->will create all the volumes which will be creating
in the dg as mirroed.We can create normal volumes by specifying the nmirror=1
while creating the volumes after this.

To mirror a disk:
# vxprint -l diskname -----will display the details of the diskname,from that we
will get the private and public lenght of the disk.
# vxdisk list diskname ----> will also gives the details.
# vxdisksetup -i devicename prioffset=0 privlen=xxxx publen=xxxx----This will add
the disk into the controll of the VXVM.
# vxdg -g dgname adddisk diskname=devicename----->will add the disk into the
particular DG.
# vxmirror -g dgname disk1 disk2--->will mirror the disk1 to disk2
To remove a mirror:

# vxassist -g dgname remove mirror volname----This will remove the mirror from the
volume.
# vxplex -g dgname -o rm dis plexname -----will also remove the mirror plex from
the volume
# vxplex -g dgname dis plexname ------dissociate the plex from the volume
# vxedit -g dgname -r rm plexname ----->will remove the plex from the volume
# vxedit -g dg -v set user=user------> volumeChange ownership of a volume
# vxplex -g dg dis plex-------->Remove Mirror
# vxedit -g dg -r rm plex------>Remove plex.
# vxplex -g dg -o rm dis plex-------------> Remove Mirror and delete plex
# vxassist -g dg convert volume layout=mirror-concat---->To convert the layout to
mirror-concat.
# vxstat -g newdg -i 5 -c 5 -p vol04-02-------Will display the plex iostat(i-
interval,c-count)
# vxevac -g <dg> disk03 disk02----->To move all the subdisks from one disk to
another.
# vxedit -fr rm vol01----------to remove the volume.
# vxmend clear tutil0 vol01-01------to clear the tutil on plex.
# vxedit set failing=off disk05-----To clear the failing flag from a disk.
# vxprint -t -v -e 'aslist.aslist.sd_disk="boot_disk_name"'----->To list all
volumes on the primary boot disk
# vxdg list disk_group_name----to display the version number of the vxvm
# vxdg [-T version] upgrade disk_group_name-----to upgrade the version of the disk
group
# vxdmpadm listctlr all----->To list the controllers attached to the disk which
are attached to the system.
# vxdmpadm getsubpaths ctlr=c1---->To display all paths that are connected to
controller.

# vxprint -l disk03
Disk group: rootdg
Disk: disk03
info: diskid=1234567890.59.vm250e1.veritas.com
assoc: device=c2t2d0s2 type=auto <== NEW
flags: autoconfig ecopy_enabled
device: pubpath=/dev/vx/dmp/c2t2d0s4
privpath =/dev/vx/dmp/c8t2d0s3 ,== NEW
devinfo: publen=35354136 privlen=9167

To exclude the disks and controllers from the vxdiskadm we can create the file
/etc/vx/disks.exclude-----for the disks,mention the disk name as c0t0d0 in one
line
/etc/vx/cntrls.exclude-----for the controllers,mention the controller name as c0
in one line
/etc/vx/enclr.exclude----for the enclosure.
# vxvol -g testdg rdpol round v01-----To set the read policy as round robin.
# vxstat -s -ff home-02 src-02-------To see the failure status of plex
# vxvmconfigbackup-------------------To take the backup of the volume
configuration
# vxconfigd -k -x cleartempdir-------
# vxprint -g datadg -F%name -e 'any pl_.sd_disk="datadisk01"'-------To display the
objects in the disk
# /usr/lib/vxvm/bin/vxencap -A -c -g rootdg -f sliced -s 2048
rootdisk=c1t0d0s2------To encapsulate the rootdisk.
# vxdmpadm getdmpnode nodename=c3t2d1s2------To display the DMP node that control
aphysical path
# vxdmpadm getdmpnode enclosure=enc0----To display the DMP nodes for the specified
enclosure
# vxdmpadm getlungroup dmpnodename=c11t0d10s2------To display the DMP nodes in the
same LUN group as the mentioned DMP node.
# vxdmpadm getsubpaths dmpnodename=c2t66d0s2---------Displays all the paths to the
LUNs that are controlled by the specified DMP nodename.
# vxdmpadm getsubpaths ctlr=c2
# vxdmpadm listctlr all-----To list all the DMP information about the controllers
# vxdmpadm listctlr enclosure=enc0 type=ACME
# vxdmpadm listenclosure enc0
# vxdmpadm listenclosure all
# vxdmpadm iostat start
# vxdmpadm iostat show all
# vxdmpadm iostat start memory=4096
# vxstat -g mydg -s -ff home-02 src-02------To determine which disk is having
write errors
# fsadm -F vxfs -b "newsize" -r /dev/vx/rdsk/testdg/datavol /datavol
# growfs -M /dev/md/rdsk/d0 /mnt
# vxdisk �g datadg resize datadg01 length=8GB---->To resize the disk if the LUN is
resized.
# vxassist �g diskgroup help showattrs----To display the vxassist attributes
To start/stop the VEA server manually � /etc/init.d/isisd start/stop/restart

#./fsadm -F vxfs -o largefiles /opt/oracle

Вам также может понравиться