Documente Academic
Documente Profesional
Documente Cultură
It can be in three states: Enable = Normal mode Disable = M ost operations cannot be be used Booted = Normal startup while using boot disk group M onitors for failure events and relocates failed subdisks Used to backup configuration chnages, the files created can be used with vxmake to restored lost groups. Display veritas volume manager events used with the vxconfigd daemon
v x r e l o c d v x c o n f i g b a c k u p d v x n o t i f y v x c a c h e d v x a t t a c h d
Enabled - both private and public regions are accessible Disabled - no private or public regions are accessible Detached - only private regions are accessible
VM utilities
log to /var/vxvm/vxconfigd.log log to filename log to syslog date and timestamp every entry log all possible tracing to file
-x -x -x -x
The vxiod utility starts, stops, or reports on VERITAS Volume M anager (VxVM ) I/O daemons. An I/O daemon provides a process context for performing I/O in VxVM .M anage extended disk i/o & handles dirty regions, logging
v x i o d
vxiod set <number> = set number of runnning viod daemon Note: when run on its own it displays # of vxiod daemons that are running.
The vxdctl utility manages aspects of the state of the volume configuration daemon vxconfigd and also manages aspects of configuration for bootstrapping the rootdg disk group. mode = what mode the vxconfigd is running in enable = enable the vxconfigd daemon (reread the db) disable = disable the vxconfigd daemon
v x d c t l[ o p t i o n ]
stop = kill the vxconfigd daemon (Use 'vxconfigd -k -m enable' to start again) license [init] = print out license info or reread licenses support = display version and components list = display entries in /etc/vx/volboot init [dmp] = recreate /etc/vx/volboot Note: when in disabled or stopped mode no VX commands will be able to run
v x i n s t a l l
www.datadisk.co.uk/html_docs/veritas/veritas_lvm_cs.htm
1/8
4/4/13
Disk Regions
This is were veritas holds the meta data regarding the disk. A copy of the configuration database is copied to each private region within the disk group. Veritas will try and keep 5 copies of the configuration database.
P r i v a t e
Normally configured as slice 3 Once the private region is created it cannot be changed, thus if it fills up then you have to reinitize the disk with a new private region length, see disks -> initialize disk
Normally configured as slice 4. Disk Layouts private and public region slices are on separate partitions (3 & 4), this type of disk is not suitable for moving between different O/S's but are suitable for boot partitions Can be converted to CDS
S l i c e dD i s k l a y o u t
format=sliced
C D S( C r o s s p l a t f o r mD a t a S h a r i n g )
private and public regions are one slice (slice 7) , this type is suitable for moving between different O/S's but not suitable for boot partitions. format=cdsdisk
format=simple
N o n e
No partitioning
n/a
File Locations
vxinstall has not be run Host ID's backup config files (vxconfigbackupd) delete or deported disk group config files All commands logs Licenses
/ e t c / v x / r e c o n f i g . d / s t a t e . d / i n s t a l l d b / e t c / v x / v o l b o o t / e t c / v x / c b r / b k N o t e :y o um u s th a v ea tl e a s tr u nv x c o n f i g b a c k u po n c e ,o t h e r w i s et h ed i r e c t o r yd o e sn o t e x i s to ry o uh a v es p e c i f i e da n o t h e rl o c a t i o n . / e t c / v x / d g c f g / d e p o r t / v a r / a d m / v x / c m d l o g / v a r / a d m / v x / v e a c m d l o g / e t c / v x / l i c e n s e s / l i c / v a r / v x v m / t e m p d b
N o t e :t oc l e a rt h et e m p d bf i l e : v x c o n f i g dkxc l e a r t e m p d i r-c l e a rt h e/ v a r / v x v m / t e m p d b / v a r / a d m / v x / v x c o n f i g d . l o g
www.datadisk.co.uk/html_docs/veritas/veritas_lvm_cs.htm
2/8
4/4/13
Backup
Restore (precommit/commit)
Disks
# #i n c r e a s et h ep r i v a t er e g i o ns i z ed e f a u l t1 0 2 4 v x d i s k s e t u pic 2 t 0 d 0p r i v l e n =2 0 4 8
Initialize disk
-i n i t i a l i z e dad i s ka sas l i c e dd i s k
N o t e :f o r m a tc a nb ee i t h e rs l i c e d ,s i m p l e ,c d s d i s ko rn o n e( s e ea b o v e-D i s kR e g i o n s )
Uninitialize disk Disk Information Resize a LUN Add a disk slice to volboot Add a disk slice Add a disk Remove a disk totally from VM Remove a disk from a volume Remove a disk slice from VM Clear any host ID flags Renaming a disk M ove disk to different disk group
v x d i s k u n s e t u pCc 2 t 0 d 0 v x d i s kg< g r o u p >l i s t< d i s k > v x d i s ksl i s t v x d i s kg< g r o u p >r e s i z e< d i s k >l e n g t h = 8 G v x d c t la d dd i s k< d e v i c e >t y p e = s i m p l e v x d i s k f< d e v i c e >t y p e = s i m p l e v x d i s k a d dc 1 t 0 d 0o rc 1( a l ld i s ko nc o n t r o l l e r ) v x d i s k s e t u pi< d e v i c e > v x d i s kr m< d e v i c e > v x d gg< g r o u p >r m d i s k< d i s k n a m e > v x d c t lr md i s k< d e v i c e > v x d i s kc l e a r i m p o r t< d i s kn a m e > v x e d i tg< d i s k >r e n a m e< o l dd i s kn a m e >< n e wd i s kn a m e > v x d gm o v e< s o u r c ed g >< t a r g e td g >< d i s k >
Offline a disk
Online a disk
v x e d i t g< g r o u p >s e ts p a r e = o n< d i s k > v x e d i t g< g r o u p >s e tn o h o t u s e = o n< d i s k > v x e d i tg< g r o u p >s e tf a i l i n g = o f f< d i s k > v x d i s kd e f i n ec 0 t 0 d 0 s 0t y p e = n o p r i v v x r e a t t a c h[ b r|c< d e v i c e > ]
b=B a c k g r o u n dp r o c e s s r=R e c o v e rv o l u m e s c=C h e c k st os e ei fr e a t t a c hi sp o s s i b l e v x d i s ks c a n d i s k s[ n e w|f a b r i c] v x e d i tg< g r o u p >s e tc o m m e n t = " . . . . . . . "< d i s k > # #H e r eia mf i x i n ga" o n l i n ea l t u s e d "i s s u eb u ts e a r c ht h ew e bf o rd i f f e r e n ti s s u e sa s t h e r ea r ean u m b e ro fw a y st ot h es a m et h i n g ,j u s tr e m e m b e rt h ev x p r i v u t i lc o m m a n d # #o b t a i nt h ed i s k sp r i v a t er e g i o nt a g1 5 p r t v t o c/ d e v / r d s k / c 2 t 0 d 0 s 2 # #d dt h ec o n t e n ts t oaf i l e
www.datadisk.co.uk/html_docs/veritas/veritas_lvm_cs.htm
3/8
4/4/13
Private region problem
Disk Group
Create a disk group Remove a group Add a disk to a group Remove a disk from a group
v x d gi n i tg r o u p< d i s k > = < d e v i c e > v x d gi n i t< g r o u p >< d i s k > = < d e v i c e >c d s = o f f v x d gd e s t r o y< g r o u p > v x d g g< g r o u p >a d d d i s k< d i s k > = < d e v i c e > v x d g g< g r o u p >r m d i s k< d i s k > v x d gkg< g r o u p >a d d d i s k< d i s k > = < d e v i c e > k=f o r c e sv x v mt ot a k em e d i an a m eo ft h ef a i l e dd i s k&a s s i g ni tt ot h en e wd i s k
-i n i t i a l i z ean o n c d sd i s kg r o u p
Import a group
Deport a group List no hot use on disk List spare space on disk Display free space Backup disk group (vxvm 4.0) Restore disk group (vxvm 4.0) Diskgroup Version Upgrade disk version
v x d gd e p o r t< g r o u p > v x d gn< n e w g r o u p n a m e >d e p o r t< o l d _ g r o u p _ n a m e > v x d g g< g r o u p >n o h o t u s e< d i s k > v x d g g< g r o u p >s p a r e< d i s k > v x d g g< g r o u p >f r e e v x c o n f i g b a c k u p v x c o n f i g r e s t o r e[ p | d | c ] v x d gl i s t< g r o u p >|g r e piv e r s i o n v x d gu p g r a d e< g r o u p > v x d gT5 0u p g r a d e< g r o u p > v x d gT5 0i n i t< g r o u p >< d i s k > = < d e v i c e > v x d gb o o t d g v x d gd e f a u l t d g v x d c t ld e f a u l t d g< g r o u p >-s e td e f a u l t d g -u p g r a d et oc u r r e n tv e r s i o n -u p g r a d et ov e r s i o n5 0 -c r e a t e rn e wg r o u p@v e r s i o n5 0
Boot/Default DG
Volume
Adding mirror to root
/ e t c / v x / b i n / v x r o o t m i r< a l t e r n a t e >c r e a t er o o t v o l ,s w a pv o l , v x a s s i s tm a k e< v o l u m e >< s i z e >< d i s k > v x a s s i s tg< g r o u p >m a k e< v o l >< s i z e >! c t r l : c 2
-d o n ' tu s ec o n t r o l l e r2
v x a s s i s tm i r r o r< v o l u m e >> d i s k > v x a s s i s tg< g r o u p >r e m o v em i r r o r< v o l >! d i s k 0 1 v x a s s i s tm a k e< v o l u m e >< s i z e >l a y o u t = s t r i p e
-r e m o v et h ed i s k 0 1m i r r o r
www.datadisk.co.uk/html_docs/veritas/veritas_lvm_cs.htm
4/8
4/4/13
Remove a volume
Initializing a volume
v x v o li n i ts t a t e< v o l u m e >[ p l e x ] s t a t e = c l e a n , e n a b l e , a c t i v e v x a s s i s tg< g r o u p >r e l a y o u t< v o l >l a y o u t = s t r i p en c o l = 2 v x a s s i s tg< g r o u p >r e l a y o u t< v o l >l a y o u t = s t r i p en c o l = + 1 v x a s s i s tg< g r o u p >r e l a y o u t< v o l >l a y o u t = s t r i p en c o l = 1 v x a s s i s tg< g r o u p >r e l a y o u t< v o l >l a y o u t = s t r i p es t r i p e = 3 2 kn c o l = 5 v x a s s i s tg< g r o u p >r e l a y o u t< v o l >l a y o u t = r a i d 5s t r i p e u n i t = 3 2 kn c o l 3 v x a s s i s tg< g r o u p >c o n v e r t< v o l >l a y o u t = s t r i p e m i r r o r #D i s p l a yt h er e l a y o u to p e r a t i o n v x r e l a y o u tg< g r o u p >[ s t a t u s | r e v e r s e | s t a r t ]< v o l > v x t a s kl i s t
Online Relayout
# #e i t h e rm a k es u r et h e r ei saa n o t h e rd i s ki nt h eg r o u p ,y o uc a ne v e ns p e c i f yi t v x a s s i s tg< g r o u p >m o v e< v o l >\ ! < d i s k >[ < d i s k > ] v x e d i tg< g r o u p >< o l d _ v o l _ n a m e >< n e w _ v o l _ n a m e > v x v o ls t a r t< v o l u m e > v x r e c o v e r s b< v o l u m e >
s=s t a r tv o l u m ea f t e rr e c o v e r y b=b a c k g r o u n dt h er e c o v e r yt a s k v x v o lg< g r o u p >s t o p< v o l u m e > v x e v a cg< g r o u p >< f r o m d i s k >< t o d i s k > v x v o lm a i n t< v o l u m e > v x m e n dm i r r o rc l e a n< p l e x > v x p l e xa t t< v o l _ n a m e >< p l e x > v x r e s i z e< v o l u m e >< n e wl e n g t h > v x r e s i z eg< g r o u p >< v o l u m e >+ 1 0 0 m v x r e s i z e< v o l u m e >< n e wl e n g t h > v x r e s i z eg< g r o u p >< v o l u m e >1 0 0 m v x a s s i s ta d d l o g< v o l u m e > -i n c r e a s et h ev o l u m eb y1 0 0 M b -d e c r e a s et h ev o l u m eb y1 0 0 M b
Disable a volume Evacuate a volume M aintenance mode Not clean No kernel state Extending a volume size Shrinking a volume size add a DRL log to a volume
remove a DRL log from a volume v x a s s i s tr e m o v el o g< v o l u m e > Extending log size Detering volume size Recover a volume
v x v o ls e tl o g l e n=2 m< v o l u m e / l o g > v x a s s i tg< g r o u p >m a x s i z el a y o u t = m i r r o r-t h em a x i m u ms i z ey o uc a nc r e a t eam i r r o r v x a s s i s tg< g r o u p >m a x g r o w< v o l u m e > -t h em a x i m u ms i z et h ev o l u m ec a ng r o wt o o V x m e n df i xc l e a n< p l e x > v x e d i tg< g r o u p >s e to w n e r = < u s e r >g r o u p = < g r o u p >m o d e = < p e r m s >< v o l >
Plexs
Creating a plex Remove a plex M oving a plex Copying a plex Attaching a plex Detaching a plex
v x m a k ep l e x< p l e x >s d= < s u bd i s kn a m e > v x p l e x or md i s< p l e x > v x p l e xg< g r o u p >d i s< p l e x > v x e d i tg< g r o u p >r fr m< p l e x > v x p l e xm v< o r i g i n a lp l e x >< n e wp l e x > v x p l e xc p< v o l u m e >< n e wp l e x > v x p l e xa t t< v o l u m e >< p l e x > v x p l e xd e t< p l e x >
www.datadisk.co.uk/html_docs/veritas/veritas_lvm_cs.htm
5/8
4/4/13
Offlining a plex
v x m e n do f fv o l 0 1 0 2
Sub-disks
Creating sub-disk Removing sub-disk M oving sub-disk Associating with a plex Dissociating Splitting Joining relocating a sub disk relocating a whole disk sub disks
v x m a k es d< s u b d i s k >< d i s k > ,o f f s e t ,l e n v x e d i tr m< s u b d i s k > v x s dm v< o l ds u b d i s k >< n e ws u b d i s k > v x m a k ep l e x< p l e x >s d = < s u b d i s k > , i . ev x m a k ep l e xh o m e 1s d =d i s k 0 2 0 1 ,d i s k 0 2 0 0 ,d i s k 0 2 0 2 v x s dd i s< s u b d i s k > v x s d s < s i z e >s p l i ts d < n e ws u b > < n e w s u b 2 > v x s dj o i n< s u b d i s k 1 > < s u b d i s k 2 > < n e ws u b d i s k > # #e i t h e rm a k es u r et h e r ei saa n o t h e rd i s ki nt h eg r o u p ,y o uc a ne v e ns p e c i f yi t v x a s s i s tg< g r o u p >m o v e< v o l >\ ! < d i s k >[ < d i s k > ] v x p r i n tgr o o t d gs e' s d _ o r i g _ d m n a m e = " d i s k 0 2 " ' v x u n r e l o cgr o o t d gd i s k 0 2
Volume Display volume info Display volume properties Display unstartable volume Check for volume failures
v x p r i n t A h t< v o l > v x p r i n t v l v x i n f og< g r o u p >< v o l > v x s t a t g< g r o u p > f fv
Veritas Tasks
v x t a s kl i s t v x t a s km o n i t o r
-c o n t i n u o u s l ym o n i t o r
Display tasks
Tracing
Licensing
www.datadisk.co.uk/html_docs/veritas/veritas_lvm_cs.htm 6/8
4/4/13
Add View
v x l i c i n s t v x l i c e n s ec v x l i c r e p v x l i c e n s ep / e t c / v x / l i c e n s e s / l i c / e t c / v x / e l m v x d c t ll i c e n s ei n i t
VEA
Start/Stop
/ e t c / i n i t . d / i s i s d[ s t a r t | s t o p | r e s t a r t ] v x s v c c t r ls t a t u s v x s v c[ m | k | v ]
Status
Daemons
Logging Logging help in recovery and can speed it up dramatically, the main form of logging in veritas is the DRL (dirty region log) which performs the following log keeps track of changed regions if system fails only the changed regions of the volume are recovered
Add Remove
v x a s s i s tg< g r o u p >a d d l o g< v o l >l o g t y p e = d r l v x a s s i s tg< g r o u p >a d d l o g< v o l > v x a s s i s tg< g r o u p >r e m o v el o g< v o l >[ n l o g = n ]< v o l > -u s e df o rr a i dl o g s( n ot y p e )
Volume Read Policy Policies can be used if you have slower disks within a volume and you wish to use the faster disks.
Round Robin Preffered Plex Selected Plex
v x v o lg< g r o u p >r d p o lr o u n d< v o l > v x v o lg< g r o u p >r d p o lp r e f e r< v o l >< p l e x > v x v o lg< g r o u p >r d p o ls e l e c t< v o l >
Storage Expert (vxse) Veritas have created some scripots that can check the integrity of the vxvm setup i.e mirrored volumes, spares, etc. The scripts are based on rules and there are a number of differents rules veritas has set, look in the rules directory to see all of them.
Display Description Check rules List spare rules
v x s e _ r a i d 5 l o g 1i n f o v x s e _ r a i d 5 l o g 1g< g r o u p >c h e c k v x s e _ s p a r e sl i s t v x s e _ s p a r e sr u n
N o t e :y o un e e dt or u n" / e t c / i n i t . d / i s i s ds t a r t "t os t a r tt h e n e c e s s a r yd a e m o n sf i r s t
VxDMP
www.datadisk.co.uk/html_docs/veritas/veritas_lvm_cs.htm 7/8
4/4/13
http://prefetch.net/articles/veritasrecoveryfeatures.html
www.datadisk.co.uk/html_docs/veritas/veritas_lvm_cs.htm
8/8