Q-1 How to get volume information in Veritas Volume Manager?
Ans: # vxinfo <volume-name>
Q-2 How set the number of kernel thread in Veritas Volume Manager?
Ans: # vxiod set 10
Note: This is the daemon that allows for extended I/O calls without blocking calling processes. As this is a kernel thread you cannot see it with ps command so you have to use the vxiod command to see if it is running.
Q-3 How to create a plex from a subdisk in Veritas Volume Manager?
Ans: # vxmake plex <plex-name> sd=<sub-disk-name>
Q-4 How to make a subdisk from a disk in Veritas Volume Manager?
Ans: To make a subdisk called subdisk-80 at the beginning of the disk disk80 of size 10000 blocks:
# vxmake sd subdisk-80 disk80,0,10000
If you wanted to put another subdisk on this disk then you would have an offset of the size of the previous subdisk (10000 in our case):
# vxmake sd subdisk-81 disk80,10000,20000
Q-5 How to set a plex offline in Veritas Volume Manager?
Ans: # vxmend off <plex-name>
Q-6 How to set a plex online in Veritas Volume Manager?
Ans: # vxmend on <plex-name>
Q-7 How to set a plex to a clean state in Veritas Volume Manager?
Ans: # vxmend fix clean plex-name
Q-8 How to mirror all the volumes on the disk rootdisk to disk90 in Veritas Volume Manager?
Ans: # vxmirror rootdisk disk90
Q-9 How to rebuild the partition table after a root disk failure in Veritas Volume Manager?
Ans: To rebuild the partition table after recovering from a root disk failure after re-mirroring the disk in Veritas Volume Manager:
# vxmksdpart -g rootdg diskpart 1 0x03 0x01
Q-10 How to attach a plex to a volume in Veritas Volume Manager?
Ans: # vxplex att <volume_name> <plex-name>
Q-11 How to display all the available information in Veritas Volume Manager?
Ans: # vxprint –ht
Q-12 How to display all the information about plexes in Veritas Volume Manager?
Ans: # vxprint -l <plex-name>
# vxprint –lp
Q-13 How to display all the information about subdisks in Veritas Volume Manager?
Ans: # vxprint -l <diskname>
# vxprint –st
Q-14 How to display all the information about volumes in Veritas Volume Manager?
Ans: # vxprint -l volumename
# vxprint -vl
# vxprint –vt
Q-15 How to list all the volumes on a boot disk Veritas Volume Manager?
Ans: # vxprint -t -v -e ‘aslist.aslist.sd_disk=”boot-disk-name”‘
Q-16 How to bring a volume back online in background mode in Veritas Volume Manager?
Ans: # vxrecover -b volume
Q-17 How to recover a volume in Veritas Volume Manager?
Ans: # vxrecover -s <volume-name>
Q-18 How to recover all volumes in Veritas Volume Manager?
Ans: To start recovery of all volumes in Veritas Volume Manager:
# vxrecover –s
Q-19 How to add a log disk to a volume in Veritas Volume Manager?
Ans: # vxsd aslog <disk-name> <volume-name>
Q-20 How to join subdisks in Veritas Volume Manager?
Ans: To join subdisk-88 and subdisk-77 to create the new bigger subdisk-99:
# vxsd join subdisk-88 subdisk-77 subdisk-99
Q-21 How to move the contents of a subdisk to another in Veritas Volume Manager?
Ans: To move the contents of subdisk-90 to subdisk-80 in Veritas Volume Manager:
# vxsd mv subdisk-90 subdisk-80
Q-22 How to report disk statistics in Veritas Volume Manager?
Ans: # vxstat –g diskgroup –d
Q-23 How to trace all the I/O on the selected volume in Veritas Volume Manager?
Ans: # vxtrace <volume-name>
Q-24 Veritas Volume Manager GUI
Ans: # vxva
Q-25 How to put a volume in maintenance mode in Veritas Volume Manager?
Ans: # vxvol maint <volume_name>
Q-26 How to stop a volume in a disk group in Veritas Volume Manager?
Ans: # vxvol -g <disk-group> stop <volume-name>
Q-27 How to check which tasks is running in Veritas Volume Manager?
Ans: # vxtask list
# vxtask monitor
Q-28 How to change the naming scheme?
Ans: # vxddladm set namingscheme=<osn/ebn> <persistence=yes/no>
Q-29 How to get the list of all enclosure?
Ans: # vxdmpadm listenclosure all
Q-30 How to check how many disks are in a particular enclosure?
Ans # vxdmpadm getdmpnode enclosure=<enclosure name>
Q-31 How to get the path of a particular disk or how to check the enclosure of a particular device?
Ans # vxdmpadm getsubpaths dmpnodename=<device name (c1t2d0)>
# vxdisk list <device name (c1t2d0)>
Q-32 How to restart VxVM configuration Daemon?
Ans # vxconfigd -k
Q-33 How to find the actual disk device name while disks are showing in enclosure based naming scheme?
Note: When disks are showing in enclosure based scheme, is shows disks name as EMC0_0, EMC0_1 rather than c0t0d0
Ans # vxdisk list –e <enc disk name (ENC0_1)>
Q-34 How to start failed VxVM object, which got failed due to changed from OS based naming scheme to enclosure based naming.
Ans (1) First deport the disk group
(2) Run below given command
(3) Now import the disk group.
Q-35 How to reserve a disk for special purpose or vice versa? (Reserve disk can’t use for normal volume operation)
Ans: # vxedit –g <Disk Group> set reserve=on diskname
# vxedit –g <Disk Group> set reserve=off diskname
Q-36 How do you determine by how much a Veritas Volume can be expanded?
Ans: # vxassist –g <DG> maxgrow <volume>
Q-37 How do you grow a Veritas VXVM volume?
Ans: # vxresize –g <DG> <volume> +5g
Q-38 How many partitions are created in a disk when we initialize the disk under VxVM?
Ans: 2 partitions
Private region created on slice 3
Public region created on slice4
Q-39 What is the length of Private Region?
Ans: VxVM 5.0 = 32Mb
VxVM 4.0 = 1 Mb
Q-40 How do you determine Volume Status in Veritas VxVM?
Ans: # vxprint -htv
Q-41 Why would you deport a diskgroup in VxVM?
Ans: Normally we deport a disk group when we want to import that disk group on
# vxdg deport <DG>
Q-42 Interactive front end to the vxdisk program in VxVM?
Ans: # vxdiskadm
Q-43 How to display free space on the disks in Veritas volume Manager?
Ans: # vxdg free
Q-44 How to find how much a volume can be grown by in Veritas Volume Manager?
Ans: # vxassist maxgrow <volume-name>
Q-45 How to find the largest raid5 partition you can have in Veritas Volume Manager?
Ans: # vxassist maxsize layout=raid5
Q-46 How to find the largest stripe you can have in VxVM?
Ans: # vxassist maxsize layout=stripe
Q-47 How to move a volume to another disk except a particular one in Veritas Volume Manager?
Ans: To move a volume vg01 to any other disk except disk90 in Veritas Volume Manager:
# vxassist move vg01 !disk90
Q-48 How to set a preferred plex to read from in Veritas Volume Manager?
Ans: # vxvol rdpol prefer <volume-name> <plex-name>
Q-49 How to set a round robin read policy on the volume in Veritas Volume Manager?
Ans: # vxvol rdpol round volume_name
Q-50 How to verify and enable largefile support on a vxfs filesystem?
Ans: To verify if largefile support is enabled on a VXFS filesystem:
# fsadm -F vxfs /dir_name
If you need to enable largefile support:
# fsadm -F vxfs -o largefiles /dir_name
Q-51 How to add a log disk for a volume in Veritas Volume Manager?
Ans: To add a log disk for a raid5 or mirror of a volume in Veritas Volume Manager:
# vxassist addlog volume-name
Q-52 How to encapsulate the root disk?
Ans: We can encapsulate the root disk by vxdiskadm command.
# vxdiskadm à Encapsulate one or more disks
Q-53 How to mirror the root volume?
Ans: We can mirror all the volumes needed to boot with the below command:
# vxrootmir <c0t1d0>
It will mirror all the file systems needed to boot on the c0t1d0 disk.
Q-54 How to remove rootability?
Ans: We can un-encapsulate the root disk and take it out from all the file systems needed to boot the system from VxVM control by command vxunroot. This utility make the necessary changes to boot the system without VxVM support.
Q-55 how to create a mirror on a previously defined volume in Veritas Volume Manager
Ans: Example to use the disks disk80 and disk90 to make a mirror on the volume called vg01:
# vxassist mirror vg01 disk80 disk90
Example to make a 50 mb mirror on volume called vg01 using any two free disks:
# vxassist mirror vg01 50m layout=mirror
Q-56 How to create a raid5 volume in Veritas Volume Manager?
Ans: To create a raid5 volume in Veritas Volume Manager using any available disks:
# vxassist make vg01 100m layout=raid5
Q-57 How to create a volume in Veritas Volume Manager?
Ans: Example to make a volume called vg01 of size 100m using any available disk:
# vxassist –g <DG> make <vol> 100m
Example to make a volume called vg01 to be 100m big using the disk disk80:
# vxassist –g <DG> make <vol> 100m disk80
Q-58 How to create a volume with a mirror and log in Veritas Volume Manager?
Ans: Example to make a volume named vg01 with 50mb stripe disk using disks disk80 and disk90 and mirror this on a stripped mirror using disk92 and disk95 and use a log subdisk:
# vxassist–g <DG> make <vol> layout=mirror,stripe,log disk80 disk90 disk92 disk95
Q-59 How to create a volume with a mirror in Veritas Volume Manager?
Ans: Example to make a volume vg01 with a 50mb mirror using the two disks disk80 and disk90:
# vxassist –g <DG> make <vol> 100m layout=mirror disk80 disk90
Q-60 How to grow the size of a volume in Veritas Volume Manager?
Ans: Examples to grow the size of the volume vg01 to 2000 512byte sectors:
# vxassist growto vg01 2000
# vxassist growby vg01 2000
Q-61 How to mirror a volume on any free disk in Veritas Volume Manager?
Ans: To mirror a volume vg01 on any free disk in Veritas Volume Manager:
# vxassist mirror vg01
Q-62 How to mirror volumes in a disk group in Veritas Volume Manager?
Ans: Example to mirror volume vol80 to vol90 in the disk group rootdg:
# vxassist -g rootdg mirror vol80 vol90
Q-63 How to shrink the size of a volume in Veritas Volume Manager?
Ans: Examples to shrink the volume vg01 by 2000 512byte sectors:
# vxassist shrinkto vg01 2000
# vxassist shrinkby vg01 2000
Q-64 How to verify the main daemon for Veritas Volume Manager?
Ans: vxconfigd is the main daemon of Veritas Volume Manager which must be running at all times. It is started at system startup.
We can check its status by below given way:
# vxdctl mode
Or we can verify it is running with a ps command:
# ps -ef | grep vxconfigd
Q-65 How to enable, disable or verify the vxconfigd daemon in Veritas Volume Manager?
To verify the vxconfigd daemon in Veritas Volume Manager:
# vxdctl mode
To enable the vxconfigd daemon:
# vxdctl enable
To disable the vxconfigd daemon:
# vxdctl disable
# vxdmpadm setattr path c3t10d0s2 pathtype=primary
# vxdmpadm setattr path c4t10d0s2 pathtype=secondary
Q-67 What is vxbootsetup utility?
Ans: The vxbootsetup utility configures physical disks so that they can be used to boot the system. Before vxbootsetup is called to configure a disk, mirrors of the root, swap, /usr and /var volumes (if they exist) should be created on the disk. These mirrors should be restricted mirrors of the volume. The vxbootsetup utility configures a disk by writing a boot track at the beginning of the disk and by creating physical disk partitions in the UNIX VTOC that match the mirrors of the root, swap, /usr and /var.
With no medianame arguments, all disks that contain usable mirrors of the root, swap, /usr and /var volumes are configured to be bootable. If medianame arguments are specified, only the named disks are configured.
vxbootsetup requires that the root volume is named rootvol and has a usage type of root. The swap volume is required to be named swapvol and to have a usage type of swap. The volumes containing /usr and /var (if any) are expected to be named usr and var, respectively.
Q-68 What is vxrootmir utility?
Ans: The vxrootmir script creates mirrors of volumes required in booting. It creates a mirror for rootvol, swapvol and standvol. It also creates mirrors of usr, var and home if they exist as separate volumes on the boot disk. The mirror is created on the specified disk media device.
The specified disk media device should have enough space to contain the mirror for all the source volumes mentione above, or else it will fail. Also, corresponding slices must be free because it is used to create the partition for root.
All disk partitions for the new volume mirrors are created.
This script is called by the vxmirror command if the root disk is required to be mirrored. It is also called from the vxdiskadm menus through the choice of the mirror volumes on a disk operation.
Q-69 What is vxmirror utility?
Ans: The vxmirror command provides a mechanism to mirror all the contents of a specified disk, to mirror all currently un-mirrored volumes in the specified disk group, or to change or display the current defaults for mirroring. All volumes that have only a single plex (mirror copy), will be mirrored by adding an additional plex.
Volumes containing subdisks that reside on more than one disk will not be mirrored by vxmirror.
vxmirror is generally called from the vxdiskadm menus. It is not an interactive command and once called, will continue until completion of the operation or until a failure is detected.
Q-70 What is vxunroot utility?
Ans: The vxunroot script causes the root, swap, usr and var file systems to be converted back into being accessible directly through disk partitions instead of through volume devices. Other changes made to ensure the booting of the system from the root volume are also removed such that the system will boot with no dependency on the Volume Manager.
For vxunroot to work properly, all but one plexes of rootvol, swapvol, usr and var should be removed. The plexes left behind for the above volumes should be the ones created by vxrootmir or the original ones created when the root disk was encapsulated. This will ensure that the underlying subdisks will have equivalent partitions defined for them on the disk. If none of these conditions are met, the vxunroot operation will fail and none of the volumes will be converted to disk partitions.
Q-71 How to recover from the root disk and root-mirror disk failure?
1) Boot the system into single user mode from Solaris installation CD.
ok boot cdrom –s
2) Use the format command to create partitions on the new root disk (c0t0d0s2). These should be identical in size to those on the original root disk before encapsulation unless you are using this procedure to change their sizes.
3) Create the file system on this slice
# mkfs –F ufs /dev/rdsk/c0t0d0s0
4) Mount the root slice on /a
# mount /dev/dsk/c0t0d0s0 /a
5) Now restore the / file system from backup.
6) Now run the installboot command to install bootblk.
# cd /usr/platform/`uname –i`/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t0d0s0
# installboot /usr/platform/`uname –i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0
7) Now restore /usr file system if it is there.
8) Create /etc/vx/reconfig.d/state.d/install-db file to prevent the configuration daemon from starting.
# touch /a/etc/vx/reconfig.d/state.d/install-db
9) Now comment 2 lines in /etc/system file as given below
# cp /a/etc/system /a/etc/system.orig
# vi /a/etc/system
* set vxio:vol_rootdev_is_volume=1
10) Now edit the vfstab file to replace the volume device names with the disk slices.
11) Now remove the /a/dev/vx/dsk/bootdg and /a/dev/vx/rdsk/bootdg
# rm /a/dev/vx/dsk/bootdg
# rm /a/dev/vx/rdsk/bootdg
12) Now reboot the system. System will be booted into multi user mode.
# init 6
Q-72 How to recover the VxVM configuration after reinstallation of Solaris?
Ans: Reinstallation is necessary if all copies of your root disks are damaged, or if certain critical files are lost due to file system damage. Disconnect all the disks which are not involved in reinstallation process.
1) Install the Solaris OS
2) Install the VxVM software and also install the VxVM license also.
3) Recover the VxVM configuration.
4) touch the /etc/vx/reconfig.d/state.d/install-db file
5) Shut down the system
6) Reattach the disks which were removed before installation.
7) Reboot the system and when the system comes up, bring it into single user mode.
8) Remove the /etc/vx/reconfig.d/state.d/install-db file
9) Start VxVM IO daemons.
# vxiod set 10
10) Start the VxVM daemon in disable mode
# vxconfigd –m disable
11) Initialize the vxconfigd daemon
# vxdctl init
12) Initialize the DMP subsystem
# vxdctl initdmp
13) Now start the vxconfigd daemon
# vxdctl enable
14) Now reboot the system
Now the configuration preserved on the disks not involved in the reinstallation has now been recovered.
Q-73 How to convert the SVM meta devices into VxVM volumes?
Ans: There are three utilities used to convert SVM meta devices into VxVM volumes.
1) Run the preconvert utility to analyze the current SVM configuration:
The preconvert utility analyzes the current Solaris Volume Manager configuration and builds a description for the new VxVM configuration. preconvert does not make any changes to the Solaris Volume Manager configuration or to the host system.
2) Now run the showconvert utility to display the preconvert conversions plan into readable format.
3) Now run the convertname utility to display the VxVM volume names .
# convertname /dev/md/dsk/d12
Note: The convertname utility takes Solaris Volume Manager device paths as arguments (metadevice paths or raw disk paths) and returns the VxVM volume path for the device as it will show after the conversion.
4) Now run the doconvert utility to start the actual conversion process
5) Now reboot the system to make the changes.
Check out the wonderful VXVM commands Man page.