You are on page 1of 26

VeritasVolumeManagerPart1

VeritasVolumeManager 1.VolumeManagerObjects 1.1Disks 1.2Diskgroups 1.3VolumeManagerdisks 1.4Subdisks 1.5Plexes 1.6Volumes 1.7VolumeMangerObjects&theirRelationship 2.VolumeManagerConfiguration(optionsmenu) 2.1Addorinitializeoneormoredisks 2.2Encapsulateoneormoredisks 2.3Removeadisk 2.4Removeadiskforreplacement 2.5Replaceafailedorremoveddisk 2.6Mirrorvolumesonadisk 2.7Movevolumesfromadisk 2.8Enableaccessto(import)adiskgroup 2.9Removeaccessto(deport)adiskgroup 2.10Enable(online)adiskdevice 2.11Disable(offline)adiskdevice 2.12Markadiskasaspareforadiskgroup 2.13Turnoffthespareflagonadisk AboutVeritasvolumemanager: VeritasVolumeManagerisasoftwareproductfromveritasInc.anditisusedtomanagediskstorage. Themainfeaturesofvolumemanagerarefollowing: 1.Allowscreationoflogicalvolumesspanningovermultipledisks.Thisovercomesthephysicallimitofthe disk. 2.ProvideshighavailabilitystoragesolutionsthroughRAID,Mirroringofdisks. 3.Providesfailoverfeaturesbyprovidingtransferablediskgroupownershipbetweensystems. 4.Dynamicreconfigurationofdiskstorageinanonlinesystemstate.whatisveritasvolumemanager. Thefollowingarticledescribesthevolumemanagerobjectsandconfigurationoftheseobjectsusingatext menubasedutilitycalledvxdiskadm.

1.0VolumeManagerObjects Disks Disksarereferredinvolumemanagerbytwotermsdevicenameanddiskname.Thedevicename specifiescontroller,targetidandsliceofthedisk.Disknameisthecommonnamegiventothedevice nameasaneasytoremembername. Forexampledevicenamec2t3dos2representscontrollernumber2,targetid3,diskgroup0andslice2 anddisk01maybeitsdiskname.Whiledevicenameissystemdependentbasedoncontrolleranddiskid thedisknameisuserdefined. Diskgroups:

Adiskgroupisacollectionofvolumemanagerdisksgroupedtogethertoholdthedata.Allthe configurationchangesmadetoadiskgroupareappliedtothedisksinthatdiskgrouponly. VolumeManagerobjectscannotspandiskgroupsi.e.alltheoperationsonaparticulardiskgroup remainsconfinedtothatparticulargroup. Diskgroupsenablehighavailabilityasthesecanbesharedbytwoormorehostsbutcanbe accessedbyonlyonehostatatime.Intwohostsandasharedstoragesituationonehostcan takeovertheownershipofthediskgroupsanddrivesincaseotherhostfails.

VolumeManagerdisks

Addingphysicaldiskstothevolumemanagerresultsincreationofpublicandprivateregionin thediskbythevolumemanager.Thepublicregionisthediskspaceavailableforvolumespace andtheprivateregionstorestheconfigurationinformation. AVolumeManagerdisksarecreatedfromthepublicregionofaphysicaldiskthatisunder VolumeManagercontrol.Eachvolumemanagerdiskcorrespondstoonephysicaldisk. Avolumemanagerdiskisgivenadiskmedianamewhenitisaddedtoadiskgroupwhichcanbe defaultoruniqueuserdefined.. Onceavolumemanagerdiskisassignedadiskmedianame,thediskisnolongerreferredtobyits physicaladdressofc#t#d#.Thephysicaladdressofc#t#d#becomesknownasthediskaccess record.

Subdisks

Asubdiskisasubsectionofadisk'spublicregionandisthesmallestunitofstorageinVolume Manager. Asubdiskisdefinedbyanoffsetandalengthinsectorsonavolumemanagerdisk. Avolumemanagerdiskcancontainmultiplesubdisksbutsubdiskscannotoverlaporsharethe sameportionsofavolumemanagerdisk. volumemanagerdiskspacethatisnotreservedorthatisnotpartofasubdiskisfreespace.You canusefreespacetocreatenewsubdisks.

Asubdiskissimilartoapartitionbutwithfollowingdifferences:

Themaximumnumberofpartitionstoadiskiseight. Thereisnotheoreticallimittonumberofsubdisksthatcanbeattachedtoasingleplex,butithas beenlimitedtoadefaultvalueof4096.Ifrequired,thisdefaultcanbechanged,usingthe vol_subdisk_numtunableparameter.

Plexes

Aplexisastructuredororderedcollectionofsubdisksthatrepresentsonecopyofthedataina volume.Aplexconsistsofoneormoresubdiskslocatedononeormorephysicaldisks. Aplexisalsocalledamirror.Thetermsplexandmirrorcanbeusedinterchangeably,eventhough aplexisonlyonecopyofthedata.Theterms"mirrored"or"mirroring"implytwoormorecopies ofdata. Thelengthofaplexisdeterminedbythelastblockthatcanbereadorwrittenonthelastsubdisk intheplex. Thedefaultnamingconventionforplexesinavolumeisvolumename##.Thedefaultplexname consistsofthevolumename,ahyphen,andatwodigitnumber

Volumes

Avolumeiscomposedofoneormoreplexesnotrestrictedbythephysicalsizeofthedisk. Avolumecanspanacrossmultipledisks. VolumeManagerusesthedefaultnamingconventionvol##forvolumes,where##representsa twodigitnumberbutcanbeuserdefinedasperrequirement.

VolumeManagerObjectsandTheirRelationship

