Sunteți pe pagina 1din 20

Veritas Volume Manager command list

NOTE - private regon is 1024 sectors by default which means


that it is limited to 2000 objects,when creating extreemly large diskgroups
vxdisksetup might need the flag of privlen=2048.

Create a disk group on a new disk:


vxdg init <dg name> <media name>=c1t10d0

Add disk to an existing disk group:


vxdg -g <dg name> adddisk <media name>=c2t0d0
replace addisk with rmdisk to remove a disk

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)

Adding disks while solaris is running:


drvconfig (This probes scsi - Solaris)
disks (Creates links in /dev - Solaris)
prtvtoc (View the vtoc - Solaris)
vxdctl enable (Rescan for disks - Veritas)
vxdisk list (Shows the disk in error as they are not initalized jet)
vxdisksetup (init the disks)

To encapsulate use:
vxencap -g <discgroup> <devicename>

Export a disk group:


vxdg deport <dg name>
vxdg -h <hostame> deport <dgname> to export to another host

Import a disk group:


vxdg import <dg name>
vxdg -C to clear hostid of old host (When failing over in DR situation)
vxdg -fC to clear hostid of old host and forcing diskgroup online

Destroy a disk group:


vxdg destroy <disk group>
Evacuate data from a disk:
vxevac -g <dg name> <from disk> <to disks>

Create a volume on a diskgroup:


vxassist -g <dg name> make <volname> <size> layou=stripe
ncols=number of colums stripeunit=size

Create a veritas filesystem on this volume:


mkfs -F vxfs /dev/vx/rdsk/<disk group>/<volume> <size>

Delete a volume same as creatiuon but replace make with remove

Resize a filesystem:
vxresize -g <disk group> -F <fstype> <volume> <size>

If Veritas is ever causing you problems, do the following:


Touch /etc/vx/reconfig.d/state.d/install-db
edit /etc/system and modify /etc/vfstab
to disable VRTS to start up and access the old root
partitions

Other Examples:

vxassist make martin 100m


makes a volume called martin using any disk

vxassist make martin 100m disk10


makes a volume called martin using disk10

vxassist make martin 100m layout=stripe disk07 disk08


creates a 100mb striped volume called martin using disks7 and 8

vxassist mirror martin disk05 disk06


uses disks5 and 6 ro make a mirror on volume called martin

vxassist make martin 50m layout=mirror


makes a 50Mb mirror using any 2 disks

vxassist make martin 50m layout=mirror disk05 disk06


makes a 50mb mirror using disks 5 and 6
vxassist make martin 50m layout=mirror,stripe disk05 disk06 disk07
disk08
makes a 50Mb stripe using disks5 and 6 mirrored across 7 and 8

vxassist make martin 50m layout=mirror,stripe,log disk05 disk06 disk07


disk08
makes a 50Mb stripe using disks5 and 6 mirrored across 7 and 8 and uses
a
log subdisk

vxassist make martin 100m layout=raid5


makes a 100m raid5 volume

/usr/sbin/vxedit -g rootdg rename disk12 disk09


to rename disk12 to disk09 in the rootdg

vxedit rm disk10
to remove a greyed out or obsolete disk in this case disk10
or to remove a disk from a diskgroup

vxdisk list - to list all disks under vmcontrol

vxdisk clearimport c#t#d#s#


to allow a disk to be imported after a server crash

vxdg -g razadg rmdisk test


to remove a disk called test from a dg called razadg

vxdg -g razadg adddisk test=c1t3d3


to add disk c1t3d3 to a dg called razadg calling the disk test, use
vxdisk list
to determine what disks are free :)

vxedit -g rootdg set spare=on disk09


sets disk09 in the rootdg as a hotspare.

vxmirror rootdisk disk01


mirrors all the volumes on the root disk to disk01

vxassist -g rootdg mirror vol01 disk03


mirrors vol01 (in rootdg) to disk03

vxassist mirror martin


will mirror the volume martin

to make a mirror manually try

/usr/sbin/vxmake -g rootdg sd disk03-01 dm_name=disk03 dm_offset=0


len=81920
to create a subdisk on disk03 callin the subdisk disk03-01 the len
81920 is
81920sectors x 512bytes =40M

vxmake plex martin-02 sd=disk03-01


creates a plex called martin-02 using subdisk disk03-01

vxplex att martin martin-02


attaches the plex martin-02 to volume martin

to list all volumes on your primary boot disk enter


vxprint -t -v -e 'aslist.aslist.sd_disk="boot_disk_name"'

