Sie sind auf Seite 1von 9

VxVM Disk

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 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.

Mixed Questions:

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>
OR
# vxprint –lp

Q-13 How to display all the information about subdisks in Veritas Volume
Manager?
Ans: # vxprint -l <diskname>
OR
# vxprint –st

Q-14 How to display all the information about volumes in Veritas Volume
Manager?
Ans: # vxprint -l volumename
OR
# vxprint -vl
OR
# 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 –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: # vea

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
Or
# 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)>
Or
# 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
# /etc/vx/bin/vxdarestore
(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


And
# 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
other host.
# 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.
# vxunroot
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
OR
# 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
OR
# 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

Das könnte Ihnen auch gefallen