---------------------------
Initialize a disk
vxdisksetup -i device
List disks owned by local and remote hosts
vxdisk –o alldgs list
List disk header
vxdisk list diskname|device
Evacuate a disk
vxevac -g diskgroup from_disk to_disk
Rename a disk
vxedit -g diskgroup rename oldname newname
Set spare, no hot relocation,or reserved space on a disk
vxedit -g diskgroup set {spare|nohotuse|reserve}=on|off diskname
Unrelocate a disk
vxunreloc -g diskgroup original_diskname
Create a disk group
vxdg init diskgroup diskname=device
Add a disk to disk group
vxdg -g diskgroup adddisk diskname=device
Remove a disk from disk group
vxdg –g diskgroup rmdisk diskname
Deport, import or destroy a disk group
vxdg {deport|import|destroy} diskgroup
List disk groups
vxdg list [diskgroup]
Show free/spare space pool
vxdg –g diskgroup {free|spare}
Upgrade disk group
version vxdg [-T version] upgrade diskgroup
Rewrite disk headers, configuration copies, and kernel log copies in a disk
group.
vxdg flush diskgroup targetdg object...
or
vxdctl enable (for all disk groups)
Move an object between disk groups
vxdg move sourcedg targetdg object...
Split objects between disk groups
vxdg split sourcedg targetdg object...
Join disk groups
vxdg join sourcedg targetdg
List objects affected by a disk group move operation
vxdg listmove sourcedg targetdg object...
Create a volume
vxassist -g diskgroup make vol_name size layout=format diskname
Remove a volume
vxedit -g diskgroup -rf rm vol_name
or
vxassist -g diskgroup remove volume vol_name
Display a volume
vxprint -g diskgroup -vt vol_name
vxprint -g diskgroup –l vol_name
Change volume read policy
vxvol -g diskgroup rdpol round vol_name
vxvol -g diskgroup rdpol prefer vol_name preferrred_plex_name
vxvol -g diskgroup rdpol select vol_name
Mirror an existing plex
vxassist -g diskgroup mirror vol_name
Create a snapshot volume
vxassist –g diskgroup -b snapstart vol_name
vxassist –g diskgroup snapshot vol_name new_volume
Abort a snapshot
vxassist -g diskgroup snapabort orig_vol_name
Reassociate a snapshot
vxassist -g diskgroup snapback snapshot_vol
Dissociate a snapshot
vxassist -g diskgroup snapclear snapshot_vol
Print snapshot information
vxassist -g diskgroup snapprint vol_name
Relayout a volume
vxassist -g diskgroup relayout vol_name layout=new_layout [attributes...]
Convert to or from a layered layout
vxassist -g diskgroup convert vol_name layout=new_layout [attributes...]
Add a log to a volume
vxassist –g diskgroup addlog vol_name
Create a subdisk
vxmake -g diskgroup sd subdisk_name diskname offset length
Remove a subdisk
vxedit -g diskgroup rm subdisk_name
Display subdisk information
vxprint –st
vxprint -l subdisk_name
Associate a subdisk to a plex
vxsd assoc plex_name subdisk_name
Dissociate a subdisk
vxsd dis subdisk_name
Create a plex
vxmake -g diskgroup plex plex_name sd=subdisk_name,…
Associate a plex (to a volume)
vxplex –g diskgroup att vol_name plex_name
Unmirror a volume (remove a plex)
vxplex –o rm dis plex_name
Start/stop volumes
vxvol {start|stop} vol_name
Start/stop all volumes
vxvol {startall|stopall}
Recover a volume
vxrecover -sn vol_name
Detach a plex
vxplex –g diskgroup det plex_name
Attach a plex
vxplex –g diskgroup att vol_name plex_name
Change state flags on plex
vxmend fix {active|clean|stale} plex_name
Turn plex online/offline
vxmend {on|off} plex_name
Set FastResync flag on a
volume vxvol set fastresync=on vol_name
Count and size of VxVM disk I/Os completed per sample
time slice to a volume:
vxstat -g diskgroup [-i interval] [-c count] –d vol_name
VxVM I/O trace information—dump to file and read from file
vxtrace -g diskgroup [–t duration] –d [filename] –o dev,disk vol_name;
vxtrace –l –f /tmp/tracedata | pg
Sample I/O load with statistics—sequential
vxbench –w {read|write} –i iosize=size,iocount=count filename
Sample I/O load with statistics—random
vxbench –w {rand_read|rand_write} –i iosize=size,iocount=count,maxfilesize=size filename
View currently set VxVM kernel parameters
Example: View the current setting for the kernel
parameter vol_max_vol:
# echo ‘vol_max_vol/D’ | adb –k
Change VxVM kernel parameters
Example: Change the VxVM kernel parameter
vol_max_vol from the current value to a new
value of 2048 by adding the parameter to the
/etc/system file:
# set vxio: vol_max_vol=2048
Then, reboot the system.
######################################################
display disk listings:
# vxdisk list
display volume manager object listings
# vxprint -ht
display free space in a disk group
# vxdg -g
list all volume manager tasks currently running on the system
# vxtask list
add a disk to Volume Manager (devicename = cXtXdX) (prompt driven)
# vxdiskadd
designate/remove a disk as a hot-relocation spare
# vxedit set spare=on
# vxedit set spare=off
rename a disk
# vxedit rename
reserve/unreserve a disk (space won't be allocated unless specifically mentioned in vxassist)
# vxedit set reserve=on
# vxedit set reserve=off
take a disk offline (first remove the disk from its disk group) (devicename=cXtXdXs2)
#vxdisk offline
remove a disk
(first, stop any applications associated with the volume,
unmount the volume, stop the volume,
if you need the data on the disk, move the volumes to another disk or back up volume)
--removing the disk from its disk group:
# vxdg -g
--remove the disk from volume manager control (devicename=cXtXdXs2)
# vxdisk rm
display multipath information
# vxdisk list
create a disk group
(see 'add a disk to volume manager - if the group does not exist, you will be prompted)
upgrade a disk group
--list disk group version
# vxdg list
--upgrade disk group to highest version currently running
# vxdg upgrade
destroy a disk group
# vxdg destroy
display disk group information
# vxdg list
# vxdg list
move a disk group
(stop any applications associated with all volumes in the disk group,
unmount and stop all volumes in the disk group:
--deport (disable local access) the disk group to be moved on first system
# vxdg deport
--import (enable local access) the disk group and its disks from the second system
# vxdg import
--start all volumes in the disk group on the second system
# vxrecover -g
or # vxvol -g
estimating maximum volume size (any_valid_type = raid5, stripe, mirror)
# vxassist -g
create a concatenated volume (length examples = 15g, 15m)
# vxassist -g
create a striped volume (length examples = 15g, 15m)
# vxassist -g
create a raid5 volume (without logging) (length examples = 15g, 15m)
# vxassist -g
create a raid5 volume (with logging) (length examples = 15g, 15m)
# vxassist -g
create a mirrored volume (without DRL) (length examples = 15g, 15m)
# vxassist -g
create a mirrored volume (with DRL) (length examples = 15g, 15m)
# vxassist -g
mirror an existing volume
# vxassist mirror
mirror all volumes within a disk group
# vxmirror -g
mirror the root (boot) disk
EEPROM variable "use-nvramrc?" must be set to true
# vxrootmir -v
remove a mirror (use 'vxprint -g
# vxplex -o rm dis
add a log to an existing volume
# vxassist addlog
remove a log from an existing volume
# vxassist remove log
create a raid 0+1 volume (without DRL)
# vxassist -g
nmirror=# nstripe=#
create a raid 1+0 volume (without DRL)
# vxassist -g
nmirror=# nstripe=#
resize a volume
# vxassist -g
# vxassist -g
# vxassist -g
# vxassist -g
estimate how much a volume can grow
# vxassist -g
remove a volume
(stop all applications associated with the volume,
unmount volume (remove /etc/vfstab entry))
--stop volume
# vxvol stop
-- remove volume (for raid 1+0, use 'rf-rm')
# vxedit -r rm
or # vxassist remove volume
change the volume read policy
# vxvol rdpol
# vxvol rdpol prefer
change volume attributes
# vxedit set
resize a filesystem (ufs cannot be shrunk, only grown)
# vxresize -g
# vxresize -g
join subdisks (must be in the order of offset on disks)
# vxsd join
Комментариев нет:
Отправить комментарий