VxVm Interview Point

Q-1 How to add a disk to a disk group in Veritas Volume Manager?
Ans: To add the physical disk c0t0d0 in the disk group homedg calling it disk90 in Veritas in Volume Manager:
# vxdg -g homedg adddisk disk90=c0t0d0

Q-2 How to remove a disk from a disk group in Veritas Volume Manager?
Ans: To remove a disk, disk90, from a disk group, homedg, in Veritas Volume Manager:
# vxdg -g homedg rmdisk disk90

Q-3 How to clear an import in Veritas Volume Manager after a crash?
Ans: # vxdisk clearimport c0t0d0s0

Q-4 How to list all disks and display their status in VxVM?
Ans: # vxdisk list

Q-5 How to remove a grayed out or obsolete disk, or remove a disk from a disk group in Veritas Volume Manager?
Ans: # vxdisk rm disk01

Q-6 How to remove a disk so that it is no longer under Veritas Volume Manager controls?
Ans: # vxdisk rm c0t0d0

Q-7 How to add or bring a disk under Veritas Volume Manager control?
Ans: To add or bring a disk under Veritas Volume Manager control:
# vxdiskadd c0t0d1
or
# vxdisksetup -i c0t0d1

Note: It might help to newfs the s2 slice of the disk and perform a vxdctl enable to get it to add a disk.

Q-8 How to remove a volume and any subdisks and plexes associated in VxVM?
Ans: # vxedit -rf rm volume_name

Q-9 How to rename the disk disk90 to be called disk80 in the group rootdg in Veritas Volume Manager?
Ans: # vxedit -g rootdg rename disk90 disk80

Q-10 How to set disk90 in the group homedg to be a hot spare in Veritas Volume Manager?
Ans: # vxedit -g homedg set spare=on disk90

Q-11 How to set the comment field of subdisk subdisk01-01 to “comments are here”?
Ans: # vxedit set comment”comments are here” subdisk01-01

Q-12 How to sets the user to ep, the group to epgrp and the mode rw-rw-rw on the volume vg01?
Ans: # vxedit set user=ep group=epgrp mode=0666 vg01

Disk Group
Q-1 How to display the default disk group?
Ans: #vxdg defaultdg

Q-2 How to set the default disk group?
Ans: # vxdctl defaultdg <disk group>

Q-3 How to display disk group information?
Ans: # vxdg list or
# vxdg list <disk group>

Q-4 How to display free disk space in disk group?
Ans: # vxdg free or
# vxdg –g <disk group> free

Q-5 How to create a disk group?
Ans: # vxdg init <disk group> cds=on|off

Q-6 How to create a disk group with a specified disk group version no.?
Ans: # vxdg –T <DG version> init <disk group>

Q-7 How to make a non CDS disk group to CDS disk group or vice versa?
Ans: # vxdg –g <disk group> set cds=on|off
Q-8 How to import a disk group?
Ans # vxdg import <disk group>

Q-9 How to import a destroyed disk group?
Ans: First you must know the DG ID of the destroyed disk group name. You can get the DG ID by displaying the included disk of destroyed DG.
# vxdg import <DG ID>

Q-10 How to disable/deport a disk group?
Ans: # vxdg deport <disk group>

Q-11 How to rename a disk group during import operation?
Ans: # vxdg –t –n <new disk group> import <disk group>

Q-12 How to rename a disk group during deport operation?
Ans: # vxdg –n <new disk group> deport <disk group>

Q-13 How to clear locks on disk group during import?
Ans: # vxdg –C import <disk group>

Q-14 How to forcible import the disk group?
Ans: # vxdg –f import <disk group>

Q-15 How to move disk group object from one DG to another?
Ans: # vxdg –o expand move <source DG> <target DG> <DG object>
# vxdg –o expand move datadg newdatadg disk01
It will move the entire associated object with disk02 from datadg to newdatadg.

Q-16 How to split a disk group to form a new disk group?
Ans: # vxdg –o expand split <old DG> <new DG> disk01 disk02
It will create a new DG with two specified disks.

Q-17 How to join two DGs into one?
Ans: # vxdg join <source DG> <target DG>

Q-18 How to destroy a disk group?
Ans: # vxdg destroy <disk group>

Q-19 How to upgrade a Disk group?
Ans: # vxdg upgrade <disk group>
It will upgrade the DG to the highest DG version supported by VxVM.
Or
# vxdg –T <Version No.> <disk group>
To upgrade to a specified version no.
We will see vxvm volume related interview questions on next part.

Check out the wonderful VXVM commands Man page.
[showglossary gid=”1717″]