vxsd mv disk03-01 disk05-01


moves the contents of subdisk disk03-01 to disk05-01
then moves subdisk disk05-01 into the plex where subdisk disk03-01
once lived, leaving disk03-01 to your mercy :)

to make a subdisk

vxmake sd disk02-02 disk02,0,8000


this would create a subdisk called disk02-02 at the start of disk02
and would be 8000blocks (4000k) long.
if you wanted to create another subdisk on this disk the offset would
be
8000 as this is where the next free space would be onthe disk so...
vxmake sd disk02-02 disk02,8000,8000 would create another 8000block
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#

vxvol -g dg volname stop


this stops a volume

vxedit -rf rm martin


removes a volume called martin and plex(es) and subdisks though

vxprint -ht volume


to display info a stripe looks like this..
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 martin fsgen ENABLED ACTIVE 204800 SELECT


martin-01
pl martin-01 martin ENABLED ACTIVE 205776 STRIPE 4/128
RW
sd disk04-01 martin-01 disk04 0 51408 0/0
c1t1d2 ENA
sd disk05-01 martin-01 disk05 0 51408 1/0
c1t2d0 ENA
sd disk02-01 martin-01 disk02 0 51408 2/0
c1t3d0 ENA
sd disk03-01 martin-01 disk03 0 51408 3/0
c1t4d0 ENA

a mirror like this...

vxprint -ht martin


Disk group: rootdg

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 martin fsgen ENABLED ACTIVE 204800 SELECT


martin-01
pl martin-01 martin ENABLED ACTIVE 205776 STRIPE 4/128
RW
sd disk04-01 martin-01 disk04 0 51408 0/0
c1t1d2 ENA
sd disk05-01 martin-01 disk05 0 51408 1/0
c1t2d0 ENA
sd disk02-01 martin-01 disk02 0 51408 2/0
c1t3d0 ENA
sd disk03-01 martin-01 disk03 0 51408 3/0
c1t4d0 ENA
pl martin-02 martin ENABLED TEMPRMSD 205632 CONCAT -
WO
sd disk10-01 martin-02 disk10 0 205632 0
c1t1d3 ENA

a raid5 like this...

unix# vxprint -ht martin


Disk group: rootdg

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 martin raid5 ENABLED ACTIVE 40992 RAID -


pl martin-01 martin ENABLED ACTIVE 42336 RAID 4/32
RW
sd disk04-01 martin-01 disk04 0 14112 0/0
c1t1d2 ENA
sd disk06-01 martin-01 disk06 0 14112 1/0
c1t1d4s2 ENA
sd disk05-01 martin-01 disk05 0 14112 2/0
c1t2d0 ENA
sd disk02-01 martin-01 disk02 0 14112 3/0
c1t3d0 ENA
pl martin-02 martin ENABLED LOG 2016 CONCAT -
RW
sd disk03-01 martin-02 disk03 0 2016 0
c1t4d0 ENA

vxplex -o rm dis plex deletes a plex, or volume if used


with -f
vxplex det plex-0#
detach's one half of the plex..

if a volume is unstartable try

try to start it by setting one of the plexes in a mirror to CLEAN


using
vxmend mirror plex_name

if this doesn't get the plex back into a kernel state of enabled
try

vxplex att vol_name plex_name

to dissociate a subdisk try


vxsd dis disk##-##

remove a subdisk by
vxedit rm disk##-##

this command show's you what the lagest stripe you


can currently have ?
vxassist maxsize layout=stripe
Maximum volume size: 17833984 (8708Mb)

same again for raid5


vxassist maxsize layout=raid5
Maximum volume size: 12300288 (6006Mb)

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)

vxassist growto martin 2000


grows a volume to 2000 512byte sectors

vxassist growby martin 2000


increases the volume martin by 2000 512byte sectors

vxassist shrinkto vol_name 1000


will shrink a volume by 1000 sectors,
make sure you don't shrink a volume below the current
size of the filesystem
vxassist shrinkby vol_name 1000
shrinks a volume by 1000 sectors

vxvol set len=100000 vol_name


will change the length to 100000 sectors
it cannot increase the volume unless spce is available in the
plexes (use vxassist)

vxsd -s SIZE split orignal_sd newdisk newdisk


this will split an existing subdisk in 2 of the specified SIZE

vxsd join sd1 sd2 new_sd


joins subdisk1 and subdisk1 to create a new subdisk

ssaadm -t 1|2|3 stop|start controller #


so start/stop disk trays...

vxrecover -s vol_name
will start a volume

vxrecover -s
will start all volumes