2.0VolumeManagerConfiguration Volumeconfigurationconsistsofaddingtwoormorediskstoformdiskgroupandcreatevolume/sfrom thisdiskgroup.Filesystemcanbecreatedonthesevolumesorthesecanbeaccessedasrawdevicesfor somedatabaseapplications.Firststepinvolumemanagerconfigurationconsistsofaddingandinitializing disksundervolumemanagerwhichcreatesapublicregionwhichisbulkofdiskspaceavailableforvolume space.Privateregionwhichisgenerallyofafewmegabytesstoresthediskconfigurationinformation. Mostofthevolumemanageroperationrelatedtodisks&volumecanbeperformedbyacharacterbased menuutilitycallvxdiskadm Followingparagraphsdescribestheuseofvxddiskadmtoconfigureandmanagevolumemanager. #vxdiskadm Typingvxdiskadmbringsupamenubasedutility(text).Theoptions,theirexplanationandscreenshots aregivenbelow.Mostoftheoptionsneedadiskname,devicenameordiskgroupnameandyoucanhave thisinformationbytypinglistinthevxdiskadmmenu.Thelistmenuoptionisusedtodisplayalistofdisks attachedtoyoursystem.Thisalsolistsremovedorfaileddisks.Mostusefultogetaquickviewofalldisksor listdetailsofasinglediskitsname,volumeassociationandstatus. Adiskneedstobeformattedinordertobeincludedinvolumemanager.volumemanagerwillreport unformatteddiskasinvalidandawillonlyrecognizeafterformatting Bydefaultalltheavailabledisksinthesystemareconsideredforinclusionasvolumemanagerdiskhowever toexcludecertaindisks,listthenamesofthediskstobeexcludedinthefile/etc/vx/disks.excludebefore theinitializationorencapsulation.Similarly,youcanexcludealldisksonspecificcontrollersfrom initializationorencapsulationbylistingthosecontrollersinthefile/etc/vx/cntrls.exclude. ?&??optionsprovidehelpaboutthemenuitemandmenusystem. #vxdiskadm VolumeManagerSupportOperations Menu:VolumeManager/Disk 1Addorinitializeoneormoredisks 2Encapsulateoneormoredisks 3Removeadisk 4Removeadiskforreplacement 5Replaceafailedorremoveddisk 6Mirrorvolumesonadisk 7Movevolumesfromadisk 8Enableaccessto(import)adiskgroup 9Removeaccessto(deport)adiskgroup 10Enable(online)adiskdevice 11Disable(offline)adiskdevice 12Markadiskasaspareforadiskgroup 13Turnoffthespareflagonadisk listListdiskinformation ?Displayhelpaboutmenu ??Displayhelpaboutthemenuingsystem qExitfrommenus Selectanoperationtoperform

2.1Addorinitializeoneormoredisks Theformatteddiskscanbeaddedorinitializedwithvolumemanager.Diskgroupsneedstobegivenfor makinganewgrouporaddingdisksinexistinggroup.Defaultdiskgroupisrootdgandifnoneisspecified thedisksareaddedtovolumemanagerandarekeptashotspareswhichcanbeusedinplaceofafailed disk. Select1(Addorinitializeoneormoredisks)fromthevxdiskadmmainmenu. Addorinitializedisks Menu:VolumeManager/Disk/AddDisks Usethisoperationtoaddoneormorediskstoadiskgroup.Youcanaddtheselecteddiskstoanexistingdisk grouportoanewdiskgroupthatwillbecreatedasapartoftheoperation.Theselecteddisksmayalsobe addedtoadiskgroupasspares.Theselecteddisksmayalsobeinitializedwithoutaddingthemtoadiskgroup leavingthedisksavailableforuseasreplacementdisks. Morethanonediskorpatternmaybeenteredattheprompt.Herearesomediskselectionexamples: all:alldisks c3c4t2:alldisksonbothcontroller3andcontroller4,target2 c3t4d0:asingledisk Selectdiskdevicestoadd: [<patternlist>,all,list,q,?]list <patternlist>canbeasingleormoredisksand/orcontrollers.If<patternlist>consistsofmultipleitems,thoseitems mustbeseparatedbywhitespace. listatthepromptdisplaysalistofthedisksavailabletothesystem,followedbyapromptatwhichyoushouldtype thedevicenameofthedisktobeadded: DEVICEDISKGROUPSTATUS c0t0d0disk01rootdgonline c0t1d0disk02rootdgonline c0t2d0disk03rootdgonline c0t3d0online c1t0d0disk10rootdgonline c1t0d1error . . . c3t0d0error c3t1d0disk33rootdgonline c3t2d0disk34rootdgonline c3t3d0disk35rootdgonline Selectdiskdevicestoadd: [<patternlist>,all,list,q,?]c1t0d1 AlldisksattachedtothesystemarerecognizedbytheVolumeManageranddisplayedhere..Errorstatusindicates disksnotrecognizedbyvolumemanageraspartofvolumemanagerandcanbeusedtoaddinthevolumemanager..

