VXASSIST with Examples

vxassist – Syntax with examples
/usr/sbin/vxassist
– Finds space for and creates volumes
– Performs volume conversion
– Adds mirrors and logs to existing volumes
– Extends and shrinks existing volumes
– Migrates data from a specified set of disks
– Provides facilities for the online backup of existing volumes
Tasks & Switches:
  • Check the maximum size a volume could be created
vxassist [-g diskgroup] maxsize
  • Check the maximum size a volume can grow
vxassist [-g diskgroup] maxgrow volume-name [attrs...]
  • Create volume
vxassist [-g diskgroup] [-U usetype] [-b] make volume-name {len|maxsize=<size>} [layout=layout_method] [attrs...]
  • Add logs to volume
vxassist [-g diskgroup][-b] addlog volume-name [attrs...]
  • Resize volumes
growto
vxassist [-g diskgroup] growto volume-name new-length [attrs...]
growby
vxassist [-g diskgroup] growby volume-name length-change [attrs...]
Shrinkto
vxassist [-g diskgroup][-f] shrinkto volume-name new-length [attrs...]
shirnkby
vxassist [-g diskgroup][-f] shrinkby volume-name length-change [attrs...]
  • Mirror volume
vxassist [-g diskgroup] [-b] mirror volume-name [attrs...]
  • Volume relayout
vxassist [-g diskgroup] [-U usetype] [-b] relayout {volume-name|plex-name} [attrs...]
  • Volume convertions
vxassist [-g diskgroup] convert volume-name [attrs...]
  • Move volume
vxassist [-g diskgroup][-b] [-t taskid] [-k [-O operation-tag]] move volume-name storage-spec ... [attrs...]
  • removing volume|mirror|log