vxvol maint vol_name


puts a volume in to maintenance mode

vxmend off plex_name


to offline a plex

vxplex att vol_name plex_name


attches and starts the plex in a volume

vxmend on plex_name
to start plex in volume

if the volume won't start up try


vxinfo volume_name

vxedit set user=martin group=techies mode=0666 volume


sets the owner as martin the group as techies and the mode to rw-rw-rw
on a volume

vxvol rdpol round volume


sets a round robin read policy on a volume
vxvol rdpol prefer vol_name plex_anme
sets a prefered plex to read from.

vxedit set comment="message" disk01-01


sets the comment field to testing

vxedit set putil01="go away" vol01


sets the putil01 to "go away"

vxrecover -b vol
well bring stale plexes back online, -b indcates background job

vxassist move volume !disk10


move the voume to a disk other than disk10

vxmend fix clean plex_name


sets the plax toa clean state so you can start vol and access data

vxdg list
lists all diskgroups

vxdisk list
lists all disks under VM control and which group their in

vxdisk list disk01


lists the properties of disk01

vxprint -vt
vxprint -l volume_name
vxprint -vl

display's info about the volumes

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

vxassist maxgrow vol


tells you how much you can grow a volume by

vxsd aslog vol01-01 disk02-01


adds a log disk (disk02-01) to the volume vol01-01

vxassist addlog volume_name


creates a log disk for a raid5 volume.

there are some variables you can set for debugging

S_DEBUG - prints info when running mode sense command


P_DEDUG - prints info for each ext library function called
I_DEBUG prints progress during get status function
O_DEBUG prints when files are opened

Table 3-1 Command Comparison

LVM Description/Action VxVM Description/Action


vxedit
Changes the
lvchange Creates, removes, and modifies
characteristics of logical or
Volume Manager records.
volumes.
vxvol set
There is no single
vxresize Resizes a file system and its
  equivalent LVM
underlying volume at the same time.
command.
Creates root, primary and
secondary swap and
vxvmboot (HP-UX Prepares volumes to be root, boot,
lvlnboot dump volumes. It also dump, or primary swap volumes (HP-
11i Version 1.5 Only)
creates boot areas on the UX 11i Version 1.5 only).
disk.
Creates volumes with the make
parameter.
lvcreate Creates a logical volume. vxassist
Example: vxassist make
vol_name 100M layout=stripe
lvextend Increases disk space vxassist Increases a volume in size with the
allocated to a logical growto or growby parameter.
volume.
LVM Description/Action VxVM Description/Action

Example: vxassist growto


vol_name 200M,

vxassist growby vol_name 100M

vxassist creates and modifies


volumes.
Decreases a volume in size with the
shrinkto or shrinkby
parameters.
Decreases disk space
lvreduce allocated to a logical vxassist Example: vxassist shrinkto
volume. vol_name 200M

Make sure you shrink the file system


before shrinking the volume.
Removes volumes with the -rf rm
parameters.

Example: vxedit -rf rm


Removes one or more vol_name
vxedit
lvremove logical volumes from a
vxassist
volume group. Removes a volume with the remove
volume parameters.

Example: vxassist remove


volume vol_name
The snapshot operation takes one
of the attached temporary mirrors and
Splits a mirrored logical vxassist creates a new volume with the
lvsplit volume into two logical
snapshot temporary mirror as its one plex.
volumes.
Example: vxassist snapshot
vol_name new_volume
Reverses and converts
the lvsplit logical There is no equivalent command in
lvmerge  
volumes to a single VxVM.
logical volume.
The vxrecover command performs
resynchronize operations for the
Synchronizes mirrors that vxrecover volumes, or for volumes residing on
lvsync are stale in one or more the named disks (medianame or the
vxvol start
logical volumes. VxVM name for the disk).
Example: vxrecover vol_name
media_name
pvcreate Makes a disk an LVM vxdisksetup Brings a disk under VxVM control.
disk.
Example: vxdisksetup c0t3d0
LVM Description/Action VxVM Description/Action

Option 1 in the vxdiskadm menu


adds or initializes one or more disks.
Displays information Lists information about VxVM disks.
pvdisplay about physical volumes in vxdisk list Example: vxdisk list
a volume group. disk_name
The vxdisk utility performs basic
Sets physical volume vxdisk administrative operations on VxVM
characteristics to disks. Operations include initializing
pvchange allow/deny allocation of vxdisk set and replacing disks, as well as taking
additional physical care of some book-keeping
extents from this disk. vxedit necessary for the disk model
presented by the Volume Manager.
Moves volumes off a disk.