Diskswithaname,groupandonlinestatusarepresentinvolumemanagerinavalidvolumemanagerdiskgroup .Oneormoredisksseparatedbyspacecanbeselectedforaddingintovolumemanager. Hereisthediskselected.Outputformat:[Device_Name] c1t2d0 Continueoperation?[y,n,q,?](default:y)y Youcanchoosetoaddthisdisktoanexistingdiskgroup,a newdiskgroup,orleavethediskavailableforusebyfuture addorreplacementoperations.Tocreateanewdiskgroup,selectadiskgroupnamethatdoesnotyetexist.To leavethedisk availableforfutureuse,specifyadiskgroupnameof"none". Whichdiskgroup[<group>,none,list,q,?](default:rootdg) Useadefaultdisknameforthedisk?[y,n,q,?](default:y) Adddiskasasparediskforrootdg?[y,n,q,?](default:n)n Theselecteddiskswillbeaddedtothediskgrouprootdgwith defaultdisknames. c1t2d0 Continuewithoperation?[y,n,q,?](default:y)y ThefollowingdiskdevicehasavalidVTOC,butdoesnotappeartohave beeninitializedfortheVolumeManager.Ifthereisdataonthedisk thatshouldNOTbedestroyedyoushouldencapsulatetheexistingdisk partitionsasvolumesinsteadofaddingthediskasanewdisk. Outputformat:[Device_Name] c1t2d0 Encapsulatethisdevice?[y,n,q,?](default:y)n c1t2d0 Insteadofencapsulating,initialize?[y,n,q,?](default:n)y Initializingdevicec1t2d0. Addingdiskdevicec1t2d0todiskgrouprootdgwithdisk namedisk39. Addorinitializeotherdisks?[y,n,q,?](default:n) 2.2Encapsulateoneormoredisks Thisisusedtobringthediskundervolumemanager,whicharealreadypresentinthesystemwithdatabutwithout volumemanager.Dataonthesedisksarenotdisturbedandifthesedisksmeetscertainvolumemanager requirementstheseareaddedundervolumemanager. Systemneedsrebootingifencapsulationisusedfordiskwithmountedfilesystemorrunningapplications.Alsothe olddevicenamesneedstobechangedinapplications/scriptstoreflectthenewvolumename. vfstabinformationisupdatedautomaticallybutitisworthwhiletocheckvfstabifchangesareproperasany discrepancyinvfstabmaycausesystembootfailureonnextreboot. Encapsulationpreservesanyexistingdataonthediskwhenthediskisplacedundervolumemanagercontrol.To reducethe chanceofencapsulationfailure,makesurethatthediskmeetsthefollowingrequirements:

Ithasasmallamountoffreespace(atthebeginningorendofthedisk)thatdoesnotbelongtoany partition Ithastwofreepartitions Ithasans2slicethatrepresentsthewholedisk

Oneofthemostcommonapplicationisencapsulationofrootdisktobringitundervolumemanagerandthenmirror ittohaveanalternatebootdisk. TheEEPROMvariableusenvramrc?mustbesettotrueandanalternatebootdiskaliasnameneedstobedefinedto accessthesecondbootdiskbyanalternatealiasnameincaseprimarydiskfails. ok>eepromusenvramrc?=true Procedureforencapsulatingadiskforvolumemanageruseisasfollows: Selectmenuitem2(Encapsulateoneormoredisks)fromthevxdiskadmmainmenuandfollowtheprompts: Encapsulateoneormoredisks Menu:VolumeManager/Disk/Encapsulate UsethisoperationtoconvertoneormorediskstousetheVolumeManager. Thisaddsthediskstoadiskgroupandreplacesexisting partitions withvolumes.Diskencapsulationrequiresarebootforthe changestotakeeffect. Morethanonediskorpatternmaybeenteredattheprompt.Here aresomediskselectionexamples: all:alldisks c3c4t2:alldisksonbothcontroller3andcontroller4,target2 c3t4d0:asingledisk Selectdiskdevicestoencapsulate: [<patternlist>,all,list,q,?]c2t5d0 <patternlist>canbeasingledisk,oraseriesofdisksand/orcontrollers(withoptionaltargets).If<patternlist> consistsofmultipleitems,thoseitemsmustbeseparatedbywhitespace. Hereisthediskselected.Outputformat:[Device_Name] c2t5d0 Continueoperation?[y,n,q,?](default:y)y Youcanchoosetoaddthisdisktoanexistingdiskgrouporto anewdiskgroup.Tocreateanewdiskgroup,selectadiskgroupnamethatdoesnotyetexist. Whichdiskgroup[<group>,list,q,?](default:rootdg) Useadefaultdisknameforthedisk?[y,n,q,?](default:y) Theselecteddiskswillbeencapsulatedandaddedtotherootdg diskgroupwithdefaultdisknames. c2t5d0 Continuewithoperation?[y,n,q,?](default:y)y

Thefollowingdiskhasbeenselectedforencapsulation.Outputformat: [Device_Name] c2t5d0 Continuewithencapsulation?[y,n,q,?](default:y)y Thediskdevicec2t5d0willbeencapsulatedandaddedtothedisk grouprootdgwiththedisknamedisk01. Thec2t5d0diskhasbeenconfiguredforencapsulation. Thefirststageofencapsulationhascompletedsuccessfully.You shouldnowrebootyoursystemattheearliestpossibleopportunity. Theencapsulationwillrequiretwoorthreerebootswhichwillhappenautomaticallyafterthenextreboot.To rebootexecutethecommand: shutdowng0yi6 Thiswillupdatethe/etc/vfstabfilesothatvolumedevicesare usedtomountthefilesystemsonthisdiskdevice.Youwillneedtoupdateanyotherreferencessuchasbackup scripts,databases, ormanuallycreatedswapdevices. Encapsulateotherdisks?[y,n,q,?](default:n)n Thediskdevicec2t5d0willbeencapsulatedandaddedtothediskgrouprootdgwiththedisknamedisk01. Theencapsulationoperationfailedwiththefollowingerror: Itisnotpossibletoencapsulatec2t5d0,forthefollowingreason: <vxvm:vxslicer:ERROR:Unsupporteddisklayout.> HitRETURNtocontinue. Encapsulationmayfailifthereisnotenoughfreespaceavailableonthedisktoaccommodatevolumemanager.If thishappens,theprocedureabovewillendabruptlywithanerrormessageasabove. 2.3Removeadisk Thisoptionisusedtoremoveadiskfromadiskgroupprovidedthereisnoactivevolumeusingthisdisk..Ifthere aresomevolumesusingthediskthethosehavetobeeithermovedtosomeotherdiskorremovediftheyareno longerneeded. Howeversinceadiskgroupmusthaveatleastonediskyoucannotremoveallthedisksfromadiskgroup.Toremove alldisksfromadiskgroupyouhavetodisablethevolumegroupwiththeexceptionofrootdgdiskgroupwhichcan notbedisabled. Selectmenuitem3(Removeadisk)fromthevxdiskadmmainmenu. Removeadisk Menu:VolumeManager/Disk/RemoveDisk Usethisoperationtoremoveadiskfromadiskgroup.This operationtakes,asinput,adiskname.Thisisthesamename thatyougavetothediskwhenyouaddedthedisktothedisk group. Enterdiskname[<disk>,list,q,?]disk01 Requestedoperationistoremovediskdisk01fromgrouprootdg.

