$CMcA_log
The weblog of Chris McAvoy. His projects, plans, schemes, and reading. Mirrored via the Blogger API @ http://www.lonelylion.com
        

VxVM CLI Cheat Sheet

VxVM Cheat Sheet

-------INFORMATION-------------------------------------------------
vxprint -ht ==> Prints VxVM config
 * -h   List  hierarchies  below  selected  records.
 * -t   Print single-line output records that depend  upon
               the  configuration  record  type. For disk groups,
               the output consists of the record  type  (dg)  the
               disk group name, and the disk group ID.

vxprint -g <volumegroup> -ht ==> Prints VxVM config of <volumegroup>

vxdisk list ==> Lists all disks (both VxVM and Unix Controlled)

-------VOLUME GROUPS------------------------------------------------
vxdctl enable ==> scan system for new disks. (i.e. after adding disks
 from EMC, you need to run `vxdctl enable` to see them through
 VxVM.

How to create a volume manager(ed) disk:

# Scan for Added Disk
vxdctl enable
# Initialize new disks (<diskname>)
/usr/lib/vxvm/bin/vxdisksetup -i <diskname>
# Create new volume group, and add disk(s)
vxdg init <new vg> <disk1>=<diskname1> <disk2>=<diskname2>

 

-------VOLUMES------------------------------------------------------
vxassist -g <vg> -b make <volumename> <length> layout=<layouttype> comment=<comment> fstype=<fstype> <disk> <disk> <disk>
 *-b option puts command in the background, this is advisable.
 *VALID <layouttype>'s SEE APPENDIX A

vxassist -g <vg> -b remove volume <volumename>

Top Secret Cool Stuff:
 vxassist -g vg27 -b make unused `vxassist -g vg27 maxsize | awk '{print $4}'` layout=concat comment="UNUSED"

## MAINTENANCE COMMANDS
# Grow Volume
vxassist -g <vg> growto <volname> <length>

--------FILE SYSTEMS------------------------------------------------
# Create VXfS filesystem, with large file support
mkfs -F vxfs -o largefiles /dev/vx/rdsk/vg02/lvol03


-------APPENDIX A---------------------------------------------------
     concat-mirror
               New volumes should be concatenated  and  mirrored.
               The  mirroring is handled at each a subdisk level.
               The  attribute  stripe-mirror-col-split-trigger-pt
               is applied.

     contig, nocontig
               Disallow or allow (default) plexes, regular stripe
               columns,  or RAID-5 stripe columns from using mul-
               tiple regions of disk.  If  contig  is  specified,
               then  plexes  and columns must be allocated from a
               single contiguous region of disk.  If this is  not
               possible, the allocation fails.  By default, vxas-
               sist tries to  allocate  space  contiguously,  but
               will  use  multiple  regions  or multiple disks if
               needed.

     diskalign, nodiskalign
               Align  (default)  or  do  not  align  subdisks  on
               cylinder  boundaries.   When alignment is not dis-
               abled, subdisks are created beginning on  cylinder
               boundaries  and are extended to match the end of a
               cylinder.  Dirty region log subdisks, however, are
               not cylinder aligned (they are usually only 2 or 3
               blocks long).  Instead,  when  creating  log  sub-
               disks, spaces are located from the available disks
               that could not be  turned  into  regular  subdisks
               because  the  spaces aren't cylinder aligned.  For
               example, once one cylinder is used for a log  sub-
               disk,  that  cylinder  cannot be used to create an
               aligned data (or RAID-5 log) subdisk, so other log
               subdisks will be created there until that cylinder
               fills up.

     grow, nogrow
               Allows a volume to grow during a  relayout  opera-
               tion.

     log, nolog
               Create (or do not create) dirty region  logs  (for
               mirrored   volumes)  or  log  plexes  (for  RAID-5
               volumes) when creating a new volume.  This  attri-
               bute  can  be specified independently for mirrored
               and RAID-5 volumes with the raid5log and regionlog
               layout specifications.  The current implementation
               does not support the creation of DCM logs  in  the
               layout specification.

     mirror, nomirror, raid5
               New  volumes  should   be   mirrored,   unmirrored
               (default),  or  RAID-5,  respectively. For mirror,
               the  attributes  stripe-mirror-col-trigger-pt  and
               stripe-mirror-col-split-trigger-pt are applied.

     mirror-concat
               New volumes should be mirrored. The  mirroring  is
               done  at the volume level.  The attributes stripe-
               mirror-col-trigger-pt    and    stripe-mirror-col-
               split-trigger-pt are ignored with this layout.

     mirror-stripe
               New volumes should be mirrored  and  striped.  The
               mirroring  is done at the volume level. The attri-
               butes  stripe-mirror-col-trigger-pt  and   stripe-
               mirror-col-split-trigger-pt  are ignored with this
               layout.

     raid5log, noraid5log
               Create (default) or do not create log  plexes  for
               RAID-5 volumes.

     regionlog, noregionlog
               Create or do not create (default) dirty-region log
               subdisks for mirrored volumes.

     shrink, noshrink
               Allows a volume to shrink during a relayout opera-
               tion.

     span, nospan
               Allow (default) or disallow plexes, regular stripe
               columns,  or  RAID-5  stripe columns from spanning
               multiple disks.   If  nospan  is  indicated,  then
               plexes  or  columns  can  be  formed from multiple
               regions of the same disk,  but  cannot  be  formed
               from more than one disk.

     stripe, nostripe
               New plexes should be striped or unstriped, respec-
               tively.   When  creating a new volume, the default
               is nostripe.  When adding a new plex to an  exist-
               ing  volume,  the  default is stripe if the volume
               already has one or more striped plexes,  and  nos-
               tripe  in  other  cases. For stripe (when combined
               with  mirror,  the  attributes  stripe-mirror-col-
               trigger-pt  and stripe-mirror-col-split-trigger-pt
               are applied.

     stripe-mirror
               New volumes should be striped  and  mirrored.  The
               mirroring  is handled at each column level or sub-
               disk level  depending  on  the  attribute  stripe-
               mirror-col-split-trigger-pt.

     stripe-mirror-col
               New volumes should be striped  and  mirrored.  The
               mirroring  is  handled  at  each column level. The
               attributes    stripe-mirror-col-trigger-pt     and
               stripe-mirror-col-split-trigger-pt   are   ignored
               with this layout.

     stripe-mirror-sd
               New volumes should be striped  and  mirrored.  The
               mirroring is handled at each a subdisk level.



© Copyright 2002 .
Last update: 2/20/02; 2:57:52 PM.