VXVM Commands With Examples
VXVM Commands With Examples
The vxtask utility performs basic administrative operations on VERITAS Volume Manager (VxVM)
tasks that are running on the system. Operations include listing tasks (subject to filtering), modifying
the state of a task (aborting, pausing, resuming), and modifying the rate of progress of a
task. VERITAS Volume Manager Tasks represent long-term operations in progress on the system.
Every task provides the time the operation started, the size and progress of the operation, and the
operation’s state and rate of progress (throttle).
Tasks Switches
vxtask [-ahlpqr ] [-g dg_name [-g dg_name…]] [[-G dg_name] -
Listing VxVM Tasks
v volume [-v volume…]] [-i taskid] list [taskid…]
Changing parameters of VxVM Tasks vxtask [-i taskid] set name=value taskid
Option Description
-a Limits the output to tasks in the aborting state.
# vxtask list
# vxtask -l list
Type: RELAYOUT
Throttle: 0
Throttle time: 0
# vxtask -r list
# vxtask -p list
# vxtask -q list
# vxtask -r list
# vxtask -c 10 -t 60 monitor
Type: RELAYOUT
Throttle: 0
Throttle time: 0
Type: RELAYOUT
Throttle: 0
Throttle time: 0
Type: RELAYOUT
Throttle time: 0
Tasks Switches
List the Veritas Volume Manager alerts vxlist [-g diskgroup] alert
List the Volume Manager cache objects vxlist [-g diskgroup] cache
List the supported Array Support Libraries (ASL) vxlist [-g diskgroup] dmp
List the Cluster Volume Manager node information vxlist [-g diskgroup] nodeinfo
Lists the unmounted file systems that are referenced in ‘vfstab’ vxlist umfilesystem|umfs
Displays the information in long format vxlist [-g diskgroup] -l vol vol_1
Display only the disks section in the property page for the specified volume vxlist [-g diskgroup] -s disk vol vol_1
# vxlist
# /opt/VRTSsfmh/adm/dclisetup.sh
asl
....
Output truncated
....
asl scsi3_jbod - -
jbod
Host: vcsnode1
GUID: {d5a789c4-4a3b-11e4-94e7-000c2950665d}
Volume: oravol
Size: 100m
Type: fsgen
Status: healthy
GUID: {b4d40872-4490-11e4-a991-000c29656c89}
Layout: concat
NMirrors: 2
Snapshots: snapvol:fullinst
Display only the disks section in the property page for the specified volume
# vxlist -s disk vol oravol
disks
The vxinfo utility reports a usage-type-dependent condition on one or more volumes in a disk
group.A report for each volume specified by the volume operand is written to the standard output.
Volume conditions:
Volume Condition Description
The volume has been started but is not operationally accessible. This
condition may result from errors that have occurred since the volume was
Started Unusable
started, or may be a result of administrative actions, such as vxdg -k
rmdisk.
The volume is not started and either is not correctly configured or doesn’t
Unstartable meet the prerequisites for automatic startup (with volume startup)
because of errors or other conditions.
Plex States
State Description
1. When the volume is started and the plex fully participates in normal volume
I/O
ACTIVE
2. When the volume is stopped as a result of a system crash and the plex is
ACTIVE at the moment of the crash
Volume creation sets all plexes associated with the volume to the EMPTY state
EMPTY
to indicate that the plex is not yet initialized.
LOG The state of a dirty region logging (DRL) or RAID-5 log plex is always set to LOG.
The vxmend off task indefinitely detaches a plex from a volume by setting the
OFFLINE
plex state to OFFLINE.
A snapshot plex that is being attached by the snapstart operation, when the
attach is complete, the state for the plex is changed to SNAPDONE. If the
SNAPATT
system fails before the attach completes, the plex and all of its subdisks are
removed.
A snapshot plex that is fully attached. If the system fails before the attach
SNAPDIS
completes, the plex is dissociated from the volume.
The SNAPTMP plex state is used during a vxassist snapstart operation when a
SNAPTMP
snapshot is being prepared on a volume.
A plex does not have the complete and current volume contents, that plex is
placed in the STALE state. Also, if an I/O error occurs on a plex, the kernel
STALE
stops using and updating the contents of that plex, and the plex state is set to
STALE.
Setting a plex to the TEMP state eases some plex operations that cannot occur
TEMP
in a truly atomic fashion.
Report the name and condition of each plex in each reported volume
# vxinfo -g oradg -p
The vxmend utility performs various Veritas Volume Manager (VxVM) usage-type-specific
operations on subdisk, plex, and volume records.
Tasks Switches
Put the named plexes or volumes into an offline state vxmend [-g diskgroup] [-o useopt] [-U usetype] off name
Take the named plexes or volumes out of the offline state vxmend [-g diskgroup] [-o useopt] [-U usetype] on name
Change the state of a volume or plex vxmend [-g diskgroup] [-o useopt] [-U usetype] fix how n
Clear specified utility fields for each named record in the disk vxmend [-fprsvV] [-g diskgroup] [-o useopt] [-U usetype]
group name …
Note: To enable the volume, use ‘vxmend fix clean’ & ‘vxvol start’ commands.
The vxedit utility sets and changes attributes for VERITAS Volume Manager (VxVM)
configuration records that do not depend upon volume usage types.
Each invocation can be applied to only one disk group at a time.
Tasks Switches
Rename disk name in disk group vxedit [-g diskgroup] rename oldname newname
Renaming Sub-disks
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
sd disk02-01 - ENABLED 204800 - - - -
Re-naming Plex
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
Re-naming Volume
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
Volume
# vxedit -g oradg rm testvol
Note: Make sure you have detached plexes associated with volume.
Plex
# vxedit -g oradg rm oravol-01
Note: Make sure you have detached sub disks associated with plex.
Sub-Disks
# vxedit -g oradg rm oradisk01-01
The option ‘-rf’ removes recursively & forcefully, so use it with caution.
Set aside/does not set aside a disk from use in a disk group
# vxedit -g oradg set reserve=on oradisk01
The vxdisk utility performs basic administrative operations on disks. Operations include initializing
and replacing disks, as well as taking care of some book-keeping necessary for the disk model
presented by VERITAS Volume Manager (VxVM).
Note: A disk does not have a disk media name until it has been initialized by VxVM. For vxdisk
operations on an initialized disk (disk), the disk may be specified either by its disk access name or by
its disk media name.Physical disks in VxVM are assumed to be movable, and are usually identified
by a unique disk ID stored on the physical disk, rather than by a disk device node. This allows disks
to be moved to different SCSI target IDs or to different controllers without affecting correct
operation.
Tasks Switches
Determine the usability of the specified disks vxdisk [-f] [-g diskgroup] check disk
Define disk access record, but do not initialize vxdisk [-f] define accessname [attribute …]
Rewrite all CDS ID information to the specified disk vxdisk [-f] flush accessname …
Initializes regions of a disk used by VxVM. vxdisk [-f] [-r] init accessname [attribute …]
Display Disk summary information about specified disk vxdisk [-g diskgroup] -s list [accessname]
Display discovery information about disks vxdisk [-g diskgroup] -p list [accessname]
Take the disk offline vxdisk [-f] [-l filename] offline [accessname …]
Updates the unique disk identifier vxdisk [-g diskgroup] updateudid disk …
Device: c4t13d0s2
devicetag: c4t13d0
type: auto
info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2
guid: -
udid: -
site: -
Multipathing information:
numpaths: 1
c4t13d0s2 state=enabled
Device: c3t1d0s2
devicetag: c3t1d0
type: auto
hostid: vxserver
info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2
guid: {68391d66-4406-11e4-a991-000c29656c89}
udid:
VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C299459294E7CD53E0D3DEECC10C
site: -
version: 3.1
ssb: actual_seqno=0.0
headers: 0 240
Defined regions:
Multipathing information:
numpaths: 1
c3t1d0s2 state=enabled
Disk: c3t1d0s2
type: auto
guid: {68391d66-4406-11e4-a991-000c29656c89}
udid:
VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C299459294E7CD53E0D3DEECC10C
site: -
diskid: 1411575503.166.vxserver
dgname: testdg
dgid: 1411577705.178.vxserver
hostid: vxserver
info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2
DISK : c4t9d0s2
DISKID : 1411587602.274.vxserver
VID : OPNFILER
UDID : OPNFILER%5FVIRTUAL-DISK%5FDISKS%5FOPNFILERUEWMXR-tkYE-EV5k
SCSI_VERSION : 4
REVISION : 0
PID : VIRTUAL-DISK
PHYS_CTLR_NAME : /iscsi
MEDIA_TYPE : hdd
LUN_SNO_ORDER : 12
LUN_SERIAL_NO : OPNFILERUEWMXR-tkYE-EV5k
LIBNAME : scsi3_jbod
DMP_DEVICE : c4t9d0
CAB_SERIAL_NO : DISKS
ATYPE : Disk
ARRAY_PORT_PWWN:
ANAME : Disk
TRANSPORT : iSCSI
ENCLOSURE_NAME : disk
DMP_SINGLE_PATH: /dev/rdsk/c4t9d0s2
NUM_PATHS : 1
c1t0d0s2 1 /dev/rdsk/c1t0d0s2
c2t0d0s2 1 /dev/rdsk/c2t0d0s2
c4t9d0s2 1 /dev/rdsk/c4t9d0s2
c4t10d0s2 1 /dev/rdsk/c4t10d0s2
c4t11d0s2 1 /dev/rdsk/c4t11d0s2
c4t12d0s2 2 NULL
c4t13d0s2 2 NULL
c4t14d0s2 2 NULL
# cat /access_names.txt
c3t1d0s2
c3t2d0s2
c3t3d0s2
c3t4d0s2
If you dont specify the length, all additional usable space on the device is claimed. – If you shrink
a LUN, you must specify the new length explicitly.
Any volumes on the device should only be grown after the device itself has first been grown.
Otherwise, storage other than the device may be used to grow the volumes, or the volume resize
may fail if no free storage is available.
Resizing should only be performed on devices that preserve data. Consult the array documentation
to verify that data preservation is supported. – It is possible to resize LUNs that are online but not
part of any disk group.
Do not perform this operation when replacing a physical disk with a disk of a different size as data
is not preserved. – Before reducing the size of a device, any volumes on the device should first be
reduced in size or moved off the device.
If the device that is being resized has the only valid configuration copy for a disk group, the -f
option may be specified to forcibly resize the device.
Resizing a device that contains the only valid configuration copy for a disk group can result in data
loss if a system crash occurs during the resize.
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
# vxdisk rm c4t14d0s2
udid: OPNFILER%5FVIRTUAL-DISK%5FDISKS%5FOPNFILERlEz1fa-xZaX-5wpw
vxdiskunsetup Syntax with Examples
October 1, 2014 191 Views
This command removes the VERITAS Volume Manager configuration from one or more disks.
This command reverses the configuration done by the vxdisksetup command. This operation
makes the disks unusable by VxVM.
This command can be applied only to VxVM-initialized disks that are not in use within an
imported disk group.
This command operates by removing the public and private regions that were created by the
last invocation of vxdisksetup on the specified disks. After this operation, those disks are
converted from the online to the online invalid.
Options Usage
The shred operation overwrites the data on the disk with a digital
-o shred[=1|3|7] pattern in one or more passes. Specify the number of passes as 1, 3,
or 7. The default is 1 pass.
The vxdisksetup command configures the disk for use by VERITAS Volume Manager (VxVM).
‘vxdisksetup’ is called by the vxdiskadd command as part of initial disk configuration. It is not
typically necessary to call this command directly.
Note: In release 4.0 of VxVM, the behavior of the vxdisksetup command has been changed so that it
only
Creates autoconfigured disks, which can have one of the following formats:
1. cdsdisk
The disk is formatted as a CDS disk that is suitable for moving between different operating
systems.
This is the default format (provided that the -i option is used to write the disk header).
It is not suitable for boot disks.
For disks less than 1 TB slice 7 holds private & public region. For the disk in more size slice 2
will be holding private & public region.
2. none
The disk is un-formatted. This value may be displayed, but it cannot be set as a valid format.
3. simple
Slice 3 is created to hold the private and public regions with all other slices (apart from slice
2) zeroed out.
4. sliced
Slices 3 and 4 are created to hold separate private and public region partitions with all other
slices (apart from slice 2) zeroed out.
This format can be applied to disks that can be used to boot the system.
If the disk is not initialized as a boot disk, space is reserved on the disk to allow it to be converted
to cdsdisk format if required.
The private region is used by VxVM to store configuration information, and is followed by a public
region from which sub disks can be allocated. Default private region length is 32 MB.
Options Usage
Allocates the private region at the end of the disk.
-e
Note: This option is not supported for cdsdisk and simple format disks.
Writes a disk header to the disk, initializes the private region of the disk and makes the
disk directly usable
Note:
-i
A disk that is a member of an imported disk group cannot be initialized. The command
also fails if the disk is a member of a deported disk group. The -f option can be used to
override the latter restriction.
Must be specified with the -f option to remove the UFS file system signature from a
-r
disk.
Device: c3t1d0s2
devicetag: c3t1d0
type: auto
hostid:
info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2
guid: {01ff865e-43fa-11e4-a991-000c29656c89}
udid:
VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C299459294E7CD53E0D3DEECC10C
site: -
version: 3.1
ssb: actual_seqno=0.0
headers: 0 240
Defined regions:
Multipathing information:
numpaths: 1
c3t1d0s2 state=enabled
devicetag: c3t2d0
type: auto
hostid:
info: format=sliced,privoffset=4,pubslice=4,privslice=3
guid: -
udid:
VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C29D279EE0D6FE6F3C73FECCE2EA
site: -
version: 2.1
ssb: actual_seqno=0.0
headers: 0 248
Defined regions:
Multipathing information:
numpaths: 1
c3t2d0s2 state=enabled
Device: c3t3d0s2
devicetag: c3t3d0
type: auto
hostid:
disk: name= id=1411571336.142.vxserver
info: format=simple,privoffset=4,pubslice=3,privslice=3
guid: -
udid:
VMware%2C%5FVMware%20Virtual%20S%5FDISKS%5F6000C299B163F835356BC1A96FBC0D17
site: -
version: 2.1
ssb: actual_seqno=0.0
headers: 0 248
Defined regions:
numpaths: 1
VxVM vxdisksetup ERROR V-5-2-1813 c4t9d0: Disk is part of testdg disk group, use -
f option to force setup.
Example:
Disk Currently in control by VXVM
DEVICE TYPE DISK GROUP STATUS
0. c1t0d0 <VMware,-VMware Virtual -1.0 cyl 2085 alt 2 hd 255 sec 63>
/pci@0,0/pci15ad,1976@10/sd@0,0
1. c2t0d0 <VMware,-VMware Virtual -1.0 cyl 2085 alt 2 hd 255 sec 63>
/pci@0,0/pci15ad,790@11/pci15ad,1976@0/sd@0,0
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@1,0
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@2,0
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@3,0
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@4,0
6. c3t5d0 <VMware,-VMwareVirtualS-1.0 cyl 43688 alt 2 hd 16 sec 3>
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@5,0
/pci@0,0/pci15ad,790@11/pci15ad,1976@1/sd@6,0
8. c4t9d0
/iscsi/[email protected]%3Asanvol05.809d5c9b352a0001,0
9. c4t10d0
/iscsi/[email protected]%3Asanvol04.c41880f4e3640001,0
10. c4t11d0
/iscsi/[email protected]%3Asanvol03.f9d0377915620001,0
11. c4t12d0
/iscsi/[email protected]%3Asanvol02.2aba8574dbbf0001,0
12. c4t13d0
/iscsi/[email protected]%3Asanvol01.7974045afa800001,0
13. c4t14d0
/iscsi/[email protected]%3Adatavol01.ba80d08f20300001,0
14. c4t15d0
/iscsi/[email protected]%3Asanvol01%3A01.7974045afa800001,0
VxVM INFO V-5-2-1401 This command may take a few minutes to complete execution
Executing Solaris command: devfsadm (part 1 of 2) at 19:34:20 IST
The vxdiskadm command provides a menu-driven interface to perform common VERITAS Volume
Manager (VxVM) disk administration tasks. The vxdiskadm script is interactive and prompts you for
responses, supplying defaults where appropriate. Help is available at every prompt by entering a
question mark (?) to display a context-sensitive help message.
vxdiskadm – Examples:
# vxdiskadm
Volume Manager Support Operations
Menu: VolumeManager/Disk
3 Remove a disk
Output:
Use this operation to add one or more disks to a disk group. You can
add the selected disks to an existing disk group or to a new disk group
that will be created as a part of the operation. The selected disks may
More than one disk or pattern may be entered at the prompt. Here are
new disk group, or you can leave these disks available for use
group, select a disk group name that does not yet exist. To
leave the disks available for future use, specify a disk group
name of "none".
disks.
Do you want to use the default layout for all disks being initialized?
[y,n,q,?] (default: y)
Menu: VolumeManager/Disk/Encapsulate
Use this operation to convert one or more disks to use the Volume Manager.
This adds the disks to a disk group and replaces existing partitions
to take effect.
More than one disk or pattern may be entered at the prompt. Here are
c3t6d0 - - online
[,all,list,q,?] c3t6d0
c3t6d0
a new disk group. To create a new disk group, select a disk group
NAME STATE ID
c3t6d0
c3t6d0
The disk group selected is a CDS disk group. For encapsulation, the disk
group's CDS attribute will be turned off, and its disk group alignment will
be set to 1.
The disk device c3t6d0 will be encapsulated and added to the disk group
[y,n,q,?] (default: y)
The encapsulation will require two or three reboots which will happen
This will update the /etc/vfstab file so that volume devices are
used to mount the file systems on this disk device. You will need
After a Reboot
3. Remove a disk
– Use this option to remove a disk from a disk group.
– You cannot remove a disk if any volumes use storage on the disk.
– You cannot remove the last disk in a disk group using this operation.
Example: Removing Disk ‘c3t3d0s2’ from disk group ‘oradg’
Output:
Remove a disk
Menu: VolumeManager/Disk/RemoveDisk
that you gave to the disk when you added the disk to the disk
group.
VxVM NOTICE V-5-2-284 Requested operation is to remove disk c3t3d0s2 from group
oradg.
Menu: VolumeManager/Disk/RemoveForReplace
group, while retaining the disk name. This changes the state
initialized disks that are not part of a disk group, you will be
c3t3d0
VxVM vxbootsetup NOTICE V-5-2-3616 Root file system is not defined on a volume.
VxVM INFO V-5-2-158 Disk replacement completed successfully.
Output:
Menu: VolumeManager/Disk/ReplaceDisk
that you removed with the "Remove a disk for replacement" menu
You can choose an uninitialized disk, in which case the disk will
be initialized, or you can choose a disk that you have already
dm c4t11d0s2 - - - - NODEVICE
Output:
Menu: VolumeManager/Disk/Mirror
Mirroring volumes from the boot disk will produce a disk that
At the prompt below, supply the name of the disk containing the
volumes to be mirrored.
You can choose to mirror volumes from disk c3t1d0s2 onto any
available disk space, or you can choose to mirror onto a specific
VxVM NOTICE V-5-2-3650 This operation can take a long time to complete.
Output:
Menu: VolumeManager/Disk/Evacuate
specify a list of disks to move volumes onto, or you can move the
the disk, does not prevent volumes from being moved onto
the disk by future operations. For example, using two
You can now specify a list of disks to move onto. Specify a list
blanks. If you do not enter any disk media names, then the volumes
group oradg.
After Movement,
Menu: VolumeManager/Disk/ImportDiskGroup
used as the final part of moving a disk group from one system to
original host.
A disk group can be imported from another host that failed without
first deporting the disk group. Be sure that all disks in the disk
If two hosts share a SCSI bus, be very careful to ensure that the
other host really has failed or has deported the disk group. If
two active hosts import a disk group at the same time, the disk
DEVICES: c3t1d0
c3t2d0
c3t3d0
c3t4d0
Menu: VolumeManager/Disk/DeportDiskGroup
Use this option to remove access to a disk group that
system. Also, deport a disk group if you want to use all of the
You will be prompted for the name of a disk group. You will
following disks:
Menu: VolumeManager/Disk/OnlineDisk
You can also use this operation to re-scan a disk that may have
the other system may have changed the disk. If so, you can use
c3t5d0 - - offline
c3t6d0 - - online
After Enabling,
NOTE:Many systems do not support disks that can be removed from a system during normal
operation. On such systems, the offline operation is seldom useful.
Example: Disabling a single disk which is not part of any disk group
Output:
disks that are not currently in a disk group. Use this operation
NOTE: Many systems do not support disks that can be removed from
c3t5d0 - - online
c3t6d0 - - online
After disabling,
Menu: VolumeManager/Disk/MarkHotSpareDisk
This operation takes, as input, a disk name. This is the same name
that you gave to the disk when you added the disk to the disk group.
VxVM NOTICE V-5-2-252 Please enter a disk name, or type "list" to list all
disks.
Menu: VolumeManager/Disk
Menu: VolumeManager/Disk/UnmarkHotSpareDisk
name that you gave to the disk when you added the disk to the
disk group.
VxVM NOTICE V-5-2-143 Disk c3t4d0s2 in oradg no longer marked as a spare disk.
After failure,
Output:
onto the original disk that has been replaced due to a disk failure.
failed drive was replaced with a disk using a different name, this
c4t9d0s2
Use -f option to unrelocate the subdisks if moving to the exact offset fails?
[y,n,q,?] (default: n) y
VxVM INFO V-5-2-954 Unrelocate to disk c4t9d0s2 is complete.
Menu: VolumeManager/Disk/MarkNoHotUse
This operation takes, as input, a disk name. This is the same name
that you gave to the disk when you added the disk to the disk group.
Enter disk name [,list,q,?] list
[y,n,q,?] (default: n)
Menu: VolumeManager/Disk/UnmarkNoHotUse
name that you gave to the disk when you added the disk to the
disk group.
[y,n,q,?] (default: n) n
Exclude Devices
Menu: VolumeManager/Disk/ExcludeDevices
This operation might lead to some devices being suppressed from VxVM's view
Menu: VolumeManager/Disk/ExcludeDevices
1 Suppress all paths through a controller from VxVM's view
Menu: VolumeManager/Disk/ExcludeDevices/CTLR-VXVM
Use this operation to exclude all paths through a controller from VxVM.
the form c#, example c3, c11 etc. Enter 'all' to exclude all paths on all
the controllers on the host. To see the list of controllers on the system,
type 'list'.
VxVM INFO V-5-2-1214 The following controllers were found on the system :
c1 c2 c3 c4
VxVM vxdisk ERROR V-5-1-558 Disk c4t14d0s2: Disk not in the configuration
VxVM vxdisk ERROR V-5-1-558 Disk c4t14d0s2: Disk not in the configuration
disk
The controller c4 will be disabled and the entries for paths on controller c4
Include Devices
Menu: VolumeManager/Disk/IncludeDevices
The devices selected in this operation will become visible to VxVM again.
Only those devices which were previously excluded can be included again.
Menu: VolumeManager/Disk/IncludeDevices
Menu: VolumeManager/Disk/IncludeDevices/CTLR-VXVM
Use this operation to make all paths through a controller visible to VxVM
again.
As a result of this operation, all paths through the specified controller
the form c#, example c3, c11 etc. Enter 'all' to include all paths on all
--------------------------
Paths : c1
Controllers : c4
VID:PID : None
--------------------------
All paths through controller c4 will be made visible VxVM again as a result of
this operation.
Continue operation? [y,n,q,?] (default: y)
Menu: VolumeManager/Disk/listexclude
--------------------------
Paths : c1
Controllers : None
VID:PID : None
--------------------------
20. Change the disk naming scheme
– Changes the disk naming scheme from the c#t#d# format to enclosure-based and vice versa.
Menu: VolumeManager/Disk/NamingScheme
Use this screen to change the disk naming scheme (from the c#t#d# format
Output:
Menu: VolumeManager/Disk/Diskrefresh
This will bring the newly added or zoned devices in VxVM view
VxVM INFO V-5-2-1401 This command may take a few minutes to complete execution
Menu: VolumeManager/Disk/Preferences
Menu: VolumeManager/Disk/Preferences/DiskInitialization
Menu: VolumeManager/Disk/Preferences/DiskInitialization
VxVM INFO V-5-2-2068 The preferred format for initializing new disks is:
cdsdisk
WARN: Please Do not Run any Device Discovery Operations outside the Tool during
Reconfiguration operations
------------------------------------------------------------------------------
OS : SunOS |PASS
-------------------------------------------------------------------------------
Press or to continue:
Menu: VolumeManager/Disk/DynamicReconfigurationOperations
1 Add Luns
2 Remove Luns
3 Replace Luns
4 Replace HBA
q Exit
Example: Listing all disks & detailed information for a specific disk
Output:
Menu: VolumeManager/Disk/ListDisk
Device: c4t10d0s2
devicetag: c4t10d0
type: auto
info: format=none
guid: -
udid: OPNFILER%5FVIRTUAL-DISK%5FDISKS%5FOPNFILER3nfUf2-Y2Rj-gFJ3
site: -
Multipathing information:
numpaths: 1
c4t10d0s2 state=enabled
Tasks Switches
Print ‘vxlicrep’ utility version number vxlicrep -v
vxlicrep -k
Print License information about specified keys
<key1,key2,…>
3.02.61.004
Print Summary or Short report of installed licenses
# vxlicrep -s
-----------------***********************-----------------
OEM ID = 2006
Features :=
VxVM = Enabled
FASTRESYNC = Enabled
DGSJ = Enabled
PGR = Enabled
VVS_CONFIG = Enabled
Platform = un-used
Version = 6.0
OEM ID = 2006
User Defined :=
DMP = Disabled
SSA_DMP = Disabled
EMC_DMP = Disabled
DGC_DMP = Disabled
HITACHI_DMP = Disabled
SEAGATE_DMP = Disabled
AUTORAID_DMP = Disabled
SENA_DMP = Disabled
ECCS_DMP = Disabled
STORCOMP_DMP = Disabled
RELAYOUT = Disabled
HP_VXVM_FULL = Disabled
FMR_DGSJ = Disabled
CVM_LITE_OPS = Disabled
CVM_FULL = Disabled
Feature ID :=
CVM_LITE = Disabled
VXPO_LIC = Disabled
VVR = Disabled
BASIC = Disabled
CONCAT = Disabled
SPAN = Disabled
MIRROR = Disabled
STRIPE = Disabled
VxVM = Enabled
RAID = Disabled
ORM = Disabled
PHOTON = Disabled
SSA = Disabled
VMBETA = Disabled
FASTRESYNC = Enabled
DGSJ = Enabled
LINUX_LITE = Disabled
ASL_DEVELOPER = Disabled
ROOTMIRROR = Disabled
FMR_DGSJ = Disabled
ALL_DMP = Disabled
PGR = Enabled
VXSYM_LIC = Disabled
PGR_TRAINING = Disabled
VVS_CONFIG = Enabled
Platform = un-used
Version = 6.0
RAID5SNAP = Disabled
Site Awareness = Disabled
RESERVED = 0
VXKEYLESS = Disabled
-----------------***********************-----------------
OEM ID = 2006
Reserved = 0
QLOGODM = Enabled
Platform = un-used
Version = 6.0
VXKEYLESS = Enabled
-----------------***********************-----------------
Features :=
DATABASE_EDITION = Enabled
DBED_ORA_TOOLS = Enabled
ODM = Enabled
-----------------***********************-----------------
OEM ID = 2006
Features :=
Storage Expert = Enabled
VxVM = Enabled
FASTRESYNC = Enabled
DGSJ = Enabled
PGR = Enabled
VVS_CONFIG = Enabled
Platform = un-used
Version = 6.0
-----------------***********************-----------------
OEM ID = 2006
VXFS = Enabled
VXCKPT = Enabled
Platform = un-used
Version = 6.0
If you are upgrading your existing license or you are installing new license to change the
system from KEYLESS to licensed, make sure you are copying your existing license information
from ‘/etc/vx/license/lic’ directory. Also keep the complete output of ‘vxlicrep -e’ command.
Once you installed or updated your Symantec license, use ‘vxdctl license init’ to reinitialize.
If the system is part of VERITAS Cluster you need to restart ‘/opt/VRTSvcs/bin/CmdServer’ as
well after freezing nodes.
You can verify the new features by issuing ‘vxlicrep’ & ‘vxdctl license’.
Tasks Switches
Print Host-ID from configuration vxlicinst -u
12b0dce3
Print Architecture/Model
# vxlicinst -m
i86pc
3.02.61.004
# vxlicinst
Tasks Switches
To restore or precommit configuration of specific disk group vxconfigrestore -p disk_group
To restore configuration of specific disk group without writing
vxconfigrestore -n disk_group
header information
# ls -l rootdg.1410417163.12.vxserver
Run:
1. The vxconfigbackup utility can be used to back up the configuration information for one or
more disk groups manually at any desired time.
2. The vxconfigbackupd daemon automatically backs up a disk group’s new configuration to
the default backup directory whenever the configuration is changed.
3. The disk group configuration backup and restore utilities do not save any data in the public region.
4. This includes only file system or other application data that is configured within VERITAS
Volume Manager (VxVM) objects.
Tasks Switches
Backup all disk group configuration’s vxconfigbackup [-f]
# ls -l rootdg.1410417163.12.vxserver
# ls -l /TEST
Tasks Switches
Set Default Boot Diskgroup vxdctl bootdg group
List or Rescan VxVM licenses for usable features vxdctl license [init]
Display ‘volboot’ file information vxdctl list
Remove an attribute from the volboot file vxdctl [-F] unset attribute
vxdctl – Examples
Set Default Boot Diskgroup
# vxdctl bootdg rootdg
If you don't wish to newly create .bash_profile, then you need to either
reinvoke
VxVM vxprint ERROR V-5-1-684 IPC failure: Configuration daemon is not accessible
Mirroring
Root Mirroring
Concatenation
Disk-spanning
Striping
RAID-5
RAID-5 Snapshot
VxSmartSync
FastResync
DGSJ
Site Awareness
CDS
Volboot file
version: 3/1
seqno: 0.3
hostid: vxserver
defaultdg: oradg
bootdg: rootdg
hostguid: {0a580b84-397b-11e4-a991-000c29656c89}
mode: enabled
100
# vxdctl setversion
120
Displays the versions of VxVM objects and components that are supported
# vxdctl support
Support information:
vxconfigd_vrsn: 34
dg_minimum: 20
dg_maximum: 180
kernel: 33
protocol_minimum: 90
protocol_maximum: 120
protocol_current: 0
Tasks Switches
vxsd [-g diskgroup] [-U utype] [-o uopt] [-V] [-v vol] [-p plex] [-l
Associates subdisks
[column/]offset] assoc plex sd…
vxsd [-g diskgroup] [-U utype] [-o uopt] [-V] [-v vol] [-p plex] [-s size] split
Splitting Subdisk
sd newsd [newsd2]
vxsd [-g diskgroup] [-U utype] [-o uopt] [-V] [-v vol] [-p plex] join sd1 sd2 …
Joining SubDisk’s
newsd
vxsd [-g diskgroup] [-U utype] [-o uopt] [-V] [-v vol] [-p plex] [-k [-O
Moving or Replacing SubDisk
operational_tag]] mv oldsd newsd
Dissociating a subdisk vxsd [-g diskgroup] [-U utype] [-o uopt] [-V] [-v vol] [-p plex] dis sd …
VXSD – Examples
Associates subdisks with an existing plex
# vxsd -g oradg assoc oravol-01 oradisk01-01
Here you can resize the volume to maximum or to a specified length using ‘vxresize’ command.
Splitting subdisk
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
Joining Subdisk
# vxsd -g oradg join oradisk01-01 oradisk01-02 oradisk01-01
Tasks Switches
vxplex [ -g diskgroup ] [-U usetype] [-o useopt] [-V]
Make a copy of a Volume
[-v vol] cp vol plex
Convert a snapshot plex into a regular plex, or vice vxplex [-v vol] convert state=SNAPDONE|ACTIVE
versa plex
Cancel the effects of a snapstart vxplex [-o useopt] [-v vol] snapabort plex
Dissociates named plexes from their current vxplex [ -g diskgroup ] [-U usetype] [-o useopt] [-V]
volume [-v vol] snapback origvol plex
VXPLEX – Examples
Make a copy of a Volume
Sample volume used for this demo:
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
Once you made a copy of volume, you can associate and use it as separate volume.
Disassociate and remove the plexes and subdisks from the configuration
# vxplex -g oradg -o rm dis appsvol-01
– This command also removes the plex & Sub Disk from configuration.
Tasks Switches
Enable locally disabled volume (LDISABLED vxvol [ -g diskgroup ] [-U usetype] [-o useopt]
State) enable volume_name
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.
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
Writes zero blocks to all plexes in the volume, up to the length of the volume
# vxvol -g oradg init zero oravol02
Sets the state for all plexes associated with volume to ACTIVE
# vxvol -g oradg init active oravol02
To resize the volume, always use vxresize. If you set the incorrect length using vxvol , then volume
may not be startable.
Tasks Switches
vxdg [-s] init diskgroup [diskname=]devicename
Creating Disk Groups
…
List & Viewing Available Disk Groups Information vxdg list [disk_group]
Removing Disk’s from Existing Disk Group vxdg [-g diskgroup] rmdisk diskname …
Import Disk Group vxdg [-C] [-f] [-n new_name] import diskgroup
Move Volume from one Disk Group to Another vxdg move src_diskgroup dst_diskgroup volume
Upgrading Disk Groups to Specific or latest Version vxdg [-T version] upgrade diskgroup
Creating Disk Group with specific minor number and diskgroup version
number:
# vxdg -T 180 init oradg minor=20001 oradisk01=c3t1d0s2 oradisk02=c3t2d0s2
oradisk03=c3t3d0s2
NAME STATE ID
Group: oradg
dgid: 1408692754.17.vxserver1
import-id: 1024.16
flags: cds
version: 180
ssb: on
autotagging: on
detach-policy: global
dg-fail-policy: obsolete
ioship: off
oradg
version: 140
version: 160
version: 180
Tasks Switches
vxmake -g diskgroup -U usetype sd subdisk_name disk_name,start_len,end_len
Creating Sub Disk
vxmake -g diskgroup sd subdisk_name len=length disk_name
Creating Concat
vxmake -b -g diskgroup -U fsgen vol volume_name [len=length] plex=plex,…
Volume
Creating Striped
vxmake -b -g diskgrup -U fsgen vol volume_name plex=striped_plex
Volume
Creating Mirrored
vxmake -b -g diskgroup -U fsgen vol volume_name plex=plex1,plex2…
Volume
dc oravol-dco oravol - - - - - -
Create volume
vxassist [-g diskgroup] [-U usetype] [-b] make volume-name {len|maxsize=<size>}
[layout=layout_method] [attrs...]
Resize volumes
growto
growby
Shrinkto
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
– Here 4 coloumn stripe volume of 2 GB size will be created using the specified disks.
– 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
– 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)
– 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
– Here the 4 column raid5 volume will be created using specified disks.
– RIAD5 uses default LOG method
– Default ‘ncol’ value is 5
– Default ‘stwidth’ value is 32
Creating Non-Layerd Volumes:
– Volumes where sub disks directly mapped to plex then to Volumes
1. mirror-concat
# vxassist -g oradg make oravol 1g layout=mirror-concat
2. mirror-stripe
2. stripe-mirror
– Here the sub disks will be created in the above specified manner.
– 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
Resizing Volumes:
# vxassist -g oradg make oravol 300m
1. growto
# vxassist -g oradg growto oravol 500m
2. growby
3. shrinkto
4. shrinkby
Note:
– 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:
Online Re-Layout supports to change the plex or volume to or from
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
Note:
*** 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:
1. Mirror-Concat into Concat-Mirror
– For a simple volume which is having one subdisk & plex you can use the above command
– 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
vxprint’s options
Option Description
-A Print all disk groups
The node does not have local access to the disk. The node is sending private
LFAILED region I/Os through the network to a remote node that has local access to
the disk.
The disk was not discovered locally by DMP. The node does not have a
LMISSING
corresponding DMP device for the disk.
ACTIVE The volume has been started (kernel state is currently ENABLED)
The volume contents are not initialized. The kernel state is always
EMPTY
DISABLED when the volume is EMPTY.
ENABLED The volume is online and can be read from or written to.
Plex States
State Description
1. When the volume is started and the plex fully participates in normal volume I/O
ACTIVE 2. When the volume is stopped as a result of a system crash and the plex is ACTIVE at
the moment of the crash
When it is known to contain a consistent copy (mirror) of the volume contents and an
operation has disabled the volume. As a result, when all plexes of a volume are clean,
CLEAN
no action is required to guarantee that the plexes are identical when that volume is
started.
Data change object (DCO) plex attached to a volume can be used by a snapshot plex
DCOSNP
to create a DCO volume during a snapshot operation.
Volume creation sets all plexes associated with the volume to the EMPTY state to
EMPTY
indicate that the plex is not yet initialized.
When the vxconfigd daemon detects an uncorrectable I/O failure on an ACTIVE plex,
IOFAIL it places the plex in the IOFAIL state to exclude it from the recovery selection process
at volume start time.
LOG The state of a dirty region logging (DRL) or RAID-5 log plex is always set to LOG.
The vxmend off task indefinitely detaches a plex from a volume by setting the plex
OFFLINE
state to OFFLINE.
A snapshot plex that is being attached by the snapstart operation, when the attach is
SNAPATT complete, the state for the plex is changed to SNAPDONE. If the system fails before
the attach completes, the plex and all of its subdisks are removed.
A snapshot plex that is fully attached. If the system fails before the attach completes,
SNAPDIS
the plex is dissociated from the volume.
The SNAPTMP plex state is used during a vxassist snapstart operation when a
SNAPTMP
snapshot is being prepared on a volume.
A plex does not have the complete and current volume contents, that plex is placed
STALE in the STALE state. Also, if an I/O error occurs on a plex, the kernel stops using and
updating the contents of that plex, and the plex state is set to STALE.
Setting a plex to the TEMP state eases some plex operations that cannot occur in a
TEMP
truly atomic fashion.
The plex is online. A write request to the volume is reflected in the plex. A read request from t
ENABLED
is satisfied from the plex.
SubCache & SubDisk Modes
State Description
DET The subdisk has been detached.
The subdisk in a RAID5 plex has failed and the RAID5 volume is in degraded mode (d
dS
indicates that the subdisk is detached, and S indicates that its contents are stale).
FAIL The subdisk has been detached in the kernel due to an error.
NDEV The media record on which the subdisk is defined has no associated access record.
RCOV The subdisk is part of a RAID5 plex and has stale content.
The media record on which the subdisk is defined has been removed from its disk access
RMOV
record by a utility.
SubVolume Modes
State Description
ENA The subvolume is usable.
IOFAIL The subvolume has been detached in the kernel due to an error.
Command output with Examples:
To Display VxVM configuration Summary:
# vxprint -S
3 5 6 0 0 4 0 0 0
0 0 0
# vxprint -l oradisk03
Disk: oradisk03
info: diskid=1408760143.38.vxserver1
device: path=/dev/vx/dmp/c2t9d0s2
mediatype: hdd
dg oradg oradg - - - - - -
# vxprint -l oradg
Group: oradg
info: dgid=1408715327.33.vxserver1
version: 180
detach-policy: global
dg-fail-policy: dgdisable
ioship: off
cds=on
# vxprint -g oradg
dg oradg oradg - - - - - -
# vxprint -l oravol
Volume: oravol
info: len=204800
type: usetype=fsgen
assoc: plexes=oravol-01
exports=(none)
apprecov: seqno=0/0
recovery: mode=default
recov_id=0
guid: {cb16f2d8-2a6a-11e4-8488-000c299c547d}
# vxprint -l oradisk01-01
Subdisk: oradisk01-01
flags: enabled
mediatype: hdd
Plex: appsvol-01
info: len=204800
type: layout=CONCAT
flags: complete
mediatype: hdd
dg oradg oradg - - - - - -
cachevol-01
oravol-P01
oravol-P02
oravol-P03
oravol-P04
oravol-03