Continuewithoperation?[y,n,q,?](default:y) Removalofdiskdisk01iscomplete. Removeanotherdisk?[y,n,q,?](default:n) 2.4Removeadiskforreplacement Thisoptionisusedforremovingthediskbutretainingthenameofthedisksothatitcanbeusedbythenewly replaceddisk.Thereplacementdiskcanbeanewlyaddeddiskoralreadyavailablediskintheotherdiskgroups Selectmenuitem4(Removeadiskforreplacement)fromthevxdiskadmmainmenu. Removeadiskforreplacement Menu:VolumeManager/Disk/RemoveForReplace Usethismenuoperationtoremoveaphysicaldiskfromadisk group,whileretainingthediskname.Thischangesthestate forthedisknametoaremoveddisk.Ifthereareany initializeddisksthatarenotpartofadiskgroup,youwillbe giventheoptionofusingoneofthesedisksasareplacement. Enterdiskname[<disk>,list,q,?]disk02 Additionalscreensdisplayiftherearevolumesassociatedwiththediskyouwanttoremove.Youhavetodecideif dataisneededornotneededandanswerthepromptsasasked. Thefollowingdevicesareavailableasreplacements: c1t1d0 Youcanchooseoneofthesedisksnow,toreplacedisk02. Select"none"ifyoudonotwishtoselectareplacementdisk. Chooseadevice,orselect"none" [<device>,none,q,?](default:c1t1d0) Requestedoperationistoremovediskdisk02fromgrouprootdg. Theremoveddiskwillbereplacedwithdiskdevicec1t1d0. Continuewithoperation?[y,n,q,?](default:y) Removalofdiskdisk02completedsuccessfully. Proceedingtoreplacedisk02withdevicec1t1d0. Diskreplacementcompletedsuccessfully. Removeanotherdisk?[y,n,q,?](default:n)

2.5Replaceafailedorremoveddisk Thisoptionisusedtoreplaceafailedorremoveddisk.Thenewdiskcanbeinitializedornoninitializedasthis optiondoesinitialization. Selectmenuitem5(Replaceafailedorremoveddisk)fromthevxdiskadmmainmenu. Replaceafailedorremoveddisk Menu:VolumeManager/Disk/ReplaceDisk Usethismenuoperationtospecifyareplacementdiskforadisk thatyouremovedwiththe"Removeadiskforreplacement"menu operation,orthatfailedduringuse.Youwillbepromptedfor adisknametoreplaceandadiskdevicetouseasareplacement. Youcanchooseanuninitializeddisk,inwhichcasethediskwill beinitialized,oryoucanchooseadiskthatyouhavealready initializedusingtheAddorinitializeadiskmenuoperation. Selectaremovedorfaileddisk[<disk>,list,q,?]disk02 Thefollowingdevicesareavailableasreplacements: c1t0d0s2c1t1d0s2 Youcanchooseoneofthesediskstoreplacedisk02. Choose"none"toinitializeanotherdisktoreplacedisk02. Chooseadevice,orselect"none" [<device>,none,q,?](default:c1t0d0s2) Therequestedoperationistousetheinitializeddevicec1t0d0s2 toreplacetheremovedorfaileddiskdisk02indiskgrouprootdg. Continuewithoperation?[y,n,q,?](default:y) Replacementofdiskdisk02ingrouprootdgwithdiskdevice c1t0d0s2completedsuccessfully. 2.6Mirrorvolumesonadisk volumescanbemirroredtoanotherdiskwithavailablespacehoweveritcannotbeusedtomirrorexistingmirrorsor mirrorsspanningmorethanonesubdisk. Tomirrorvolumesonadisk,makesurethatthetargetdiskhasanequalorgreateramountofspaceastheoriginating diskandthendothefollowing Selectmenuitem6(Mirrorvolumesonadisk)fromthevxdiskadmmainmenu. Mirrorvolumesonadisk Menu:VolumeManager/Disk/Mirror Thisoperationcanbeusedtomirrorvolumesonadisk.These volumescanbemirroredontoanotherdiskorontoany availablediskspace.Volumeswillnotbemirrorediftheyare

alreadymirrored.Also,volumesthatarecomprisedofmorethan onesubdiskwillnotbemirrored. Mirroringvolumesfromthebootdiskwillproduceadiskthatcan beusedasanalternatebootdisk. Enterdiskname[<disk>,list,q,?]disk02 Youcanchoosetomirrorvolumesfromdiskdisk02ontoany availablediskspace,oryoucanchoosetomirrorontoaspecific disk.Tomirrortoaspecificdisk,selectthenameofthatdisk. Tomirrortoanyavailablediskspace,select"any". Enterdestinationdisk[<disk>,list,q,?](default:any)disk01 NoteBesuretoalwaysspecifythedestinationdiskwhenyouarecreatinganalternaterootdisk.Otherwise,the volumemanagerwillselectspaceavailableinthediskgroupwhichmightspandiskandwillresultinbootfailurefrom thisdisk. 2.7Movevolumesfromadisk Thisoptionisusedincasethediskistobereplacedorremovedandhasactivevolumesonthedisk..Alsovolumes canbemovedtodifferentdiskgroupsforbetterspace,performanceetc. Selectmenuitem7(Movevolumesfromadisk)fromthefromthefromthefromthevxdiskadmmainmenu. Movevolumesfromadisk Menu:VolumeManager/Disk/Evacuate Usethismenuoperationtomoveanyvolumesthatareusinga diskontootherdisks.Usethismenuimmediatelypriorto removingadisk,eitherpermanentlyorforreplacement.Youcan specifyalistofdiskstomovevolumesonto,oryoucanmovethe volumestoanyavailablediskspaceinthesamediskgroup. NOTE:Simplymovingvolumesoffofadisk,withoutalsoremoving thedisk,doesnotpreventvolumesfrombeingmovedonto thediskbyfutureoperations.Forexample,usingtwo consecutivemoveoperationsmaymovevolumesfromthe seconddisktothefirst. Enterdiskname[<disk>,list,q,?]disk01 Youcannowspecifyalistofdiskstomoveonto.Specifyalist ofdiskmedianames(e.g.,disk01)allononelineseparatedby blanks.Ifyoudonotenteranydiskmedianames,thenthe volumeswillbemovedtoanyavailablespaceinthediskgroup. Requestedoperationistomoveallvolumesfromdiskdisk01in grouprootdg. NOTE:Thisoperationcantakealongtimetocomplete.

