Site icon UnixArena

VxVM – vxvol Command syntax with Examples

vxvol – UnixArena’s Manual Page

/usr/sbin/vxvol – The vxvol utility performs VERITAS Volume Manager Operations on volumes.

Tasks

Switches

Enable locally disabled volume (LDISABLED State) vxvol [ -g diskgroup ] [-U usetype] [-o useopt] enable volume_name
Initialize a volume for use vxvol [ -g diskgroup ] [-U usetype] [-o useopt] init clean|enable|zero volume_name [plex]
Put volume into maintenance mode vxvol [ -g diskgroup ] [-U usetype] [-o useopt] maint volume_name
Sets the read policy for a volume vxvol [ -g diskgroup ] [-U usetype] [-o useopt] rdpol round|prefer|select volume_name [plex]
Perform synchronization operation vxvol [ -g diskgroup ] [-U usetype] [-o useopt] resync volume_name
Resizing the volumes using vxvol vxvol [ -g diskgroup ] [-U usetype] [-o useopt] set var=value volume_name
Enable or Disable fastresync on volumes vxvol [ -g diskgroup ] set fastresync=on|off volume_name
To use volume in cluster vxvol [ -g diskgroup ] set exclusive=yes|no volume_name
Start the specified volume vxvol [ -g diskgroup ] [-U usetype] [-o useopt] start volume_name
Stop the specified volume vxvol [ -g diskgroup ] [-U usetype] [-o useopt] stop volume_name
Start all the volume in a disk group vxvol [ -g diskgroup ] [-U usetype] [-o useopt] startall
Stop all the volume in a disk group vxvol [ -g diskgroup ] [-U usetype] [-o useopt] stopall

VXVOL  – Examples:

Note: Examples just shows how to use the command with specific options. You need to decide how to use and when to use.

Enable locally disabled volume (DISABLED State)

 # vxvol -g oradg -U fsgen enable oravol

Initialize Volume for a Use:
This applies where volume has been created by vxmake command and volume yet to initialize. You may also need to use where the volume has been set to uninitialized by vxmend.
Sample volume:

v  oravol02     -            DISABLED EMPTY    0        ROUND     -        gen
	pl oravol02-01  oravol02     DISABLED EMPTY    204800   CONCAT    -        RW
	sd oradisk02-01 oravol02-01  oradisk02 0       204800   0         c3t2d0   ENA

Sets the state for the specified plex to CLEAN, and sets all other plexes to STALE for that volume

# vxvol -g oradg init clean oravol02
	v  oravol02     -            DISABLED CLEAN    0        ROUND     -        gen
	pl oravol02-01  oravol02     DISABLED CLEAN    204800   CONCAT    -        RW
	sd oradisk02-01 oravol02-01  oradisk02 0       204800   0         c3t2d0   ENA

Writes zero blocks to all plexes in the volume, up to the length of the volume

  # vxvol -g oradg init zero oravol02
	v  oravol02     -            ENABLED  ACTIVE   0        ROUND     -        gen
	pl oravol02-01  oravol02     ENABLED  ACTIVE   204800   CONCAT    -        RW
	sd oradisk02-01 oravol02-01  oradisk02 0       204800   0         c3t2d0   ENA

Enables the volume and its plexes but leaves the volume uninitialized

  # vxvol -g oradg init enable oravol02	
	v  oravol02     -            ENABLED  EMPTY    0        ROUND     -        gen
	pl oravol02-01  oravol02     ENABLED  EMPTY    204800   CONCAT    -        RW
	sd oradisk02-01 oravol02-01  oradisk02 0       204800   0         c3t2d0   ENA

Sets the state for all plexes associated with volume to ACTIVE

  # vxvol -g oradg init active oravol02
  	v  oravol02     -            ENABLED  ACTIVE   0        ROUND     -        gen
	pl oravol02-01  oravol02     ENABLED  ACTIVE   204800   CONCAT    -        RW
	sd oradisk02-01 oravol02-01  oradisk02 0       204800   0         c3t2d0   ENA

Put volume into maintenance mode

  # vxvol -g oradg maint oravol
	VxVM vxvol ERROR V-5-1-1222 Volume oravol is enabled, use -o force

To make the volume force maintenance

  # vxvol -g oradg -o force maint oravol
	v  oravol       -            DETACHED ACTIVE   204800   SELECT    -        fsgen
	pl oravol-01    oravol       ENABLED  ACTIVE   204800   CONCAT    -        RW
	sd oradisk01-01 oravol-01    oradisk01 0       204800   0         c3t1d0   ENA

Set the read policy for a volume

  # vxvol -g oradg rdpol round oravol
	v  oravol       -            ENABLED  ACTIVE   204800   ROUND     -        fsgen
	pl oravol-01    oravol       ENABLED  ACTIVE   204800   CONCAT    -        RW
	sd oradisk01-01 oravol-01    oradisk01 0       204800   0         c3t1d0   ENA
	pl oravol-02    oravol       ENABLED  ACTIVE   204800   CONCAT    -        RW
	sd oradisk02-01 oravol-02    oradisk02 0       204800   0         c3t2d0   ENA

Perform synchronization operation

  # vxvol -g oradg -o bg resync oravol

Re-sizing the volumes
Sample volume:

  	v  oravol       -            ENABLED  ACTIVE   204800   SELECT    -        fsgen
	pl oravol-01    oravol       ENABLED  ACTIVE   204800   CONCAT    -        RW
	sd oradisk01-01 oravol-01    oradisk01 0       204800   0         c3t1d0   ENA

After Re-sizing the volume:

   # vxvol -g oradg -o bg set len=value oravol
      	v  oravol       -            ENABLED  ACTIVE   102400   SELECT    -        fsgen
	pl oravol-01    oravol       ENABLED  ACTIVE   204800   CONCAT    -        RW
	sd oradisk01-01 oravol-01    oradisk01 0       204800   0         c3t1d0   ENA

[box type=”warning” align=”alignleft” ]To resize the volume, always use vxresize. If you set the incorrect length using vxvol , then volume may not be startable. [/box]

Enable fastresync on Volume

  # vxvol -g oradg set fastresync=on oravol

Start the specified Volume

  # vxvol -g oradg -o bg start oravol

start the specified volume forcefully

  # vxvol -g oradg -f start oravol

Stop the specified Volume

  # vxvol -g oradg -o force stop oravol
	v  oravol       -            DISABLED CLEAN    204800   SELECT    -        fsgen
	pl oravol-01    oravol       DISABLED CLEAN    204800   CONCAT    -        RW
	sd oradisk01-01 oravol-01    oradisk01 0       204800   0         c3t1d0   ENA

Start all Volumes in the disk group

  # vxvol -g oradg -o bg,delayreover,slow startall

Stop all Volumes in the disk group

  # vxvol -g oradg -o force -o bg stopall
Exit mobile version