Documente Academic
Documente Profesional
Documente Cultură
VM daemons Maintains system configuration in the kernel & disk (private region). If the daemon is stopped it does not disable any configuration state loaded into the kernel, it only affects the ability to make configuration changes until vxconfigd is restarted. vxconfigd It can be in three states: nabl ! "ormal mode #isable ! Most operations cannot be be used $ooted ! "ormal startup %hile using boot disk group Monitors for failure events and relocates failed subdisks &sed to backup configuration chnages, the files created can be used %ith vxmake to restored lost groups. #isplay vertias volume manager events used %ith the vxconfigd daemon Kernel Info )he kernel can be in three states: 'ernel (tates nabled * both private and public regions are accessible #isabled * no private or public regions are accessible #etached * only private regions are accessible
VM utilities vxconfigd *k *m enable *x ,debug option+x+M debug *x log *x logfile ! ,name*x syslog *x timestamp *x tracefile!name log to .var.vxvm.vxconfigd.log log to filename log to syslog date and timestamp every entry log all possible tracing to file
)he vxiod utility starts, stops, or reports on + /I)0( +olume Manager (+x+M) I.1 daemons. 0n I.1 daemon provides a process context for performing I.1 in +x+M.Manage extended disk i.o & handles dirty regions, logging vxiod vxiod set ,number- ! set number of runnning viod daemon "ote: %hen run on its o%n it displays 2 of vxiod daemons that are running. vxdctl [option] )he 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 ! %hat mode the vxconfigd is running in enable ! enable the vxconfigd daemon (reread the db) disable ! disable the vxconfigd daemon stop ! kill the vxconfigd daemon (&se 3vxconfigd *k *m disable3 to start again) license 4init5 ! print out license info or reread licenses
support ! display version and components list ! display entries in .etc.vx.volboot init 4dmp5 ! recreate .etc.vx.volboot "ote: %hen is disabled or stop mode no +6 commands %ill be able to run vxinstall Disk Regions )his is %ere veritas holds the meta data regarding the disk. 0 copy of the configuration database is copied to each private region %ithin the disk group. +eritas %ill try and keep 7 copies of the configuration database. "ormally configured as slice 8 )his is the area that %ill store the users data. Public "ormally configured as slice 9. Disk ayouts private region and public region slices are on seprate partitions (8 & 9), tis type of disk is not suitable for moving bet%een different 1.(3s but are suitable for boot partitions :an be converted to :#( "D! #"ross$ platform Data !%aring& !imple :an be converted to :#( 'one "one partitioning private and public regions are one slice (slice ;) , this type is suitable for moving bet%een different 1.(3s but not suitable for boot parttions. <rivate and public are the same partition but continuous (slice 8) Install volume manger (use .etc.vx.disk to exclude any disks or controllers)
Private
VxVM "onfiguration Database #$ si=e #$ location (ile ocations vxinstall has not be run ?ost I#3s backup config files (vxconfigbackupd) delete or deported disk group .etc.vx.reconfig.d.state.d.install*db .etc.vx.volboot .etc.vx.cbr.bk .etc.vx.dgcfg.deport vxdg list ,group- > grep permlen * the si=e of the configuration db vxdisk list ,disk- > grep *i configs * db location
config files 0ll commands logs @icenses .var.adm.vx.veacmdlog .etc.vx.licenses.lic .var.vxvm.tempdb Imported disk groups info "ote: to clear the tempdb file: vxconfigd *k *x cleartempdir * clear the .var.vxvm.tempdb vxconfigd log file )ackup * Restore .usr.lib.vxvm.bin.vxconfigbackup *l .var.vxvm.backups $ackup *l ! location %here to store backup vxconfigrestore *p ,group2 either one of the belo% after the precommit vxconfigrestore *d ,groupvxconfigrestore *c ,group"ote: *p ! %hen you %ant to check that the restore is correct (use vxprint to check) *d ! abort the precommit *c ! commit the precommit Disks vxdisksetup *i cAtBdB privlen!;CD vxdisksetup *i ,device- format!sliced * initiali=ed a disk as a sliced disk Initiali=e disk "ote: format can be either sliced, simple, cdsdisk or none (see above * #isk /egions) &ninitiali=e disk #isk Information /esi=e a @&" 0dd a disk slice to volboot 0dd a disk slice 0dd a disk vxdiskunsetup *: cAtBdB vxdisk *g ,group- list ,diskvxdisk *s list vxdisk *g ,group- resi=e ,disk- length!DE vxdctl add disk ,device- type!simple vxdisk Ff ,device- type!simple vxdiskadd cGtBdB or cG (all disk on controller) vxdisksetup *i ,device.var.vxvm.vxconfigd.log
/estore (precommit.commit)
/emove a disk totally from vxdisk rm ,device+M /emove a disk from a volume vxdg *g ,group- rmdisk ,diskname-
/emove a disk slice from +M :lear any host I# flags /enaming a disk
vxdctl rm disk ,devicevxdisk clearimport ,disk namevxedit *g ,disk- rename ,old disk name- ,ne% disk name-
Move disk to different disk vxdg move ,source dg- ,target dg- ,diskgroup vxdisk offline ,dev name1ffline a disk "ote: disk must not be in a disk group vxdisk online ,dev name1nline a disk "ote: disk must have a private region other%ise you need to initialise the disk ?ot spare "o?ot&se )urn off failing flag ncapsulate a disk vxedit Fg ,group- set spare!on ,diskvxedit Fg ,group- set nohotuse!on ,diskvxedit *g ,group- set failing!off ,diskvxdisk define cBtBdBsB type!nopriv vxreattach 4*br > *c5 /eattach disk ((0") *b ! $ackground process *r ! /ecover volumes *c ! :hecks to see if reattach is possible vxdisk scandisks 4ne% > fabric 5 vxedit *g ,group- set comment!H.......H ,disk-
#iscover ne% disks #isk :omment Disk +roup :reate a disk group /emove a group 0dd a disk to a group /emove a disk from a group /eplace failed disk
vxdg init group ,disk-!,devicevxdg init ,group- ,disk-!,device- cds!off vxdg destroy ,groupvxdg Fg ,group- adddisk ,disk-!,devicevxdg Fg ,group- rmdisk ,diskvxdg *k *g ,group- adddisk ,disk-!,device-
*k ! forces vxvm to take media name of the failed disk & assign it to the ne% disk vxdg import ,groupvxdg *n ,ne%*group*name- import ,old*group*namevxdg *: import ,groupvxdg import *: ,group*: * clears any exist host flags vxdg deport ,group-
Import a group
vxdg *n ,ne%*group*name- deport ,oldIgroupIname@ist no hot use on disk @ist spare space on disk #isplay free space vxdg Fg ,group- nohotuse ,diskvxdg Fg ,group- spare ,diskvxdg Fg ,group- free
$ackup disk group (vxvm vxconfigbackup 9.B) /estore disk group (vxvm vxconfigrestore 4*p>*d>*c5 9.B) #iskgroup +ersion &pgrade disk version vxdg list ,group- > grep *i version vxdg upgrade ,group* upgrade to current version vxdg *) 7B upgrade ,group* upgrade to version 7B vxdg *) 7B init ,group- ,disk-!,device- * creater ne% group J version 7B vxdg bootdg vxdg defaultdg vxdctl defaultdg ,group- * set defaultdg Volume 0dding mirror to root .etc.vx.bin.vxrootmir ,alternate- create rootvol, s%ap vol, vxassist make ,volume- ,si=e- ,diskvxassist *g ,group- make ,vol- ,si=e- Kctrl:cA * don3t use controller A
$oot.#efault #E
vxassist make ,volume- ,si=e- ,disk- layout!4stripe*mirror>concat*mirror> mirror*concat>mirror*stripe5 stripe*mirror ! layered volume concat*mirror ! layered volume mirror*concat ! non*layered volume mirror*stripe ! non*layered volume
vxassist mirror ,volume- -diskvxassist *g ,group- remove mirror ,vol- KdiskBG vxassist make ,volume- ,si=e- layout!stripe
vxassist *g ,group- *o ordered make ,vol- ,si=e- layout!stripe ncol!8 ,diskG,diskA- ,disk8-
:reate mirrored volume vxassist make ,volume- ,si=e- layout!mirror, log nmirror!2 nlog!2 %ith log :reate a raid volume /emove a volume Initiali=ing a volume 1nline /elayout vxassist make ,volume- ,si=e- layout!raid7 vxedit Frf rm ,volumevxassist *g ,group- remove volume ,vol"ote: you must disable the volume first vxvol init state ,volume- 4plex5state!clean,enable,active vxassist *g ,group- relayout ,vol- layout!stripe ncol!A
vxassist *g ,group- relayout ,vol- layout!stripe ncol!LG vxassist *g ,group- relayout ,vol- layout!stripe ncol!*G vxassist *g ,group- relayout ,vol- layout!stripe stripe!8Ak ncol!7 vxassist *g ,group- relayout ,vol- layout!raid7 stripeunit!8Ak ncol8 vxassist *g ,group- convert ,vol- layout!stripe*mirror 2 #isplay the relayout operation vxrelayout *g ,group- 4status>reverse>start5 ,volvxtask list (tarting a volume (tart a disabled volume #isable a volume vacuate a volume Maintenance mode "ot clean "o kernel state xtending a volume si=e (hrinking a volume si=e add a #/@ log to a volume vxvol start ,volumevxrecover Fsb ,volume*s ! start volume after recovery *b ! background the recovery task vxvol stop ,volumevxevac *g ,group- ,from*disk- ,to*diskvxvol maint ,volumevxmend mirror clean ,plexvxplex att ,volIname- ,plexvxresi=e ,volume- ,ne% lengthvxresi=e *g ,group- ,volume- LGBBm vxresi=e ,volume- ,ne% lengthvxresi=e *g ,group- ,volume- *GBBm vxassist addlog ,volume* increase the volume by GBBMb * decrease the volume by GBBMb
remove a #/@ log from vxassist remove log ,volumea volume xtending log si=e #etering volume si=e vxvol set loglen ! Am ,volume.logvxassit *g ,group- maxsi=e layout!mirror * the maximum si=e you can create a mirror vxassist *g ,group- maxgro% ,volume- * the maximum si=e the volume can gro% too +xmend fix clean ,plexvxedit *g ,group- set o%ner!,user- group!,group- mode!,perms- ,vol-
/ecover a volume :hange volumes permissions Plexs :reating a plex /emove a plex Moving a plex
vxmake plex ,plex- sd !,sub disk namevxplex Fo rm dis ,plexvxplex *g ,group- dis ,plexvxedit *g ,group- *rf rm ,plexvxplex mv ,original plex- ,ne% plex-
vxplex cp ,volume- ,ne% plexvxplex att ,volume- ,plexvxplex det ,plexvxmend off volBG*BA
!ub$disks :reating sub*disk /emoving sub*disk Moving sub*disk 0ssociating %ith a plex #issociating (plitting Noining relocating a sub disk vxmake sd ,sub*disk- ,disk-, offset, len vxedit rm ,sub*diskvxsd mv ,old sub*disk- ,ne% sub*diskvxmake plex ,plex- sd!,sub*disk-, M i.e vxmake plex home*G sd! diskBA*BG, diskBA*BB, diskBA*BA vxsd dis ,sub*diskvxsd Fs,si=e- split sd,ne% sub-,ne%subAvxsd Ooin ,sub*diskG-,subdiskA-,ne% subdiskvxassist *g ,disk group- move KdiskB7 diskBA
relocating a %hole disk vxprint *g rootdg *se 3sdIorigIdmname!HdiskBAH3 sub disks vxunreloc *g rootdg diskBA Volume Manager Information Disks #isplay all the physical disks vxdisk list vxdisk *o alldgs list vxstat Fg ,group-Fff Fd Disk +roup #isplay group properties vxdg list #isplay detailed group info vxdg list ,groupvxinfo *p *g ,groupVolume #isplay volume info #isplay volume properties #isplay unstartable volume :heck for volume vxprint F0ht ,volvxprint Fvl vxinfo *g ,group- ,volvxstat Fg ,group-Fff *v
#isplay detailed disk info vxdisk list ,disk:heck for disk failures
failures Plex #isplay plex properties :heck for plex failures #isplay sub*disk properties vxprint Fvp vxstat Fg ,group-Fff *p !ub$Disks vxprint Fst Veritas ,asks vxtask list vxtask monitor * continuously monitor #isplay tasks (tates: r ! running p ! pause a ! aborting !tatistics and ,racing Iostats vxstat *g ,group- *r Fd ,disks* reset all stats on disk vxstat *g ,group- *d * display stats vxstat *g ,group- *i G *d ,vol* display stats every G sec intervals for volume vxstat *g ,group- *i GB *c 7 *d * display 7 sets J GB secs intervals vxtrace *d ,filename- *o dev,disk ,volvxtrace *f ,filename- *o dev,disk ,vol- > more
)racing icensing 0dd +ie% <aths /eload ne% license V-. (tart.(top
* versions greater than 8.7 * versions belo% 8.7 * versions greater than 8.7 * versions belo% 8.7
.etc.vx.licenses.lic * versions greater than 8.7 .etc.vx.elm * versions belo% 8.7 vxdctl license init
(tatus
#aemons
ogging @ogging help in recovery and can speed it up dramatically, the main form of logging in veritas is the #/@ (dirty region log) %hich performs the follo%ing
log keeps track of changed regions if system fails only the changed regions of the volume are recovered vxassist *g ,group- addlog ,vol- logtype!drl vxassist *g ,group- addlog ,vol* used for raid logs (no type) vxassist *g ,group- remove log ,vol- 4nlog!n5 ,vol-
<olicies can be used if you have slo%er disks %ithin a volume and you %ish to use the faster disks. /ound /obin <reffered <lex (elected <lex !torage -xpert #vxse& +eritas have created some scripots that can check the integrity of the vxvm setup i.e mirrored volumes, spares, etc. )he 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. #isplay #escription :heck rules @ist spare rules /un spare run "ote: you need to run H.etc.init.d.isisd startH to start the necessary daemons first V/!- Pat%s /ules #efault <arameters .opt.+/)(.vxse.vxvm .etc.default.vxse vxseIraid7logG info vxseIraid7logG *g ,group- check vxseIspares list vxseIspares run vxvol *g ,group- rdpol round ,volvxvol *g ,group- rdpol prefer ,vol- ,plexvxvol *g ,group- rdpol select ,vol-
VxDMP see +x#M< for more information Veritas links /ecovery features http:..prefetch.net.articles.veritasrecoveryfeatures.html
xtent based allocation xtent attributes Qast filesystem recovery 0ccess control lists (0:@) 1nline administration 1nline backup nchanced I.1 and mount options Improved synchronous %rites (upport for large filesystems (up to A terabytes) (upport for large files (up to G terabytes) +eritas Ruicklog
Version 0 disk ayout )he +xQ( version 9 disk layout divides the entire file system space into fixed si=ed allocation units. )he first allocation unit starts at block =ero and all allocation units 8A' blocks. 0ll structural information are contained in files. (o expanding the filesystem structures simply reRuires extending the appropriate structural files. 0ll version 9 structural files reside in the structural fileset. )he structural files in version 9 disk layout are:
:ontains the obOect location table (1@)). )he 1@), %hich referenced from the superblock is used to locate the other structural files. ncapsulates the super*block and super*block replicas. 0lthough the primary location of the super*block is kno%n, the label file can be used to locate upper* block copies ifthere is structural damage to the filesystem.
Label File
Device File
/ecords device information such as volume length and volume label and contains pointers to other structural files. ?old information on a per* fileset basis. )his may include the inode of the filesetSs inode list file, the maximum number of inodes allo%ed, an indication of %hether the filesystem supports large files and the inode number of Ruotas file if the filesetsupports Ruotas. Then a filesystem is created, there are t%o filesets, the structural fileset, %hichdefines the file system structure and the primary fileset %hich contains user data.
$oth the structural fileset and the primary fileset have their o%n inode lists %hich are stored in inode list files. Increasing the number of inodes involves increasing the si=e of the file after expanding the inode allocation unit file. ?old the free inode map, extended operations map and a summary of the inode resources. Maps the block used by the filesystem intent log. Indicates the allocation state of each 0& by defining %hether each 0& is free allocated as a %hole (no bitmaps allocated) or expanded, in %hich case the bitmaps associated %ith each 0& determine %hich extents are allocated. :ontains the 0& summary for each allocation unit, %hich contains the number of free extents of each si=e. )he summary for an extent is created only %hen an allocation unit is expanded for use. :ontains the free extent maps for each of the allocation units. If the filesystem supports Ruotas, there is a Ruotas file, %hich is used to track the resources allocated to each user.
Inode Allocation Unit File Log File Extent Allocation Unit State File
Extent Allocation Unit Summar File Free Extent !a" File #uotas File
"reating a (ilesystem )he mkfs command creates veritas filesystems by %riting to a special character device. mkfs FQ vxfs Fo largefiles .dev.vx.rdsk.appdg.sambaIvol mkfs 4*Q vxfs5 4 genericIoption5 4*o specialIoption5 device 4si=e5 :reate genericIoption * 1ptions common to other filesystem types specialIoption * 1ptions specific to +xQ( filesystem device * disk device or +eritas volume si=e * the si=e in sectors
Identifying (ilesystem types fstyp *v .dev.vx.dsk.appdg.sambaIvol Identify filesystem type fstyp *v .dev.vx.rdsk.appdg.sambaIvol (block device) (ra% device)
!%rink1gro3 a (ilesystem (hrink a filesystem Ero% a filesystem Reorganise a (ilesystem &se the fsadm ro reorganise (defrag) a filesystem: /eport on extent fragmentation: /eport on directory fragmentation: /eorganise extents: /eorganise directories: .usr.lib.fs.vxfs.fsadm * .samba .usr.lib.fs.vxfs.fsadm *# .samba .usr.lib.fs.vxfs.fsadm *e .samba .usr.lib.fs.vxfs.fsadm *d .samba .usr.lib.vxfs.fsadm *b GBA9BB .samba .usr.lib.vxfs.fsadm *b AB9DBB .samba
"reate and Mount a snaps%ot filesystem &se the mount command to create the snap shot filesystem then use vxdump (or tar, dd, cpio) to backup the filesystem to tape:
:reate the snapshot filesystem: $ackup the filesystem: /estore the filesystem (to .restore
mount *Q vxfs *o snapof!.dev.vx.dsk.appdg.sambaIvol snap,si=e!ABD9BB U .dev.vx.dsk.rootdg.snapshot.snapshot vxdump *cf .dev.rmt.Gcbn .snapshot vxrestore *vx .restore
filesystem): 2sing 4uotas )urn on a Ruota for a filesystem (make sure filesystem has been mounted %ith Ruota option): )o setup a users Ruota )o vie% a users Ruota: )o turn off Ruota on a filesystem: "ote: )he Ruota file is not removed. Vx(! consistancy Qull check fsck *Q vxfs *o full,nolog ,volumevxRuotaon ,mountIpoint"ote: a file %ill be created called Ruotas (it3s a text file) vxedRuota ,usernamevxRuota *v ,usernamevxRuotaoff ,mountIpoint-
Intent og )he intent log is uded to speed up recovery :reate Mount fsadm *Q vxfs *o log!si=e,logdevice!,devicemount *Q vxfs *o log mount *Q vxfs *o delaylog (integrity) (performance)
xtent based allocation xtent attributes Qast filesystem recovery 0ccess control lists (0:@) 1nline administration 1nline backup nchanced I.1 and mount options Improved synchronous %rites
(upport for large filesystems (up to A terabytes) (upport for large files (up to G terabytes) +eritas Ruicklog
:ontains the obOect location table (1@)). )he 1@), %hich referenced from the superblock is used to locate the other structural files. ncapsulates the super*block and super*block replicas. 0lthough the primary location of the super*block is kno%n, the label file can be used to locate upper*block copies ifthere is structural damage to the filesystem. /ecords device information such as volume length and volume label and contains pointers to other structural files. ?old information on a per* fileset basis. )his may include the inode of the filesetSs inode list file, the maximum number of inodes allo%ed, an indication of %hether the filesystem supports large files and the inode number of Ruotas file if the filesetsupports Ruotas. Then a filesystem is created, there are t%o filesets, the structural fileset, %hichdefines the file system structure and the primary fileset %hich contains user data.
Label File
Device File
$oth the structural fileset and the primary fileset have their o%n inode lists %hich are stored in inode list files. Increasing the number of inodes involves increasing the si=e of the file after expanding the inode allocation unit file. ?old the free inode map, extended operations map and a summary of the inode resources. Maps the block used by the filesystem intent log. Indicates the allocation state of each 0& by defining %hether each 0& is free allocated as a %hole (no bitmaps allocated) or expanded, in %hich case the bitmaps associated %ith each 0& determine %hich extents are allocated. :ontains the 0& summary for each allocation unit, %hich contains the number of free extents of each si=e. )he summary for an extent is created only %hen an allocation unit is expanded for use.
Inode Allocation Unit File Log File Extent Allocation Unit State File
:ontains the free extent maps for each of the allocation units. If the filesystem supports Ruotas, there is a Ruotas file, %hich is used to track the resources allocated to each user.
"reating a (ilesystem
)he mkfs command creates veritas filesystems by %riting to a special character device. )o create a file system: mkfs 4*Q vxfs5 4 genericIoption5 4*o specialIoption5 device 4si=e5 genericIoption specialIoption device si=e example: mkfs FQ vxfs Fo largefiles .dev.vx.rdsk.appdg.sambaIvol output: version 9 layout AB9DBB sectors, GBA9BB blocks of si=e GBA9, log si=e GBA9 blocks unlimited inodes, largefiles supported GBA9BB data blocks, GBGADB free data blocks 9 allocation units of 8A;CD blocks, 8A;CD blocks last allocation unit has 9BVC data blocks 'ote: you do not get the super*block output list as in ne%fs 2 1ption largefiles set 1ptions common to other filesystem types 1ptions specific to +xQ( filesystem disk device or +eritas volume the si=e in sectors
Displaying a (ilesystem
)o see information on a filesystem: mount *v
.dev.dsk.cBtBdBsB on . type ufs read.%rite.setuid.largefiles on (un May G9 GV:9A:A7 ABBB .proc on .proc type proc read.%rite.setuid on (un May G9 GV:9A:A7 ABBB .fd on .dev.fd type fd read.%rite.setuid on (un May G9 GV:9A:A7 ABBB s%ap on .tmp type tmpfs read.%rite on (un May G9 GV:9A:A7 ABBB .dev.vx.dsk.appdg.sambaIvol on .samba type vxfs read.%rite.log.setuid.largefiles on (un May G9 GV:9A:A7 ABBB
!%rink1gro3 a (ilesystem
&se the fsadm command to shrink.gro% a filesystem: (hrink a filesystem Ero% a filesystem .usr.lib.vxfs.fsadm *b GBA9BB .samba .usr.lib.vxfs.fsadm *b AB9DBB .samba
Reorganise a (ilesystem
&se the fsadm ro reorganise (defrag) a filesystem: /eport on extent fragmentation: /eport on directory fragmentation: /eorganise extents: /eorganise directories: .usr.lib.fs.vxfs.fsadm * .samba .usr.lib.fs.vxfs.fsadm *# .samba .usr.lib.fs.vxfs.fsadm *e .samba .usr.lib.fs.vxfs.fsadm *d .samba
&se the mount command to create the snap shot filesystem then use vxdump (or tar, dd, cpio) to backup the filesystem to tape:
:reate the snapshot filesystem: $ackup the filesystem: /estore the filesystem (to .restore filesystem):
mount *Q vxfs *o snapof!.dev.vx.dsk.appdg.sambaIvol snap,si=e!ABD9BB U .dev.vx.dsk.rootdg.snapshot.snapshot vxdump *cf .dev.rmt.Gcbn .snapshot vxrestore *vx .restore
2sing 4uotas
)urn on a Ruota for a filesystem (make sure filesystem has been mounted %ith Ruota option): )o setup a users Ruota )o vie% a users Ruota: )o turn off Ruota on a filesystem: "ote: )he Ruota file is not removed. vxRuotaon ,mountIpoint"ote: a file %ill be created called Ruotas (it3s a text file) vxedRuota ,usernamevxRuota *v ,usernamevxRuotaoff ,mountIpoint-
0t this point, the operating system is no longer under +eritas +olume Manager control. )he disk cBtGdB is unused, and the system %ould not survive the failure of cBtBdB if it %ere to die no%. "ote that even though the operating system is no longer under system control, in some cases you might %ish to continue running +eritas volume manager for non*os volumes. In this situation a fe% additional steps are reRuired: G. Manually start up volume manager processes: 2 rm .etc.vx.reconfig.d.state.d.install*db 2 vxiod set GB 2 vxconfigd *m disable 2 vxdctl enable A. :onfirm that all previous root volumes are accessible: 8. /emove the previous root volumes from +x+M: 2 vxedit *rf rm rootvol s%apvol var 9. /emove the root disk from +x+M: 2 vxdg rmdisk rootdisk 7. Qinally, restore the original vtoc to cBtBdB: 0t this point the root disk cBtBdB is completely free of +x+M, but any other +eritas volumes can be brought online and mounted if reRuired.
)his article %ill provide an introduction to t%o important and often overlooked recovery features: failure notifications and configuration database backups. )he article %ill also provide t%o disaster*recovery case studies to sho% ho% these recovery features can be used to aide in recovering from disasters %hen they strike. 0 basic kno%ledge of +eritas +olume Manager %ill be assumed. If you are ne% to +eritas +olume Manager, consult the vxintro(Gm) man page for an introduction to terminology and basic usage.
#ue to the critical nature of the configuration information stored in the disk headers, it is important to periodically back up this information. 0s I %ill discuss in the section :onfiguration $ackups, +eritas introduced ne% features in +eritas +olume Manager 9.6 to ease the backup process.
ig ig ig ig ig
1 1 1 1 1
)o print the contents of the configuration database, the vxprint(Gm) utility can be used. )he follo%ing example uses the vxprint(Gm) H*hH (list record hierarchies) and H*tH (use one*line format tailored for each record type) options to display the configuration database %ith an informational header and descriptive records: Z vxprint $%t
D1 ;> D0 :? :9 56 ?> ? =9 ;D ;? ;5 D5 ;= 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2562781 ;>3>4 D4?854 :982B*52> :?1 535C4?69 2?69<04 :?1$?;4>$56 ?69<04 =94D =94D =94D =3:42>?69 ;23=?69 de au#t c1t1d0s2 c1t2d0s2 c1t3d0s2 c1t)d0s2 c1t5d0s2 c1t6d0s2 2961 D0*52> >@=4 B;>3>4 B;>3>4 B;>3>4 B;>3>4 B;>3>4 B;>3>4 D8;B ?692304 535C4 961?69 D56 0826:; 1:6<=,8D ;=3:4*52> =:8?942 =<A942 ;>3>4 =:803:@ ;>3>4 :40*C6;> ;>3>4 ;>3>4 ;>3>4 9421>C ;>3>4 9421>C D8;B677; 9421>C 2?6993@: 9421>C D8;B677; 9421>C
3==?69*52> ;>3>4 D3>3?69; ;:9 :40*D1 :40*:92B :43D=69 =:47=94D <>@=4 93@6<> 2569$E8D 06D4 -569$.677 D4?854 06D4 -569$.677 30$20 06D4 -569$.677 D4?854 06D4
1123603158.13.pooh 35365968 35521)08 35521)08 35521)08 35365968 35521)08 , , , , , , oravo#01,03 3$128 :E 2$2 423 2$2 423 2$2 423 sgen
oravo#01 oravo#01,03 oravo#01,;01 oravo#01,;02 oravo#01,;03 oravo#01,901 oravo#01,=01 c1t1d0,02 oravo#01,=02 c1t)d0,02 oravo#01,902 oravo#01,=03 c1t2d0,02 oravo#01,=0) c1t5d0,02 oravo#01,903 oravo#01,=05 c1t3d0,02 oravo#01,=06 c1t6d0,02
, 423A94D 35>8?4 )19)30)0 ;4945> oravo#01 423A94D 35>8?4 )19)3168 ;>:8=4 oravo#01,03 oravo#01,901 1 13981056 0$0 oravo#01,03 oravo#01,902 1 13981056 1$0 oravo#01,03 oravo#01,903 1 13981056 2$0
, 423A94D 35>8?4 13981056 ;4945> , sgen oravo#01,901 423A94D 35>8?4 13981056 56253> , :E oravo#01,=01 c1t1d0 0 13981056 0 c1t1d0 423 oravo#01,901 423A94D 35>8?4 13981056 56253> , :E oravo#01,=02 c1t)d0 0 13981056 0 c1t)d0 423 , oravo#01,902 oravo#01,=03 oravo#01,902 oravo#01,=0) , oravo#01,903 oravo#01,=05 oravo#01,903 oravo#01,=06 423A94D 423A94D c1t2d0 423A94D c1t5d0 423A94D 423A94D c1t3d0 423A94D c1t6d0 35>8?4 35>8?4 0 35>8?4 0 35>8?4 35>8?4 0 35>8?4 0 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 ;4945> , sgen 56253> , :E 0 c1t2d0 423 56253> , :E 0 c1t5d0 423 ;4945> , sgen 56253> , :E 0 c1t3d0 423 56253> , :E 0 c1t6d0 423
)he obOect types (e.g., subdisks, disk groups, plexes, volumes, etc.), block offsets, obOect names, and locations can be useful for understanding the +eritas +olume Manager layout and reassembling the configuration layout during a disaster. #ue to the importance of this information, backing up the configuration database is imperativeK 0s you %ill see in the next section, +eritas +olume Manager makes backing up the configuration information a snap.
"onfiguration )ackups
)he vxconfigbackupd(Gm) daemon %as introduced in +eritas +olume Manager 9.6 to provide an automated %ay to back up disk headers and the configuration database. +xconfigbackupd(Gm) is started automatically at system boot time and actively monitors the configuration database and disk headers. Then vxconfigbackupd(Gm) detects a change to the active configuration, vxconfigbackupd(Gm) %ill %rite the configuration to a set of files in the .etc.vx.cbr.bk.. directory. (HH identifies the disk group, and HH identifies the disk group id.) )he vxconfigbackupd(Gm) man page provides the follo%ing descriptions for the files in the .etc.vx.cbr.bk.. directory:
$etc$v%$c"r$"k$.$.diskin o 9ocation o "ackup i#e $etc$v%$c"r$"k$.$."incon ig 9ocation o "ackup i#e $etc$v%$c"r$"k$.$.c grec 9ocation o "ackup i#e in v%print ,m ormat. or disk attri"utes. or "inary con iguration copy. records
or con iguration
In addition to the automated backups that are performed by vxconfigbackupd(Gm), manual backups can be performed %ith the vxconfigbackup(Gm) utility. )his is valuable for backing up specific versions of the configuration and archiving the configuration to a user*supplied destination. )he follo%ing example uses the vxconfigbackup(Gm) H*lH (location to store backup) to back up the current configuration to the .etc.dgbackups directory: Z 1usr1lib1vxvm1bin1vxconfigbackup $l 1etc1dgbackups
;tart "acking up diskgroup oradg to F $etc$dg"ackups$oradg.112/2)0283.19.Ginnie ... ?%?0 26>854 ?,5,2,3100 Aackup comp#ete or diskgroup: oradg
If you are using a version of +eritas +olume Manager prior to 9.6, you %ill be unable to use the vxconfigbackupd(Gm) and vxconfigbackup(Gm) utilities to manage backups. #on3t fear ** the sample shell script in @isting G can be used to archive the configuration to a text file, %hich can be passed to vxmake(Gm)3s H*dH option to re*create the configuration if disaster %ere to strike.
Diskgroup oradg con iguration restoration started ...... 8nsta##ing vo#ume manager disk header or c1t1d0s2 ... 8nsta##ing vo#ume manager disk header or c1t2d0s2 ... 8nsta##ing vo#ume manager disk header or c1t3d0s2 ... 8nsta##ing vo#ume manager disk header or c1t)d0s2 ... 8nsta##ing vo#ume manager disk header or c1t5d0s2 ... 8nsta##ing vo#ume manager disk header or c1t6d0s2 ... , oradgHs diskgroup con iguration is restored 'in a precommitted state(. Diskgroup can "e accessed in read on#y and can "e e%amined using v%print'1m( in this state. :un: v%con igrestore ,# $etc$dg"ackups$ ,c oradg ==I to commit the restoration. v%con igrestore ,# $etc$dg"ackups$ ,d oradg ==I to a"ort the restoration.
Then vxconfigrestore(Gm) is invoked, the configuration %ill be staged to a transient location, allo%ing the administrator to validate the configuration %ith the vxprint(Gm) utility. If the configuration looks sound, the configuration can be committed to the disk headers and the configuration database by invoking vxconfigrestore(Gm) %ith the H*cH (commit) option: Z 1usr1lib1vxvm1bin1vxconfigrestore $l 1etc1dgbackups1 $c oradg
5ommitting con iguration restoration or diskgroup oradg .... oradgHs diskgroup con iguration restoration is committed.
1nce the configuration is restored, the volumes can be started, and the file systems that reside on those volume can be mounted.
7ai#ures have "een detected "y the ?4:8>3; ?o#ume 0anager: ai#ed disks: c1t)d0 ai#ed p#e%es: raid5vo#,=08
(ince email addressed to the root user is directed to the local mail spool by default, it is advantageous to for%ard all messages addressed to root to an actual email address. )his can be accomplished by enabling email for%arding and adding the follo%ing alias to .etc.aliases: root: adminJmycompany.com
If you %ould prefer to use a separate account for notifications, you can append the account name to the line that starts vxrelocd(Gm) in the vxvm*recover init script: Z grep vxrelocd 1etc1init;d1!?5vxvm$recover vxrelocd root storageproblems & :onfiguring the notification facility to route messages to a valid account is crucial and ensures timely notifications %hen failures are detected.
7ai#ures have "een detected "y the ?4:8>3; ?o#ume 0anager: ai#ed vo#umes: oravo#01
I immediately logged into %innie and received the follo%ing error %hen trying to list the directory that %as on the failed volume oravolBG: Z ls $la 1u68 .: I.1 error 0 Ruick check of the system logs revealed numerous (:(I error messages: Z tail 1var1adm1messages
Lu# 26 $pciJ1 Lu# 26 Lu# 26 $pciJ1 Lu# 26 Lu# 26 $pciJ1 Lu# 26 Lu# 26 $pciJ1 Lu# 26 Lu# 26 $pciJ1 Lu# 26 Lu# 26 $pciJ1 Lu# 26 1/:)9:3/ Ginnie scsi: -8D 10/833 kern.Garning. E3:2821: !0$pciJ1$scsiJ)$sdJ1!0 'sd1(: 1/:)9:3/ Ginnie ;5;8 transport ai#ed: reason Hincomp#eteH: retrying command 1/:)9:3/ Ginnie scsi: -8D 10/833 kern.Garning. E3:2821: !0$pciJ1$scsiJ)$sdJ)!0 'sd5(: 1/:)9:3/ Ginnie ;5;8 transport ai#ed: reason Hincomp#eteH: retrying command 1/:)9:)0 Ginnie scsi: -8D 10/833 kern.Garning. E3:2821: !0$pciJ1$scsiJ)$sdJ1!0 'sd1(: 1/:)9:)0 Ginnie disk not responding to se#ection 1/:)9:)0 Ginnie scsi: -8D 10/833 kern.Garning. E3:2821: !0$pciJ1$scsiJ)$sdJ)!0 'sd5(: 1/:)9:)0 Ginnie disk not responding to se#ection 1/:)9:)2 Ginnie scsi: -8D 10/833 kern.Garning. E3:2821: !0$pciJ1$scsiJ)$sdJ1!0 'sd1(: 1/:)9:)2 Ginnie disk not responding to se#ection 1/:)9:)) Ginnie scsi: -8D 10/833 kern.Garning. E3:2821: !0$pciJ1$scsiJ)$sdJ1!0 'sd1(: 1/:)9:)) Ginnie disk not responding to se#ection
)he +eritas vxprint(Gm) utility %as also unable to display the disk group configuration (since the configuration database %as unavailable): Z vxprint $g oradg $%t Z I raced to the machine room to check the status of the hard%are and started to speculate that a (:(I cable or the storage array had failed. Then I checked the hard%are, I noticed that the storage array %as po%ered off, and the eRuipment in the surrounding racks %as %orking correctly. $ased on my findings, I thought that a po%er cord failed. 1nce I replaced the cord, the storage array came back to life, but the oradg disk group I needed to access %as in the disabled state: Z vxdg list
2304 oradg ;>3>4 disa"#ed 8D 1123603158.13.Ginnie
0 Ruick check of the disks sho%ed that they %ere online and associated %ith the disabled disk group: Z vxdisk list
D4?854 c0t0d0s2 c0t1d0s2 c1t1d0s2 c1t2d0s2 c1t3d0s2 c1t)d0s2 c1t5d0s2 c1t6d0s2 >@=4 auto:none auto:none auto:cdsdisk auto:cdsdisk auto:cdsdisk auto:cdsdisk auto:cdsdisk auto:cdsdisk D8;B , , c1t1d0 c1t2d0 c1t3d0 c1t)d0 c1t5d0 c1t6d0 1:6<= , , oradg oradg oradg oradg oradg oradg ;>3><; on#ine on#ine on#ine on#ine on#ine on#ine on#ine on#ine inva#id inva#id dgdisa"#ed dgdisa"#ed dgdisa"#ed dgdisa"#ed dgdisa"#ed dgdisa"#ed
In some situations, +eritas may report offline devices as Hfailed %as: c6t6d6sAH. Then this happens, the vxreattach(Gm) command can reconnect +eritas +olume Manager to HlostH devices. @uckily, in our case, +eritas %as able to reconnect to the devices so I unmounted the file system, deported the disk group, and imported the disk group to enable the oradg disk group: Z umount 1u68 Z vxdg deport oradg Z vxdg import oradg )he deport and import operations are reRuired to fix a disabled disk group and %ill validate that the disk group configuration records are consistent. 1nce the disk group %as imported, I ran vxinfo(Gm) to vie% the volume and plex status: Z vxinfo $g oradg $p
vo# p#e% vo# p#e% p#e% vo# p#e% p#e% vo# p#e% oravo#01 oravo#01,03 oravo#01,901 oravo#01,=01 oravo#01,=02 oravo#01,902 oravo#01,=03 oravo#01,=0) oravo#01,903 oravo#01,=05 sgen 35>8?4 sgen 35>8?4 35>8?4 sgen 35>8?4 35>8?4 sgen 35>8?4 ;tarta"#e ;tarta"#e ;tarta"#e ;tarta"#e
p#e% oravo#01,=06
35>8?4
)he H(tartableH flag indicates that the volume and plexes are in a startable state, so I executed the vxvol(Gm) utility to start the volume: Z vxvol $g oradg start oravol68 1nce the volume came online, I ran fsck(Gm) to replay the transactions in the +xQ( Oournal: Z fsck $( vxfs 1dev1vx1dsk1oof1oravol68
#og rep#ay in progress rep#ay comp#ete , marking super,"#ock as 59432
0fter fsck(Gm) finished the consistency check, I mounted the file system, applied the archive logs, and %as able to bring the database back up to an operational state. #ue to the recovery features built into +eritas volume manager, +eritas file system, and 1racle, %e %ere able to avoid a full file system restoreK (ince I received the failure notification immediately after +eritas detected a problem %ith the volume, I %as able to reduce the time it took to recover the faulted system.
oradgHs diskgroup con iguration is restored 'in precommitted state(. Diskgroup can "e accessed in read on#y and can "e e%amined using v%print'1m( in this state. :un: v%con igrestore ,# $etc$dg"ackups$oradg*0612205 ,c oradg ==I to commit the restoration. v%con igrestore ,# $etc$dg"ackups$oradg*0612205 ,d oradg ==I to a"ort the restoration.
Te verified the configuration %as consistent by running vxprint(Gm), and committed the configuration to the disk headers and configuration database by invoking vxconfigrestore(Gm) %ith the H*cH option: Z 1usr1lib1vxvm1bin1vxconfigrestore $c $l 1var1tmp1back oradg
5ommitting con iguration restoration or diskgroup oradg ....
1nce %e committed the configuration, the layout matched our last kno%n good configuration backup: Z vxprint $%t
Disk group: oradg D1 ;> D0 :? :9 56 ?> ? =9 ;D ;? ;5 D5 ;= 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2562781 ;>3>4 D4?854 :982B*52> :?1 535C4?69 2?69<04 :?1$?;4>$56 ?69<04 =94D =94D =94D =3:42>?69 ;23=?69 de au#t 2961 D0*52> >@=4 B;>3>4 B;>3>4 B;>3>4 B;>3>4 B;>3>4 B;>3>4 D8;B ?692304 535C4 961?69 D56 0826:; 1:6<=,8D ;=3:4*52> =:8?942 =<A942 ;>3>4 =:803:@ ;>3>4 :40*C6;> ;>3>4 ;>3>4 ;>3>4 9421>C ;>3>4 9421>C D8;B677; 9421>C 2?6993@: 9421>C D8;B677; 9421>C 3==?69*52> ;>3>4 D3>3?69; ;:9 :40*D1 :40*:92B :43D=69 93@6<> -569$.677 -569$.677 -569$.677 =:47=94D 2569$E8D D4?854 30$20 D4?854 <>@=4 06D4 06D4 06D4 06D4
dg oradg v p# sv sv sv v p# sd p# sd v p# sd p# sd v p# sd p# sd
de au#t
10000
112/2)0283.19.Ginnie oravo#01,03 sgen ;>:8=4 3$128 :E 0$0 2$2 423 1$0 2$2 423 2$0 2$2 423 ;4945> , 56253> , 0 c1t1d0 56253> , 0 c1t)d0 ;4945> , 56253> , 0 c1t2d0 56253> , 0 c1t5d0 ;4945> , 56253> , 0 c1t3d0 56253> , 0 c1t6d0 sgen :E 423 :E 423 sgen :E 423 :E 423 sgen :E 423 :E 423
oravo#01 , oravo#01,03 oravo#01,;01 oravo#01,;02 oravo#01,;03 oravo#01,901 oravo#01,=01 c1t1d0,02 oravo#01,=02 c1t)d0,02 oravo#01,902 oravo#01,=03 c1t2d0,02 oravo#01,=0) c1t5d0,02 oravo#01,903 oravo#01,=05 c1t3d0,02 oravo#01,=06 c1t6d0,02
423A94D 35>8?4 )19)30)0 ;4945> oravo#01 423A94D 35>8?4 )19)3168 oravo#01,03 oravo#01,901 1 13981056 oravo#01,03 oravo#01,902 1 13981056 oravo#01,03 oravo#01,903 1 13981056 , oravo#01,901 oravo#01,=01 oravo#01,901 oravo#01,=02 , oravo#01,902 oravo#01,=03 oravo#01,902 oravo#01,=0) , oravo#01,903 oravo#01,=05 oravo#01,903 oravo#01,=06 423A94D 423A94D c1t1d0 423A94D c1t)d0 423A94D 423A94D c1t2d0 423A94D c1t5d0 423A94D 423A94D c1t3d0 423A94D c1t6d0 ;@25 35>8?4 0 35>8?4 0 ;@25 35>8?4 0 35>8?4 0 ;@25 35>8?4 0 35>8?4 0 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056 13981056
)o ensure that no damage had occurred to the file system, %e used fsck(Gm) to consistency check the file system: Z fsck $( vxfs 1dev1vx1rdsk1oradg1oravol68 and got our 1racle #$0 to verify the integrity of each data file %ith 1racle3s database verification utilities. $ecause accidents and disasters can strike at any time, it is important to perform regular backups of the +eritas configuration and store this data in a safe location (having a configuration database backup saved us from having to restore the database or re*create the +eritas obOects by hand).
"onclusion
)his article provided an introduction to t%o important +eritas +olume Manager recovery techniRues and discussed %ays to ensure recoverability after a disaster. Then dealing %ith difficult +eritas situations, it is imperative to kno% %hat function a command performs before executing it. It is also helpful to engage +eritas support or the folks on the +eritas mailing lists %hen maOor disasters occur. )his %ill ensure that a second set of eyes is available to revie% the problem, and %ill ensure the Ruickest and safest methods are used to recover a faulted system. I tested all commands on a (olaris GB server running +eritas +olume Manager 9.G, and I highly recommend testing all configuration changes on non*production systems. If you have Ruestions or comments on the article, please feel free to *mail the author.
References
+eritas documentation: http:..%%%.veritas.com ((0 ?elpful ?ints: http:..%%%.eng.auburn.edu.pub.mail*lists.ssastuff. +eritas +olume Manager Mailing @ist 0rchives: http:..mailman.eng.auburn.edu.search.html
.ckno3ledgements
/yan %ould like to thank the individuals %ho maintain the ((0 helpful hints site, as %ell as the members of the +eritas +olume Manager list.
+eritas +6#M< =%at is Dynamic Multipat%ing #DMP&E #M< is a method of providing t%o or more hard%are paths to a single drive. Qor example, the physical hard%are can have at least t%o paths, such as cGtGdB and cAtGdB, directing I.1 to the same drive. +x+M arbitrarily selects one of the t%o names and creates a single device entry, then transfers data across both paths to spread the I.1, #M< is enabled by default. +olume Manager detects multipath systems %ith the &niversal Torld%ide #evice Identifiers(TT# I#s) and manages multipath targets, such as disk arrays, %hich define policies for using more than one path. )enefits of DMP
7ig% availability * #M< provides greater reliability through a path failover mechanism. In the event of a loss of oneconnection to a disk, the system continues to access the critical data over the other sound connections until the failed pathis replaced. Improved performance * #M< provides greater I.1 throughput by balancing the I.1 load uniformly across multiple I.1 pathsto the disk device.
)he disk paths can be in a active.active (use both paths) or active.passive state (use one path). list controllers list enclosures #isplay <aths Tho controls the path :ontroller (enable.disable) (tatistics vxdmpadm listctlr all vxdmpadm listenclosure all vxdmpadm getsubpaths ctlr!fscsiA vxdmpadm getsubpaths dmpnodename!,enclosurevxdmpadm getdmpnode namename!c8tAdB vxdmpadm disable ctlr!,controllervxdmpadm enable ctlr!,controllervxdmpadm iostat start vxdmpadm iostat reset vxdmpadm iostat sho% all vxdmpadm setattr enclosure ,enclosure- iopolicy!,policyadaptive priority balanced (default) round*robin minimumR single*active vxdmpadm setattr path ,path*name- pathtype!,path*type<ath )ype active nomanual nopreffered primary secondary standby
(tops the restore daemon vxdmpadm start restored (tops the restore daemon vxdmpadm stop restored