Continuewithoperation?[y,n,q,?](default:y) Movevolumevol3... Movevolumevol3bk00... Evacuationofdiskdisk01iscomplete. Movevolumesfromanotherdisk?[y,n,q,?](default:n) 2.8Enableaccessto(import)adiskgroup Usedinenablingownershipoftheothersystemtoadiskgroupwhichhasbeendeportedbytheothersystem.Used infailoverconfigurationswheretheownershipofashareddisk/diskgroupistransferredtotheothersystemincase offailureofcurrentsystem. Selectmenuitem8(Enableaccessto(import)adiskgroup)fromthevxdiskadmmainmenu. Enableaccessto(import)adiskgroup Menu:VolumeManager/Disk/EnableDiskGroup Usethisoperationtoenableaccesstoadiskgroup.Thiscanbe usedasthefinalpartofmovingadiskgroupfromonesystemto another.Thefirstpartofmovingadiskgroupistousethe "Removeaccessto(deport)adiskgroup"operationonthe originalhost. Adiskgroupcanbeimportedfromanotherhostthatfailedwithout firstdeportingthediskgroup.Besurethatalldisksinthedisk grouparemovedbetweenhosts. IftwohostsshareaSCSIbus,beverycarefultoensurethatthe otherhostreallyhasfailedorhasdeportedthediskgroup.If twoactivehostsimportadiskgroupatthesametime,thedisk groupwillbecorruptedandwillbecomeunusable. Selectdiskgrouptoimport[<group>,list,q,?](default:list) newdg Theimportofnewdgwassuccessful. Selectanotherdiskgroup?[y,n,q,?](default:n) 2.9Disableaccessto(deport)adiskgroup Diskgroupisdeportedifdisksgroupsownershipneedstobetransferredtoanothersystemorallthedisksinadisk groupsneedstobefreedfromgroup.Disksinadiskgroupstobedeportedshouldnotbeactive. Selectmenuitem9(Removeaccessto(deport)adiskgroup)fromthevxdiskadmmainmenu. Removeaccessto(deport)adiskgroup Menu:VolumeManager/Disk/DeportDiskGroup Usethismenuoperationtoremoveaccesstoadiskgroupthatis currentlyenabled(imported)bythissystem.Deportadisk

groupifyouintendtomovethedisksinadiskgrouptoanother system.Also,deportadiskgroupifyouwanttouseallofthe disksremaininginadiskgroupforsomenewpurpose. Youwillbepromptedforthenameofadiskgroup.Youwillalso beaskedifthedisksshouldbedisabled(offlined).For removablediskdevicesonsomesystems,itisimportantto disableallaccesstothediskbeforeremovingthedisk. Enternameofdiskgroup[<group>,list,q,?](default:list)newdg Therequestedoperationistodisableaccesstotheremovable diskgroupnamednewdg.Thisdiskgroupisstoredonthe followingdisks: newdg01ondevicec1t1d0s2 Youcanchoosetodisableaccessto(alsoknownas"offline") thesedisks.Thismaybenecessarytopreventerrorsif youactuallyremoveanyofthedisksfromthesystem. Disable(offline)theindicateddisks?[y,n,q,?](default:n) Continuewithoperation?[y,n,q,?](default:y) Removalofdiskgroupnewdgwassuccessful. Disableanotherdiskgroup?[y,n,q,?](default:n) 2.10Enable(online)adiskdevice Diskswhichareturnedofflinebyvolumemanager,orwhicharetobeimportedcanbeenabledbythisoption.This operationcausesdiskstobescannedandfindoutthediskbelongingtoadiskgroup. Selectmenuitem10(Enable(online)adiskdevice)fromthevxdiskadmmainmenu. Enable(online)adiskdevice Menu:VolumeManager/Disk/OnlineDisk Usethisoperationtoenableaccesstoadiskthatwasdisabled withthe"Disable(offline)adiskdevice"operation. Youcanalsousethisoperationtorescanadiskthatmayhave beenchangedoutsideoftheVolumeManager.Forexample,ifadisk issharedbetweentwosystems,theVolumeManagerrunningonthe othersystemmayhavechangedthedisk.Ifso,youcanusethis operationtorescanthedisk. NOTE:Manyvxdiskadmoperationsrescandiskswithoutuser intervention.Thiswilleliminatemostneedstoonlinea diskdirectly,exceptwhenthediskisdirectlyofflined. Selectadiskdevicetoenable[<address>,list,q,?]c1t1d0