Performs volume operations on a


subdisk. Moves the contents of old
vxevac subdisk onto the new subdisks and
Moves allocated physical replaces old sub disk with the new
extents from source to subdisks for any associations.
pvmove vxsd mv
destination within a
volume group. The vxdiskadm script presents a
vxdiskadm menu of possible operations to the
user.

Option 7 in the vxdiskadm menu


moves volumes.
Removes the LVM header Removes the VxVM header
pvremove information and releases vxdiskunsetup information and releases the disk
the disk from LVM control. from VxVM control.
vxdiskadd Creates a new disk group and/or
vgcreate Creates a volume group.
vxdg init adds disks to a disk group.

vxdg list Displays the contents of a disk group.


vgdisplay Displays information on Displays information about all objects
all volume groups. vxprint
or a subset of objects.
vxdg -g
Activates or deactivates diskgroupset
vgchange one or more volume Activates a shared disk group.
activation=
groups.
mode
Extends a volume group Adds a disk to the disk group.
vxdiskadd
vgextend by adding one or more Option 1 in the vxdiskadm menu
vxdiskadm
disks to it. adds disks to the disk group.
Removes disks from a disk group.
vxdg rmdisk
Reduces a volume group Removes the specified disk access
vgreduce by removing one or more vxdisk rm record by disk access name.
disks from it.
vxdiskadm Option 3 in the vxdiskadm menu
removes disks.
vgscan Scans all disks and looks vxinfo Displays information about volumes.
LVM Description/Action VxVM Description/Action

Displays complete or partial


information from records in VxVM
vxprint
for logical volume groups. disk group configurations.

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

Table 3-2 LVM and VxVM Task Comparison


Task
Description Example
Type

LVM Create an LVM disk. pvcreate /dev/rdsk/disk_name


vxdiskadd device_name
VxVM Bring a disk under Volume Manager control. Option 1 in the vxdiskadm menu adds a disk
and initializes it.
vgcreate /dev/vol_grp
LVM Create a volume group
/dev/dsk/disk_name
Task
Description Example
Type
vxdg init disk_group disk_name
VxVM Create a disk group. Option 1 in the vxdiskadm menu performs this
task.
Add a new disk to the existing volume vgextend /dev/vol_grp/dev/rdsk/
LVM
group. disk_name
vxdg -g disk_group adddisk
VxVM Add a disk to an existing disk group.
disk=devicename
lvextend -l 50
Extend a logical volume or increase space /dev/vol_grp/lvol_name
LVM
allocated to a logical volume. l—indicates the number of logical extents in the
logical volume
vxresize -g disk_group -F vxfs
vol_name length

vxassist growto vol_name


new_length
VxVM Increase the volume by or to a given length.
vxassist growby vol_name
length_change

Grow the file system after growing the volumes.


lvreduce -L to_size
LVM Reduce a logical volume. /dev/vol_grp/lvol_name
-L indicates the number of megabytes.
vxresize -g disk_group -F vxfs
vol_name to_length

vxassist -b shrinkby vol_name


length
VxVM Reduce a volume by or to a given length.
vxassist -b shrinkto vol_name
newlength

Shrink the file system before reducing the


volume.
vgimport -v /dev/vol_grp\
LVM Import and activate a volume group. /dev/dsk/disk_name
vgchange -a y /dev/vol_grp
vxdg -tfC -n newname import
Import a disk group to make the specified disk_group
VxVM
disk group accessible on the local machine. Option 8 in the vxdiskadm menu performs this
task.
Export and deactivate an LVM volume vgchange -a n vol_group
LVM
group, and its associated logical volumes. vgexport /dev/vol_group
VxVM Deport a disk group to disable access to the vxdg deport disk_group
specified disk group. A disk group cannot Option 9 in the vxdiskadm menu performs this
be deported if any volumes in the disk task.
Task
Description Example
Type

group are currently open.


Back up volume group configuration vgcfgbackup -f /pathname/filename
LVM
information. vol_grp
Back up volume group configuration dgcfgbackup -f /pathname/filename
VxVM
information. vol_grp
Restore volume group configuration to a vgcfgrestore -n /dev/vol_grp
LVM
particular physical volume. /dev/rdsk/disk_name
Restore volume group configuration to a dgcfgrestore -n /dev/vol_grp
VxVM
particular physical volume. /dev/rdsk/disk_name
Increase or decrease secondary swap
space. lvextend—to increase swap space
LVM
Enlarge an existing swap logical volume, or lvreduce—to decrease swap space
add a new swap logical volume.
Add a new swap volume (HP-UX 11i vxassist make swapvol2 size
VxVM
Version 1.5 only). (HP-UX 11i Version 1.5 only)
Remove a volume group. vgremove /dev/vol_grp
This destroys a volume group by removing
LVM This is preceded by lvremove and vgreduce
its last disk and removing it from
/etc/lvmtab. down to the last disk.

