Site icon UnixArena

VxVM – vxdg Command Syntax with Examples

/usr/sbin/vxdg– Unix Arena’s Manual page. 

Product – Veritas Volume Manager-vxvm (Storage Foundation)

/usr/sbin/vxdg – The vxdg utility performs administrative operations on disk groups.

System-Wide Reserved Disk Groups

bootdg – Specifies the boot disk group – Default is nodg
Caution: Do not attempt to change the value of bootdg. You may render your system unbootable.
defaultdg – Specifies the default disk group to use if the -g option is not specified -Default is nodg
nodg – Specifies to an operation that no disk group has been defined

Tasks

Switches

Creating Disk Groups vxdg [-s] init diskgroup [diskname=]devicename …
Creating Older Versions of Disk Groups vxdg -T [dg_version] init diskgroup [diskname=]devicename …
Creating Disk Group with Specific Minor Number vxdg init diskgroup [minor=minor_no]  [diskname=]devicename …
Creating Sliced format Disk Group vxdg init diskgroup cds=off  [diskname=]devicename …
List & Viewing Available Disk Groups Information vxdg list [disk_group]
Changing Minor number of a Disk Group vxdg [-g diskgroup] [-f] reminor [diskgroup] new-minor-number
Adding Disk’s to Existing Disk Group vxdg [-g diskgroup] adddisk [diskname=]devicename …
Removing Disk’s from Existing Disk Group vxdg [-g diskgroup] rmdisk diskname …
View Default Disk Group vxdg defaultdg
View the free Space in Disk Group vxdg -g diskgroup free
Deport Disk Group vxdg [-n newname] [-h newhostid] deport diskgroup
Import Disk Group vxdg [-C] [-f] [-n new_name]  import diskgroup
Move Disk from one Disk Group to Another vxdg [-f] [-o expand] move src_diskgroup dst_diskgroup diskname
Move Volume from one Disk Group to Another vxdg move  src_diskgroup dst_diskgroup volume
Split the Disk Group vxdg [-f] [-o expand] split src_diskgroup dst_diskgroup objects
Join the Disk Group vxdg [-f] join src_diskgroup dst_diskgroup
Upgrading Disk Groups to Specific or latest Version vxdg  [-T version] upgrade diskgroup
Destroy the Disk Group vxdg destroy diskgroup

vxdg command line Examples:

Note:
Diskgroup name – oradg
Disks name – oradisk01 oradisk02 oradisk03

Creating Disk Group:

#vxdg init oradg oradisk01=c3t1d0s2 oradisk02=c3t2d0s2 oradisk03=c3t3d0s2

Creating Disk Group with specific minor number and diskgroup version number:

# vxdg -T 180 init oradg minor=20001 oradisk01=c3t1d0s2 oradisk02=c3t2d0s2 oradisk03=c3t3d0s2

Creating Sliced format Disk Group:

# vxdg init appsdg cds=off c4t1d0 c4t2d0

To View Disk Group Information’s

# vxdg list
NAME         STATE           ID
oradg        enabled,cds          1408692754.17.vxserver1
appsdg       enabled              1408693306.24.vxserver1
# vxdg list oradg
Group:     oradg
dgid:      1408692754.17.vxserver1
import-id: 1024.16
flags:     cds
version:   180
alignment: 8192 (bytes)
ssb:            on
autotagging:    on
detach-policy: global
dg-fail-policy: obsolete
ioship: off
copies:    nconfig=default nlog=default
config:    seqno=0.1029 permlen=48144 free=48139 templen=2 loglen=7296
config disk c3t1d0s2 copy 1 len=48144 state=clean online
config disk c3t2d0s2 copy 1 len=48144 state=clean online
config disk c3t3d0s2 copy 1 len=48144 state=clean online
log disk c3t1d0s2 copy 1 len=7296
log disk c3t2d0s2 copy 1 len=7296
log disk c3t3d0s2 copy 1 len=7296

To get the minor number of the diskgroup

# vxprint -l oradg | grep minor
minors:   >= 20001

To get the free space of the diskgroup disks:

vxdg -g oradg free
DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
oradisk01    c3t1d0s2     c3t1d0       0         2031232   -
oradisk02    c3t2d0s2     c3t2d0       0         2031232   -
oradisk03    c3t3d0s2     c3t3d0       0         2031232   -

Changing Minor number of a Disk Group:

# vxdg -g oradg reminor 10001

Adding Disk’s to Existing Disk Group:

# vxdg -g oradg adddisk oradisk04=c3t4d0s2 oradisk05=c3t5d0s2 oradisk06=c3t6d0s2

Removing Disk’s from Existing Disk Group:

# vxdg -g oradg rmdisk oradisk06

Viewing Default Disk Group:

# vxdg defaultdg
oradg

Re-naming the diskgroup:

# vxdg -n testdg deport oradg

testdg is the new name.

Move Disk from one Disk Group to Another

# vxdg -o expand move oradg appsdg oradisk06

Move Volume from one Disk Group to Another:

• Actually it moves the corresponding disks from one disk Group to another.

# vxdg move oradg appsdg oravol

Splitting & Joining Disk Group:

# vxdg -o expand split oradg1 oradg2 oradisk04 oradisk05 oradisk06
# vxdg join oradg2 oradg1

Viewing the diskgroup version:

# vxdg list appsdg | grep version
 version:   140

Upgrade DG to specific version:

# vxdg -T 160 upgrade appsdg             
# vxdg list appsdg | grep version
 version:   160

Upgrade DG to Latest Version available:

# vxdg upgrade appsdg                       
# vxdg list appsdg | grep version
 version:   180

To Destroy the Disk Group:

# vxdg destroy oradg1

Note:Use vxdg destroy with extreme caution, and make sure the disk group doesn’t have any online filesystem’s.

Exit mobile version