Administrative Guide: Veritas Volume Manager
Administrative Guide: Veritas Volume Manager
1
Volume
LAB EXERCISE
F O R I N T E R N A L C I R C U L AT I O N O N LY
Administrative Guide
User for Lab session:
/etc/vx/bin/vxdisksetup -i c2t5d0
/etc/vx/bin/vxdisksetup -i c2t8d0
Creating Volumes
vxassist g mydg make martin 100m
makes a volume called martin in the diskgroup mydg
vxassist g mydg make martin 50m layout=mirror,stripe disk10 disk20 disk1 disk2
makes a 50Mb stripe using disk10 and disk20 mirrored across disk1 and disk2
vxassist g mydg make martin 50m layout=mirror,stripe,log disk10 disk20 disk1 disk2
makes a 50Mb stripe using disk10 and disk20 mirrored across disk1 and disk2 and uses a
log subdisk
2
Displaying VXVM Configuration
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
Removing Volumes/Disks
vxdisk rm c#t#d#s2
to remove a disk so it's out of vm control
3
Modifying Volumes
vxmirror rootdisk disk10
mirrors all the volumes on the rootdisk to disk10
Growing/Shrinking Volumes
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)
4
it cannot increase the volume unless spce is available in the
plexes (use vxassist)
Starting/Stopping/Fixing Volumes
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
vxmend on plex_name
to start plex in volume
vxrecover -b vol
well bring stale plexes back online, -b indcates background job
5
vxmend fix clean plex_name
sets the plex to a clean state so you can start vol and access data
Miscellaneous Commands
vxsd mv disk2-01 disk10-01
moves the contents of subdisk disk2-01 to disk10-01
then moves subdisk disk10-01 into the plex where subdisk disk2-01
once lived, leaving disk2-01 to your mercy :)
to make a subdisk
vxdiskadd c#t#d#
to add bring a new disk under vm control
6
sd disk03-01 martin-01 disk03 0 51408 3/0 c1t4d0 ENA
if this doesn't get the plex back into a kernel state of enabled
try
7
to dissociate a subdisk try
vxsd dis disk##-##
remove a subdisk by
vxedit rm disk##-##
8
Other new commands for Version 3.x ONLY
9
Basic VxVM Commands
disk operations
disk group operations
volume operations
disk operations
action command line
Initialize a disk vxdisksetup -i device
List disks owned by local and
vxdisk -o alldgs list
remote hosts
List disk header vxdisk list diskname|device
/etc/vx/bin/vxevac -g diskgroup from_disk to_disk1
Evacuate a disk to_disk2 ...
Rename a disk vxedit -g diskgroup rename oldname newname
Set spare, no hot relocation, or vxedit -g diskgroup set {spare|nohotuse|reserve}=on|
reserved space on a disk off diskname
10
List objects affected by a disk
vxdg listmove sourcedg targetdg object...
group move operation
volume operations
action command line
vxassist -g diskgroup make vol_name size{m|g|s}
Create a volume layout=format diskname
Remove a volume vxedit -g diskgroup -rf rm vol_name
(unmount and stop the volume or
first) vxassist -g diskgroup remove volume vol_name
11
12