Site icon UnixArena

VxVM – vxedit Command Syntax with Examples

/usr/sbin/vxedit– Unix Arena’s Manual page

Product – Veritas Volume Manager-vxvm (Storage Foundation)

/usr/sbin/vxedit – create, remove, and modify VERITAS Volume Manager Records

Tasks

Switches

Rename disk name in disk group vxedit [-g diskgroup] rename oldname newname
Remove VxVM virtual objects vxedit [-g diskgroup] [-rf] rm name…
Set or Change attributes of VxVM virtual objects vxedit [-e pattern] [-g diskgroup] set attribute=value… [name…]

vxdg command line Examples:

Renaming disk media name:

	DEVICE       TYPE            DISK         GROUP        STATUS
	c3t1d0s2     auto:cdsdisk    oradisk01    oradg        online
	c3t2d0s2     auto:cdsdisk    disk2        oradg        online

  # vxedit -g oradg rename disk2 oradisk02

  	DEVICE       TYPE            DISK         GROUP        STATUS
  	c3t1d0s2     auto:cdsdisk    oradisk01    oradg        online
	c3t2d0s2     auto:cdsdisk    oradisk02    oradg        online

Renaming Sub-disks

	TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
	sd disk02-01    -            ENABLED  204800   -        -        -       -
	sd oradisk01-01 -            ENABLED  204800   -        -        -       -

  # vxedit -g oradg rename disk02-01 oradisk02-01

  	TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
	sd oradisk01-01 -            ENABLED  204800   -        -        -       -
	sd oradisk02-01 -            ENABLED  204800   -        -        -       -

Re-naming Plex

	TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
	pl plex-01      -            DISABLED 204800   -        -        -       -
	pl plex-02      -            DISABLED 204800   -        -        -       -

  # vxedit -g oradg rename plex-01 oravol-01

	NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
	pl oravol-01    -            DISABLED 204800   -        -        -       -
	pl plex-02      -            DISABLED 204800   -        -        -       -

Re-naming Volume

	TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
	v  oravol       gen          DISABLED 0        -        EMPTY    -       -

  # vxedit -g oradg rename oravol testvol

	TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
	v  testvol      gen          DISABLED 0        -        EMPTY    -       -

Removing VxVM virtual objects

	v  testvol      -            DISABLED EMPTY    0        ROUND     -        gen
	pl oravol-01    testvol      DISABLED EMPTY    204800   CONCAT    -        RW
	sd oradisk01-01 oravol-01    oradisk01 0       204800   0         c3t1d0   ENA

Volume

  # vxedit -g oradg rm testvol

[box type=”note” ]Note: Make sure you have detached plexes associated with volume.[/box]

Plex

  # vxedit -g oradg rm oravol-01

[box type=”note” ]Note: Make sure you have detached sub disks associated with plex.[/box]

Sub-Disks

  # vxedit -g oradg rm oradisk01-01

Removing volume and its all associated objects

		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
		pl oravol-02    oravol       ENABLED  ACTIVE   204800   CONCAT    -        RW
		sd oradisk02-01 oravol-02    oradisk02 0       204800   0         c3t2d0   ENA

  # vxedit -g oradg -rf rm oravol

[box type=”warning” ]The option ‘-rf’ removes recursively & forcefully, so use it with caution.[/box]

Setting or Changing Attributes of virtual objects

Disks used here,

	DEVICE       TYPE            DISK         GROUP        STATUS
	c3t1d0s2     auto:cdsdisk    oradisk01    oradg        online
	c3t2d0s2     auto:cdsdisk    oradisk02    oradg        online failing
	c3t3d0s2     auto:cdsdisk    oradisk03    oradg        online
	c3t4d0s2     auto:cdsdisk    oradisk04    oradg        online

Set aside/does not set aside a disk from use in a disk group

# vxedit -g oradg set reserve=on oradisk01

Does not/does allow free space on a disk to be used for hot-relocation

  # vxedit -g oradg set nohotuse=on oradisk03

Add/remove a disk from the pool of hot-relocation spares

  # vxedit -g oradg set spare=on oradisk04

Set or clear ‘failing’ flag on specified disks

  # vxedit -g oradg set failing=off oradisk02

After Setting or Changing attributes,

	DEVICE       TYPE            DISK         GROUP        STATUS
	c3t1d0s2     auto:cdsdisk    oradisk01    oradg        online reserved
	c3t2d0s2     auto:cdsdisk    oradisk02    oradg        online
	c3t3d0s2     auto:cdsdisk    oradisk03    oradg        online nohotuse
	c3t4d0s2     auto:cdsdisk    oradisk04    oradg        online spare
Exit mobile version