vxdg deport disk_group


VxVM Destroy a disk group.
vxdg init disk_group
Extend a volume group by adding LVM vgextend /dev/vol_grp/\
LVM
disks to the volume group. /dev/dsk/disk_name
vxdiskadd disk_name
VxVM Add one or more disks to the disk group. Option 1 in the vxdiskadm main menu
performs this task.
Reduce a volume group by reducing the vgreduce /dev/vol_grp
LVM
number of disks in a volume group /dev/dsk/disk_name
vxdg -g disk_group -k rmdisk
VxVM Remove a disk from disk group.
disk_name
1.pvcreate /dev/rdsk/second_disk

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:

vxassist make vol_name length


A concatenated volume
VxVM layout=mirror, stripe
A striped mirror volume
vxassist make vol_name length
layout=raid5
A RAID-5 volume
LVM Display information about logical volumes. lvdisplay /dev/vol_grp/lvol_name
Display all volume information. vxprint -vt
VxVM
Display information about a specific volume. vxprint -ht vol_name
LVM Display information about volume groups. vgdisplay -v /dev/vol_grp
vxdisk list

Display disk group information. vxprint -g disk_group


VxVM Display information about a specific disk
group. vxdg list

vxdisk list disk_group


LVM Display information about physical volumes. pvdisplay /dev/dsk/disk_name
Display information about Volume Manager
VxVM vxinfo or vxprint
volumes.
LVM Remove a logical volume. lvremove /dev/vol_grp/lvol_name
VxVM Remove a volume. vxedit rm vol_name
Remove disks from a volume group or vgreduce /dev/vol_grp
LVM reduce the number of disks in the volume
/dev/dsk/disk_name
group.
VxVM Remove disks from a disk group. vxdisk rm disk_group
Task
Description Example
Type

vxdg rmdisk disk_name

vxdg -g group_name rmdisk disk_name


Remove an entire volume group.
Before attempting to remove the volume
LVM group, you must remove the logical volumes vgremove /dev/vol_grp
using lvremove, and all physical volumes
except the last one using vgreduce.
Deport a disk group. You must unmount vxdg deport disk_group
VxVM
and stop any volumes in the disk group first.
vgcreate /dev/vol_grp\
/dev/dsk/disk_name
/dev/dsk/disk_name_2
Set up alternate links to a physical volume.
LVM If a disk has two controllers, you can make
To remove the link:
one primary and the other an alternate link.

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

Snapshot a volume and create a new vxassist snapshot vol_name


VxVM
volume. new_vol_name
lvmerge
Combine two logical volumes back into a /dev/vol_grp/split_vol_name\
LVM /dev/vol_grp/lvol_name
mirrored logical volume
split_vol_name= active logical volume
VxVM No VxVM equivalent.  
pvmove -n
Move a mirrored logical volume from one /dev/vol_grp/lvol_name\
LVM
disk to another. /dev/dsk/disk_name
/dev/dsk/disk_name2
VxVM Move a plex. vxplex mv orig_plex new_plex
Synchronize a mirrored logical volume.
LVM Synchronize extents within a mirrored lvsync /dev/vol_grp/lvol_name
logical volume.
Resynchronize operations for the given vxvol resync
VxVM
volumes.
Synchronize extents within mirrored logical vgsync /dev/vol_grp
LVM
volumes in a volume group.
Resynchronize operations for the named
volumes, or for volumes residing on the
named disks. vxrecover -s vol_name
VxVM
If no medianame or volume operands are
specified, then the operation applies to all
volumes.
lvchange -a y
LVM Start a volume.
/dev/vol_grp/lvol_name
vxrecover -s vol_name
VxVM Start a volume.
vxvol start vol_name
lvchange -a n
LVM Stop a volume.
/dev/vol_grp/lvol_name
VxVM Stop a volume. vxvol stop vol_name
LVM Make a disk available as a hot spare. pvchange -z y /dev/dsk/disk_name
VxVM Make a disk available as a hot spare. vxedit set spare=on disk_name

Table 3-3 Additional VxVM Tasks with no LVM equivalents


Task Description Example

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

S-ar putea să vă placă și