Enableanotherdevice?[y,n,q,?](default:n) 2.11Disable(offline)adiskdevice Thisoptiondisablesallaccesstoadiskwhichisnotpartofanydiskgroup.Thisisusedtoremovediskfromvolume group.Somesystemsdonotsupportdisksthatcanberemovedfromasystemduringnormaloperation.Onsuch systems,theofflineoperationisnotveryuseful. Selectmenuitem11(Disable(offline)adiskdevice)fromthevxdiskadmmainmenu. Disable(offline)adiskdevice Menu:VolumeManager/Disk/OfflineDisk Usethismenuoperationtodisableallaccesstoadiskdevice bytheVolumeManager.Thisoperationcanbeappliedonlyto disksthatarenotcurrentlyinadiskgroup.Usethisoperation ifyouintendtoremoveadiskfromasystemwithoutrebooting. NOTE:Manysystemsdonotsupportdisksthatcanberemovedfrom asystemduringnormaloperation.Onsuchsystems,the offlineoperationisseldomuseful. Selectadiskdevicetodisable[<address>,list,q,?]c1t1d0 Disableanotherdevice?[y,n,q,?](default:n) 2.12Markadiskasaspareforadiskgroup Thisisusedtoreservethediskasanautomaticreplacementdisk(hotrelocation)incaseofanotherdiskinthedisk groupfails.Hotrelocationrelocatesredundantsubdiskstootherdisksandrestorestheaffectedvolumemanager objectsanddata.Ifadiskhasalreadybeendesignatedasaspareinthediskgroup,thesubdisksfromthefaileddisk arerelocatedtothesparedisk.Otherwise,anysuitablefreespaceinthediskgroupisused. Selectmenuitem12(Markadiskasaspareforadiskgroup)fromthevxdiskadmmainmenu. Markadiskasaspareforadiskgroup Menu:VolumeManager/Disk/MarkSpareDisk Usethisoperationtomarkadiskasaspareforadiskgroup. Thisoperationtakes,asinput,adiskname.Thisisthesamename thatyougavetothediskwhenyouaddedthedisktothediskgroup. Enterdiskname[<disk>,list,q,?]disk01 Markingofdisk01inrootdgasasparediskiscomplete. Markanotherdiskasaspare?[y,n,q,?](default:n) AnyVMdiskinthisdiskgroupcannowusethisdiskasaspareintheeventofafailure.Ifadiskfails,hotrelocation shouldautomaticallyoccur.Thefaileddiskneedstobereplaced.

2.13Turnoffthespareflagonadisk ThisisusedtoremoveaVMDiskFromtheHotRelocationPool&freehotrelocationsparedisksforuseasregular volumemanagerdisksWhileadiskisdesignatedasaspare,thespaceonthatdiskisnotusedasfreespaceforthe creationofvolumemanagerobjectswithinitsdiskgroupandthisoptionmakesthisspaceavailable. Selectmenuitem13(Turnoffthespareflagonadisk)fromthevxdiskadmmainmenu. Turnoffthespareflagonadisk Menu:VolumeManager/Disk/UnmarkSpareDisk Usethisoperationtoturnoffthespareflagonadisk. Thisoperationtakes,asinput,adiskname.Thisisthesame namethatyougavetothediskwhenyouaddedthedisktothe diskgroup. Enterdiskname[<disk>,list,q,?]disk01 Diskdisk01inrootdgnolongermarkedasasparedisk. Turnoffspareflagonanotherdisk?[y,n,q,?](default:n)

Afterusingthevxdiskadmforconfiguringdisksanddiskgroupsnextstepistoconfigurevolumesandthenusethem forstorageoperations.Thesecondpartofthisarticlediscussesthisaspectofvolumemanager.

VeritasVolumeManagerPart2

vxassist General 1.CreatingaVolume 1.1CreatingaConcatenatedVolume 1.2CreatingaStripedVolume 1.3CreatingaRAID5Volume 2.ExtendingaVolume 2.1Extendingavolumeuptocertainlength, 2.2ExtendingbyaGivenLength 3.ShrinkingaVolume 3.1ShrinkingtoaGivenLength 3.2ShrinkingbyaGivenLength 4.RemovingaVolume 5.MirroringaVolume 5.1Creating&MirroringaNewVolume 5.2MirroringanExistingVolume 5.3MirroringAllVolumes 6.RemovingaMirror 7.AddingaRAID5Log 8.AddingaDRLLog 9.RemovingaRAID5Log 10.PreparingaVolumeforOnlineBackup 11.DisplayingVolumeConfigurationInformation General ThevxassistutilityinVeritasVolumeManagerisusedtocreatevolumes,addmirrorsandlogstoexistingvolumes, extendandshrinkexistingvolumes,providesforthemigrationofdatafromaspecifiedsetofdisks,andprovides facilitiesfortheonlinebackupofexistingvolumes. Thedefaultbehaviorofvxassististocreatevolumesintherootdgdiskgroupifdiskgroupisnotspecified.Thedefault lengthistakenasnumberofblocksbutthiscanbespecifiedinKilobytesorMegabytesorGigabytes. vxassistcommandsyntax: vxassist<option><Keyword>volume_name[attributes] Commonlyusedoptionsaregivenbelow(Seemanvxassistforcompletelistofsupportedoptions) gforspecifyingdiskgroups bforbackgroundoperation dfilecontainingdefaultsforvxassistifnotspecified/etc/default/vxassistisused Keywordsusedaremake,mirror,move,growto,growby,shrintto,shirnkby,snapstart,snapshot ,snapwait Attributesspecifyvolumeslayoutdiskscontrollartoincludeexcludeetc DeviceNodes: Defaultrootdgdiskgroup. BlockDeviceNode/dev/vx/dsk/volume_name RawDeviceNode/dev/vx/rdsk/volume_name OtherDiskGroups BlockDeviceNode/dev/vx/dsk/diskgroup_name/volume_name RawDeviceNode/dev/vx/rdsk/diskgroup_name/volume_name _______________________________________

