Veritas Volume Manager Command List
Veritas Volume Manager Command List
Veritas Volume Manager Command List
Set up a preferred reading plex, this can be useful if we have a sparse plex
(plex in RAM):
vxvol -g <group> rdpol prefer <volname> <plexname>
instead of prefer we can have round or sdeet
View configuration:
vxprint -th
List disks:
vxdisk list
vxdisk -o alldgs list (shows deported disks)
To encapsulate use:
vxencap -g <discgroup> <devicename>
Resize a filesystem:
vxresize -g <disk group> -F <fstype> <volume> <size>
Other Examples:
vxedit rm disk10
to remove a greyed out or obsolete disk in this case disk10
or to remove a disk from a diskgroup
to make a subdisk
vxdisk rm c#t#d#s2
to remove a disk so it's out of vm control
vxdiskadd c#t#d#
to add bring a new disk under vm control
or you can try...
vxdisksetup -i c#t#d#
if this doesn't get the plex back into a kernel state of enabled
try
remove a subdisk by
vxedit rm disk##-##
this shows how you how much you can grow a volume by..
vxassist maxgrow vol01
Volume vol01 can be extended by 18245632 to 18450432 (9009Mb)
vxrecover -s vol_name
will start a volume
vxrecover -s
will start all volumes
vxmend on plex_name
to start plex in volume
vxrecover -b vol
well bring stale plexes back online, -b indcates background job
vxdg list
lists all diskgroups
vxdisk list
lists all disks under VM control and which group their in
vxprint -vt
vxprint -l volume_name
vxprint -vl
vxprint -lp
vxprint -l plex_name
displays info about plexes
vxprint -st
vxprint -l disk##-##
displays info about subdisks
ssaadm display -p c#
show disk iops over 10 seconds...
vxtrace vol
traces all i/o on a volume..
vxstat -d
to report disk stats
vxdg free
displays the free space on the disks
Table 3-1 Command Comparison
vxdiskadm
Option list in the vxdiskadm
menu displays disk information.
Synchronizes mirrors that
vgsync vxrecover Starts resynchronization and
are stale in one or more
recovery of volumes.
logical volumes.
Deports a disk group from the
Removes the definition of vxdg deport
system.
vgremove a volume group from the
vxdiskadm Option 9 in the vxdiskadm menu
system.
removes a disk group.
Deports a disk group from the
vgexport Removes a volume group vxdg deport system.
from the system. vxdiskadm Option 9 in the vxdiskadm menu
removes a disk group.
Adds a volume group to
the system by scanning Imports a disk group.
vxdg import
vgimport physical volumes which Option 8 in the vxdiskadm menu
vxdiskadm
have been exported using imports a disk group.
vgexport.
No LVM command vxplex Operates on plex objects.
lvchange,
lvextend,
Performs operations on vxvol Operates on volume objects.
logical volumes.
lvcreate,
lvreduce
vxrootmir (HP-UX Prepares a disk to support booting
11i Version 1.5 Only) (HP-UX 11i Version 1.5 only).
No LVM command vxsd Operates on subdisk objects.
No LVM command vxmend Fixes simple misconfigurations
2.vgextend /dev/vol_grp\
/dev/dsk/second_disk
LVM Mirroring a disk involves several steps.
3.lvextend -m no_of_mirrors\
/dev/vol_grp/lvol_name
/dev/dsk/second_disk
LVM Mirroring the root disk involves several pvcreate -B /dev/rdsk/second_disk
steps.
mkboot -l /dev/dsk/second_disk
vgextend /dev/vol_grp\
/dev/dsk/second_disk
Task
Description Example
Type
lvextend -m no_of_mirrors\
/dev/vol_grp/root_lvol
/dev/dsk/second_disk
lvlnboot -r /dev/vol_grp/lvol_name
Mirroring a disk
vxmirror -g disk_group -d yes|no
To mirror volumes on a disk or control disk_name [new_disk_name]
default mirroring and causes a disk to have
VxVM its contents mirrored to available space on vxmirror -d yes disk_name
another disk.
Option 6 in the vxdiskadm menu performs this
Note: Root disk mirroring is supported on task.
HP-UX 11i Version 1.5 only.
Create a logical volume in LVM volume lvcreate -L vol_size /dev/vol_grp
LVM
group.
Create a volume of one of these layout
vxassist make vol_name length
types:
vgreduce /dev/vol_grp
/dev/dsk/disk_name
The Multipathing disk devices in the Volume
Manager represent virtual devices with one The DMP feature in VxVM sets up links
or more physical access paths to a automatically. It is not required to set up links
particular physical disk. Dynamic separately.
VxVM
Multipathing provides reliability of disk Refer to the manual page vxdmp (7) and the
access by dynamically switching to another VERITAS Volume Manager 3.1 Administrator's
physical path in the event of failure of a Guide for more information on DMP.
path.
lvcreate -l num_log_extents -m 1 -n
LVM Create a mirrored logical volume.
mirr_lv /dev/vol_grp
vxassist make vol_namelength
Create a mirrored volume/plex or add a layout=mirrorvxmake
VxVM
mirror to an existing volume. plexplex_namesdisk_name
vxplex att vol_nameplex_name
Reduce a single/double mirrored logical lvreduce -m 0 /dev/vol_grp/mirr_lv
LVM volume to an unmirrored logical volume.
lvremove /dev/vol_grp/mirr_lv
Remove a mirrored logical volume.
Remove mirrors or reduce the number of
plexes/mirrors. vxplex -o rm dis plex_name
VxVM
Remove a volume with the plexes vxedit -rf rm vol_name
associated with it.
lvextend -m 2
LVM Increase the number of mirror copies.
/dev/vol_grp/lvol_name
Add mirrors to a volume or increase the vxassist mirror vol_name
VxVM
number of plexes.
Convert a mirrored logical volume into two lvsplit -s backup
LVM logical volumes.
/dev/vol_grp/lvol_name
Split a logical volume.
Task
Description Example
Type
Hot-relocation: in addition to using disks as hot spares, the hot relocation No action needed for hot
facility can also use any available free space in the disk group. If no disks relocation.
have been designated as spares when a failure of a redundant object
occurs, VxVM automatically uses any available free space in the disk To move hot-relocated
group in which the failure occurs. If there is not enough spare disk space, subdisks back to the
a combination of spare space and free space is used. After a disk is
repaired, you can move all the hot-relocated subdisks back to the original
Task Description Example
original disk:
disk using the vxunreloc(1M) utility.
vxunreloc disk_name
vxedit rename
Rename a disk old_diskname
new_diskname
vxdisk offline disk_name
Alternatively, menu option
Offline a disk.
12 of vxdiskadm
performs this task.
vxdisk online
disk_name
Online a disk.
Select menu option 10 of
vxdiskadm.
vxevac -g
disk_group
Evacuate a disk.
medianame
new_medianame
Select menu option 4 of
Replace a disk.
vxdiskadm.
vxrecover -g
Recover volumes on a disk. disk_group vol_name
medianame
vxdisk list
Display a DMP node.
meta_device
vxdg -tC -n
Rename a disk group.
newdg_name
vxedit -v rename
name newname
Rename a volume.
Update the /usr/fstab
file with the new name.
vxassist addlog
Add a DRL log to a volume.
vol_name
vxassist snapshot
Create a snapshot copy of a volume. vol_name
temp_vol_name
vxrecover -g
disk_group volume
Recover a volume. medianame
vxmend fix clean
plex_name
vxplex att
Repair a mirror
plex_name
vxplex det
Disable a mirror
plex_name
Task Description Example
vxassist remove log
Remove a log from a volume.
vol_name
vxsd mv old_subdisk
Move a subdisk.
new_subdisk
vxsd -s size
splitsubdisk
Split a subdisk.
new_subdisk1
new_subdisk2
vxsd joinsubdisk1
Join subdisks. subdisk2
new_subdisk