Professional Documents
Culture Documents
The vxdg utility performs various diskgroup operations that includes the creation of disk
groups, addition of disks in to diskgroup,removing disk from diskgroup.This
command performs disk group imports and deports as well.Here we are going to see how create a
new diskgroup and adding disks in existing diskgroup.In the end of the article we will see how to
backup the diskgroup configuration.
In the below output you can see, we have five disks which are in VXVM control. We have brought
the disk in to vxvm control using vxdisksetup.
uarena#vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk - - online
disk_1 auto:cdsdisk - - online
disk_2 auto:ZFS - - ZFS
disk_3 auto:ZFS - - ZFS
disk_4 auto:cdsdisk - - online
disk_5 auto:cdsdisk - - online
disk_6 auto:cdsdisk - - online
Task:2-Addition of disk:
If you want to add the new disk in to existing diskgroup, bring the disk in to vxvm control using
vxdisksetup and add it using below command.
uarena#vxdg -g UXDG adddisk UXDISK3=disk_4
uarena#vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk UXDISK1 UXDG online
disk_1 auto:cdsdisk UXDISK2 UXDG online
disk_2 auto:ZFS - - ZFS
disk_3 auto:ZFS - - ZFS
disk_4 auto:cdsdisk UXDISK3 UXDG online
disk_5 auto:cdsdisk - - online
disk_6 auto:cdsdisk - - online
You can remove the disk any time from DG if its not used in any volume.
uarena#vxdg -g UXDG rmdisk UXDISK3
uarena#vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk UXDISK1 UXDG online
disk_1 auto:cdsdisk UXDISK2 UXDG online
disk_2 auto:ZFS - - ZFS
disk_3 auto:ZFS - - ZFS
disk_4 auto:cdsdisk - - online
disk_5 auto:cdsdisk - - online
disk_6 auto:cdsdisk - - online
If you want to find out how much size volume we can create from the diskgroup, use the below
command.In other word to you can determine the free space of the diskgroup.
uarena#vxassist -g UXDG maxsize
Maximum volume size: 284672 (139Mb)
Task:5-Deporting diskgroup:
After un-mounting the volumes , you can deport the diskgroup.To see the imported diskgroup
uarena#vxdg list
NAME STATE ID
UXDG enabled,cds 1364022395.37.sfos
uarena#vxdg deport UXDG
By default vxdisk output will not show the deported diskgroup tag.
uarena#vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk - - online
disk_1 auto:cdsdisk - - online
disk_2 auto:ZFS - - ZFS
disk_3 auto:ZFS - - ZFS
disk_4 auto:cdsdisk - - online
disk_5 auto:cdsdisk - - online
disk_6 auto:cdsdisk - - online
To find the deported diskgroup disks,
uarena#vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk - (UXDG) online
disk_1 auto:cdsdisk - (UXDG) online
disk_2 auto:ZFS - - ZFS
disk_3 auto:ZFS - - ZFS
disk_4 auto:cdsdisk - - online
disk_5 auto:cdsdisk - - online
disk_6 auto:cdsdisk - - online
You cant the rename the diskgroup while its in imported state.In a order to rename the DG, you
need to re-import with new name.
uarena#vxdg deport UXDG
uarena#vxdg -n NEWDG import UXDG
uarena#vxdg list
NAME STATE ID
NEWDG enabled,cds 1364022395.37.sfos
Whenever there is a configuration change in diskgroup, automatically vxvm backup the new
configuration under /etc/vx/cbr/bk/
bash-3.00# ls -lrt /etc/vx/cbr/bk
total 6
drwxr-xr-x 14 root root 18 Mar 27 19:18 UXDG.1364022395.37.sfos
drwxr-xr-x 2 root root 6 Mar 27 21:21 UXDG.1364398489.45.sfos
# /etc/vx/bin/vxconfigbackup
Start backing up diskgroup UXDG to
/etc/vx/cbr/bk/UXDG.1364474089.57.sfos ...
VxVM NOTICE V-5-2-3100 Backup complete for diskgroup: UXDG
Note:Default configuration location will be /etc/vx/cbr/bk/