1.CreatingaVolume: 1.1CreatingaConcatenatedVolume Bydefault,vxassistcreatesaconcatenatedvolumeusingthespaceavailableonadiskoronthenumberofdisksina diskgroupifthevolumesizespecifiedismorethentheoneavailableonasingledisk. Diskscanbespecifiedfromadiskgroupforavolumegroupbutifnotmentionedavailabledisksareselectedbythe volumemanager. Commandsyntax: vxassistmakevolume_namevolume_length Tocreateanewvolumeappvolof100MBinthedefaultdiskgrouprootdgwithavailabledisks: #vxassistmakeappvol100m Tocreatethevolumeappvolof100MBondisk03 #vxassistmakeappvol100mdisk03 1.2CreatingaStripedVolume Astripedvolumecontainsatleastoneplexthatconsistsoftwoormoresubdiskslocatedontwoormorephysical disks. CommandSyntax: vxassistmakevolume_namelengthlayout=stripe Tocreateastripedvolumeappvol2withthedefaultstripeunitsizeonthedefaultnumberofdisks #vxassistmakeappvol2100mlayout=stripe Tocreateastripedvolumeappvol2100MBstripedvolumeonthreespecificdisks. #vxassistmakeappvol2100mlayout=stripedisk04disk05disk06 1.3CreatingaRAID5Volume ARAID5volumecontainsaRAID5plexthatconsistsoftwoormoresubdiskslocatedontwoormorephysicaldisks. OnlyoneRAID5plexcanexistpervolume.ARAID5volumemayalsocontainoneormoreRAID5logplexes,which areusedtologinformationaboutdataandparitybeingwrittentothevolume. CommandSyntax: vxassistmakevolume_namelengthlayout=raid5 TocreatetheRAID5volumeappvol4withthedefaultstripeunitsizeonthedefaultnumberofdiskswithRAID5log,

#vxassistmakeappvol4100mlayout=raid5. 2.ExtendingaVolume Caution:Ifyouplantousevolumesizechange(groworshrink)onavolumewithdatamakesureyouhavethegood backupofthevolumeavailablebeforecarryingoutsuchoperation. 2.1Extendingavolumeuptocertainlength, Commandsyntax vxassistgrowtovolume_namelength Toextendvol3upto8000sectors,type: #vxassistgrowtovol38000 2.2ExtendingbyaGivenLength CommandSyntax vxassistgrowbyvolume_namelength Toextendvolappby1000sectors,type: #vxassistgrowbyvolapp1000 3.ShrinkingaVolume CautionDonotshrinkavolumebelowthesizeofthefilesystem.IfyouhaveaVxFSfilesystem,youcanshrinkthe filesystemandthenshrinkthevolume.Ifyoudonotshrinkthefilesystemfirst,youriskunrecoverabledataloss. Alwaysmakesureyouhaveagoodbackupofthedatavolumetobeshirnked. 3.1ShrinkingtoaGivenLength Shrinkavolumetoaspecificlengthasfollows: vxassistshrinktovolume_namelength Makesureyoudonotshrinkthevolumebelowthecurrentsizeofthefilesystemordatabaseusingthevolume.This commandcanbesafelyusedonemptyvolumes. Toshrinkvolcatto1300sectors,type: #vxassistshrinktovolcat1300 3.2ShrinkingbyaGivenLength Shrinkavolumebyaspecificlengthasfollows: vxassistshrinkbyvolume_namelength

Toshrinkvolcatby8000sectors,type: #vxassistshrinkbyvolapp28000 4.RemovingaVolume Removingavolumerequiresremovingallreferencestothevolumestoberemovedlikeunmountingthevolumeif mountedandremovingitsreferencefrom/etc/vfstab. Anactivevolumehastobestoppedfirsttostopalltheactivitiestothevolumeonlythenitcanberemoved StoppingVolume: CommandSyntax vxvolstopvolume_name Tostopappvol1 #vxvolstopappvol1 RemovingVolume CommandSyntax vxeditrfrmvolume_name Toremovethevolumeappvol1 #vxeditrfrmappvol11 5.MirroringaVolume Mirroringallowdatatobewrittensimultaneouslytotwodiskssothatincaseoffailureofonediskdataisavailable fromtheothermirroreddisk.Bootdiskscanbemirrioredtoprovidealternatebootingdisk. 5.1Creating&MirroringaNewVolume CommandSyntax: vxassistmakevolume_namelengthlayout=mirror Tocreatethemirroredvolume,appvol22of100mb #vxassistmakeappvol22100mlayout=mirror TocreateavolumewithDirtyRegionLoggingenabled #vxassistmakevolume_namelengthlayout=mirror,log 5.2MirroringanExistingVolume

Commandsyntax vxassistmirrorvolume_name Creatingamirrorofvolumevol44: #vxassistmirrorvol44 5.3MirroringAllVolumes Tomirrorallexistingvolumestoavailablediskspace /etc/vx/bin/vxmirrora 6.RemovingaMirror Removingamirrorinvolvesfirstdissociatingtheplexfromitsvolumeandthenremovingtheplexandanyassociated subdiskscompletely.Thelastvalidmirrorplexassociatedwithavolumecannotberemoved. Dissociateandremovetheplexfromitsvolumeasfollows: vxplexormdisplex_name vxprinthshowsthevolumeandassociatedplexes: Diskgroup:rootdgTYNAMEASSOCKSTATELENGTHPLOFFSSTATETUTIL0PUTIL0vvolmfsgenENABLED10240 ACTIVEplvolm01volmENABLED10240ACTIVEsddisk0102volm01102400plvolm02volmENABLED 10240ACTIVEsddisk0203volm02102400 Todisassociateandremovevolmir02fromvolmir,type: #vxplexormdisvolm02 Theoutputofvxprinthforvolmnowshowsvolumevolmwithonlyoneplex:: Diskgroup:rootdgTYNAMEASSOCKSTATELENGTHPLOFFSSTATETUTIL0PUTIL0vvolmfsgenENABLED10240 ACTIVEplvolm01volmirENABLED10240ACTIVEsddisk0102volmir01102400 7.AddingaRAID5Log ARAID5logmaintainsacopyofthedataandparitybeingwrittentothevolumeatanygiventime.Ifasystemfailure occurs,VxVMcanreplaytheRAID5logtoresynchronizethevolume.Thiscopiesthedataandparitythatwasbeing writtenatthetimeoffailurefromthelogtotheappropriateareasoftheRAID5volume. RAID5logplexesareusedtologinformationaboutdataandparitybeingwrittentotheraidvolume.Alogplexis createdforthevolumebydefaultwhenaraidvolumeiscreatedbutadditionalonescanbeaddedbyfollowing command. vxassistaddlogname_of_raid5_vol 8.AddingaDRLLog