vxassist [-g diskgroup] [-b] remove {volume|mirror|log} volume-name [storage-spec ...] [attrs...]
vxassist – Examples:
To check the maximum size a volume could be created:
# vxassist -g oradg maxsize
Maximum volume size: 24768512 (12094Mb)
# vxassist -g oradg maxsize layout=stripe
Maximum volume size: 24768512 (12094Mb)
# vxassist -g oradg maxsize layout=mirror
Maximum volume size: 12384256 (6047Mb)
# vxassist -g oradg maxsize layout=raid5
Maximum volume size: 16513024 (8063Mb)
# vxassist -g oradg maxsize layout=stripe-mirror
Maximum volume size: 12384256 (6047Mb)
Creating a Simple Volume:
# vxassist -g oradg make oravol01 5g
Creating a Stripe Volume:
# vxassist -g oradg make oravol 2g layout=stripe ncol=4 stwidth=64 oradisk01 oradisk02 oradisk03 oradisk04
– Default ‘ncol’ value is 3
– Default ‘stwidth’ value is 128
Creating a Mirror Volume:
# vxassist -g oradg make oravol 1g layout=mirror mirror=ctlr nmirror=3 logtype=drl
– Default ‘nmirror’ value is 2
– By default no log plexes will be added to mirror volume.
Creating RIAD-5 Volume:
# vxassist -g oradg make oravol 1g layout=raid5 ncol=4 oradisk01 oradisk02 oradisk03 oradisk04 oradisk05
– RIAD5 uses default LOG method
– Default ‘ncol’ value is 5
– Default ‘stwidth’ value is 32
Creating Non-Layerd Volumes:
1. mirror-concat
# vxassist -g oradg make oravol 1g layout=mirror-concat
# vxassist -g oradg make oravol 1g layout=mirror-stripe
Creating Layed Volumes:
1. concat-mirror
# vxassist -g oradg make oravol 1g layout=concat-mirror
# vxassist -g oradg make oravol 1g layout=stripe-mirror
Using ‘ordered’ allocation attribute:
# vxassist -g oradg -o ordered make oravol 1g layout=raid5 ncol=4 oradisk01 oradisk05 oradisk03 oradisk02 oradisk04
– For creating 4 coloumn raid, make sure you input five disks. ( 4 + 1 disk = 4 column + 1 log)
Adding or Enabling DRL logging to Existing Mirror Volume:
# vxassist -g oradg addlog oravol logtype=drl
Mirroring Existing Volumes:
# vxassist -g oradg mirror oravol
To check the maximum size a volume can grow:
# vxassist -g oradg maxgrow oravol01
Volume oravol01 can be extended by 24358912 to: 24563712 (11994Mb)
Resizing Volumes:
# vxassist -g oradg make oravol 300m
# vxassist -g oradg growto oravol 500m
# vxassist -g oradg growby oravol 200m
# vxassist -g oradg -f shrinkby oravol 200m
# vxassist -g oradg -f shrinkto oravol 300m
– The ‘vxassist’ command only resizes the volume not the file system use ‘fsadm’ to resize the file system.
– The ‘vxresize’ command resizes both file systems & Volumes.
– Before shrinking any volumes make sure you have resized the file system using ‘fsadm’, else you could corrupt file systems.
Performing Online-Relayout:
1. Concatenated
2. Striped
3. Raid 5
4. Striped Mirror
5. Concatenated mirror
Also it used to change number of columns & Stripe unit size in striped & Raid 5 Volumes
Changing Concat volume into Stripe Layout:
# vxassist -g oradg make oravol 100m layout=nostripe oradisk01
# vxassist -g oradg relayout testvol layout=stripe ncol=3
Adding more columns to existing Stripe Layout Volume:
# vxassist -g oradg relayout oravol ncol=+2
Removing column(s) from existing Stripe Layout Volume:
# vxassist -g oradg relayout oravol ncol=-1
To change Stripeunit size & number of column of a stripe layout volume:
# vxassist -g oradg relayout oravol stripeunit=64k ncol=5
To Change the mirror volume into RAID 5 Volume Layout:
# vxassist -g oradg relayout oravol-01 layout=raid5 stripeunit=128k ncol=3
*** Specify one of the plex name from mirror volume to change the layout into raid5. Online relayout operations can be administered using ‘vxrelayout’ command as well.
Convert between a layered volume and a non-layered volume layout:
# vxassist -g oradg make testvol 100m layout=mirror-concat
# vxassist -g oradg convert testvol layout=concat-mirror
\
# vxassist -g oradg make testvol 100m layout=mirror-stripe
# vxassist -g oradg convert testvol layout=stripe-mirror
Moving Storage objects in volume:
# vxassist -g oradg move oravol \!oradisk01 oradisk02
– For a mirror and other volumes you have to perform this command about ‘n’ time to complete the operations depending on your volume configuration.
To remove log from existing volume:
# vxassist -g oradg remove log oravol
To remove Mirror from existing mirror volume:
# vxassist -g oradg remove mirror oravol
To remove volume and its associated objects:
# vxassist -g oradg remove volume oravol
Product – Veritas Volume Manager-vxvm (Storage Foundation)
The vxassist utility is a command-line interface to the Veritas Volume Manager (VxVM) that:
– If the ‘layout’ is not specified, by default ‘concat’ volumes will be created.
– Here 4 coloumn stripe volume of 2 GB size will be created using the specified disks.
– Here, the 3 way mirror volume of 1 GB size will created using different controllers with ‘DRL’ Log enabled (oradisk01=c1 oradisk03=c2 oradisk05=c3)
– Here the 4 column raid5 volume will be created using specified disks.
– Volumes where sub disks directly mapped to plex then to Volumes
2. mirror-stripe
-Volumes where sub disks & plexes are mappaed to underlaying volumes then to volumes
2. stripe-mirror
– Here the sub disks will be created in the above specified manner.
1. growto
(Volume size will be resized to 500m)
2. growby
(Volume size will be resized to 700m)
3. shrinkto
(Volume size will be resized to 500m)
4. shrinkby
(Volume size will be resized to 300m)
Note:
Online Re-Layout supports to change the plex or volume to or from
Note:
1. Mirror-Concat into Concat-Mirror
2. Mirror-Stripe into Stripe-Mirror
– For a simple volume which is having one subdisk & plex you can use the above command

Comments

Popular posts from this blog

[SOLVED]* Please wait for the system Event Notification service

Rebuild the initial ramdisk image in Red Hat Enterprise Linux

Python reference Interview questions