Dirtyregionlogging(DRL)isusedwithmirroredvolumelayouts.DRLkeepstrackoftheregionsthathavechangeddue toI/Owritestoamirroredvolume.Priortoeverywrite,abitmapiswrittentoalogtorecordtheareaofthediskthat isbeingchanged.Incaseofsystemfailure,DRLusesthisinformationtorecoveronlytheportionsofthevolumethat needtoberecovered. ToputDirtyRegionLoggingintoeffectforavolume,alogsubdiskmustbeaddedtothatvolumeandthevolume mustbemirrored.Onlyonelogsubdiskcanexistperplex. Thefollowingexamplecreatesalogforthemirroredvolumevol03: #vxassistaddlogvol03 Whenvxassistisusedtoaddalogsubdisktoavolume,alogplexisalsocreatedtocontainthelogsubdisk,bydefault. Oncecreated,theplexcontainingalogsubdiskcanbetreatedasaregularplex.Datasubdiskscanbeaddedtothelog plex.Thelogplexandlogsubdiskcanberemovedusingthesameproceduresusedtoremoveordinaryplexesand subdisks. 9.RemovingaRAID5Log RemovingaRAID5loginvolvesfirstdissociatingthelogfromitsvolumeandthenremovingthelogandany associatedsubdiskscompletely. Dissociatethelogfromitsvolumeasfollows: #vxplexormdisplex_name Toidentifythelogplex,usethecommand: vxprinthtraid5_volume_name Todisassociatethelogplexvolrd02fromvolrd,type: #vxplexormdisvolrd02 Theoutputofvxprinthforvolrdnowshows: Diskgroup:rootdgTYNAMEASSOCKSTATELENGTHPLOFFSSTATETUTIL0PUTIL0vvolrdraid5ENABLED32ACTIVE plvolrd01volrdENABLED32ACTIVEsddisk0102volrd01320sddisk0203volrd01320 10.PreparingaVolumeforOnlineBackup Volumemanagerprovidesaneasywaytotakebackupoftheonlinedatabycreatinganofflinesnapshotmirrorofthe volume. Thevxassistsnapstartoperationcreatesawriteonlybackupmirror,whichisattachedtoandsynchronizedwiththe volumetobebackedupandlaterdetachedandmadeofflinebyvxassistsnapshotcommand.Thesnapshotvolume canbeusedbybackuputilitieswhiletheoriginalvolumecontinuestobeavailableforapplicationsandusers.

ThevolumebackupmethoddescribedheredoesnotapplytoRAID5volumes. Backingupavolumewithvxassistinvolvesthefollowingprocedure Createasnapshotmirror snapstartstartscreatingaonlinesnapshotmirrorofthevolumeusingtheavailablediskspace.Thesnapshotis completedwithvxassistsnapshotcommandwhenofflinesnapshotvolumeiscreatedwithauserdefinedname. CommandSyntax:

vxassistsnapstartvolume_name

Tocreateasnapshotmirrorofavolumecalledvol8,type

#vxassistsnapstartvol8

Createasnapshotvolume CommandSyntax vxassistsnapshotvolume_namenew_volume_name Tocreateasnapshotvolumeofvol8,type: #vxassistsnapshotvol8snapvol8 Youcannowbackupthesnapshotvolumebywhatevermeansyouprefer.Toavoidwastingspace,youcanthen removethesnapshotvolume,whichoccupiesasmuchspaceastheoriginalvolume 11DisplayingVolumeConfigurationInformation Thevxprintcommandcanbeusedtodisplayinformationabouthowavolumeisconfigured. Displaythevolume,mirror,andsubdiskrecordinformationforallvolumesasfollows: #vxprintht Diskgroup:rootdg DGNAMENCONFIGNLOGMINORSGROUPID DMNAMEDEVICETYPEPRIVLENPUBLENSTATE VNAMEUSETYPEKSTATESTATELENGTHREADPOLPREFPLEX PLNAMEVOLUMEKSTATESTATELENGTHLAYOUTNCOL/WIDMODE SDNAMEPLEXDISKDISKOFFSLENGTH[COL/]OFFDEVICEMODE dgrootdg759096729.1025.tweety dmdisk10c1t0d0s2sliced5591044400 dmdisk20c2t0d0s2sliced5591044400 vpubsfsgenENABLEDACTIVE2288SELECT

plpubs01pubsENABLEDACTIVE2288CONCATRW sddisk1001pubs01disk10022880c0t0d0ENA vvol8fsgenENABLEDACTIVE20480SELECT plvol801vol8ENABLEDACTIVE20480CONCATRW sddisk1002vol80disk102288204800c0t1d0ENA wheredgisadiskgroup,dmisadisk,visavolume,plisaplex,andsdisasubdisk.Thetopfewlinesindicatethe headersthatmatcheachtypeofoutputlinethatfollows.Eachvolumeislistedalongwithitsassociatedplex(es)and subdisk(s). Displayvolumerelatedinformationforaspecificvolumeasfollows: #vxprinttvolume_name Todisplayinformationaboutvol8,type: #vxprinttvol8

You might also like