Você está na página 1de 86

SVM Quick Reference Guide Reference: - Solaris Volume Manager Administration Guide Part No: 816 !

"#$ 1# SM% Ser&ices associated 'it( SVM )o c(eck t(e SM% ser&ices associated 'it( Solaris Volume Manager* use t(e follo'ing form of t(e s&cs command: # svcs -a | egrep "md|meta" disa+led disa+led disa+led online online online online 1#:$":!" 1#:$":!" 1#:$":!" 1#:$":./ 1#:$":!6 1#:$":!8 1#:$":"1 s&c:,net'ork,r-c,mdcomm:default s&c:,net'ork,r-c,metamed:default s&c:,net'ork,r-c,metam(:default s&c:,s0stem,metainit:default s&c:,net'ork,r-c,meta:default s&c:,s0stem,fmd:default s&c:,s0stem,mdmonitor:default

1f t(e Solaris Volume Manager configuration consists of a local set onl0* t(en t(ese ser&ices s(ould +e online: svc:/system/metainit svc:/network/rpc/meta svc:/system/mdmonitor 1f t(e Solaris Volume Manager configuration includes disk sets* t(en t(ese additional ser&ices s(ould +e online: svc:/network/rpc/metamed svc:/network/rpc/metamh 1f t(e Solaris Volume Manager includes multi-node disk sets* t(en t(is ser&ice s(ould +e online in addition to t(e ot(er ser&ices alread0 mentioned: svc:/network/rpc/mdcomm SVM State Database and Replicas )(e Solaris Volume Manager state data+ase contains configuration and status information for all &olumes* (ot s-ares* and disk sets2 Solaris Volume Manager maintains multi-le co-ies 3re-licas4 of t(e state data+ase to -ro&ide redundanc0 and to -re&ent t(e data+ase from +eing corru-ted during a s0stem cras( 3at most* onl0 one data+ase co-0 'ill +e corru-ted42 )(e state data+ase re-licas ensure t(at t(e data in t(e state data+ase is al'a0s &alid2 5(en t(e state data+ase is u-dated* eac( state data+ase re-lica is also u-dated2 )(e u-dates occur one at a time 3to -rotect against corru-ting all u-dates if t(e s0stem cras(es42 1f 0our s0stem loses a state data+ase re-lica* Solaris Volume Manager must figure out '(ic( state data+ase re-licas still contain &alid data2 Solaris Volume Manager determines t(is information +0 using a majority consensus 1

algorithm2 )(is algorit(m re6uires t(at a ma7orit0 3(alf 8 14 of t(e state data+ase re-licas +e a&aila+le and in agreement +efore an0 of t(em are considered &alid2 9ecause of t(e re6uirements of t(e ma7orit0 consensus algorit(m* 0ou must create at least t(ree state data+ase re-licas '(en 0ou set u- 0our disk configuration2 A consensus can +e reac(ed as long as at least t'o of t(e t(ree state data+ase re-licas are a&aila+le2 :uring +ooting* Solaris Volume Manager ignores corru-ted state data+ase re-licas2 1n some cases* Solaris Volume Manager tries to re'rite state data+ase re-licas t(at are corru-ted2 ;t(er'ise* t(e0 are ignored until 0ou re-air t(em2 1f a state data+ase re-lica +ecomes corru-ted +ecause its underl0ing slice encountered an error* 0ou need to re-air or re-lace t(e slice and t(en ena+le t(e re-lica2 1f all state data+ase re-licas are lost* 0ou could* in t(eor0* lose all data t(at is stored on 0our Solaris Volume Manager &olumes2 %or t(is reason* it is good -ractice to create enoug( state data+ase re-licas on se-arate dri&es and across controllers to -re&ent catastro-(ic failure2 1t is also 'ise to sa&e 0our initial Solaris Volume Manager configuration information* as 'ell as 0our disk -artition information2 State data+ase re-licas are also used for RA1:-1 &olume res0nc(roni<ation regions2 )oo fe' state data+ase re-licas relati&e to t(e num+er of mirrors mig(t cause re-lica 1,; to im-act RA1:-1 &olume -erformance2 )(at is* if 0ou (a&e a large num+er of mirrors* make sure t(at 0ou (a&e at least t'o state data+ase re-licas -er RA1:-1 &olume* u- to t(e ma=imum of "$ re-licas -er disk set2 90 default eac( state data+ase re-lica for &olumes* t(e local set and for disk sets occu-ies ! M+0tes 381/# disk sectors4 of disk storage2 )(e default si<e of a state data+ase re-lica for a multi-o'ner disk set is 16 M+0tes2 Re-licas can +e stored on t(e follo'ing de&ices: A dedicated local disk -artition A local -artition t(at 'ill +e -art of a &olume A local -artition t(at 'ill +e -art of a >%S logging de&ice Re-licas cannot +e stored on t(e root 3,4* s'a-* or ,usr slices2 Nor can re-licas +e stored on slices t(at contain e=isting file s0stems or data2 After t(e re-licas (a&e +een stored* &olumes or file s0stems can +e -laced on t(e same slice2 ow to !reate State Database Replicas # metadb -a -c num+er -l lengt(-of re-lica -f ctds-of-slice -a S-ecifies to add or create a state data+ase re-lica2 -f S-ecifies to force t(e o-eration* e&en if no re-licas e=ist2 -c num+er S-ecifies t(e num+er of re-licas to add to t(e s-ecified slice2 -l lengt(-of-re-lica S-ecifies t(e si<e of t(e ne' re-licas* in +locks2 )(e default si<e is 81/#2 )(is si<e s(ould +e a--ro-riate for &irtuall0 all configurations* including t(ose configurations 'it( t(ousands of logical &olumes2 ctds-of-slice S-ecifies t(e name of t(e com-onent t(at 'ill (old t(e re-lica2 ?=am-le 1 @reating t(e %irst State :ata+ase Re-lica # metadb -a -f c0t0d0s7 # metadb flags first +lk +lock count au 16 81/# ,de&,dsk,c$t$d$sA Bou must use t(e -f o-tion along 'it( t(e -a o-tion to create t(e first state data+ase re-lica2 )(e a o-tion adds state data+ase re-licas to t(e s0stem2 )(e -f o-tion forces t(e creation of t(e first re-lica 3and ma0 +e omitted '(en 0ou add su--lemental re-licas to t(e s0stem42 ?=am-le # Adding )'o State :ata+ase Re-licas to t(e Same Slice #

# metadb -a -c " c1t3d0s1 # metadb flags first +lk +lock count au 16 81/# ,de&,dsk,c1t.d$s1 au 8#$8 81/# ,de&,dsk,c1t.d$s1 )(e -a o-tion adds state data+ase re-licas to t(e s0stem2 )(e -c # o-tion -laces t'o re-licas on t(e s-ecified slice2 )(e metad+ command c(ecks t(at t(e re-licas are acti&e* as indicated +0 t(e a flag in t(e metad+ command out-ut2 ?=am-le . @(ecking t(e Status of All State :ata+ase Re-licas # metadb -i flags first +lk +lock count a m - luo 16 81/# ,de&,dsk,c$t$d$sA a - luo 8#$8 81/# ,de&,dsk,c$t$d$sA a - luo 16!$$ 81/# ,de&,dsk,c$t$d$sA a - luo 16 81/# ,de&,dsk,c1t.d$s1 5-l 16 81/# ,de&,dsk,c#t.d$s1 a - luo 16 81/# ,de&,dsk,c1t1d$s. a - luo 8#$8 81/# ,de&,dsk,c1t1d$s. a - luo 16!$$ 81/# ,de&,dsk,c1t1d$s. r - re-lica does not (a&e de&ice relocation information o - re-lica acti&e -rior to last mdd+ configuration c(ange u - re-lica is u- to date l - locator for t(is re-lica 'as read successfull0 c - re-licaCs location 'as in ,etc,l&m,mdd+2cf - - re-licaCs location 'as -atc(ed in kernel m - re-lica is master* t(is is re-lica selected as in-ut 5 - re-lica (as de&ice 'rite errors a - re-lica is acti&e* commits are occurring to t(is re-lica M - re-lica (ad -ro+lem 'it( master +locks : - re-lica (ad -ro+lem 'it( data +locks % - re-lica (ad format -ro+lems S - re-lica is too small to (old current data +ase R - re-lica (ad de&ice read errors A legend of all t(e flags follo's t(e status2 )(e c(aracters in front of t(e de&ice name re-resent t(e status2 >--ercase letters indicate a -ro+lem status2 Do'ercase letters indicate an E;ka0F status2 ?=am-le ! Adding State :ata+ase Re-licas of a S-ecific Si<e 1f 0ou are re-lacing e=isting state data+ase re-licas* 0ou mig(t need to s-ecif0 a re-lica si<e2 Particularl0 if 0ou (a&e e=isting state data+ase re-licas 3on a s0stem u-graded from t(e Solstice :isk Suite -roduct* -er(a-s4 t(at s(are a slice 'it( a file s0stem* 0ou must re-lace e=isting re-licas 'it( ot(er re-licas of t(e same si<e or add ne' re-licas in a different location 2 # metadb -a -c # -l $%#& c0t0d0s7 # metadb flags first +lk +lock count au 16 1$.! ,de&,dsk,c$t$d$sA au 1$"$ 1$.! ,de&,dsk,c$t$d$sA au #$8! 1$.! ,de&,dsk,c$t$d$sA .

Go' to :elete State :ata+ase Re-licas # metadb -d -f ctds-of-slice -d S-ecifies to delete a state data+ase re-lica2 -f S-ecifies to force t(e o-eration* e&en if no re-licas e=ist2 ctds-of-slice S-ecifies t(e name of t(e com-onent t(at contains t(e re-lica2 Note t(at 0ou need to s-ecif0 eac( slice from '(ic( 0ou 'ant to remo&e t(e state data+ase re-lica2 ?=am-le :eleting State :ata+ase Re-licas # metadb -d f c0t0d0s7 )(is e=am-le s(o's t(e last re-lica +eing deleted from a slice2 Bou must add t(e -f o-tion to force t(e deletion of t(e last re-lica on t(e s0stem2

RA1:-$ Volumes3Stri-e and @oncatenation4 ;&er&ie' of RA1:-$ Volumes RA1:-$ &olumes are com-osed of slices or soft -artitions2 )(ese &olumes ena+le 0ou to e=-and disk storage ca-acit02 )(e0 can +e used eit(er directl0 or as t(e +uilding +locks for RA1:-1 3mirror4 &olumes and soft -artitions2 )(ere are t(ree kinds of RA1:-$ &olumes: Stri-e &olumes @oncatenation &olumes @oncatenated stri-e &olumes Note A component refers to any device, from slices to soft partitions, used in logical volume.

A stri-e &olume s-reads data e6uall0 across all com-onents in t(e &olume* '(ile a concatenation &olume 'rites data to t(e first a&aila+le com-onent until it is full* t(en mo&es to t(e ne=t a&aila+le com-onent2 A concatenated stri-e &olume is sim-l0 a stri-e &olume t(at (as +een e=-anded from its original configuration +0 adding additional com-onents2 %or se6uential 1,; o-erations on a concatenation &olume* Solaris Volume Manager reads all t(e +locks on t(e first com-onent* t(en all t(e +locks of t(e second com-onent* and so fort(2 ;n +ot( a concatenation &olume and a stri-e &olume* all 1,; o-erations occur in -arallel2 Bou can use a RA1:-$ &olume t(at contains multi-le com-onents for an0 file s0stem e=ce-t t(e follo'ing: root 3,4 ,usr s'a ,&ar ,o-t An0 file s0stem t(at is accessed during an o-erating s0stem u-grade or installation RA1:-$ 3Stri-e4 Volume

A RA1:-$3stri-e4 &olume is a &olume t(at arranges data across one or more com-onents2 Stri-ing alternates e6uall0-si<ed segments of data across t'o or more com-onents* forming one logical storage unit2 )(ese segments are interlea&ed round-ro+in so t(at t(e com+ined s-ace is made alternatel0 from eac( com-onent2 Stri-ing ena+les multi-le controllers to access data at t(e same time* '(ic( is also called -arallel access2 Parallel access can increase 1,; t(roug(-ut +ecause all disks in t(e &olume are +us0 most of t(e time ser&icing 1,; re6uests2 An e=isting file s0stem cannot +e con&erted directl0 to a stri-e2 )o -lace an e=isting file s0stem on a stri-e &olume* 0ou must +ack u- t(e file s0stem* create t(e &olume* t(en restore t(e file s0stem to t(e stri-e &olume2 1nterlace Values for a RA1: $ 3Stri-e4 Volume An interlace is t(e si<e* in H+0tes* M+0tes* or +locks* of t(e logical data segments on a stri-e &olume2 :e-ending on t(e a--lication* different interlace &alues can increase -erformance for 0our configuration2 )(e -erformance increase comes from (a&ing se&eral disk arms managing 1,; re6uests2 5(en t(e 1,; re6uest is larger t(an t(e interlace si<e* 0ou mig(t get +etter -erformance2 ScenarioIRA1:-$ 3Stri-e4 Volume %igure s(o's a stri-e &olume t(at is +uilt from t(ree com-onents 3slices42 1t also illustrates (o' data is 'ritten onto t(e &olume com-onents according to t(e interlace si<e and using t(e round-ro+in tec(ni6ue2 5(en SVM 'rites data onto t(e com-onents of a stri-e &olume* it 'rites data +locks of t(e interlace 'idt( to :isk A 3interlace 14* :isk 9 3interlace #4* and :isk @ 3interlace .42 SVM t(en re-eats t(e -attern 'riting to :isk A3interlace !4* :isk 9 3interlace "4* :isk @ 3interlace 64* and so fort(2 )(e interlace &alue sets t(e si<e of data 'ritten eac( time to a slice2 )(e total ca-acit0 of t(e stri-e &olume e6uals t(e num+er of com-onents multi-lied +0 t(e si<e of t(e smallest com-onent2

"

RA1:-$ 3@oncatenation4 Volume A RA1: $ 3concatenation4 &olume is a &olume '(ose data is organi<ed seriall0 and ad7acentl0 across com-onents* forming one logical storage unit2 >se a concatenation &olume to get more storage ca-acit0 +0 com+ining t(e ca-acities of se&eral com-onents2 Bou can add more com-onents to t(e concatenation &olume as t(e demand for storage gro's2 A concatenation &olume ena+les 0ou to d0namicall0 e=-and storage ca-acit0 and file s0stem si<es online2 A concatenation &olume allo's 0ou to add com-onents e&en if t(e ot(er com-onents are currentl0 acti&e2 A concatenation &olume can also e=-and an0 acti&e and mounted >%S file s0stem 'it(out (a&ing to +ring do'n t(e s0stem2 1n general* t(e total ca-acit0 of a concatenation &olume is e6ual to t(e total si<e of all t(e com-onents in t(e &olume2 1f a concatenation &olume contains a slice 'it( a state data+ase re-lica* t(e total ca-acit0 of t(e &olume is t(e sum of t(e com-onents minus t(e s-ace t(at is reser&ed for t(e re-lica2 Bou can also create a concatenation &olume from a single com-onent2 Dater* '(en 0ou need more storage* 0ou can add more com-onents to t(e &olume2 ScenarioIRA1:-$ 3@oncatenation4 Volume %igure illustrates a concatenation &olume t(at is +uilt from t(ree com-onents 3slices42 1t also illustrates (o' data is 'ritten onto t(e &olume com-onents according to t(e interlace si<e and onto eac( slice se6uentiall02 )(e data +locks are 'ritten se6uentiall0 across t(e com-onents* +eginning 'it( Slice A2 Bou can en&ision Slice A as containing logical data +locks 1 t(roug( !2 :isk 9 'ould contain logical data +locks " t(roug( 82 :ri&e @ 'ould contain logical data +locks / t(roug( 1#2 )(e total ca-acit0 of &olume 'ould +e t(e com+ined ca-acities of t(e t(ree slices2 1f eac( slice 'ere # G+0tes* t(e &olume 'ould (a&e an o&erall ca-acit0 of 6 G+0tes2

RA1:-$ 3@oncatenated Stri-e4 Volume A RA1: $3concatenated stri-e4 &olume is a stri-e t(at (as +een e=-anded +0 adding additional com-onents 3stri-es42 )o set t(e interlace &alue for a concatenated stri-e &olume* at t(e stri-e le&el* use t(e metattach 'i command2 ?ac( stri-e 'it(in t(e concatenated stri-e &olume can (a&e its o'n interlace &alue2 5(en 0ou create a concatenated stri-e &olume from scratc(* if 0ou do not s-ecif0 an interlace &alue for a -articular stri-e* it in(erits t(e interlace &alue from t(e -re&ious stri-e added to t(e &olume2 ?=am-leIRA1:-$ 3@oncatenated Stri-e4 Volume %igure illustrates a concatenated stri-e &olume t(at is a concatenation of t(ree stri-es2 6

)(e first stri-e consists of t(ree slices* Slice A t(roug( @* 'it( an interlace &alue of 16 H+0tes2 )(e second stri-e consists of t'o slices* Slice : and ?* and uses an interlace &alue of .# H+0tes2 )(e last stri-e consists of a t'o slices* Slice % and G2 9ecause no interlace &alue is s-ecified for t(e t(ird stri-e* it in(erits t(e &alue from t(e stri-e t(at 'as added +efore it* '(ic( in t(is case is .# H+0tes2 Se6uential data +locks are added to t(e first stri-e until t(at stri-e (as no more s-ace2 :ata +locks are t(en added to t(e second stri-e2 5(en t(is stri-e (as no more s-ace* data +locks are added to t(e t(ird stri-e2 5it(in eac( stri-e* t(e data +locks are interlea&ed according to t(e s-ecified interlace &alue2

RA1:-$ Volumes 3)ask Ma-4

)(e task ma- identifies t(e -rocedures t(at are needed to manage SVM RA1:-$ &olumes2

Go' to @reate a RA1:-$ 3Stri-e4 Volume >se t(e follo'ing form of t(e metainit command: # metainit volume-name number-of-stripes components-per-stripe interlace] component-names [ 'i

volume-name S-ecifies t(e name of t(e &olume to create2 number-of-stripes S-ecifies t(e num+er of stri-es to create2 components-per-stripe S-ecifies t(e num+er of com-onents eac( stri-e s(ould (a&e2 component-names S-ecifies t(e names of t(e com-onents t(at are used2 1f more t(an one com-onent is used* se-arate eac( com-onent 'it( a s-ace2 -i interlace S-ecifies t(e interlace 'idt( to use for t(e stri-e2 )(e interlace 'idt( is a &alue* follo'ed +0 eit(er JkC for kilo+0tes* JmC for mega+0tes* or J+C for +locks2 )(e interlace s-ecified cannot +e less t(an 16 +locks* or greater t(an 1$$ mega+0tes2 )(e default interlace 'idt( is 16 kilo+0tes2 ?=am-le @reating a RA1: $ 3Stri-e4 Volume of )(ree Slices # metainit d20 1 3 c0t1d0s2 c0t2d0s2 c0t3d0s2 d#$: @oncat,Stri-e is setu)(is e=am-le s(o's t(e stri-e* d#$* consists of a single stri-e 3t(e num+er 142 )(e stri-e is com-osed of t(ree slices 3t(e num+er .42 9ecause no interlace &alue is s-ecified* t(e stri-e uses t(e default of 16 H+0tes2 )(e s0stem confirms t(at t(e &olume (as +een set u-2 ?=am-le @reating a RA1:-$ 3Stri-e4 Volume of )'o Slices 5it( a .# H+0te 1nterlace # metainit d10 1 2 c0t1d0s2 c0t2d0s2 -i 32k d1$: @oncat,Stri-e is setu)(is e=am-le s(o's t(e stri-e* d1$* consists of a single stri-e 3t(e num+er 142 )(e stri-e is com-osed of t'o slices 3t(e num+er #42 )(e -i o-tion sets t(e interlace &alue to .# H+0tes2 3)(e interlace &alue cannot +e less t(an 8H+0tes* nor greater t(an 1$$ M+0tes24 )(e s0stem &erifies t(at t(e &olume (as +een set u-2 8

Go' to @reate a RA1:-$ 3@oncatenation4 Volume >se t(e follo'ing form of t(e metainit command: # metainit volume-name number-of-stripes components-per-stripe component-names volume-name S-ecifies t(e name of t(e &olume to create2 number-of-stripes S-ecifies t(e num+er of stri-es to create2 components-per-concatenation S-ecifies t(e num+er of com-onents eac( concatenation s(ould (a&e2 component-names S-ecifies t(e names of t(e com-onents t(at are used2 1f more t(an one com-onent is used* se-arate eac( com-onent 'it( a s-ace2 ?=am-le: @reating a @oncatenation of ;ne Slice # metainit d25 1 1 c0t1d0s2 d#": @oncat,Stri-e is setu)(is e=am-le s(o's t(e creation of a concatenation* d#"2 )(is concatenation consists of one stri-e 3t(e first num+er 14 com-osed of a single slice 3t(e second num+er 1 in front of t(e slice42 )(e s0stem &erifies t(at t(e &olume (as +een set u-2 )(e e=am-le s(o's a concatenation t(at can safel0 enca-sulate e=isting data2 ?=am-le: @reating a @oncatenation of %our Slices # metainit d40 4 1 c0t1d0s2 1 c0t2d0s2 1 c0t2d0s3 1 c0t2d1s3 d!$: @oncat,Stri-e is setu)(is e=am-le s(o's t(e creation of a concatenation* d!$2 )(e concatenation consists of four stri-es 3t(e num+er !4* eac( com-osed of a single slice 3t(e num+er 1 in front of eac( slice42 )(e s0stem &erifies t(at t(e &olume (as +een set u-2 Go' to ?=-and Storage @a-acit0 for ?=isting :ata $() *nmo+nt the ,ile system) # +mo+nt !iles"stem "() -o create a concatenation. +se the ,ollowing method: K>se t(e follo'ing form of t(e metainit command: # metainit volume-name number-of-stripes components-per-stripe component-names [ 'i interlace] volume-name S-ecifies t(e name of t(e &olume to create2 number-of-stripes S-ecifies t(e num+er of stri-es to create2 components-per-stripe S-ecifies t(e num+er of com-onents eac( stri-e s(ould (a&e2 component-names S-ecifies t(e names of t(e com-onents t(at are used2 1f more t(an one com-onent is used* se-arate eac( com-onent 'it( a s-ace2 #() /dit the /etc/v,stab ,ile so that the ,ile system re,erences the name o, the concatenation) &() Remo+nt the ,ile system) # mo+nt files"stem ?=am-le: ?=-anding a %ile S0stem +0 @reating a @oncatenation # +mo+nt docs # metainit d25 2 1 c0t1d0s2 1 c0t2d0s2 d#": @oncat,Stri-e is setu/

3?dit t(e ,etc,&fsta+ file so t(at t(e file s0stem references t(e &olume d#" instead of slice c$t1d$s#4 # mo+nt docs )(is e=am-le s(o's t(e creation of a concatenation* d#"* out of t'o slices* ,de&,dsk,c$t1d$s# 3'(ic( contains a file s0stem mounted on ,docs4 and ,de&,dsk,c$t#d$s#2 )(e file s0stem must first +e unmounted2 Note t(at t(e first slice in t(e metainit command must +e t(e slice t(at contains t(e file s0stem2 1f not* 0ou 'ill corru-t 0our data2 Ne=t* t(e entr0 for t(e file s0stem in t(e ,etc,&fsta+ file is c(anged 3or entered for t(e first time4 to reference t(e concatenation2 %or e=am-le* initiall0* t(e follo'ing line a--ears in t(e ,etc,&fsta+ file: /dev/dsk/c0t1d0s2 /dev/rdsk/c0t1d0s2 /docs ufs 2 yes -

)(is line s(ould +e c(anged to t(e follo'ing: /dev/md/dsk/d25 /dev/md/rdsk/d25 /docs ufs 2 yes -

%inall0* t(e file s0stem is remounted2 Go' to ?=-and an ?=isting RA1:-$ Volume A concatenated stri-e ena+les 0ou to e=-and an e=isting stri-e2 %or e=am-le* if a stri-e (as run out of storage ca-acit0* 0ou con&ert it into a concatenated stri-e2 :oing so allo's 0ou to e=-and 0our storage ca-acit0 'it(out (a&ing to +ack u- and restore data2 )(is -rocedure assumes t(at 0ou are adding an additional stri-e to an e=isting stri-e2 )o create a concatenated stri-e* use t(e follo'ing met(od: # metattach volume-name component-names volume-name S-ecifies t(e name of t(e &olume to e=-and2 component-names S-ecifies t(e names of t(e com-onents t(at are used2 1f more t(an one com-onent is used* se-arate eac( com-onent 'it( a s-ace2 ?=am-le: @reating a @oncatenated Stri-e +0 Attac(ing a Single Slice # metattach d2 c1t2d0s2 d#: com-onents are attac(ed )(is e=am-le illustrates (o' to attac( a slice to an e=isting stri-e* d#2 )(e s0stem confirms t(at t(e slice is attac(ed2 ?=am-le: @reating a @oncatenated Stri-e +0 Adding Se&eral Slices # metattach d25 c1t2d0s2 c1t2d1s2 c1t2d3s2 d#": com-onents are attac(ed )(is e=am-le takes an e=isting t(ree-'a0 stri-e* d#"* and concatenates anot(er t(ree-'a0 stri-e to it2 9ecause no interlace &alue is gi&en for t(e attac(ed slices* t(e stri-es in(erit t(e interlace &alue configured for d#"2 )(e s0stem &erifies t(at t(e &olume (as +een set u-2 Go' to Remo&e a RA1:-$ Volume $() Make s+re that yo+ have a c+rrent back+p o, all data and that yo+ have root privilege) "() Make s+re that yo+ no longer need the vol+me) 1f 0ou delete a stri-e or concatenation and reuse t(e slices t(at 'ere -art of t(e deleted &olume* all data on t(e &olume is deleted from t(e s0stem2 1$

#() *nmo+nt the ,ile system. i, needed) # +mo+nt files"stem &() -o remove a vol+me. +se one o, the ,ollowing methods: # metaclear volume-name ?=am-le: Remo&ing a @oncatenation # +mo+nt d# # metaclear d# d8: @oncat,Stri-e is cleared ( dit the /etc/vfsta! file" )(is e=am-le illustrates remo&ing t(e concatenation* d8 t(at also contains a mounted file s0stem2 )(e file s0stem must +e unmounted +efore t(e &olume can +e remo&ed2 )(e s0stem dis-la0s a confirmation message t(at t(e concatenation is remo&ed2 1f an entr0 in t(e ,etc,&fsta+ file e=ists for t(is &olume* delete t(at entr02 Bou do not 'ant to confuse t(e s0stem +0 asking it to mount a file s0stem on a none=istent &olume2 RA1:-13Mirror4 Volumes RA1:-13Mirror4 Volumes 3;&er&ie'4 A RA1:-1 &olume* or mirror* is a &olume t(at maintains identical co-ies of t(e data in RA1:-$ 3stri-e or concatenation4 &olumes2 )(e RA1:-$ &olumes t(at are mirrored are called su+mirrors2 Bou can mirror an0 file s0stem* including e=isting file s0stems like root 3,4* s'a-* and ,usr2 Bou can also use a mirror for an0 a--lication* suc( as a data+ase2 A mirror can consist of u- to four su+mirrors2 Go'e&er* t'o-'a0 mirrors usuall0 -ro&ide sufficient data redundanc0 for most a--lications and are less e=-ensi&e in terms of disk dri&e costs2 A t(ird su+mirror ena+les 0ou to make online +acku-s 'it(out losing data redundanc0 '(ile one su+mirror is offline for t(e +acku-2 1f 0ou take a su+mirror Eoffline*F t(e mirror sto-s reading and 'riting to t(e su+mirror2 At t(is -oint* 0ou could access t(e su+mirror itself* for e=am-le* to -erform a +acku-2 Go'e&er* t(e su+mirror is in a read-onl0 state2 5(ile a su+mirror is offline* Solaris Volume Manager kee-s track of all 'rites to t(e mirror2 5(en t(e su+mirror is +roug(t +ack online* onl0 t(e -ortions of t(e mirror t(at 'ere 'ritten '(ile t(e su+mirror 'as offline 3t(e res0nc(roni<ation regions4 are res0nc(roni<ed2 Su+mirrors can also +e taken offline to trou+les(oot or re-air -(0sical de&ices t(at (a&e errors2 Su+mirrors can +e attac(ed or +e detac(ed from a mirror at an0 time* t(oug( at least one su+mirror must remain attac(ed at all times2 Normall0* 0ou create a mirror 'it( onl0 a single su+mirror2 )(en* 0ou attac( a second su+mirror after 0ou create t(e mirror2 ScenarioIRA1:-1 3Mirror4 Volume %igure illustrates a mirror* d#$2 )(e mirror is made of t'o &olumes 3su+mirrors4 d#1 and d##2 Solaris Volume Manager makes du-licate co-ies of t(e data on multi-le -(0sical disks* and -resents one &irtual disk to t(e a--lication* d#$ in t(e e=am-le2 All disk 'rites are du-licated2 :isk reads come from one of t(e underl0ing su+mirrors2 )(e total ca-acit0 of mirror d#$ is t(e si<e of t(e smallest of t(e su+mirrors 3if t(e0 are not of e6ual si<e42

11

Pro&iding RA1:-18$ and RA1:-$81 Solaris Volume Manager su--orts +ot( RA1:-18$ and RA1:-$81 redundanc02 RA1:-18$ redundanc0 constitutes a configuration of mirrors t(at are t(en stri-ed2 RA1:-$81 redundanc0 constitutes a configuration of stri-es t(at are t(en mirrored2 )(e Solaris Volume Manager interface makes it a--ear t(at all RA1:-1 de&ices are strictl0 RA1:-$812 Go'e&er* Solaris Volume Manager recogni<es t(e underl0ing com-onents and mirrors eac( indi&iduall0* '(en -ossi+le2 0ote #olaris $olume %anager cannot al&ays provide '()*-1+0 functionality. ,o&ever, &here !oth su!mirrors are identical to each other and are composed of disk slices (and not soft partitions", '()*-1+0 is possi!le. @onsider a RA1:-$81 im-lementation 'it( a t'o-'a0 mirror t(at consists of t(ree stri-ed slices2 5it(out Solaris Volume Manager* a single slice failure could fail one side of t(e mirror2 Assuming t(at no (ot s-ares are in use* a second slice failure 'ould fail t(e mirror2 >sing Solaris Volume Manager* u- to t(ree slices could -otentiall0 fail 'it(out failing t(e mirror2 )(e mirror does not fail +ecause eac( of t(e t(ree stri-ed slices are indi&iduall0 mirrored to t(eir counter-arts on t(e ot(er (alf of t(e mirror2 %igure illustrates (o' a RA1:-1 &olume can e=-erience t(e loss of a slice* 0et t(e RA1:-18$ im-lementation -re&ents data loss2

1#

)(e RA1:-1 &olume consists of t'o su+mirrors2 ?ac( of t(e su+mirrors consist of t(ree identical -(0sical disks t(at (a&e t(e same interlace &alue2 A failure of t(ree disks* A* 9* and %* is tolerated2 )(e entire logical +lock range of t(e mirror is still contained on at least one good disk2 All of t(e &olumeCs data is a&aila+le2 Go'e&er* if disks A and : fail* a -ortion of t(e mirrorCs data is no longer a&aila+le on an0 disk2 Access to t(ese logical +locks fails2 Go'e&er* access to -ortions of t(e mirror '(ere data is a&aila+le still succeeds2 >nder t(is situation* t(e mirror acts like a single disk t(at (as de&elo-ed +ad +locks2 )(e damaged -ortions are una&aila+le* +ut t(e remaining -ortions are a&aila+le2 RA1:-1 Volume 3Mirror4 Res0nc(roni<ation RA1:-1 &olume 3mirror4 res0nc(roni<ation is t(e -rocess of co-0ing data from one su+mirror to anot(er su+mirror '(en one of t(e follo'ing occurs: Su+mirrors fail )(e s0stem cras(es A su+mirror (as +een taken offline and +roug(t +ack online Ane' su+mirror (as +een added 5(ile t(e res0nc(roni<ation takes -lace* t(e mirror remains reada+le and 'rita+le +0 users2 A mirror res0nc(roni<ation ensures -ro-er mirror o-eration +0 maintaining all su+mirrors 'it( identical data* 'it( t(e e=ce-tion of 'rites in -rogress2 %ull Res0nc(roni<ation 5(en a ne' su+mirror is attac(ed 3added4 to a mirror* all t(e data from anot(er su+mirror in t(e mirror is automaticall0 'ritten to t(e ne'l0 attac(ed su+mirror2 ;nce t(e mirror res0nc(roni<ation is done* t(e ne' su+mirror is reada+le2 A su+mirror remains attac(ed to a mirror until it is detac(ed2 1f t(e s0stem cras(es '(ile a res0nc(roni<ation is in -rogress* t(e res0nc(roni<ation is restarted '(en t(e s0stem finis(es re+ooting2 ;-timi<ed Res0nc(roni<ation :uring a re+oot follo'ing a s0stem failure* or '(en a su+mirror t(at 'as offline is +roug(t +ack online* Solaris Volume Manager -erforms an o-timi<ed mirror res0nc(roni<ation2 )(e metadisk dri&er tracks su+mirror regions2 )(is functionalit0 ena+les t(e metadisk dri&er to kno' '(ic( su+mirror regions mig(t +e out-of-s0nc after a failure2 An o-timi<ed mirror res0nc(roni<ation is -erformed onl0 on t(e out-of-s0nc regions2 Bou can s-ecif0 t(e order in '(ic( mirrors are res0nc(roni<ed during re+oot2 Bou can omit a mirror res0nc(roni<ation +0 setting su+mirror -ass num+ers to <ero2 %or tasks associated 'it( c(anging a -ass num+er2 !a+tion ( pass num!er of -ero should only !e used on mirrors that are mounted as read-only. Partial Res0nc(roni<ation %ollo'ing t(e re-lacement of a slice 'it(in a su+mirror* Solaris Volume Manager -erforms a -artial mirror res0nc(roni<ation of data2 Solaris Volume Manager co-ies t(e data from t(e remaining good slices of anot(er su+mirror to t(e re-laced slice2 @onfiguration Guidelines for RA1:-1 Volumes 9efore 0ou create a mirror* create t(e RA1:-$ 3stri-e or concatenation4 &olumes t(at com-rise t(e mirror2 5(en creating a mirror* first create a one-'a0 mirror* t(en attac( a second su+mirror2 )(is strateg0 starts a res0nc(roni<ation o-eration2 )(is strateg0 also ensures t(at data is not corru-ted2 Bou can also create a one'a0 mirror for use as a future t'o-'a0 or multi-'a0 mirror2 Bou can create a t'o-'a0 mirror* t(ree-'a0 mirror* or four-'a0 mirror from a one-'a0 mirror 'it( a single command2 Bou can s-eed t(e creation -rocess +0 creating all su+mirrors 'it( a single command2 >se t(is -rocess onl0 if 0ou are not mirroring e=isting data and if 0ou are comforta+le destro0ing t(e data on all of t(e su+mirrors2 Bou can create a RA1:-1 &olume from an e=isting file s0stem t(at is +uilt on a slice2 ;nl0 t(e single slice ma0 +e included in t(e -rimar0 RA1:-$ &olume 3su+mirror42 1f 0ou are mirroring root or ot(er s0stemcritical file s0stems* all su+mirrors must consist of onl0 a single slice2 1.

>se t(e s'a- -l command to c(eck for all s'a- de&ices2 ?ac( slice t(at is s-ecified as s'a- must +e mirrored inde-endentl0 from t(e remaining s'a- slices2 )(e ?n(anced Storage tool 'it(in t(e Solaris Management @onsole does not su--ort unmirroring root 3,4* ,o-t* ,usr* or s'a-2 1n fact* t(e tool does not su--ort unmirroring an0 file s0stem t(at cannot +e unmounted '(ile t(e s0stem is running2 1nstead* use t(e command-line -rocedure for t(ese file s0stems2 >se su+mirrors of t(e same si<e2 Su+mirrors of different si<es result in unused disk s-ace2 >se onl0 similarl0 configured su+mirrors 'it(in a mirror2 1n -articular* if 0ou create a mirror 'it( an unla+eled su+mirror* 0ou cannot attac( an0 su+mirrors t(at contain disk la+els2 Bou can (a&e a mirrored file s0stem in '(ic( t(e first su+mirror attac(ed does not start on c0linder $2 All additional su+mirrors 0ou attac( must also not start on c0linder $2 1f 0ou attem-t to attac( a su+mirror starting in t(is situation* t(e follo'ing error message dis-la0s: EcanCt attac( la+eled su+mirror to an unla+eled mirror E ?it(er all su+mirrors intended for use 'it(in a s-ecific mirror must start on c0linder $* or all of t(e su+mirrors must not start on c0linder $2 Starting c0linders do not (a&e to +e t(e same across all su+mirrors2 Go'e&er* all su+mirrors must eit(er include or not include c0linder $2 Bou can im-ro&e a mirrorCs -erformance +0 adding additional state data+ase re-licas +efore 0ou create t(e mirror2 As a general rule* add t'o additional re-licas for eac( mirror 0ou add to t(e s0stem2 Solaris Volume Manager uses t(ese additional re-licas to store t(e dirt0 region log 3:RD4* '(ic( is used to -ro&ide o-timi<ed res0nc(roni<ation2 90 -ro&iding ade6uate num+ers of re-licas* 0ou can minimi<e 1,; im-act on RA1:-1 &olume -erformance2 >sing at least t'o re-licas on t(e same disks or controllers as t(e mirror t(at t(e re-licas log also (el-s to im-ro&e o&erall -erformance2 ;nl0 mount t(e mirror de&ice directl02 :o not tr0 to mount a su+mirror directl0* unless t(e su+mirror is offline and mounted read-onl02 :o not mount a slice t(at is -art of a su+mirror2 )(is -rocess could destro0 data and cras( t(e s0stem2 Performance Guidelines for RA1:-1 Volumes Hee- t(e slices of different su+mirrors on different disks and controllers2 :ata -rotection is diminis(ed considera+l0 if slices of t'o or more su+mirrors of t(e same mirror are on t(e same disk2 Dike'ise* organi<e su+mirrors across se-arate controllers* +ecause controllers and associated ca+les tend to fail more often t(an disks2 )(is -ractice also im-ro&es mirror -erformance2 >se t(e same t0-e of disks and controllers in a single mirror2 Particularl0 in old S@S1 storage de&ices* different models or different +rands of disks or controllers can (a&e 'idel0 &ar0ing -erformance2 1f disks and controller t(at (a&e t(e different -erformance le&els are used in a single mirror* -erformance can degrade significantl02 Mirroring mig(t im-ro&e read -erformance* +ut 'rite -erformance is al'a0s degraded2 Mirroring im-ro&es read -erformance onl0 in t(readed or as0nc(ronous 1,; situations2 A single t(read reading from t(e &olume does not -ro&ide a -erformance gain2 Bou can e=-eriment 'it( t(e mirror read -olicies can im-ro&e -erformance2 %or e=am-le* t(e default read mode is to alternate reads in a round-ro+in fas(ion among t(e disks2 )(is -olic0 is t(e default +ecause round-ro+in tends to 'ork +est for >%S multiuser* multi-rocessor acti&it02 1n some cases* t(e geometric read o-tion im-ro&es -erformance +0 minimi<ing (ead motion and access time2 )(is o-tion is most effecti&e '(en: )(ere is onl0 one slice -er disk ;nl0 one -rocess at a time is using t(e slice or file s0stem 1,; -atterns are (ig(l0 se6uential or '(en all accesses are read Bou can attac( a su+mirror to a mirror 'it(out interru-ting ser&ice2 Bou attac( su+mirrors to mirrors to create t'o-'a0* t(ree-'a0* and four-'a0 mirrors2 1!

5(en 0ou -lace a su+mirror offline* 0ou -re&ent t(e mirror from reading from and 'riting to t(e su+mirror2 Go'e&er* 0ou -reser&e t(e su+mirrorCs logical association to t(e mirror2 5(ile t(e su+mirror is offline* Solaris Volume Manager kee-s track of all 'rites to t(e mirror2 )(e 'rites are 'ritten to t(e su+mirror '(en it is +roug(t +ack online2 90 -erforming an o-timi<ed res0nc(roni<ation* Solaris Volume Manager onl0 (as to res0nc(roni<e data t(at (as c(anged* not t(e entire su+mirror2 5(en 0ou detac( a su+mirror* 0ou se&er its logical association to t(e mirror2 )0-icall0* 0ou -lace a su+mirror offline to -erform maintenance2 Bou detac( a su+mirror to remo&e it2 >nderstanding Su+mirror Status to :etermine Maintenance Actions )(e metastat command of Solaris Volume Manager re-orts status information on RA1: 1 &olumes and su+mirrors2 )(e status information (el-s 0ou to determine if maintenance action is re6uired on a RA1:-1 &olume2 )(e follo'ing ta+le e=-lains su+mirror states s(o'n '(en 0ou run t(e 1metastat2 command on a RA1:-1 &olume2

Additionall0* for eac( slice in a su+mirror* t(e 1metastat2 command s(o's t(e follo'ing: *evice #tart .lock *!ase #tate ,ot #pare 1ndicates t(e de&ice name of t(e slice in t(e stri-e 1ndicates t(e +lock on '(ic( t(e slice +egins 1ndicates if t(e slice contains a state data+ase re-lica 1ndicates t(e state of t(e slice 1ndicates t(at a slice is +eing used as a (ot s-are for a failed slice

)(e slice state is -er(a-s t(e most im-ortant information to re&ie' '(en 0ou are trou+les(ooting mirror errors2 1f t(e su+mirror re-orts a /0eeds %aintenance1 state* 0ou must refer to t(e slice state for more information2 Bou take a different reco&er0 action de-ending on if t(e slice is in t(e /%aintenance1 state or in t(e /2ast rred1 state2 1f 0ou onl0 (a&e slices in t(e EMaintenanceF state* t(e0 can +e re-aired in an0 order2 1f 0ou (a&e slices +ot( in t(e /%aintenance1 state and in t(e /2ast rred1 state* 0ou must fi= t(e slices in t(e /%aintenance1 state first2 ;nce t(e slices in t(e /%aintenance1 state (a&e +een fi=ed* t(en fi= t(e slices in t(e /2ast rred1 state2 )(e follo'ing ta+le e=-lains t(e slice states for su+mirrors and -ossi+le actions to take2

1"

)(e Affect of 9ooting 1nto Single->ser Mode on RA1:-1 Volumes Sometimes* 0ou ma0 need to +oot a s0stem 'it( mirrors for root 3,4* ,usr* and s'a-* t(e so-called E!ootF file s0stems* into single-user mode 3+0 using t(e +oot -s command42 1n t(is case* t(ese mirrors and -ossi+l0 all mirrors on t(e s0stem 'ill a--ear in t(e E0eeding %aintenanceF state '(en &ie'ed 'it( t(e metastat command2 %urt(ermore* if 'rites occur to t(ese slices* t(e metastat command s(o's an increase in dirt0 regions on t(e mirrors2 )(is situation a--ears to +e -otentiall0 dangerous2 Go'e&er* t(e 2metasync 3r2 command* '(ic( normall0 runs during +oot to res0nc(roni<e mirrors* is interru-ted '(en t(e s0stem is +ooted into single-user mode2 ;nce t(e s0stem is re+ooted* t(e 2metasync 3r2 command 'ill run and res0nc(roni<e all mirrors2 1f t(is situation is a concern* 0ou can run t(e 2metasync 3r2 command manuall02 R45D'$ Vol+mes 6-ask Map( Go' to @reate a RA1:-1 Volume %rom >nused Slices )(is -rocedure s(o's 0ou (o' to create a t'o-'a0 mirror2 1f 0ou 'ant to create a t(ree-'a0 mirror or a four-'a0 mirror* use t(e same -rocedure. i() !reate two stripes or concatenations) -hese components become the s+bmirrors) ii() -o create the mirror. +se the ,ollowing method: >se t(e follo'ing form of t(e metainit command to create a one-'a0 mirror: # metainit volume-name -m submirror-name 16

volume-name S-ecifies t(e name of t(e &olume to create -m S-ecifies to create a mirror submirror-name S-ecifies t(e name of t(e com-onent t(at 'ill +e t(e first su+mirror in t(e mirror iii() -o add the second s+bmirror. +se the ,ollowing method: >se t(e follo'ing form of t(e metattac( command: # metattach volume-name submirror-name ?=am-le: @reating a )'o-5a0 Mirror # metainit d51 1 1 c0t0d0s2 d"1: @oncat,Stri-e is setu# metainit d52 1 1 c1t0d0s2 d"#: @oncat,Stri-e is setu# metainit d50 -m d51 d"$: Mirror is setu# metattach d50 d52 d"$: Su+mirror d"# is attac(ed )(is e=am-le s(o's 0ou (o' to create t(e t'o-'a0 mirror* d"$2 )(e metainit command creates t'o su+mirrors 3d"1 and d"#4* '(ic( are RA1:-$ &olumes2 )(e metainit -m command creates t(e one-'a0 mirror from t(e d"1 RA1:-$ &olume2 )(e metattac( command attac(es d"#* creating a t'o-'a0 mirror and causing a res0nc(roni<ation2 An0 data on t(e attac(ed su+mirror is o&er'ritten +0 t(e ot(er su+mirror during t(e res0nc(roni<ation2 ?=am-le: @reating a )'o-5a0 Mirror 5it(out Res0nc(roni<ation # metainit d51 1 1 c0t0d0s2 d"1: @oncat,Stri-e is setu# metainit d52 1 1 c1t0d0s2 d"#: @oncat,Stri-e is setu# metainit d50 -m d51 d52 metainit: d"$: 5ARN1NG: )(is form of metainit is not recommended2 )(e su+mirrors ma0 not (a&e t(e same data2 Please see ?RR;RS in metainit31M4 for additional information2 d"$: Mirror is setu)(is e=am-le s(o's t(e creation a t'o-'a0 mirror* d"$2 )(e metainit command creates t'o su+mirrors 3d"1 and d"#4* '(ic( are RA1:-$ &olumes2 )(e metainit -m command is t(en run 'it( +ot( su+mirrors to create t(e mirror2 5(en 0ou create a mirror using t(e metainit command rat(er t(an t(e metattac( command * no res0nc(roni<ation o-erations occur2 As a result* data could +ecome corru-ted '(en Solaris Volume Manager assumes t(at +ot( sides of t(e mirror are identical and can +e used interc(angea+l02 Go' to @reate a RA1:-1 Volume %rom a %ile S0stem >se t(is -rocedure to mirror an e=isting file s0stem2 1f t(e file s0stem can +e unmounted* t(e entire -rocedure can +e com-leted 'it(out a re+oot2 %or file s0stems t(at cannot +e unmounted* suc( as ,usr and ,s'a-* t(e s0stem must +e re+ooted to com-lete t(e -rocedure2 5(en creating a RA1:-1 &olume from an e=isting file s0stem +uilt on a slice* onl0 t(e single slice ma0 +e included in t(e -rimar0 RA1:-$ &olume 3su+mirror42 1f 0ou are mirroring s0stem-critical file s0stems* all su+mirrors must consist of onl0 a single slice2 1n t(e e=am-le used in t(is -rocedure* t(e e=isting slice is c1t$d$s$2 )(e second slice* c1t1d$s$* is a&aila+le for t(e second (alf of t(e mirror2 )(e su+mirrors are d1 and d#* res-ecti&el0* and t(e mirror is d$2 1A

i() 5denti,y the slice that contains the e7isting ,ile system to be mirrored -his e7ample +ses the slice c$t%d%s%) !reate a new R45D'% vol+me on the slice ,rom the previo+s step by +sing the ,ollowing method: >se t(e follo'ing form of t(e metainit command: # metainit 'f volume-name number-of-stripes components-per-stripe component-name -f %orces t(e command to continue2 >se t(is '(en t(e slice contains a mounted %S2 volume-name S-ecifies t(e name of t(e &olume to create number-of-stripes S-ecifies t(e num+er of stri-es to create2 components-per-stripe S-ecifies t(e num+er of com-onents eac( stri-e s(ould (a&e2 component-names S-ecifies t(e names of t(e com-onents t(at are used2 )(is e=am-le uses t(e root slice* c$t$d$s$2 ii() !reate a second R45D'% vol+me 6concatenation( on an +n+sed slice 6c$t$d%s% in this e7ample( to act as the second s+bmirror) -he second s+bmirror m+st be the same si8e as the original s+bmirror or larger) *se one o, the ,ollowing methods: >se t(e follo'ing form of t(e metainit command2 # metainit volume-name number-of-stripes components-per-stripe component-name iii() !reate a one'way mirror by +sing one o, the ,ollowing methods: >se t(e follo'ing form of t(e metainit command2 # metainit volume-name -m submirror-name 5v() /dit the /etc/v,stab ,ile so that the ,ile system mo+nt instr+ctions re,er to the mirror. not to the block device) %or e=am-le* if t(e /etc vfstab file contains t(e follo'ing entr0 for t(e file s0stem: /dev/dsk/slice /dev/rdsk/slice /var ufs 2 yes @(ange t(e entr0 to read as follo's: /dev/md/dsk/mirror-name /dev/md/rdsk/mirror-name /var ufs 2 yes 3 V() Remo+nt yo+r newly mirrored ,ile system according to one o, the ,ollowing proced+res: if 0ou are mirroring a %S t(at can +e unmounted* t(en unmount and remount t(e file s0stem2 # +mo+nt files"stem # mo+nt !iles"stem vi() 5, yo+ are mirroring a ,ile system that cannot be +nmo+nted. then reboot yo+r system2 # reboot vii() *se the ,ollowing ,orm o, the metattach command to attach the second s+bmirror) # metattach volume-name submirror-name ?=am-le: @reating a )'o-5a0 Mirror %rom a %ile S0stem )(at @an 9e >nmounted # metainit f d1 1 1 c1t0d0s0 d1: @oncat,Stri-e is setu# metainit d2 1 1 c1t1d0s0 d#: @oncat,Stri-e is setu# metainit d0 m d1 d$: Mirror is setu# +mo+nt master ( dit the /etc/vfsta! file so that the file system references the mirror" # mo+nt master # metattach d0 d2 18

d$: Su+mirror d# is attac(ed 1n t(is e=am-le* t(e -f o-tion forces t(e creation of t(e first concatenation* d1* '(ic( contains t(e mounted file s0stem ,master on ,de&,dsk,c1t$d$s$2 )(e second concatenation* d#* is created from ,de&,dsk,c1t1d$s$2 )(is slice must +e t(e same si<e as * or larger t(an t(e si<e of d124 )(e metainit command 'it( t(e -m o-tion creates t(e one'a0 mirror* d$* from d12 Ne=t* t(e entr0 for t(e file s0stem s(ould +e c(anged in t(e ,etc,&fsta+ file to reference t(e mirror2 )(e follo'ing line in t(e ,etc,&fsta+ file initiall0 a--ears as follo's: /dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 /var ufs 2 yes )(e entr0 is c(anged to t(e follo'ing: /dev/md/dsk/d0 /dev/md/rdsk/d0 /var ufs 2 yes %inall0* t(e file s0stem is remounted and su+mirror d# is attac(ed to t(e mirror* causing a mirror res0nc(roni<ation2 )(e s0stem confirms t(at t(e RA1:-$ and RA1:-1 &olumes are set u-* and t(at su+mirror d# is attac(ed2 ?=am-le: @reating a )'o-'a0 Mirror %rom a %ile S0stem )(at @annot 9e >nmounted # metainit f d12 1 1 c0t3d0s$ d1#: @oncat,Stri-e is setu# metainit d22 1 1 c1t0d0s$ d##: @oncat,Stri-e is setu# metainit d2 -m d12 d#: Mirror is setu( dit the /etc/vfsta! file so that /usr references the mirror" # reboot # metattach d2 d22 d#: Su+mirror d## is attac(ed )(is e=am-le creates a t'o-'a0 mirror using a slice containing t(e ,usr file s0stem2 )(e -f o-tion forces t(e creation of t(e first concatenation* d1#* '(ic( contains t(e mounted file s0stem ,usr on ,de&,dsk,c$t.d$s62 )(e second concatenation* d##* is created from ,de&,dsk,c1t$d$s62 )(is slice must +e t(e same si<e as* or larger t(an t(e si<e of d1#2 )(e metainit command 'it( t(e -m o-tion creates t(e one-'a0 mirror d# using t(e concatenation t(at contains t(e ,usr file s0stem2 Ne=t* t(e ,etc,&fsta+ file must +e edited to c(ange t(e entr0 for ,usr to reference t(e mirror2 )(e ,etc,&fsta+ file contains t(e follo'ing entr0 for t(e ,usr file s0stem: /dev/dsk/c0t4d0s5 /dev/rdsk/c0t4d0s5 /usr ufs 1 yes @(ange t(e entr0 to read as follo's: /dev/md/dsk/d2 /dev/md/rdsk/d2 /usr ufs 1 yes After a re+oot* t(e second su+mirror d## is attac(ed to t(e mirror* causing a mirror res0nc(roni<ation2 ?=am-le: @reating a Mirror %rom t(e ,s'a- S-ace # metainit f d11 1 1 c0t0d0s1 d11: @oncat,Stri-e is setu# metainit d21 1 1 c1t0d0s1 d#1: @oncat,Stri-e is setu# metainit d1 -m d11 d1: Mirror is setu( dit the /etc/vfsta! file so that s&ap references the mirror" # reboot # metattach d1 d21 d1: Su+mirror d#1 is attac(ed

1/

1n t(is e=am-le* t(e -f o-tion forces t(e creation of t(e first concatenation* d11* '(ic( contains t(e mounted file s0stem s'a- on ,de&,dsk,c$t$d$s12 )(e second concatenation* d#1* is created from ,de&,dsk,c1t$d$s12 )(is slice must +e t(e same si<e as* or larger t(an t(e si<e of d112 )(e metainit command 'it( t(e -m o-tion creates t(e one'a0 mirror d1 using t(e concatenation t(at contains s'a-2 Ne=t* if t(ere is an entr0 for s'a- in t(e ,etc,&fsta+ file* it must +e edited to reference t(e mirror2 )(e ,etc,&fsta+ file contains t(e follo'ing entr0 for t(e s'a- s-ace: /dev/dsk/c0t0d0s1 - - s&ap - no @(ange t(e entr0 to read as follo's: /dev/md/dsk/d1 - - s&ap - no After a re+oot* t(e second su+mirror d#1 is attac(ed to t(e mirror* causing a mirror res0nc(roni<ation2 Go' to @reate a RA1:-1 Volume %rom t(e root 3,4 %ile S0stem2 )(e -rocess for mirroring t(e root 3,4 file s0stem on a SPAR@ -latform is similar to mirroring an0 ot(er file s0stem t(at 0ou cannot unmount2 )(e -rocedure differs in t(at t(e metaroot command is run instead of manuall0 editing t(e ,etc,&fsta+ file2 Mirroring t(e root 3,4 file s0stem also re6uires recording t(e -at( to t(e alternate +oot de&ice2 )(is de&ice re+oots t(e s0stem if t(e su+mirror fails2 1n t(e e=am-le used in t(is -rocedure* t(e e=isting slice is c1t$d$s$2 )(e second slice* c1t1d$s$* is a&aila+le for t(e second (alf of t(e mirror2 )(e su+mirrors are d1 and d#* res-ecti&el0* and t(e mirror is d$2 !a+tion 9e sure to create a one-'a0 mirror 'it( t(e metainit command t(en attac( t(e additional su+mirrors 'it( t(e metattac( command2 5(en t(e metattac( command is not used* no res0nc(roni<ation o-erations occur2 As a result* data could +ecome corru-ted '(en SVM assumes t(at +ot( sides of t(e mirror are identical and can +e used interc(angea+l02 i() 5denti,y the slice that contains the e7isting root 6/( ,ile system to be mirrored) -his e7ample +ses the slice c$t%d%s%) ii() !reate a new R45D'% vol+me on the slice ,rom the previo+s step by +sing ,ollowing method) 9nly the single slice can be incl+ded in the R45D'% vol+me) >se t(e follo'ing form of t(e metainit command: # metainit -f volume-name number-of-stripes components-per-stripe component-name iii() !reate a second R45D'% vol+me on an +n+sed slice 6c$t$d%s% in this e7ample( to act as the second s+bmirror) -he secondary s+bmirror m+st be the same si8e as the original s+bmirror. or larger) *se the ,ollowing method: # metainit volume-name number-of-stripes components-per-stripe component-name iv() !reate a one'way mirror by +sing one o, the ,ollowing methods: # metainit volume-name -m submirror-name v() Remo+nt yo+r newly mirrored ,ile system) R+n the metaroot vol+me'name command. replacing vol+me' name with the name o, the mirror yo+ have created) -hen. reboot yo+r system) #$

# metaroot volume-name # reboot vi() *se the ,ollowing ,orm o, the metattach command to attach the second s+bmirror) # metattach volume-name submirror-name vii() Record the alternate boot path) 6$() :etermine t(e -at( to t(e alternate root de&ice2 >se t(e ls -l command on t(e slice t(at is +eing attac(ed as t(e second su+mirror to t(e root 3,4 file s0stem mirror2 # ls -l dev dsk c1t1d0s0 lrw7rw7rw7 $ root root :: Mar : $"::& /dev/rdsk/c$t$d%s% '; ))/))/devices/sb+s<$.,=%%%%%%/esp<$."%%%%%/sd<#.%:a 6"() Record t(e string t(at follo's t(e /devices director0: /sb+s<$.,=%%%%%%/esp<$."%%%%%/sd<#.%:a) 0ote 9ecause t(e s0stem mig(t not +e a&aila+le* t(is information s(ould also +e 'ritten do'n some'(ere ot(er t(an on t(e s0stem 6#() ?dit t(e string to c(ange t(e ma7or name 3sd* in t(is case4 to disk. resulting in /sb+s<$.,=%%%%%%/esp<$."%%%%%/disk<#.%:a) 1f t(e s0stem uses an 1:? +us* t(e original full -at( mig(t look like > ls -l dev dsk c1t1d0s0 lrw7rw7rw7 $ root root #= Mar $# $::%# /dev/dsk/c%t%d%s% '; ))/))/devices/pci<$,.%/ide<d/dad<%.%:a After c(anging t(e ma7or name dad to disk* 0ou 'ould (a&e /pci<$,.%/ide<d/disk<%.%:a 6&() >se t(e ;-en9ootL PR;M n&alias command to define a E+acku-rootF de&ice alias for t(e secondar0 root 3,4 file s0stem mirror2 %or e=am-le: ok nvalias backup%root sbus&1'f#000000 esp&1'200000 disk&3'0(a 6:() Redefine t(e boot'device alias to reference +ot( t(e -rimar0 and secondar0 su+mirrors* in t(e order in '(ic( 0ou 'ant t(em to +e used* and store t(e configuration) ok printenv boot-device +oot-de&ice M disk net ok setenv boot-device disk backup%root net +oot-de&ice M disk +acku-Nroot net ok nvstore 0ote 3 1n t(e e&ent t(at t(e -rimar0 su+mirror fails* t(e s0stem 'ould automaticall0 +oot to t(e second su+mirror2 ;r* if 0ou +oot manuall0* 0ou 'ould enter: ok boot backup%root ?=am-le: @reating a Mirror %rom t(e root 3,4 %ile S0stem # metainit f d1 1 1 c0t0d0s0 d1: @oncat,Stri-e is setu# metainit d2 1 1 c0t1d0s0 d#: @oncat,Stri-e is setu# metainit d0 -m d1 #1

d$: Mirror is setu# metaroot d0 # lock,s -fa # reboot ))) # metattach d0 d2 d$: Su+mirror d# is attac(ed # ls -l dev dsk c0t1d0s0 lr'=r'=r'= 1 root root 88 %e+ 8 1":"1 ,de&,rdsk,c1t.d$s$ -O 22,22,de&ices,-ciP1f*$,-ciP1*1,ideP.,dadP$*$:a # init % 2 ok nvalias backup%root pci&1f'0 pci&1'1 ide&3 disk&0'0(a ok setenv boot-device disk backup%root net ok nvstore 1n t(is e=am-le* t(e -f o-tion forces t(e creation of t(e first RA1:-$ &olume* d1* '(ic( contains t(e mounted root 3,4 file s0stem on ,de&,dsk,c$t$d$s$2 )(e second concatenation* d#* is created from ,de&,dsk,c$t1d$s$2 )(is slice must +e t(e same si<e as* or larger t(an t(e si<e of d12 )(e metainit command 'it( t(e -m o-tion creates t(e one-'a0 mirror d$ using t(e concatenation t(at contains root 3,42 Ne=t* t(e metaroot command edits t(e ,etc,&fsta+ and ,etc,s0stem files so t(at t(e s0stem can +e +ooted 'it( t(e root 3,4 file s0stem on a &olume2 1t is a good idea to run t(e lockfs -fa command +efore re+ooting2 :o not attac( t(e second su+mirror +efore t(e s0stem is re+ooted2 Bou must re+oot after running t(e metaroot command and +efore attac(ing t(e second su+mirror2 After a re+oot* t(e su+mirror d# is attac(ed to t(e mirror* causing a mirror res0nc(roni<ation2 )(e s0stem confirms t(at t(e concatenations and t(e mirror are set u-* and t(at su+mirror d# is attac(ed2 )(e ls -l command is run on t(e root ra' de&ice to determine t(e -at( to t(e alternate root de&ice in case t(e s0stem mig(t later need to +e +ooted from it2 5orking 5it( Su+mirrors Go' to Attac( a Su+mirror 0ote An error message stating Ecan6t attach la!eled su!mirror to an unla!eled mirrorF indicates t(at 0ou unsuccessfull0 attem-ted to attac( a RA1:-$ &olume to a mirror2 A la+eled &olume 3su+mirror4 is a &olume '(ose first com-onent starts at c0linder $* '(ile an unla+eled &olumeCs first com-onent starts at c0linder 12 )o -re&ent t(e la+eled su+mirrorCs la+el from +eing corru-ted* Solaris Volume Manager does not allo' la+eled su+mirrors to +e attac(ed to unla+eled mirrors2 i() 5denti,y the component 6concatenation or stripe( to be +sed as a s+bmirror) )(e com-onent must +e of t(e same si<e or larger t(an t(e e=isting su+mirror2 ii() Make s+re that yo+ have root privilege and that yo+ have a c+rrent back+p o, all data) Veri,y that the stat+s o, the mirror yo+ want to work with is in an 19kay2 state +sing the metastat command) # metastat mirror iii() *se the ,ollowing method to attach a s+bmirror) K# metattach mirror submirror iv() View the stat+s o, the mirror +sing the metastat command) ##

# metastat mirror ?=am-le: Attac(ing a Su+mirror # metastat d30 d.$: mirror Su+mirror $: d6$ State: ;ka0 222 # metattach d30 d70 d.$: su+mirror dA$ is attac(ed # metastat d30 d.$: mirror Su+mirror $: d6$ State: ;ka0 Su+mirror 1: dA$ State: Res0ncing Res0nc in -rogress: !1 Qdone Pass: 1 Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: #$$61.$ +locks 222 )(is e=am-le s(o's t(e attac(ing of a su+mirror* dA$* to a one-'a0 mirror* d.$2 Bou create a t'o-'a0 mirror '(en 0ou attac( t(e su+mirror to t(e mirror2 )(e mirror d.$ initiall0 consists of su+mirror d6$2 )(e su+mirror dA$ is a RA1:-$ &olume2 Bou &erif0 t(at t(e status of t(e mirror is E;ka0F 'it( t(e metastat command* t(en attac( t(e su+mirror2 5(en t(e metattac( command is run* t(e ne' su+mirror is res0nc(roni<ed 'it( t(e e=isting mirror2 5(en 0ou attac( an additional su+mirror to t(e mirror* t(e s0stem dis-la0s a message2 )o &erif0 t(at t(e mirror is res0nc(roni<ing* use t(e metastat command2 Go' to :etac( a Su+mirror i() Make s+re that yo+ have root privilege) Make s+re that yo+ have a c+rrent back+p o, all data) Veri,y that the stat+s o, the mirror yo+ want to work with is in an 19kay2 state +sing the metastat command) *se the ,ollowing method to detach a s+bmirror) >se t(e metadetac( command to detac( a su+mirror from a mirror2 # metadetach mirror submirror ?=am-le: :etac(ing a Su+mirror # metastat d": mirror Su+mirror $: d"$ 222 # metadetach d5 d50 d": su+mirror d"$ is detac(ed 1n t(is e=am-le* mirror d" (as a su+mirror* d"$2 Bou detac( t(e su+mirror 'it( t(e metadetac( command2 )(e underl0ing slices from d"$ can +e reused else'(ere2 After t(e su+mirror is detac(ed from t(e mirror* t(e s0stem dis-la0s a confirmation message2 Go' to Place a Su+mirror ;ffline and ;nline

#.

)(e metaonline command can onl0 +e used '(en a su+mirror 'as taken offline +0 t(e metaoffline command2 After t(e metaonline command runs* Solaris Volume Manager automaticall0 +egins res0nc(roni<ing t(e su+mirror 'it( t(e mirror2 Note )(e metaoffline commandCs ca-a+ilities are similar to t(e ca-a+ilities offered +0 t(e metadetac( command2 Go'e&er* t(e metaoffline command does not se&er t(e logical association +et'een t(e su+mirror and t(e mirror2 i() Make s+re that yo+ have root privilege and that yo+ have a c+rrent back+p o, all data) *se the ,ollowing method to place a s+bmirror online or o,,line) >se t(e metaoffline command to a su+mirror offline2 # metao,,line mirror submirror >se t(e metaonline command to -lace a su+mirror online2 # metaonline mirror submirror ?=am-le: Placing a Su+mirror ;ffline # metao,,line d10 d11 d1$: su+mirror d11 is offlined 1n t(is e=am-le* su+mirror d11 is taken offline from mirror d1$2 Reads continue to +e made from t(e ot(er su+mirror2 )(e mirror is out of s0nc as soon as t(e first 'rite is made2 )(is inconsistenc0 is corrected '(en t(e offlined su+mirror is +roug(t +ack online2 ?=am-le: Placing a Su+mirror ;nline # metaonline d10 d11 d1$: su+mirror d11 is onlined 1n t(is e=am-le* su+mirror d11 is +roug(t +ack online in mirror d1$2 Go' to ?na+le a Slice in a Su+mirror i() Make s+re that yo+ have root privilege and that yo+ have a c+rrent back+p o, all data) *se the ,ollowing method to enable a slice in a s+bmirror) >se t(e metare-lace command to ena+le a failed slice in a su+mirror2 R metareplace -e mirror failed-slice )(e metare-lace command automaticall0 starts a res0nc(roni<ation to s0nc(roni<e t(e re-aired or re-laced slice 'it( t(e rest of t(e mirror2 ?=am-le: ?na+ling a Slice in a Su+mirror # metareplace -e d11 c1t4d0s7 d11: de&ice c1t!d$sA is ena+led 1n t(is e=am-le* t(e mirror d11 (as a su+mirror t(at contains slice* c1t!d$sA* '(ic( (ad a soft error2 )(e metare-lace command 'it( t(e -e o-tion ena+les t(e failed slice2 Maintaining RA1:-1 Volumes G K o' to Vie' t(e Status of Mirrors and Su+mirrors i() *se the ,ollowing method to the check mirror or s+bmirror stat+s) #!

Run t(e metastat command on t(e mirror to &ie' t(e status of eac( su+mirror2 # metastat mirror ?=am-le: @(ecking Status of RA1:-1 Volumes Gere is sam-le out-ut from t(e metastat command2 >se metastat command 'it(out a mirror name to dis-la0 all t(e status of all mirrors2 # metastat d70( )irror Su+mirror $: dA1 State: ;ka0 Pass: 1 Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: 1#"/.6.A +locks dA1: Su+mirror of dA$ State: ;ka0 Si<e: 1#"/.6.A +locks Stri-e $: :e&ice Start 9lock :+ase State Reloc Got S-are c1t.d$s. $ No ;ka0 Bes Stri-e 1: :e&ice Start 9lock :+ase State Reloc Got S-are c1t.d$s! $ No ;ka0 Bes Stri-e #: :e&ice Start 9lock :+ase State Reloc Got S-are c1t.d$s" $ No ;ka0 Bes d$: Mirror Su+mirror $: d1 State: ;ka0 Su+mirror 1: d# State: ;ka0 Pass: 1 Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: "6$$ +locks d1: Su+mirror of d$ State: ;ka0 Si<e: "6$$ +locks Stri-e $: :e&ice Start 9lock :+ase State Got S-are c$t#d$sA $ No ;ka0 222 >se t(e metastat command 'it( a mirror name argument to dis-la0 out-ut for a s-ecific mirror2 # metastat d70 dA$: Mirror Su+mirror $: dA1 State: ;ka0 Pass: 1 Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: 1#"/.6.A +locks dA1: Su+mirror of dA$ #"

State: ;ka0 Si<e: 1#"/.6.A +locks Stri-e $: :e&ice Start 9lock :+ase State Reloc Got S-are c1t.d$s. $ No ;ka0 Bes Stri-e 1: :e&ice Start 9lock :+ase State Reloc Got S-are c1t.d$s! $ No ;ka0 Bes Stri-e #: :e&ice Start 9lock :+ase State Reloc Got S-are Maintaining RA1:-1 Volumes @(a-ter 11 S RA1:-1 3Mirror4 Volumes 3)asks4 1.. c1t.d$s" $ No ;ka0 Bes %or eac( su+mirror in t(e mirror* t(e metastat command s(o's t(e status* an Ein&okeF line if t(ere is an error* t(e assigned (ot s-are -ool 3if an04* t(e si<e in +locks* and information a+out eac( slice in t(e su+mirror2 Go' to ?=-and a RA1:-1 Volume i() Make s+re that yo+ have root privilege and that yo+ have a c+rrent back+p o, all data) *se the ,ollowing method to e7pand a mirror) >se t(e metattac( command to attac( additional slices to eac( su+mirror2 # metattach submirror slice ?ac( su+mirror in a mirror must +e e=-anded2 ii() *se the metattach command to ca+se the mirror to recomp+te its si8e based on the si8e o, the s+bmirror) # metattach mirror ?=am-le: ?=-anding a )'o-5a0 Mirror )(at @ontains a Mounted %ile S0stem # metastat d8: Mirror Su+mirror $: d/ State: ;ka0 Su+mirror 1: d1$ State: ;ka0 222 # metattach d* c0t2d0s5 d/: com-onent is attac(ed # metattach d10 c0t3d0s5 d1$: com-onent is attac(ed # metattach d# )(is e=am-le s(o's (o' to e=-and a mirrored* mounted file s0stem +0 concatenating t'o disk dri&es to t(e mirrorCs t'o su+mirrors2 )(e mirror is named d8 and contains t'o su+mirrors named d/ and d1$2 %or a >%S* run t(e gro'fs31M4 command on t(e mirror &olume2 Res-onding to RA1:-1 Volume @om-onent %ailures G K o' to Re-lace a Slice in a Su+mirror i() Make s+re that yo+ have root privilege and that yo+ have a c+rrent back+p o, all data) *se the metastat command to view the stat+s o, the R45D'$ vol+me and associated s+bmirrors) #6

# metastat mirror-name ii() *se one o, the ,ollowing methods to replace a slice in a s+bmirror) >se t(e follo'ing form of t(e metare-lace command to re-lace a slice in a su+mirror: # metareplace mirror-name component-name mirror-name is t(e name of t(e &olume to create2 component-name s-ecifies t(e name of t(e com-onent to re-lace2 ?=am-le: Re-lacing a %ailed Slice in a Mirror )(e follo'ing e=am-le illustrates (o' to re-lace a failed slice '(en t(e s0stem is not configured to use (ot s-are -ools for t(e automatic re-lacement of failed disks2 # metastat d$ d6: Mirror Su+mirror $: d16 State: ;ka0 Su+mirror 1: d#6 State: Needs maintenance 222 d#6: Su+mirror of d6 State: Needs maintenance 1n&oke: metare-lace d6 c$t#d$s# Tne' de&iceO 222 # metareplace d$ c0t2d0s2 c0t2d2s2 d6: de&ice c$t#d$s# is re-laced 'it( c$t#d#s# )(e metastat command confirms t(at mirror d6 (as a su+mirror* d#6* 'it( a slice in t(e ENeeds maintenanceF state2 )(e metare-lace command re-laces t(e slice as s-ecified in t(e E1n&okeF line of t(e metastat out-ut 'it( anot(er a&aila+le slice on t(e s0stem2 )(e s0stem confirms t(at t(e slice is re-laced* and starts res0nc(roni<ing t(e su+mirror2 Go' to Re-lace a Su+mirror *se the metastat command to view the stat+s o, the R45D'$ vol+me and associated s+bmirrors) # metastat mirror-name *se the metadetach. metaclear. metatinit. and metattach commands to replace an entire s+bmirror) a() *se the metadetach command to the ,ailed s+bmirror ,rom the mirror) # metadetach -f mirror-name submirror -f %orces t(e detac( to occur mirror-name S-ecifies t(e name of t(e mirror submirror S-ecifies t(e su+mirror to detac( b() *se the metaclear command to delete the s+bmirror) # metaclear f submirror f %orces t(e deletion of t(e su+mirror to occur #A

submirror S-ecifies t(e su+mirror to delete c() *se the metainit command to create a new s+bmirror) # metainit volume-name number-of-stripes components-per-stripe component-name volume-name S-ecifies t(e name of t(e &olume to create2 number-of-stripes S-ecifies t(e num+er of stri-es to create2 components-per-stripe S-ecifies t(e num+er of com-onents eac( stri-e s(ould (a&e2 component-name S-ecifies t(e names of t(e com-onents t(at are used2 d() *se the metattach command to attach the new s+bmirror) # metattach mirror submirror ?=am-le: Re-lacing a Su+mirror in a Mirror )(e follo'ing e=am-le illustrates (o' to re-lace a su+mirror in an acti&e mirror2 # metastat d20 d#$: Mirror Su+mirror $: d#1 State: ;ka0 Su+mirror 1: d## State: Needs maintenance 222 # metadetach f d20 d22 d#$: su+mirror d## is detac(ed # metaclear f d22 d##: @oncat,Stri-e is cleared # metainit d22 2 1 c1t0d0s2 1 c1t0d1s2 d##: @oncat,Stri-e is setu# metattach d20 d22 d#$: com-onents are attac(ed 1n t(is e=am-le* t(e metastat command confirms t(at t(e t'o-'a0 mirror* d#$* (as a su+mirror* d##* in t(e ENeeds maintenanceF state2 1n t(is case* t(e entire su+mirror needs to +e cleared and recreated2 )(e metadetac( command detac(es t(e failed su+mirror from t(e mirror +0 using t(e f o-tion* '(ic( forces t(e detac(ment to occur2 )(e metaclear command clears t(e su+mirror2 )(e metainit command recreates su+mirror* d##* 'it( ne' slices2 %inall0* t(e metattac( command attac(es t(e re+uilt su+mirror2 A mirror res0nc(roni<ation +egins automaticall02 )(e s-ecific configuration of t(e ne' &olume* d##* de-ends on t(e com-onent 0ou are re-lacing2 A concatenation* as s(o'n (ere* can sufficientl0 re-lace a concatenation2 Go'e&er* a concatenation 'ould not +e an ideal re-lacement for a stri-e +ecause it could im-act -erformance2 Bou tem-oraril0 lose t(e ca-a+ilit0 for data redundanc0 '(ile t(e mirror is a one-'a0 mirror2 Go' to >nmirror a %ile S0stem >se t(is -rocedure to unmirror a file s0stem t(at can +e unmounted '(ile t(e s0stem is running2 )o unmirror root 3,4* ,&ar* ,usr* or s'a-* or an0 ot(er file s0stem t(at cannot +e unmounted '(ile t(e s0stem is running2 i() Make s+re that yo+ have root privilege and that yo+ have a c+rrent back+p o, all data) Veri,y that at least one s+bmirror is in the 9kay state) # metastat mirror #8

ii() *nmo+nt the ,ile system) # +mo+nt file-s"stem iii() Detach the s+bmirror that will contin+e to be +sed ,or the ,ile system) # metadetach mirror submirror ) iv() !lear the mirror and remaining s+bcomponents) # metaclear -r mirror v() /dit the /etc/v,stab ,ile to +se the component detached in Step& . i, necessary) Remo+nt the ,ile system) # mo+nt file-s"stem ?=am-le: >nmirroring t(e ,o-t %ile S0stem # metastat d4 d!: Mirror Su+mirror $: d# State: ;ka0 Su+mirror 1: d. State: ;ka0 Pass: 1 Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: #1$$A." +locks 312$ G94 d#: Su+mirror of d! State: ;ka0 Si<e: #1$$A." +locks 312$ G94 Stri-e $: :e&ice Start 9lock :+ase State Reloc Got S-are c$t$d$s$ $ No ;ka0 Bes d.: Su+mirror of d! State: ;ka0 Si<e: #1$$A." +locks 312$ G94 Stri-e $: :e&ice Start 9lock :+ase State Reloc Got S-are c1t$d$s$ $ No ;ka0 Bes 222 # +mo+nt opt # metadetach d4 d2 d!: su+mirror d# is detac(ed # metaclear r d4 d!: Mirror is cleared d.: @oncat,Stri-e is cleared 3?dit t(e ,etc,&fsta+ file so t(at t(e entr0 for ,o-t is c(anged from d! to t(e underl0ing slice or &olume4 # mo+nt opt 1n t(is e=am-le* t(e ,o-t file s0stem is com-osed of a t'o-'a0 mirror* d!2 )(e su+mirrors of t(e mirror are d# and d.2 )(e su+mirrors are com-osed of slices ,de&,dsk,c$t$d$s$ and ,de&,dsk,c1t$d$s$2 )(e metastat command &erifies t(at at least one su+mirror is in t(e E;ka0F state2 3A mirror 'it( no su+mirrors in t(e E;ka0F state must +e #/

re-aired first24 )(e file s0stem is unmounted2 )(en* su+mirror d# is detac(ed2 )(e metaclear -r command deletes t(e mirror and t(e ot(er su+mirror* d.2 Ne=t* t(e entr0 for ,o-t in t(e ,etc,&fsta+ file is c(anged to reference t(e underl0ing slice2 1n t(is e=am-le t(e ,etc,&fsta+ file contains t(e follo'ing entr0 for t(e ,o-t file s0stem: /dev/md/dsk/d7 /dev/md/rdsk/d7 /opt ufs 2 yes @(ange t(e entr0 to read as follo's: /dev/md/dsk/d2 /dev/md/rdsk/d2 /opt ufs 2 yes 90 using t(e su+mirror name* 0ou can continue to (a&e t(e file s0stem mounted on a &olume2 %inall0* t(e ,o-t file s0stem is remounted2 90 using d# instead of d! in t(e ,etc,&fsta+ file* 0ou (a&e unmirrored t(e mirror2 9ecause d# consists of a single slice* 0ou can mount t(e file s0stem on t(e slice name 3,de&,dsk,c$t$d$s$4 if 0ou do not 'ant t(e de&ice to su--ort a &olume2 Go' to >nmirror a %ile S0stem )(at @annot 9e >nmounted >se t(is task to unmirror file s0stems* including root 3,4* ,usr* ,o-t* and s'a-* t(at cannot +e unmounted during normal s0stem o-eration2 i() Make s+re that yo+ have root privilege and that yo+ have a c+rrent back+p o, all data) Veri,y that at least one s+bmirror is in the 9kay state) # metastat mirror ii() Detach the s+bmirror that will contin+e to be +sed ,or the ,ile system) # metadetach mirror submirror iii() *se one o, the ,ollowing commands. depending on the ,s yo+ want to +nmirror: %or t(e ,usr* ,o-t* or s'a- file s0stems* c(ange t(e file s0stem entr0 in t(e ,etc,&fsta+ file to use a non-Solaris Volume Manager de&ice 3slice42 %or t(e root 3,4 file s0stem onl0: run t(e metaroot command2 # metaroot rootslice iv() Reboot the system) # reboot v() !lear the remaining mirror and s+bmirrors) # metaclear -r mirror ?=am-le: >nmirroring t(e root 3,4 %ile S0stem # metastat d0 d$: Mirror Su+mirror $: d1$ State: ;ka0 Su+mirror 1: d#$ State: ;ka0 Pass: 1 Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: #1$$A." +locks 312$ G94 d1$: Su+mirror of d$ State: ;ka0 Si<e: #1$$A." +locks 312$ G94 Stri-e $: .$

:e&ice Start 9lock :+ase State Reloc Got S-are c$t.d$s$ $ No ;ka0 Bes d#$: Su+mirror of d$ State: ;ka0 Si<e: #1$$A." +locks 312$ G94 Stri-e $: :e&ice Start 9lock :+ase State Reloc Got S-are c1t.d$s$ $ No ;ka0 Bes # metadetach d0 d20 d$: su+mirror d#$ is detac(ed # metaroot dev dsk c0t3d0s0 # reboot ))) # metaclear -r d0 d$: Mirror is cleared d1$: @oncat,Stri-e is cleared # metaclear d20 d#$: @oncat,Stri-e is cleared 1n t(is e=am-le* t(e root 3,4 file s0stem is a t'o-'a0 mirror* d$2 )(e su+mirrors of t(e mirror are d1$ and d#$2 )(e su+mirrors are com-osed of slices ,de&,dsk,c$t.d$s$ and ,de&,dsk,c1t.d$s$2 )(e metastat command &erifies t(at at least one su+mirror is in t(e E;ka0F state2 3A mirror 'it( no su+mirrors in t(e E;ka0F state must +e re-aired first24 Su+mirror d#$ is detac(ed to make d$ a one-'a0 mirror2 )(e root slice is t(e slice containing t(e root 3,4 file s0stem2 )(e metaroot command is run* using t(e root slice from '(ic( t(e s0stem is going to +oot2 )(is command edits t(e ,etc,s0stem and ,etc,&fsta+ files2 )(e command remo&es information t(at s-ecifies mirroring of t(e root 3,4 file s0stem2 After re+ooting t(e s0stem* t(e metaclear -r command deletes t(e mirror and t(e ot(er su+mirror* d1$2 )(e last metaclear command clears su+mirror d#$2 ?=am-le: >nmirroring t(e s'a- %ile S0stem # metastat d1 d1: Mirror Su+mirror $: d11 State: ;ka0 Su+mirror 1: d#1 State: ;ka0 222 # metadetach d1 d21 d1: su+mirror d#1 is detac(ed ( dit the /etc/vfsta! file to change the entry for s&ap from metadevice to slice name" # reboot ))) # metaclear r d1 d1: Mirror is cleared d11: @oncat,Stri-e is cleared # metaclear d21 d#1: @oncat,stri-e is cleared 1n t(is e=am-le* t(e s'a- file s0stem is made of a t'o-'a0 mirror* d12 )(e su+mirrors of t(e mirror are d11 and d#12 )(e su+mirrors are com-osed of slices ,de&,dsk,c$t.d$s1 and ,de&,dsk,c1t.d$s12 .1

)(e metastat command &erifies t(at at least one su+mirror is in t(e E;ka0F state2 3A mirror 'it( no su+mirrors in t(e E;ka0F state must +e re-aired first24 Su+mirror d#1 is detac(ed to make d1 a one-'a0 mirror2 Ne=t* t(e ,etc,&fsta+ file is edited to c(ange t(e entr0 for s'a- to reference t(e slice t(at is in su+mirror d#12 1n t(is e=am-le* t(e ,etc,&fsta+ file contains t(e follo'ing entr0 for t(e s'a- file s0stem: /dev/md/dsk/d7 /dev/md/rdsk/d7 /opt ufs 2 yes /dev/md/dsk/d1 - - s&ap - no @(ange t(e entr0 to read as follo's: /dev/dsk/c0t4d0s1 - - s&ap - no After re+ooting t(e s0stem* t(e metaclear -r command deletes t(e mirror and t(e ot(er su+mirror* d112 )(e final metaclear command clears su+mirror d#12 Go' to Perform an ;nline 9acku- of a RA1:-1 Volume Bou can use t(is -rocedure on an0 file s0stem e=ce-t t(e root 3,4 file s0stem2 9e a'are t(at t(is t0-e of +ackucreates a Esna-s(otF of an acti&e file s0stem2 :e-ending on (o' t(e file s0stem is +eing used '(en it is 'ritelocked* some files on t(e +acku- mig(t not corres-ond to t(e actual files on disk2 )(e follo'ing limitations a--l0 to t(is -rocedure: K1f 0ou use t(is -rocedure on a t'o-'a0 mirror* +e a'are t(at data redundanc0 is lost '(ile one su+mirror is offline for +acku-2 A multi-'a0 mirror does not (a&e t(is -ro+lem2 K)(ere is some o&er(ead on t(e s0stem '(en t(e reattac(ed su+mirror is res0nc(roni<ed after t(e +acku- is com-lete2 )(e (ig(-le&el ste-s in t(is -rocedure are as follo's: 5rite-locking t(e file s0stem 3>%S onl042 :o not lock root 3,42 %lus(ing all data from cac(e to disk2 >sing t(e metadetac( command to take one su+mirror off of t(e mirror >nlocking t(e file s0stem >sing t(e fsck command to c(eck t(e file s0stem on t(e detac(ed su+mirror 9acking u- t(e data on t(e detac(ed su+mirror >sing t(e metattac( command to -lace t(e detac(ed su+mirror +ack in t(e mirror Note 1f 0ou use t(ese -rocedures regularl0* -ut t(em into a scri-t for ease of use2

)i- )(e safer a--roac( to t(is -rocess is to attac( a t(ird or fourt( su+mirror to t(e mirror* allo' it to res0nc(roni<e* and use it for t(e +acku-2 )(is tec(ni6ue ensures t(at data redundanc0 is maintained at all times2 i() Veri,y that the mirror is in the 19kay2 state) A mirror t(at is in t(e EMaintenanceF state s(ould +e re-aired first2 # metastat mirror ii() ?l+sh data and *?S logging data ,rom cache to disk and write'lock the ,ile system) # /+sr/sbin/lock,s + mount-point ;nl0 a >%S &olume needs to +e 'rite-locked2 1f t(e &olume is set u- as a ra' de&ice for data+ase management soft'are or some ot(er a--lication* running t(e lockfs command is not necessar0 Bou mig(t* (o'e&er* 'ant to run t(e a--ro-riate &endor-su--lied utilit0 to flus( an0 +uffers and lock access2 @aution :o not 'rite-lock t(e root 3,4 file s0stem2 5rite-locking t(e root 3,4 file s0stem causes t(e s0stem to (ang2 1f 0ou are +acking u- 0our root 3,4 file s0stem* ski- t(is ste-2 iii() Detach one s+bmirror ,rom the mirror) # metadetach mirror submirror mirror 1s t(e &olume name of t(e mirror2 .#

,ubmirror 1s t(e &olume name of t(e su+mirror 3&olume4 +eing detac(ed2 Reads continue to +e made from t(e ot(er su+mirror2 )(e mirror is out of s0nc as soon as t(e first 'rite is made2 )(is inconsistenc0 is corrected '(en t(e detac(ed su+mirror is reattac(ed in Ste- A2 iv() *nlock the ,ile system and allow writes to contin+e) # /+sr/sbin/lock,s -u mount-point Bou mig(t need to -erform necessar0 unlocking -rocedures +ased on &endor-de-endent utilities used in Ste- #2 v() *se the ,sck command to check the ,ile system on the detached s+bmirror) -his step ens+res a clean back+p occ+rs) # ,sck dev md rdsk name vi() @er,orm a back+p o, the o,,lined s+bmirror) >se t(e ufsdum- command or 0our usual +acku- utilit02 0ote )o ensure a -ro-er +acku-* use t(e ra' &olume name* suc( as ,de&,md,rdsk,d!2 >sing t(e ra' &olume name access to storage t(at is greater t(an # G+0tes2 vii() 4ttach the s+bmirror) # metattach mirror submirror SVM automaticall0 +egins res0nc(roni<ing t(e su+mirror 'it( t(e mirror2 ?=am-le: Performing an ;nline 9acku- of a RA1:-1 Volume )(is e=am-le uses a mirror* d12 )(e mirror consists of su+mirrors d#* d. and d!2 )(e su+mirror d. is detac(ed and +acked u- '(ile su+mirrors d# and d! sta0 online2 )(e file s0stem on t(e mirror is ,(ome12 # metastat d1 d1: Mirror Su+mirror $: d# State: ;ka0 Su+mirror 1: d. State: ;ka0 Su+mirror 1: d! State: ;ka0 222 # /+sr/sbin/lock,s '+ -ome1 # metadetach d1 d3 # /+sr/sbin/lock,s u -ome1 # /+sr/sbin/,sck dev md rdsk d3 3Perform +acku- using ,de&,md,rdsk,d.4 # metattach d1 d3 Soft Partitions 3;&er&ie'4 As t(e storage ca-acit0 of disks (as increased* disk arra0s -resent larger logical de&ices to Solaris s0stems2 1n order to create more managea+le file s0stems or -artition si<es* users mig(t need to su+di&ide disks or logical &olumes into more t(an eig(t -artitions2 Solaris Volume ManagerCs soft -artition feature addresses t(is need2 Solaris Volume Manager can su--ort u- to 81/# logical &olumes -er disk set2 )(is num+er includes t(e local* or uns-ecified* disk set2 Solaris Volume Manager configures &olumes d0namicall0 as t(e0 are needed2 Bou can use soft -artitions to di&ide a disk slice or logical &olume into as man0 -artitions as needed2 Bou must -ro&ide a name for eac( di&ision* or soft -artition* 7ust like 0ou do for ot(er storage &olumes* suc( as stri-es or mirrors2 A soft -artition* once named* can +e accessed +0 a--lications* including file s0stems* as long as t(e soft -artition is not included in anot(er &olume2 ;nce included in a &olume* t(e soft -artition s(ould no longer +e directl0 ..

accessed2 Soft -artitions can +e -laced directl0 a+o&e a disk slice* or on to- of a mirror* stri-e* or RA1:-" &olume2 A soft -artition ma0 not +e +ot( a+o&e and +elo' ot(er &olumes2 %or e=am-le* a soft -artition +uilt on a stri-e 'it( a mirror +uilt on t(e soft -artition is not allo'ed2 A soft -artition a--ears to file s0stems and ot(er a--lications as a single contiguous logical &olume2 Go'e&er* t(e soft -artition actuall0 com-rises a series of e=tents t(at could +e located at ar+itrar0 locations on t(e underl0ing media2 1n addition to t(e soft -artitions* e=tent (eaders 3also called s0stem reco&er0 data areas4 on disk record information a+out t(e soft -artitions to facilitate reco&er0 in t(e e&ent of a catastro-(ic s0stem failure2 Soft Partitions 3)ask Ma-4

Go' to @reate a Soft Partition *se one o, the ,ollowing methods to create a so,t partition: )o create a soft -artition* use t(e follo'ing form of t(e metainit command: # metainit [-s diskset] soft-partition -p [-e] component si.e -s diskset S-ecifies '(ic( disk set is +eing used2 1f -s is not s-ecified* t(e local 3default4 disk set is used2 -p S-ecifies t(at a soft -artition +e configured2 -e S-ecifies t(at t(e entire disk s(ould +e reformatted2 %ormatting t(e disk -ro&ides a slice $* '(ic( takes most of t(e disk2 %ormatting t(e disk also -ro&ides a slice A of a minimum of ! M+0tes in si<e2 Slice A contains a state data+ase re-lica2 soft-partition S-ecifies t(e name of t(e soft -artition2 )(e name is of t(e form dnnn* '(ere nnn is a num+er in a range +et'een $ and 81/#2 component S-ecifies t(e disk* slice* or logical &olume from '(ic( to create t(e soft -artition2 All e=isting data on t(e com-onent is destro0ed +ecause t(e soft -artition (eaders are 'ritten at t(e +eginning of t(e com-onent2 si.e S-ecifies t(e si<e of t(e soft -artition2 )(e si<e is s-ecified as a num+er follo'ed +0 one of t(e follo'ing: M or m for mega+0tes G or g for giga+0tes .!

) or t for tera+0tes 9 or + for +locks3sectors4

?=am-le: @reating a Soft Partition 1n t(e follo'ing e=am-le* a !-G+0te soft -artition called d#$ is created on c1t.d$s#2 # metainit d20 -p c1t3d0s2 4/ ?=am-le: )aking a 5(ole :isk for Soft Partitions )(e follo'ing e=am-le creates a soft -artition and formats disk c1t#d$2 )(is action destro0s an0 data on t(at disk and creates a ne' soft -artition on slice $2 # metainit d7 -p -e c1t2d0 10 Go' to @(eck t(e Status of a Soft Partition *se one o, the ,ollowing methods to check the stat+s o, a so,t partition: )o &ie' t(e e=isting configuration* use t(e follo'ing form of t(e metastat command: # metastat soft-partition soft-partition S-ecifies t(e name of t(e -artition 0ou 'ant to c(eck2 ?=am-le: @(ecking t(e Status of a Soft Partition 1n t(e follo'ing e=am-le* t(e status of soft -artition d1 is c(ecked2 )(is soft -artition includes t'o e=tents and is +uilt on t(e RA1:-1 &olume d1$$2 # metastat d1 d1: soft -artition com-onent: d1$$ state: ;HAB si<e: !#6A!#8" +locks ?=tent Start 9lock 9lock @ount $ 1$#.! !$6A!#8" 1 8/.AA#6. #$$$$$$ d1$$: Mirror Su+mirror $: d1$ State: ;HAB Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: !#6A!#8"A +locks d1$: Su+mirror of d1$$ State: ;HAB Got s-are -ool: (s-$$# Si<e: !#6A!#8"A +locks Stri-e $: 3interlace: .# +locks4 :e&ice Start 9lock :+ase State Got S-are c.t.d$s$ $ No ;ka0 Go' to ?=-and a Soft Partition 5(en no ot(er logical &olumes (a&e +een +uilt on a soft -artition* 0ou can add s-ace to t(e soft -artition2 %ree s-ace is located and used to e=tend t(e -artition2 ?=isting data is not mo&ed2

."

0ote 1f a soft -artition (as +een used to create anot(er &olume 3for e=am-le* if it is a com-onent of a RA1:-$ &olume4* t(e soft -artition cannot +e e=-anded2 1n most cases* t(e same o+7ecti&e 3-ro&iding more s-ace for t(e de&ice t(at contains t(e soft -artition4 can +e ac(ie&ed +0 concatenating ot(er &olumes onto t(e containing de&ice2 *se the ,ollowing method to e7pand a so,t partition: )o add s-ace to a soft -artition* use t(e follo'ing form of t(e metattac( command: # metattach [-s diskset] soft-partition si.e diskset S-ecifies t(e name of t(e disk set in '(ic( t(e soft -artition e=ists2 soft-partition S-ecifies t(e name of an e=isting soft -artition2 si.e S-ecifies t(e amount of storage s-ace to add2 ?=am-le: ?=-anding a Soft Partition )(e e=am-le s(o's (o' to attac( s-ace to a soft -artition2 )(e file s0stem is t(en e=-anded using t(e gro'fs command '(ile t(e soft -artition is online and mounted2 # mo+nt dev md dsk d20 -ome2 # metattach d20 10/ # grow,s ) -ome2 dev md rdsk d20 Go' to Remo&e a Soft Partition *se one o, the ,ollowing methods to delete a so,t partition: )o delete a soft -artition* use one of t(e follo'ing forms of t(e metaclear command: # metaclear [-s diskset] component # metaclear [-s diskset] -r soft-partition # metaclear [-s diskset] -p component diskset S-ecifies t(e disk set in '(ic( t(e soft -artition e=ists2 soft-partition S-ecifies t(e soft -artition to delete2 -r S-ecifies to recursi&el0 delete logical &olumes* +ut not &olumes on '(ic( ot(ers de-end2 -p S-ecifies to -urge all soft -artitions on t(e s-ecified com-onent* e=ce-t t(ose soft -artitions t(at are o-en2 component S-ecifies t(e com-onent from '(ic( to clear all of t(e soft -artitions2 ?=am-le: Remo&ing a Soft Partition )(is e=am-le s(o's (o' to delete all soft -artitions on c1t!d#s$2 # metaclear -p c1t4d2s0 ;&er&ie' of RA1:-" Volumes RA1: le&el " is similar to stri-ing* +ut 'it( -arit0 data distri+uted across all com-onents 3disk or logical &olume42 1f a com-onent fails* t(e data on t(e failed com-onent can +e re+uilt from t(e distri+uted data and -arit0 information on t(e ot(er com-onents2 1n Solaris Volume Manager* A RA1:-" &olume uses storage ca-acit0 e6ui&alent to one com-onent in t(e &olume to store redundant information 3-arit042 )(is -arit0 information contains information a+out user data stored on t(e remainder of t(e RA1:-" &olumeCs com-onents2 )(at is* if 0ou (a&e t(ree com-onents* t(e e6ui&alent of one com-onent is used for t(e -arit0 information2 )(e -arit0 information is distri+uted across all com-onents in t(e &olume2 Go'e&er* 0ou cannot use a RA1:-" &olume for t(e root 3,4* ,usr* and s'a- file s0stems* or for ot(er e=isting file s0stems2 Solaris Volume Manager automaticall0 res0nc(roni<es a RA1:-" &olume '(en 0ou re-lace an e=isting com-onent or during re+oot in case of s0stem failure or -anic2 .6

?=am-leIRA1:-" Volume %igure illustrates a RA1:-" &olume t(at consists of four disks 3com-onents42 )(e first t(ree data segments are 'ritten to @om-onent A3interlace 14* @om-onent 93interlace #4* and @om-onent @ 3interlace .42 )(e ne=t data segment t(at is 'ritten is a -arit0 segment2 )(is -arit0 segment is 'ritten to @om-onent :3P 1 .42 )(is segment consists of an e=clusi&e ;R of t(e first t(ree segments of data2 )(e ne=t t(ree data segments are 'ritten to @om-onent A3interlace !4* @om-onent 9 3interlace "4* and @om-onent :3interlace 642 )(en* anot(er -arit0 segment is 'ritten to @om-onent @ 3P ! 642 )(is -attern of 'riting data and -arit0 segments results in +ot( data and -arit0 +eing s-read across all disks in t(e RA1:-" &olume2 ?ac( dri&e can +e read inde-endentl02 )(e -arit0 -rotects against a single disk failure2 1f eac( disk in t(is e=am-le 'ere # G+0tes* t(e total ca-acit0 of t(e RA1:-" &olume 'ould +e 6 G+0tes2 ;ne dri&eCs 'ort( of s-ace is allocated to -arit02

?=am-leI@oncatenated 3?=-anded4 RA1:-" Volume )(e follo'ing figure s(o's an e=am-le of an RA1:-" &olume t(at initiall0 consisted of four disks 3com-onents42 A fift( disk (as +een d0namicall0 concatenated to t(e &olume to e=-and t(e RA1:-" &olume2 )(e -arit0 areas are allocated '(en t(e initial RA1:-" &olume is created2 ;ne com-onentCs 'ort( of s-ace is allocated to -arit0* alt(oug( t(e actual -arit0 +locks are distri+uted across all of t(e original com-onents to distri+ute 1,;2 5(en additional com-onents are concatenated to t(e RA1:-" &olume* t(e additional s-ace is de&oted entirel0 to data2 No ne' -arit0 +locks are allocated2 )(e data on t(e concatenated com-onent is* (o'e&er* included in t(e -arit0 calculations* so t(e data is -rotected against single de&ice failures2 @oncatenated RA1:-" &olumes are not suited for long-term use2 >se a concatenated RA1:-" &olume until it is -ossi+le to reconfigure a larger RA1:-" &olume2 )(en* co-0 t(e data to t(e larger &olume2 0ote 5(en 0ou add a ne' com-onent to a RA1:-" &olume* Solaris Volume Manager E<erosF all t(e +locks in t(at com-onent2 )(is -rocess ensures t(at t(e -arit0 -rotects t(e ne' data2 As data is 'ritten to t(e additional s-ace* Solaris Volume Manager includes t(e data in t(e -arit0 calculations2

.A

Re6uirements for RA1:-" Volumes A RA1:-" &olume must consist of at least t(ree com-onents2 )(e more com-onents a RA1:-" &olume contains* (o'e&er* t(e longer read and 'rite o-erations take '(en a com-onent fails2 RA1:-" &olumes cannot +e stri-ed* concatenated* or mirrored2 :o not create a RA1:-" &olume from a com-onent t(at contains an e=isting file s0stem2 :oing so 'ill erase t(e data during t(e RA1:-" initiali<ation -rocess2 5(en 0ou create a RA1:-" &olume* 0ou can define t(e interlace &alue2 1f not s-ecified* t(e interlace &alue defaults to 16 H+0tes2 )(is &alue is reasona+le for most a--lications2 A RA1:-" &olume 3'it( no (ot s-ares4 can onl0 (andle a single com-onent failure2 5(en 0ou create RA1:-" &olumes* use com-onents across se-arate controllers2 @ontrollers and associated ca+les tend to fail more often t(an disks2 >se com-onents of t(e same si<e2 @reating a RA1:-" &olume 'it( com-onents of different si<es results in unused disk s-ace2 Guidelines for RA1:-" Volumes 9ecause of t(e com-le=it0 of -arit0 calculations* &olumes 'it( greater t(an a+out #$ -ercent 'rites s(ould -ro+a+l0 not +e RA1:-" &olumes2 1f data redundanc0 on a 'rite-(ea&0 &olume is needed* consider mirroring2 .8

1f t(e different com-onents in a RA1:-" &olume reside on different controllers and t(e accesses to t(e &olume are -rimaril0 large se6uential accesses* t(en setting t(e interlace &alue to .# H+0tes mig(t im-ro&e -erformance2 Bou can e=-and a RA1:-" &olume +0 concatenating additional com-onents to t(e &olume2 @oncatenating a ne' com-onent to an e=isting RA1:-" &olume decreases t(e o&erall -erformance of t(e &olume +ecause t(e data on concatenations is se6uential2 :ata is not stri-ed across all com-onents2 )(e original com-onents of t(e &olume (a&e data and -arit0 stri-ed across all com-onents2 )(is stri-ing is lost for t(e concatenated com-onent2 Go'e&er* t(e data is still reco&era+le from errors +ecause t(e -arit0 is used during t(e com-onent 1,;2 )(e resulting RA1:-" &olume continues to (andle a single com-onent failure2 @oncatenated com-onents also differ in t(e sense t(at t(e0 do not (a&e -arit0 stri-ed on an0 of t(e regions2 )(us* t(e entire contents of t(e com-onent are a&aila+le for data2 An0 -erformance en(ancements for large or se6uential 'rites are lost '(en com-onents are concatenated2 Bou can create a RA1:-" &olume 'it(out (a&ing to E<ero outF t(e data +locks2 )o do so* do one of t(e follo'ing: >se t(e metainit command 'it( t(e -k o-tion2 )(e -k o-tion recreates t(e RA1:-" &olume 'it(out initiali<ing it* and sets t(e disk +locks to t(e E;ka0F state2 )(is o-tion is -otentiall0 dangerous* as an0 errors t(at e=ist on disk +locks 'it(in t(e &olume 'ill cause un-redicta+le +e(a&ior from Solaris Volume Manager* including t(e -ossi+ilit0 of fa+ricated data2 1nitiali<e t(e de&ice and restore data from ta-e2 ;&er&ie' of @(ecking Status of RA1:-" Volumes Bou can c(eck t(e status of RA1:-" &olumes +0 looking at t(e &olume states and t(e slice states for t(e &olume2 )(e slice state -ro&ides t(e most s-ecific information '(en 0ou are trou+les(ooting RA1:-" &olume errors2 )(e RA1:-" &olume state onl0 -ro&ides general status information* suc( as 11ka"2 or 1)aintenance22 1f t(e RA1:-" &olume state re-orts a E%aintenanceF state* refer to t(e slice state2 )(e slice state s-ecificall0 re-orts if t(e slice is in t(e E%aintenanceF state or t(e E2ast rredF state2 Bou take a different reco&er0 action de-ending on* if t(e slice is in t(e E%aintenanceF state or t(e E2ast rredF state2 1f 0ou onl0 (a&e a slice in t(e E%aintenanceF state* it can +e re-aired 'it(out loss of data2 1f 0ou (a&e a slice in t(e E%aintenanceF state and a slice in t(e E2ast rredF state* data (as -ro+a+l0 +een corru-ted2 Bou must fi= t(e slice in t(e EMaintenanceF state first* t(en fi= t(e E2ast rredF slice2

)(e follo'ing ta+le e=-lains RA1:-" &olume states2 State 1nitiali<ing Meaning Slices are in t(e -rocess of (a&ing all disk +locks <eroed2 )(is -rocess is necessar0 due to t(e nature of RA1:-" &olumes 'it( res-ect to data and -arit0 interlace stri-ing2 ;nce t(e state c(anges to E;ka0*F t(e initiali<ation -rocess is com-lete and 0ou are a+le to o-en t(e de&ice2 >ntil t(en* a--lications recei&e error messages2 )(e de&ice is read0 for use and is currentl0 free from errors2 A slice (as +een marked as failed due to 1,; or o-en errors2 )(ese errors 'ere encountered during a read or 'rite o-eration2 ./

;ka0 Maintenance

)(e follo'ing ta+le e=-lains t(e slice states for a RA1:-" &olume U -ossi+le actions to take2 State 1nitiali<ing Meaning Slices are in t(e -rocess of (a&ing all disk +locks <eroed2 )(is -rocess is necessar0 due to t(e nature of RA1:-" &olumes 'it( res-ect to data and -arit0 interlace stri-ing2 Action Normall0* none2 1f an 1,; error occurs during t(is -rocess* t(e de&ice goes into t(e EMaintenanceF state2 1f t(e initiali<ation fails* t(e &olume is in t(e E1nitiali<ation %ailedF state* and t(e slice is in t(e EMaintenanceF state2 1f t(is (a--ens* clear t(e &olume and recreate it2 None2 Slices can +e added or re-laced* if necessar02 1f desired* monitor t(e RA1:-" &olume status until t(e res0nc(roni<ation is done2

;ka0 Res0ncing

)(e de&ice is read0 for use and is currentl0 free from errors2 )(e slice is acti&el0 +eing res0nc(roni<ed2 An error (as occurred and +een corrected* a slice (as +een ena+led* or a slice (as +een added2 A single slice (as +een marked as failed due to 1,; or o-en errors2 )(ese errors 'ere encountered during a read or 'rite o-eration2

Maintenance

?na+le or re-lace t(e failed slice2 )(e metastat command 'ill s(o' an in&oke reco&er0 message 'it( t(e a--ro-riate action to take 'it( t(e metare-lace command2 ?na+le or re-lace t(e failed slices2 )(e metastat command 'ill s(o' an in&oke reco&er0 message 'it( t(e a--ro-riate action to take 'it( t(e metare-lace command2 )(is command must +e run 'it( t(e -f flag2 )(is state indicates t(at data mig(t +e fa+ricated due to multi-le failed slices2

Maintenance,D ast ?rred

Multi-le slices (a&e encountered errors2 )(e state of t(e failed slices is eit(er EMaintenanceF or EDast ?rred2F 1n t(is state* no 1,; is attem-ted on t(e slice t(at is in t(e EMaintenanceF state* Go'e&er* 1,; is attem-ted on t(e slice marked EDast ?rredF* 'it( t(e outcome +eing t(e o&erall status of t(e 1,; re6uest2

RA1:-" Volumes 3)ask Ma-4

!$

)ask @reate RA1:-" &olumes @(eck t(e status of RA1:-" &olumes ?=-and a RA1:-" &olume ?na+le a slice in a RA1:-" &olume Re-lace a slice in a RA1:-" &olume

:escri-tion >se t(e Solaris Volume Manager G>1 or t(e metainit command to create RA1:-" &olumes2 >se t(e Solaris Volume Manager G>1 or t(e metastat command to c(eck t(e status of RA1:-" &olumes2 >se t(e Solaris Volume Manager G>1 or t(e metattac( command to e=-and RA1:-" &olumes2 >se t(e Solaris Volume Manager G>1 or t(e metare-lace command to ena+le slices in RA1:-" &olumes2 >se t(e Solaris Volume Manager G>1 or t(e metare-lace command to re-lace slices in RA1:-" &olumes2

Go' to @reate a RA1:-" Volume >se t(e follo'ing form of t(e metainit command: # metainit volume-name -r component component component -i interlace-value volume-name S-ecifies t(e name of t(e &olume to create2 -r S-ecifies to create a RA1:-" &olume2 component S-ecifies a slice or soft -artition to include in t(e RA1:-" &olume2 At least . com-onents are re6uired2 -i S-ecifies an interlace &alue2 ?=am-le: @reating a RA1:-" Volume of )(ree Slices 1n t(is e=am-le* t(e RA1:-" &olume d!" is created 'it( t(e -r o-tion from . slices2 9ecause no interlace &alue is s-ecified* d!" uses t(e default of 16 H+0tes2 )(e s0stem &erifies t(at t(e RA1:-" &olume (as +een set u- and +egins initiali<ing t(e &olume2 Bou must 'ait for t(e initiali<ation to finis( +efore 0ou can use t(e RA1:-" &olume2 # metainit d45 -r c2t3d0s2 c3t0d0s2 c4t0d0s2 d!": RA1: is setuGo' to @(eck t(e Status of a RA1:-" Volume 5(en c(ecking status of RA1:-" &olumes* 0ou need to c(eck +ot( t(e RA1:-" state and t(e slice state to full0 understand t(e state of t(e &olume and t(e -ossi+ilit0 of data loss if t(e &olumes are not in an ;ka0 state2 >se t(e metastat command to dis-la0 t(e status of a RA1:-" &olume2 # metastat [-s diskset] [volume] -s diskset S-ecifies t(e name of t(e disk set on '(ic( to -erform t(e command2 volume S-ecifies t(e &olume to dis-la02 %or eac( slice in t(e RA1:-" &olume* t(e metastat command s(o's t(e follo'ing: 2evice S-ecifies t(e de&ice name of t(e slice in t(e stri-e2 ,tart 3lock S-ecifies t(e +lock on '(ic( t(e slice +egins2 2base S-ecifies '(et(er t(e slice contains a state data+ase re-lica ,tate S-ecifies t(e state of t(e slice2 4ot ,pare S-ecifies '(et(er t(e slice is +eing used to (ot s-are a failed slice !1

?=am-le: Vie'ing RA1:-" Volume Status )(e follo'ing e=am-le s(o's RA1:-" &olume out-ut from t(e metastat command2 # metastat d10 d1$: RA1: State: ;ka0 1nterlace: .# +locks Si<e: 1$$8$ +locks ;riginal de&ice: Si<e: 1$!/6 +locks :e&ice Start 9lock :+ase State Got S-are c$t$d$s1 ..$ No ;ka0 c1t#d$s1 ..$ No ;ka0 c#t.d$s1 ..$ No ;ka0

Go' to ?=-and a RA1:-" Volume 1n general* attac(ing com-onents is a s(ort-term solution to a RA1:-" &olume t(at is running out of s-ace2 %or -erformance reasons* it is +est to (a&e a E-ureF RA1:-" &olume2 1f 0ou must e=-and an e=isting RA1:-" &olume to gain e=tra storage s-ace* >se t(e follo'ing form of t(e metattac( command: # metattach volume-name name-of-component-to-add volume-name S-ecifies t(e name of t(e RA1:-" &olume to e=-and2 name-of-component-to-add S-ecifies t(e name of t(e com-onent to attac(2 ?=am-le: Adding a @om-onent to a RA1:-" Volume )(e follo'ing e=am-le s(o's t(e addition of slice c#t1d$s# to an e=isting RA1:-" &olume* d#2 # metattach d2 c2t1d0s2 d#: column is attac(ed Go' to ?na+le a @om-onent in a RA1:-" Volume 1f a disk dri&e is defecti&e* 0ou can re-lace it 'it( anot(er a&aila+le disk 3and its slices4 on t(e s0stem as documented in EGo' to Re-lace a @om-onent in a RA1:-" VolumeF2 Alternati&el0* 0ou can re-air t(e disk* la+el it* and run t(e metare-lace command 'it( t(e -e o-tion to re-ena+le t(e disk2 >se t(e follo'ing form of t(e metare-lace command: # metareplace e volume-name component-name e S-ecifies to -lace t(e failed com-onent into an a&aila+le state and to -erform a failed com-onent2 volume-name S-ecifies t(e name of t(e &olume containing t(e failed com-onent2 component-name S-ecifies t(e name of t(e failed com-onent2 res0nc(roni<ation on t(e

)(e metare-lace command automaticall0 starts res0nc(roni<ing t(e ne' com-onent 'it( t(e rest of t(e RA1:-" &olume2 ?=am-le: ?na+ling a @om-onent in a RA1:-" Volume 1n t(e follo'ing e=am-le* t(e RA1:-" &olume d#$ (as a slice* c#t$d$s#* '(ic( (ad a soft error2 )(e metare-lace command 'it( t(e -e o-tion ena+les t(e slice2 # metareplace -e d20 c2t0d0s2 !#

Go' to Re-lace a @om-onent in a RA1:-" Volume )(is task re-laces a failed slice of a RA1:-" &olume in '(ic( onl0 one slice (as failed2 Bou can use t(e metare-lace command on non-failed de&ices to c(ange a disk slice or ot(er com-onent2 i() Make s+re that yo+ have a c+rrent back+p o, all data and that yo+ have s+per+ser access) ii() *se the ,ollowing method to determine which slice o, the R45D': vol+me needs to be replaced: >se t(e metastat command2 # metastat volume volume S-ecifies t(e name of t(e RA1:-" &olume2 Dook for t(e ke0'ord -(rase E0eeds %aintenanceF to identif0 t(e state of t(e RA1:-" &olume2 Dook for t(e ke0'ord E%aintenanceF to identif0 t(e failed slice2 iii() *se one o, the ,ollowing methods to replace the ,ailed slice with another slice: >se t(e follo'ing form of t(e metare-lace command: # metareplace volume-name failed-component ne+-component volume-name is t(e name of t(e RA1:-" &olume 'it( a failed com-onent2 failed-component s-ecifies t(e name of t(e com-onent to re-lace2 ne+-component s-ecifies t(e name of t(e com-onent to add to t(e &olume in -lace of t(e failed com-onent2 iv() -o veri,y the stat+s o, the replacement slice. +se one o, the methods described in Step 6ii( ) )(e state of t(e re-laced slice s(ould +e ERes0ncingF or E;ka02F ?=am-le: Re-lacing a RA1:-" @om-onent # metastat d1 d1: RA1: State: Needs Maintenance 1n&oke: metare-lace d1 c$t1!d$s6 Tne' de&iceO 1nterlace: .# +locks Si<e: 8$8A$!$ +locks ;riginal de&ice: Si<e: 8$8A"#$ +locks :e&ice Start 9lock :+ase State Got S-are c$t/d$s6 ..$ No ;ka0 c$t1.d$s6 ..$ No ;ka0 c$t1$d$s6 ..$ No ;ka0 c$t11d$s6 ..$ No ;ka0 c$t1#d$s6 ..$ No ;ka0 c$t1!d$s6 ..$ No Maintenance # metareplace d1 c0t14d0s$ c0t4d0s$ d1: de&ice c$t1!d$s6 is re-laced 'it( c$t!d$s6 # metastat d1 d1: RA1: State: Res0ncing Res0nc in -rogress: /8Qdone 1nterlace: .# +locks Si<e: 8$8A$!$ +locks ;riginal de&ice: !.

Si<e: 8$8A"#$ +locks :e&ice Start 9lock :+ase State Got S-are c$t/d$s6 ..$ No ;ka0 c$t1.d$s6 ..$ No ;ka0 c$t1$d$s6 ..$ No ;ka0 c$t11d$s6 ..$ No ;ka0 c$t1#d$s6 ..$ No ;ka0 c$t!d$s6 ..$ No Res0ncing 1n t(is e=am-le* t(e metastat command dis-la0s t(e failed slice in t(e RA1:-" &olume* d12 After locating an a&aila+le slice* t(e metare-lace command is run* s-ecif0ing t(e failed slice first* t(en t(e re-lacement slice2 1f no ot(er slices are a&aila+le* run t(e metare-lace command 'it( t(e -e o-tion to attem-t to reco&er from -ossi+le soft errors +0 res0nc(roni<ing t(e failed de&ice2 1f multi-le errors e=ist* t(e slice in t(e EMaintenanceF state must first +e re-laced or ena+led2 )(en t(e slice in t(e EDast ?rredF state can +e re-aired2 After running t(e metare-lace command* 0ou can use t(e metastat command to monitor t(e -rogress of t(e res0nc(roni<ation2 :uring t(e re-lacement* t(e state of t(e &olume and t(e ne' slice is ERes0ncing2F Bou can continue to use t(e &olume '(ile it is in t(is state2 ;&er&ie' of Got S-ares and Got S-are Pools A (ot s-are -ool is collection of slices 3(ot s-ares4 t(at SVM uses to -ro&ide increased data a&aila+ilit0 for RA1:1 3mirror4 and RA1:-" &olumes2 1f a slice failure occurs* in eit(er a su+mirror or a RA1:-" &olume* SVM automaticall0 su+stitutes t(e (ot s-are for t(e failed slice2 ,ot spares do not apply to '()*-0 volumes or one-&ay mirrors2 %or automatic su+stitution to 'ork* redundant data must +e a&aila+le2 A (ot s-are cannot +e used to (old data or state data+ase re-licas '(ile it is idle2 A (ot s-are must remain read0 for immediate use a slice failure occurs in t(e &olume 'it( '(ic( it is associated2 Solaris Volume Manager ena+les 0ou to d0namicall0 add* delete* re-lace* and ena+le (ot s-ares 'it(in (ot s-are -ools2 Got S-ares A (ot s-are is a slice 3not a &olume4 t(at is functional and a&aila+le* +ut not in use2 A (ot s-are is reser&ed* i2e2 it stands read0 to su+stitute for a failed slice in a su+mirror or RA1:-" &olume2 Got s-ares -ro&ide -rotection from (ard'are failure2 Slices from RA1:-1 and RA1:-" &olumes are automaticall0 re-laced +0 (ot s-ares '(en t(e0 fail2 )(e (ot s-ares are res0nc(roni<ed a&aila+le for use in t(e &olume2 )(e (ot s-are can +e used tem-oraril0 until t(e failed su+mirror or RA1:-" &olume slice can eit(er +e fi=ed or re-laced2 Bou create (ot s-ares 'it(in (ot s-are -ools2 1ndi&idual (ot s-ares can +e included in one or more (ot s-are -ools2 %or e=am-le* 0ou mig(t (a&e t'o su+mirrors and t'o (ot s-ares2 )(e (ot s-ares can +e arranged as t'o (ot s-are -ools* 'it( eac( -ool (a&ing t(e t'o (ot s-ares in a different order of -reference2 )(is strateg0 ena+les 0ou to s-ecif0 '(ic( (ot s-are is used first2 )(is strateg0 also im-ro&es a&aila+ilit0 +0 (a&ing more (ot s-ares a&aila+le2 A su+mirror or RA1:-" &olume can use onl0 a (ot s-are '(ose si<e is e6ual to or greater t(an t(e si<e of t(e failed slice in t(e su+mirror or RA1:-" &olume2 1f* for e=am-le* 0ou (a&e a su+mirror made of 1-G+0te dri&es* a (ot s-are for t(e su+mirror must +e 1 G+0te or greater2 Got S-are Pools A (ot s-are -ool is an ordered list 3collection4 of (ot s-ares2 Bou can -lace (ot s-ares into one or more (ot s-are -ools to get t(e most fle=i+ilit0 and -rotection from t(e fe'est slices2 Bou could -ut a single slice designated for use as a (ot s-are into multi-le (ot s-are -ools* 'it( eac( (ot s-are -ool (a&ing different slices and c(aracteristics2 )(en* 0ou could assign a (ot s-are -ool to an0 num+er of su+mirror &olumes or RA1:-" &olumes2 0ote 3 8ou can assign a single hot spare pool to multiple su!mirrors or '()*-5 volumes. ,o&ever, a su!mirror or a '()*-5 volume can !e associated &ith only one hot spare pool. !!

Go' Got S-ares 5ork 5(en 1,; errors occur* Solaris Volume Manager searc(es t(e (ot s-are -ool for a (ot s-are +ased on t(e order in '(ic( (ot s-ares 'ere added to t(e (ot s-are -ool2 Solaris Volume Manager c(ecks t(e (ot s-are -ool for t(e first a&aila+le (ot s-are '(ose si<e is e6ual to or greater t(an t(e si<e of t(e slice t(at is +eing re-laced2 )(e first (ot s-are found +0 Solaris Volume Manager t(at is large enoug( is used as a re-lacement2 Solaris Volume Manager c(anges t(e (ot s-areCs status to E1n->seF and automaticall0 res0nc(roni<es t(e data if necessar02 )(e order of (ot s-ares in t(e (ot s-are -ool is not c(anged '(en a re-lacement occurs2 1n t(e case of a mirror* t(e (ot s-are is res0nc(roni<ed 'it( data from a functional su+mirror2 1n t(e case of a RA1:-" &olume* t(e (ot s-are is res0nc(roni<ed 'it( t(e ot(er slices in t(e &olume2 1f a slice of ade6uate si<e is not found in t(e list of (ot s-ares* t(e su+mirror or RA1:-" &olume t(at failed goes into a failed state and t(e (ot s-ares remain unused2 1n t(e case of t(e su+mirror* t(e su+mirror no longer re-licates t(e data com-letel02 1n t(e case of t(e RA1:-" &olume* data redundanc0 is no longer a&aila+le2 )i- 5(en 0ou add (ot s-ares to a (ot s-are -ool* add t(em from smallest to largest in si<e2 )(is strateg0 a&oids -otentiall0 'asting ElargeF (ot s-ares as re-lacements for small slices2 5(en a slice e=-eriences an 1,; error* t(e failed slice is -laced in t(e E9rokenF state2 )o fi= t(is condition* first re-air or re-lace t(e failed slice2 )(en* +ring t(e slice +ack to t(e EA&aila+leF state +0 using t(e ?n(anced Storage tool 'it(in t(e Solaris Management @onsole2 ;r* use t(e meta-s e command2 A su+mirror or RA1:-" &olume is uses a (ot s-are in -lace of a failed slice until t(at failed slice is ena+led or re-laced2 )(e (ot s-are is t(en marked EA&aila+leF in t(e (ot s-are -ool2 )(is (ot s-are is again read0 for use2 Got S-are Pool States )(e follo'ing ta+le e=-lains (ot s-are -ool states and -ossi+le actions to take2 State A&aila+le Meaning )(e (ot s-ares in t(e (ot s-are -ool are running and read0 to acce-t data2 )(e (ot s-ares are not currentl0 +eing 'ritten to or read from2 )(is (ot s-are -ool includes (ot s-ares t(at are +eing used to re-lace failed slices in a redundant &olume2 A -ro+lem e=ists 'it( a (ot s-are or (ot s-are -ool2 Go'e&er* t(ere is no immediate danger of losing data2 )(is status is also dis-la0ed if all t(e (ot s-ares are in use2 Action None2

1n->se

9roken

:iagnose (o' t(e (ot s-ares are +eing used2 )(en* re-air t(e slice in t(e &olume for '(ic( t(e (ot s-are is +eing used2 :iagnose (o' t(e (ot s-ares are +eing used or '(0 t(e0 are +roken2 Bou can add more (ot s-ares to t(e (ot s-are -ool* if desired2

-4AB/ : ,ot #pare 9ool #tates (:ommand 2ine" Got S-are Pools 3)ask Ma-4 )(e follo'ing task ma- identifies t(e -rocedures t(at are needed to manage Solaris Volume Manager (ot s-are -ools2 )ask @reate a (ot s-are -ool :escri-tion >se t(e Solaris Volume Manager G>1 or t(e EmetainitF !"

command to create a (ot s-are -ool Add slices to a (ot s-are -ool >se t(e Solaris Volume Manager G>1 or t(e Emeta(sF command to add slices to a (ot s-are -ool Associate a (ot s-are -ool >se t(e Solaris Volume Manager G>1 or t(e Emeta-aramF 'it( a &olume command to associate a (ot s-are -ool 'it( a &olume2 @(ange '(ic( (ot s-are -ool >se t(e Solaris Volume Manager G>1 or t(e Emeta-aramF is associated 'it( a &olume command to c(ange '(ic( (ot s-are -ool is associated 'it( a &olume2 @(eck t(e status of (ot >se t(e Solaris Volume Manager G>1* t(e EmetastatF s-ares and (ot s-are -ools command* or Emeta(s 1F command to c(eck t(e status of a (ot s-are or (ot s-are -ool2 Re-lace a (ot s-are in a (ot >se t(e Solaris Volume Manager G>1 or t(e Emeta(sF s-are -ool command to re-lace a (ot s-are in a (ot s-are -ool2 :elete a (ot s-are from a (ot >se t(e Solaris Volume Manager G>1 or t(e Emeta(sF s-are -ool command to delete a (ot s-are from a (ot s-are -ool2 ?na+le a (ot s-are >se t(e Solaris Volume Manager G>1 or t(e Emeta(sF command to ena+le a (ot s-are in a (ot s-are -ool2

Go' to @reate a Got S-are Pool !a+tion 3 Solaris Volume Manager does not 'arn 0ou if 0ou create a (ot s-are t(at is not large enoug(2 1f t(e (ot s-are is not e6ual to* or larger t(an* t(e &olume to '(ic( it is attac(ed* t(e (ot s-are 'ill not 'ork2 i() Aecome s+per+ser) ii() -o create a hot spare pool. +se the ,ollowing method: # metainit -ot-spare-pool-name ctds-for-slice -ot-spare-pool-name S-ecifies t(e name of t(e (ot s-are -ool2 ctds-for-slice S-ecifies t(e slice +eing added to t(e (ot s-are -ool2 )(e o-tion is re-eated for eac( slice +eing added to t(e (ot s-are -ool2 0ote 3 )(e meta(s command can also +e used to create (ot s-are -ools2 ?=am-le: @reating a Got S-are Pool # metainit -sp001 c2t2d0s2 c3t2d0s2 (s-$$1: Gots-are -ool is setu1n t(is e=am-le* t(e (ot s-are -ool (s-$$1 contains t'o disks as t(e (ot s-ares2 )(e s0stem confirms t(at t(e (ot s-are -ool (as +een set u-2 After 0ou create t(e (ot s-are -ool* 0ou need to associate it 'it( a su+mirror or RA1:-" &olume2 Go' to Add Additional Slices to a Got S-are Pool i() Aecome s+per+ser) ii() -o add a slice to an e7isting hot spare pool. +se the ,ollowing method: # metahs -a -ot-spare-pool-name slice-to-add # metahs -a -all -ot-spare-pool-name slice-to-add !6

-a -ot-spare-pool-name S-ecifies to add t(e slice to t(e s-ecified (ot s-are -ool2 -a all S-ecifies to add t(e slice to all (ot s-are -ools2 slice-to-add S-ecifies t(e slice to add to t(e (ot s-are -ool2 0ote 3 Bou can add a (ot s-are to one or more (ot s-are -ools2 5(en 0ou add a (ot s-are to a (ot s-are -ool* t(e (ot s-are is added to t(e end of t(e list of slices in t(e (ot s-are -ool2 ?=am-le: Adding a Got S-are Slice to ;ne Got S-are Pool 1n t(is e=am-le* t(e -a o-tion adds t(e slice ,de&,dsk,c.t$d$s# to (ot s-are -ool (s-$$12 )(e s0stem &erifies t(at t(e slice (as +een added to t(e (ot s-are -ool2 # metahs -a -sp001 dev dsk c3t0d0s2 (s-$$1: Gots-are is added ?=am-le: Adding a Got S-are Slice to All Got S-are Pools 1n t(is e=am-le* t(e -a o-tion used 'it( all adds t(e slice ,de&,dsk,c.t$d$s# to all (ot s-are -ools configured on t(e s0stem2 )(e s0stem &erifies t(at t(e slice (as +een added to all (ot s-are -ools2 # metahs -a -all dev dsk c3t0d0s2 (s-$$1: Gots-are is added (s-$$#: Gots-are is added (s-$$.: Gots-are is added Go' to Associate a Got S-are Pool 5it( a Volume i() Aecome s+per+ser) ii() -o associate a hot spare pool with a R45D': vol+me or s+bmirror. +se the ,ollowing method: # metaparam -- -ot-spare-pool component -- S-ecifies to modif0 t(e named (ot s-are -ool2 -ot-spare-pool S-ecifies t(e name of t(e (ot s-are -ool2 component S-ecifies t(e name of t(e su+mirror or RA1:-" &olume to '(ic( t(e (ot s-are -ool is +eing associated2 ?=am-le: Associating a Got S-are Pool 5it( Su+mirrors 1n t(e follo'ing e=am-le* t(e -( o-tion associates a (ot s-are -ool* (s-1$$* 'it( t'o su+mirrors* d1$ and d11* of mirror* d$2 )(e metastat command s(o's t(at t(e (ot s-are -ool is associated 'it( t(e su+mirrors2 # metaparam -- -sp100 d10 # metaparam -- -sp100 d11 # metastat d0 d$: Mirror Su+mirror $: d1$ State: ;ka0 Su+mirror 1: d11 State: ;ka0 222 d1$: Su+mirror of d$ State: ;ka0 !A

Got s-are -ool: (s-1$$ 222 d11: Su+mirror of d$ State: ;ka0 Got s-are -ool: (s-1$$ 222 ?=am-le: Associating a Got S-are Pool 5it( a RA1:-" Volume 1n t(e follo'ing e=am-le* t(e -( o-tion associates a (ot s-are* (s-$$1* 'it( a RA1:-" &olume*d1$2 )(e metastat command s(o's t(at t(e (ot s-are -ool is associated 'it( t(e RA1:-" &olume2 # metaparam -- -sp001 d10 # metastat d10 d1$: RA1: State: ;ka0 Got s-are -ool: (s-$$1 222 Go' to @(ange t(e Associated Got S-are Pool i() Aecome s+per+ser) ii() -o change a vol+meCs associated hot spare pool. +se the ,ollowing method: # metaparam -- -ot-spare-pool-name 56725-volume-or-submirror-name -- S-ecifies to modif0 t(e (ot s-are -ool named2 -ot-spare-pool S-ecifies t(e name of t(e ne' (ot s-are -ool* or t(e s-ecial ke0'ord none to remo&e (ot s-are -ool associations2 component S-ecifies t(e name of t(e su+mirror or RA1:-" &olume to '(ic( t(e (ot s-are -ool is +eing attac(ed2 ?=am-le: @(anging t(e Got S-are Pool Association 1n t(e follo'ing e=am-le* t(e (ot s-are -ool* (s-$$1* is initiall0 associated 'it( a RA1:-" &olume*d!2 )(e (ot s-are -ool association for t(e &olume is t(en c(anged to (s-$$#2 )(e metastat command s(o's t(e (ot s-are -ool association +efore and after t(is c(ange2 # metastat d4 d!: RA1: State: ;ka0 Got s-are -ool: (s-$$1 222 # metaparam -- -sp002 d4 # metastat d4 d!: RA1: State: ;ka0 Got s-are -ool: (s-$$# 222 ?=am-le: Remo&ing a VolumeCs Got S-are Pool Association 1n t(e follo'ing e=am-le* t(e (ot s-are -ool* (s-$$1* is initiall0 associated 'it( a RA1:-" &olume* d!2 )(e (ot s-are -ool association is t(en c(anged to none* '(ic( indicates t(at no (ot s-are -ool s(ould +e associated 'it( t(is &olume2 )(e metastat command s(o's t(e (ot s-are -ool association +efore and after t(is c(ange2 # metastat d4 !8

d!: RA1: State: ;ka0 Got s-are -ool: (s-$$1 222 # metaparam -- none d4 # metastat d4 d!: RA1: State: ;ka0 Got s-are -ool: 222 Go' to @(eck t(e Status of Got S-ares and Got S-are Pools i() -o view the stat+s o, a hot spare pool D its hot spares. +se the ,ollowing methods: # metastat -ot-spare-pool-name ?=am-le: Vie'ing t(e Status of a Got S-are Pool )(e follo'ing e=am-le s(o's sam-le out-ut from t(e metastat command on a (ot s-are -ool2 # metastat -sp001 (s-$$1: 1 (ot s-are c1t.d$s# A&aila+le 168$$ +locks ;he metahs command can also !e used to check the status of a hot spare pool. Go' to Re-lace a Got S-are in a Got S-are Pool i() Aecome s+per+ser) ii() Veri,y whether the hot spare is c+rrently being +sed by +sing the ,ollowing method: # metastat -ot-spare-pool-name iii() -o replace the hot spare. +se the ,ollowing method: # metahs 'r -ot-spare-pool-name current--ot-spare replacement--ot-spare -r S-ecifies to re-lace disks in t(e named (ot s-are -ool2 -ot-spare-pool-name S-ecifies t(e name of t(e (ot s-are -ool2 Bou can also use t(e s-ecial ke0'ord all to c(ange all (ot s-are -ool associations2 current--ot-spare S-ecifies t(e name of t(e current (ot s-are t(at 'ill +e re-laced2 replacement--ot-spare S-ecifies t(e name of t(e slice t(at 'ill re-lace t(e current (ot s-are in t(e named (ot s-are -ool2 ?=am-le: Re-lacing a Got S-are in ;ne Got S-are Pool 1n t(e follo'ing e=am-le* t(e metastat command s(o's t(at t(e (ot s-are is not in use2 )(e meta(s -r command re-laces t(e (ot s-are* ,de&,dsk,c$t#d$s#* 'it( t(e (ot s-are* ,de&,dsk,c.t1d$s#* in t(e (ot s-are -ool* (s-$$.2 # metastat -sp003 (s-$$.: 1 (ot s-are c$t#d$s# 9roken "6$$ +locks !/

# metahs r -sp003 c0t2d0s2 c3t1d0s2 (s-$$.: Gots-are c$t#d$s# is re-laced 'it( c.t1d$s# ?=am-le: Re-lacing a Got S-are in All Associated Got S-are Pools 1n t(e follo'ing e=am-le* t(e ke0'ord all re-laces t(e (ot s-are* ,de&,dsk,c1t$d$s#* 'it( t(e (ot s-are* ,de&,dsk,c.t1d$s#* in all its associated (ot s-are -ools2 # metahs -r all c1t0d0s2 c3t1d0s2 (s-$$1: Gots-are c1t$d$s# is re-laced 'it( c.t1d$s# (s-$$#: Gots-are c1t$d$s# is re-laced 'it( c.t1d$s# (s-$$.: Gots-are c1t$d$s# is re-laced 'it( c.t1d$s# Go' to :elete a Got S-are %rom a Got S-are Pool i() Aecome s+per+ser) ii() Veri,y whether the hot spare is c+rrently being +sed by +sing the method: # metastat -ot-spare-pool-name iii() -o delete the hot spare. +se the ,ollowing method: # metahs -d -ot-spare-pool-name current--ot-spare -d S-ecifies to delete a (ot s-are from t(e named (ot s-are -ool2 -ot-spare-pool S-ecifies t(e name of t(e (ot s-are -ool2 Bou can also use t(e s-ecial ke0'ord EallF to delete t(e (ot s-are from all (ot s-are -ools2 current--ot-spare S-ecifies t(e name of t(e current (ot s-are t(at 'ill +e deleted2 ?=am-le: :eleting a Got S-are from ;ne Got S-are Pool 1n t(e follo'ing e=am-le* t(e metastat command s(o's t(at t(e (ot s-are is not in use2 )(e meta(s -d command deletes t(e (ot s-are* ,de&,dsk,c$t#d$s#* in t(e (ot s-are -ool* (s-$$.2 # metastat -sp003 (s-$$.: 1 (ot s-are c$t#d$s# 9roken "6$$ +locks # metahs -d -sp003 c0t2d0s2 Go' to ?na+le a Got S-are >se t(e follo'ing form of t(e meta(s command: # metahs -e -ot-spare-slice -e S-ecifies to ena+le a (ot s-are2 -ot-spare-slice S-ecifies t(e name of t(e slice to ena+le2 ?=am-le: ?na+ling a Got S-are 1n t(e follo'ing e=am-le* t(e meta(s command -laces t(e (ot s-are* ,de&,dsk,c$t$d$s# in t(e EA&aila+leF state after it (as +een re-aired2 1t is unnecessar0 to s-ecif0 a (ot s-are -ool2 # metahs -e c0t0d0s2 Maintaining Solaris Volume Manager 3)asks4 "$

)ask Vie' t(e Solaris Volume Manager configuration Rename a &olume @reate configuration files 1nitiali<e SVM from configuration files ?=-and a file s0stem ?na+le com-onents Re-lace com-onents

:escri-tion >se t(e SVM G>1 or t(e EmetastatF command to &ie' t(e s0stem configuration2 >se t(e SVM G>1 or t(e EmetarenameF command to rename a &olume2 >se t(e Emetastat -F command and t(e Emetad+F command to create configuration files2 >se t(e EmetainitF command to initiali<e SVM from configuration files2 >se t(e Egro'fsF command to e=-and a file s0stem2 >se t(e SVM G>1 or t(e Emetare-laceF command to ena+le com-onents2 >se t(e SVM G>1 or t(e Emetare-laceF command to re-lace com-onents2

Go' to Vie' t(e Solaris Volume Manager Volume @onfiguration >se t(e follo'ing form of t(e metastat command: # metastat -p -i component-name -p S-ecifies to s(o' out-ut in a condensed summar02 )(is out-ut is suita+le for use in creating t(e Emd)tabF file2 -i S-ecifies to &erif0 t(at RA1:-1 3mirror4 &olumes* RA1:-" &olumes* and (ot s-ares can +e accessed2 component-name S-ecifies t(e name of t(e &olume to &ie'2 1f no &olume name is s-ecified* a com-lete list of com-onents is dis-la0ed2 ?=am-le: Vie'ing t(e Solaris Volume Manager Volume @onfiguration )(e follo'ing e=am-le illustrates out-ut from t(e metastat command2 # metastat d"$: RA1: State: ;ka0 1nterlace: .# +locks Si<e: #$/8"8$! +locks ;riginal de&ice: Si<e: #$/8A68$ +locks :e&ice Start 9lock :+ase State Reloc Got S-are c1t!d$s" ..$ No ;ka0 Bes c1t"d$s" ..$ No ;ka0 Bes c#t!d$s" ..$ No ;ka0 Bes "1

c#t"d$s" ..$ No c1t1d$s" ..$ No c#t1d$s" ..$ No d1: @oncat,Stri-e Si<e: !1/A8A/ +locks Stri-e $: :e&ice Start 9lock c1t#d$s. $ No d#: @oncat,Stri-e Si<e: !1/A8A/ +locks Stri-e $: :e&ice Start 9lock c#t#d$s. $ No d8$: Soft Partition :e&ice: dA$ State: ;ka0 Si<e: #$/A1"# +locks ?=tent Start 9lock 9lock count $ 1 #$/A1"# d81: Soft Partition :e&ice: dA$ State: ;ka0 Si<e: #$/A1"# +locks ?=tent Start 9lock 9lock count $ #$/A1"! #$/A1"# dA$: Mirror Su+mirror $: dA1 State: ;ka0 Su+mirror 1: dA# State: ;ka0 Pass: 1 Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: 1#"/.6.A +locks dA1: Su+mirror of dA$ State: ;ka0 Si<e: 1#"/.6.A +locks Stri-e $: :e&ice Start 9lock c1t.d$s. $ No Stri-e 1: :e&ice Start 9lock c1t.d$s! $ No Stri-e #: :e&ice Start 9lock c1t.d$s" $ No dA#: Su+mirror of dA$ State: ;ka0 Si<e: 1#"/.6.A +locks Stri-e $: :e&ice Start 9lock

;ka0 Bes ;ka0 Bes ;ka0 Bes

:+ase Reloc Bes

:+ase Reloc Bes

:+ase State ;ka0 Bes :+ase State ;ka0 Bes :+ase State ;ka0 Bes

Reloc Got S-are Reloc Got S-are Reloc Got S-are

:+ase State

Reloc Got S-are "#

c#t.d$s. $ No ;ka0 Bes Stri-e 1: :e&ice Start 9lock :+ase State Reloc Got S-are c#t.d$s! $ No ;ka0 Bes Stri-e #: :e&ice Start 9lock :+ase State Reloc Got S-are c#t.d$s" $ No ;ka0 Bes (s-$1$: is em-t0 (s-$1!: # (ot s-ares :e&ice Status Dengt( Reloc c1t#d$s1 A&aila+le 61A6"# +locks Bes c#t#d$s1 A&aila+le 61A6"# +locks Bes (s-$"$: # (ot s-ares :e&ice Status Dengt( Reloc c1t#d$s" A&aila+le !1/A8A/ +locks Bes c#t#d$s" A&aila+le !1/A8A/ +locks Bes (s-$A$: # (ot s-ares :e&ice Status Dengt( Reloc c1t#d$s! A&aila+le !1/A8A/ +locks Bes c#t#d$s! A&aila+le !1/A8A/ +locks Bes :e&ice Relocation 1nformation: :e&ice Reloc :e&ice 1: c1t#d$ Bes id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$N1S#$$$$#1$.A%#/ c#t#d$ Bes id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$P6!V$$$$#1$"Q6WA c1t1d$ Bes id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$N1?M$$$$#1$!NP#W c#t1d$ Bes id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$N/.W$$$$A1$!$D.S c$t$d$ Bes id1*dadPs".""!e"A"f!1"!!1"f"f"."!.../.1.!.$!1#"#"!1"/.. ?=am-le: Vie'ing a Multi-)era+0te Solaris Volume Manager Volume )(e follo'ing e=am-le illustrates out-ut from t(e metastat command for a multi-tera+0te storage &olume 311 )+0tes42 # metastat d0 d$: @oncat,Stri-e Si<e: #"$A!A$8!8$ +locks 311 )94 Stri-e $: 3interlace: .# +locks4 :e&ice Start 9lock c#At8d.s$ $ No c!tAd$s$ 1##88 No Stri-e 1: 3interlace: .# +locks4 :e&ice Start 9lock c1.t#d1s$ 16.8! No c1.t!d1s$ 16.8! No c1.t6d1s$ 16.8! No c1.t8d1s$ 16.8! No c16t.d$s$ 16.8! No c16t"d$s$ 16.8! No c16tAd$s$ 16.8! No c#$t!d1s$ 16.8! No c#$t6d1s$ 16.8! No :+ase Reloc Bes Bes :+ase Reloc Bes Bes Bes Bes Bes Bes Bes Bes Bes ".

c#$t8d1s$ c/t1d$s$ c/t.d$s$ c/t"d$s$ c/tAd$s$

16.8! 16.8! 16.8! 16.8! 16.8!

No No No No No

Bes Bes Bes Bes Bes :+ase Reloc Bes Bes

Stri-e #: 3interlace: .# +locks4 :e&ice Start 9lock c#At8d#s$ 16.8! No c!tAd1s$ 16.8! No

Stri-e .: 3interlace: .# +locks4 :e&ice Start 9lock :+ase Reloc c1$tAd$s$ .#A68 No Bes c11t"d$s$ .#A68 No Bes c1#t#d1s$ .#A68 No Bes c1!t1d$s$ .#A68 No Bes c1"t8d1s$ .#A68 No Bes c1At.d$s$ .#A68 No Bes c18t6d1s$ .#A68 No Bes c1/t!d1s$ .#A68 No Bes c1t"d$s$ .#A68 No Bes c#t6d1s$ .#A68 No Bes c.t!d1s$ .#A68 No Bes c"t#d1s$ .#A68 No Bes c6t1d$s$ .#A68 No Bes c8t.d$s$ .#A68 No Bes Renaming Volumes S-ecific considerations for renaming &olumes include t(e follo'ing: Bou can rename an0 &olume e=ce-t t(e follo'ing: Soft -artitions Volumes on '(ic( soft -artitions are directl0 +uilt Volumes t(at are +eing used as log de&ices Got s-are -ools Bou can rename &olumes 'it(in a disk set2 Go'e&er* 0ou cannot rename &olumes to mo&e t(em from one disk set to anot(er disk set2 Go' to Rename a Volume i() *nmo+nt the ,ile system that +ses the vol+me) # +mo+nt files"stem ii() *se the ,ollowing ,orm o, the metarename command: # metarename old-volume-name ne+-volume-name old-volume-name S-ecifies t(e name of t(e e=isting &olume2 ne+-volume-name S-ecifies t(e ne' name for t(e e=isting &olume2 iii() /dit the /etc/v,stab ,ile to re,er to the new vol+me name. i, necessary) "!

iv() Remo+nt the ,ile system) # mo+nt files"stem ?=am-le: Renaming a Volume >sed for a %ile S0stem 1n t(e follo'ing e=am-le* t(e &olume* d1$* is renamed to d1$$2 # +mo+nt -ome # metarename d10 d100 d1$: (as +een renamed to d1$$ ( dit the /etc/vfsta! file so that the file system references the ne& volume" # mo+nt -ome 9ecause d1$ contains a mounted file s0stem* t(e file s0stem must +e unmounted +efore t(e &olume can +e renamed2 1f t(e &olume is used for a file s0stem 'it( an entr0 in t(e ,etc,&fsta+ file* t(e entr0 must +e c(anged to reference t(e ne' &olume name2 %or e=am-le* if t(e ,etc,&fsta+ file contains t(e follo'ing entr0 for t(e file s0stem: E/dev/md/dsk/d10 /dev/md/rdsk/d10 /docs home 2 yes 3/ @(ange t(e entr0 to read as follo's: E/dev/md/dsk/d100 /dev/md/rdsk/d100 /docs home 2 yes 3/ )(en* remount t(e file s0stem2 1f 0ou (a&e an e=isting mirror or transactional &olume* 0ou can use t(e metarename -= command to remo&e t(e mirror or transactional &olume and kee- data on t(e underl0ing &olume2 %or a transactional &olume* as long as t(e master de&ice is a &olume 3eit(er a RA1:-$* RA1:-1* or RA1:-" &olume4* 0ou can kee- data on t(at &olume2 5orking 5it( @onfiguration %iles Solaris Volume Manager configuration files contain +asic Solaris Volume Manager information* as 'ell as most of t(e data t(at is necessar0 to reconstruct a configuration2 )(e follo'ing -rocedures illustrate (o' to 'ork 'it( t(ese files2 Go' to @reate @onfiguration %iles i() 9nce yo+ have de,ined all appropriate parameters ,or the Solaris Vol+me Manager environment. +se the metastat 'p command to create the /etc/lvm/md)tab ,ile2 # metastat -p 8 etc lvm md9tab )(is file contains all -arameters for use +0 t(e metainit command and meta(s command2 >se t(is file if 0ou need to set u- se&eral similar en&ironments or if 0ou need to recreate t(e configuration after a s0stem failure2 Go' to 1nitiali<e Solaris Volume Manager %rom a @onfiguration %ile !a+tion 3 >se t(is -rocedure in t(e follo'ing circumstances: K1f 0ou (a&e e=-erienced a com-lete loss of 0our Solaris Volume Manager configuration K1f 0ou (a&e no configuration 0et* and 0ou 'ant to create a configuration from a sa&ed configuration file ;n occasion* 0our s0stem loses t(e information maintained in t(e state data+ase2 %or e=am-le* t(is loss mig(t occur if t(e s0stem 'as re+ooted after all of t(e state data+ase re-licas 'ere deleted2 As long as no &olumes 'ere created after t(e state data+ase 'as lost* 0ou can use t(e Emd.cf1 or /md.ta!1 files to reco&er 0our Solaris Volume Manager configuration2 0ote 3 )(e md2cf file does not maintain information on acti&e (ot s-ares2 )(us* if (ot s-ares 'ere in use '(en t(e Solaris Volume Manager configuration 'as lost* t(ose &olumes t(at 'ere using acti&e (ot s-ares are likel0 corru-ted2 i() !reate state database replicas) ii() !reate or +pdate the /etc/lvm/md)tab ,ile) ""

K1f 0ou are attem-ting to reco&er t(e last kno'n Solaris Volume Manager configuration* co-0 t(e md2cf file into t(e ,etc,l&m,md2ta+ file2 K1f 0ou are creating a ne' Solaris Volume Manager configuration +ased on a co-0 of t(e md2ta+ file t(at (a&e 0ou -reser&ed* co-0 t(e -reser&ed file into t(e ,etc,l&m,md2ta+ file2 iii() /dit the 1new2 /etc/lvm/md)tab ,ile and do the ,ollowing: 1f 0ou are creating a ne' configuration or reco&ering a configuration after a cras(* configure t(e mirrors as one-'a0 mirrors2 %or e=am-le: d8$ -m d81 1 d81 1 1 c1t6d$s. 1f t(e su+mirrors of a mirror are not t(e same si<e* +e sure to use t(e smallest su+mirror for t(is one-'a0 mirror2 ;t(er'ise* data could +e lost2 K1f 0ou are reco&ering an e=isting configuration and Solaris Volume Manager 'as cleanl0 sto--ed* lea&e t(e mirror configuration as multi-'a0 mirrors2 %or e=am-le: dA$ -m dA1 dA# 1 dA1 1 1 c1t6d$s# dA# 1 1 c1t"d$s$ S-ecif0 RA1:-" &olumes 'it( t(e -k o-tion* to -re&ent reinitiali<ation of t(e de&ice2 %or e=am-le: d!" -r c1t.d$s" c1t.d$s. c1t.d$s! -k -i .#+ iv() !heck the synta7 o, the /etc/lvm/md)tab ,ile entries witho+t committing changes by +sing one o, the ,ollowing ,orms o, the metainit command: # metainit -n md9tab-entr" # metainit -n -a )(e metainit command does not maintain a (0-ot(etical state of t(e de&ices t(at mig(t (a&e +een created '(ile running 'it( t(e -n* so creating &olumes t(at rel0 on ot(er* none=istent &olumes 'ill result in errors 'it( t(e -n e&en t(oug( t(e command ma0 succeed 'it(out t(e -n o-tion2 -n S-ecifies not to actuall0 create t(e de&ices2 >se t(is o-tion to &erif0 t(at t(e results are as 0ou e=-ected2 md9tab-entr" S-ecifies t(e name of t(e com-onent to initiali<e2 -a S-ecifies to c(eck all com-onents2 v() 5, no problems were apparent ,rom the previo+s step. recreate the vol+mes and hot spare pools ,rom the md)tab ,ile: # metainit -a -a S-ecifies to acti&ate t(e entries in t(e ,etc,l&m,md2ta+ file2 vi() 4s needed. make the one'way mirrors into m+lti'way mirrors by +sing the metattach command) # metattach mirror submirror vii() Validate the data on the vol+mes to con,irm that the con,ig+ration has been reconstr+cted acc+rately) # metastat "6

@(anging Solaris Volume Manager :efault Values 5it( t(e Solaris 1$ release* Solaris Volume Manager (as +een en(anced to configure &olumes d0namicall02 Bou no longer need to edit t(e EnmdF and t(e EmdNnsetsF -arameters in t(e E/kernel/drv/md.confF file2 Ne' &olumes are d0namicall0 created* as needed2 )(e ma=imum Solaris Volume Manager configuration &alues remain unc(anged: )(e ma=imum num+er of &olumes t(at is su--orted is 81/#2 )(e ma=imum num+er of disk sets su--orted is .#2 ?=-anding a %ile S0stem >sing t(e gro'fs @ommand After a &olume t(at contains a >%S file s0stem is e=-anded 3meaning t(at more s-ace is added4* 0ou also need to e=-and t(e file s0stem in order to recogni<e t(e added s-ace2 Bou must manuall0 e=-and t(e file s0stem 'it( t(e gro'fs command2 )(e gro'fs command e=-ands t(e file s0stem* e&en '(ile t(e file s0stem is mounted2 Go'e&er* 'rite access to t(e file s0stem is not -ossi+le '(ile t(e gro'fs command is running2 )(e gro'fs command E'rite-locksF a mounted file s0stem as it e=-ands t(e file s0stem2 )(e lengt( of time t(e file s0stem is 'rite-locked can +e s(ortened +0 e=-anding t(e file s0stem in stages2 %or instance* to e=-and a 1-G+0te file s0stem to # G+0tes* t(e file s0stem can +e gro'n in 16 M+0te stages +0 using t(e -s o-tion2 )(is o-tion s-ecifies t(e total si<e of t(e ne' file s0stem at eac( stage2 :uring t(e e=-ansion* t(e file s0stem is not a&aila+le for 'rite access +ecause of t(e 'rite-lock feature2 5rite accesses are trans-arentl0 sus-ended and are restarted '(en t(e gro'fs command unlocks t(e file s0stem2 Read accesses are not affected2 Go'e&er* access times are not ke-t '(ile t(e lock is in effect2 9ackground 1nformation for ?=-anding Slices and Volumes 0ote 3 Solaris Volume Manager &olumes can +e e=-anded2 Go'e&er* &olumes cannot +e reduced in si<e2 A &olume can +e e=-anded '(et(er it is used for a file s0stem* a--lication* or data+ase2 Bou can e=-and RA1:-$ 3stri-e and concatenation4 &olumes* RA1:-1 3mirror4 &olumes* and RA1:-" &olumes and soft -artitions2 Bou can concatenate a &olume t(at contains an e=isting file s0stem '(ile t(e file s0stem is in use2 As long as t(e file s0stem is a >%S file s0stem* t(e file s0stem can +e e=-anded 3'it( t(e gro'fs command4 to fill t(e larger s-ace2 Bou can e=-and t(e file s0stem 'it(out interru-ting read access to t(e data2 ;nce a file s0stem is e=-anded* it cannot +e reduced in si<e* due to constraints in t(e >%S file s0stem2 A--lications and data+ases t(at use t(e ra' de&ice must (a&e t(eir o'n met(od to e=-and t(e added s-ace so t(at t(e0 can recogni<e it2 Solaris Volume Manager does not -ro&ide t(is ca-a+ilit02 5(en a com-onent is added to a RA1:-" &olume* it +ecomes a concatenation to t(e &olume2 )(e ne' com-onent does not contain -arit0 information2 Go'e&er* data on t(e ne' com-onent is -rotected +0 t(e o&erall -arit0 calculation t(at takes -lace for t(e &olume2 Bou can e=-and a log de&ice +0 adding additional com-onents2 Bou do not need to run t(e gro'fs command* as Solaris Volume Manager automaticall0 recogni<es t(e additional s-ace on re+oot2 Soft -artitions can +e e=-anded +0 adding s-ace from t(e underl0ing &olume or slice2 All ot(er &olumes can +e e=-anded +0 adding slices2 Go' to ?=-and a %ile S0stem i() Review the disk space associated with a ,ile system) # d, --k ii() /7pand a *?S ,ile system on a logical vol+me) # grow,s -) mount-point dev md rdsk volume-name -) mount-point S-ecifies t(e mount -oint for t(e file s0stem to +e e=-anded2 dev md rdsk volume-name S-ecifies t(e name of t(e &olume on '(ic( 0ou 'ant to e=-and2 ?=am-le: ?=-anding a %ile S0stem "A

1n t(e follo'ing e=am-le* a ne' slice is added to a &olume* d1$* '(ic( contains t(e mounted file s0stem* ,(ome#2 )(e gro'fs command s-ecifies t(e mount -oint 'it( t(e -M o-tion to +e ,(ome#* '(ic( is e=-anded onto t(e ra' &olume ,de&,md,rdsk,d1$2 )(e file s0stem 'ill s-an t(e entire &olume '(en t(e gro'fs command is com-lete2 Bou can use t(e df -(k command +efore and after e=-anding t(e file s0stem to &erif0 t(e total disk ca-acit02 # d, --k %iles0stem k+0tes used a&ail ca-acit0 Mounted on 222 ,de&,md,dsk,d1$ 6/$!A 6"!#6 $ 1$$Q,(ome# 222 # grow,s -) -ome2 dev md rdsk d10 ,de&,md,rdsk,d1$: #/"#$$ sectors in #!$ c0linders of 1" tracks* 8# sectors 1!!21M9 in 1" c0l grou-s 316 c,g* /261M9,g* !6$8 i,g4 su-er-+lock +acku-s 3for fsck -% ufs -o +MR4 at: .#* 1/8$8* ./"8!* "/.6$* A/1.6* /8/1#* 118688* 1.8!6!* 1"8#!$* 1A8$16* 1/AA/#* #1A"68* #.A.!!* #"A1#$* #A68/6* # d, --k %iles0stem k+0tes used a&ail ca-acit0 Mounted on 222 ,de&,md,dsk,d1$ 1.8A$. 6"!#6 "/!$A ".Q,(ome# 222 %or mirror &olumes* al'a0s run t(e gro'fs command on t(e to--le&el &olume2 :o not run t(e command on a su+mirror or master de&ice* e&en t(oug( s-ace is added to t(e su+mirror or master de&ice2 ;&er&ie' of Re-lacing U ?na+ling @om-onents in RA1:-1 U RA1:-" Volumes 1n Solaris Volume Manager terminolog0* re-lacing a com-onent is a 'a0 to su+stitute an a&aila+le com-onent on t(e s0stem for a selected com-onent in a su+mirror or RA1:-" &olume2 Bou can t(ink of t(is -rocess as logical re-lacement* as o--osed to -(0sicall0 re-lacing t(e com-onent2 ?na+ling a com-onent means to Eacti&ateF or su+stitute a com-onent 'it( itself 3t(at is* t(e com-onent name is t(e same42 0ote 3 5(en reco&ering from disk errors* scan ,&ar,adm,messages to see '(at kind of errors occurred2 1f t(e errors are transitor0 and t(e disks t(emsel&es do not (a&e -ro+lems* tr0 ena+ling t(e failed com-onents2 Bou can also use t(e format command to test a disk2 ?na+ling a @om-onent Bou can ena+le a com-onent '(en an0 of t(e follo'ing conditions e=ist: Solaris Volume Manager cannot access t(e -(0sical dri&e2 )(is -ro+lem mig(t occur* for e=am-le* due to a -o'er loss* or a loose dri&e ca+le2 1n t(is case* Solaris Volume Manager -uts t(e com-onents in t(e EMaintenanceF state2 Bou need to make sure t(at t(e dri&e is accessi+le 3restore -o'er* reattac( ca+les* and so on4* and t(en ena+le t(e com-onents in t(e &olumes2 Bou sus-ect t(at a -(0sical dri&e is (a&ing transitor0 -ro+lems t(at are not disk-related2 Bou mig(t +e a+le to fi= a com-onent in t(e EMaintenanceF state +0 sim-l0 ena+ling it2 1f ena+ling t(e com-onent does not fi= t(e -ro+lem* t(en 0ou need to do one of t(e follo'ing: P(0sicall0 re-lace t(e disk dri&e and ena+le t(e com-onent Re-lace t(e com-onent 'it( anot(er a&aila+le com-onent on t(e s0stem 5(en 0ou -(0sicall0 re-lace a disk* +e sure to -artition t(e disk like t(e re-laced disk to ensure ade6uate s-ace on eac( used com-onent2 0ote 3 Al'a0s c(eck for state data+ase re-licas and (ot s-ares on t(e disk t(at is +eing re-laced2 An0 state data+ase re-lica in an erred state s(ould +e deleted +efore 0ou re-lace t(e disk2 )(en* after 0ou ena+le t(e com-onent* recreate t(e state data+ase re-licas using t(e same si<e2 Bou s(ould treat (ot s-ares in t(e same manner2 "8

Re-lacing a @om-onent 5it( Anot(er A&aila+le @om-onent Bou use t(e metare-lace command '(en 0ou re-lace or s'a- an e=isting com-onent 'it( a different com-onent t(at is a&aila+le and not in use on t(e s0stem2 Bou can use t(is command '(en an0 of t(e follo'ing conditions e=ist: A disk dri&e (as -ro+lems* and 0ou do not (a&e a re-lacement dri&e2 Go'e&er* 0ou do (a&e a&aila+le com-onents else'(ere on t(e s0stem2 Bou mig(t 'ant to use t(is strateg0 '(en a re-lacement is a+solutel0 necessar0* +ut 0ou do not 'ant to s(ut do'n t(e s0stem2 Bou see soft errors on t(e -(0sical disks2 P(0sical disks mig(t re-ort soft errors e&en t(oug( Solaris Volume Manager s(o's t(e mirror,su+mirror or RA1:-" &olume in t(e E;ka0F state2 Re-lacing t(e com-onent in 6uestion 'it( anot(er a&aila+le com-onent ena+les 0ou to -erform -re&entati&e maintenance and -otentiall0 -re&ent (ard errors from occurring2 Bou 'ant to do -erformance tuning2 ;ne 'a0 t(at 0ou can e&aluate com-onents is +0 using t(e -erformance monitoring feature a&aila+le from t(e ?n(anced Storage tool 'it(in t(e Solaris Management @onsole2 %or e=am-le* 0ou mig(t see t(at a -articular com-onent in a RA1:-" &olume is e=-eriencing a (ig( load a&erage* e&en t(oug( it is in t(e E;ka0F state2 )o +alance t(e load on t(e &olume* 0ou can re-lace t(at com-onent 'it( a com-onent from a disk t(at is less utili<ed2 Bou can -erform t(is t0-e of re-lacement online 'it(out interru-ting ser&ice to t(e &olume2 Maintenance and Dast ?rred States 5(en a com-onent in a RA1:-1 or RA1:-" &olume e=-eriences errors* Solaris Volume Manager -uts t(e com-onent in t(e EMaintenanceF state2 No furt(er reads or 'rites are -erformed to a com-onent in t(e EMaintenanceF state2 Sometimes a com-onent goes into a EDast ?rredF state2 %or a RA1:-1 &olume* t(is usuall0 occurs 'it( a one-sided mirror2 )(e &olume e=-eriences errors2 Go'e&er* t(ere are no redundant com-onents to read from2 %or a RA1:-" &olume t(is occurs after one com-onent goes into EMaintenanceF state* and anot(er com-onent fails2 )(e second com-onent to fail goes into t(e EDast ?rredF state2 5(en eit(er a RA1:-1 &olume or a RA1:-" &olume (as a com-onent in t(e EDast ?rredF state* 1,; is still attem-ted to t(e com-onent marked EDast ?rred2F )(is 1,; attem-t occurs +ecause a EDast ?rredF com-onent contains t(e last good co-0 of data from Solaris Volume ManagerCs -oint of &ie'2 5it( a com-onent in t(e EDast ?rredF state* t(e &olume +e(a&es like a normal de&ice 3disk4 and returns 1,; errors to an a--lication2 >suall0* at t(is -oint* some data (as +een lost2 )(e su+se6uent errors on ot(er com-onents in t(e same &olume are (andled differentl0* de-ending on t(e t0-e of &olume2 RA1:-1 Volume A RA1:-1 &olume mig(t +e a+le to tolerate man0 com-onents in t(e EMaintenanceF state and still +e read from and 'ritten to2 1f com-onents are in t(e EMaintenanceF state* no data (as +een lost2 Bou can safel0 re-lace or ena+le t(e com-onents in an0 order2 1f a com-onent is in t(e EDast ?rredF state* 0ou cannot re-lace it until 0ou first re-lace t(e com-onents in t(e EMaintenanceF state2 Re-lacing or ena+ling a com-onent in t(e EDast ?rredF state usuall0 means t(at some data (as +een lost2 9e sure to &alidate t(e data on t(e mirror after 0ou re-air it2 RA1:-" Volume ARA1:-" &olume can tolerate a single com-onent in t(e EMaintenanceF state2 Bou can safel0 re-lace a single com-onent in t(e EMaintenanceF state 'it(out losing data2 1f an error on anot(er com-onent occurs* it is -ut into t(e EDast ?rredF state2 At t(is -oint* t(e RA1:-" &olume is a read-onl0 de&ice2 Bou need to -erform some t0-e of error reco&er0 so t(at t(e state of t(e RA1:-" &olume is sta+le and t(e -ossi+ilit0 of data loss is reduced2 1f a RA1:-" &olume reac(es a EDast ?rredF state* t(ere is a good c(ance it (as lost data2 9e sure to &alidate t(e data on t(e RA1:-" &olume after 0ou re-air it2 Al'a0s re-lace com-onents in t(e EMaintenanceF state first* follo'ed +0 t(ose in t(e EDast ?rredF state2 After a com-onent is re-laced and res0nc(roni<ed* use t(e metastat command to &erif0 its state2 )(en* &alidate t(e data2 "/

9ackground 1nformation for Re-lacing and ?na+ling @om-onents in RA1:-1 and RA1:-" Volumes 5(en 0ou re-lace com-onents in a RA1:-1 &olume or a RA1:-" &olume* follo' t(ese guidelines: Al'a0s re-lace com-onents in t(e EMaintenanceF state first* follo'ed +0 t(ose com-onents in t(e EDast ?rredF state2 After a com-onent is re-laced and res0nc(roni<ed* use t(e metastat command to &erif0 t(e state of t(e &olume2 )(en* &alidate t(e data2 Re-lacing or ena+ling a com-onent in t(e EDast ?rredF state usuall0 means t(at some data (as +een lost2 9e sure to &alidate t(e data on t(e &olume after 0ou re-air it2 %or a >%S* run t(e fsck command to &alidate t(e EmetadataF 3t(e structure of t(e file s0stem42 )(en* c(eck t(e actual user data2 3Practicall0* users 'ill (a&e to e=amine t(eir files24 Al'a0s c(eck for state data+ase re-licas and (ot s-ares '(en 0ou re-lace com-onents2 An0 state data+ase re-lica in an erred state s(ould +e deleted +efore 0ou re-lace t(e -(0sical disk2 )(e state data+ase re-lica s(ould +e added +ack +efore 0ou ena+le t(e com-onent2 )(e same -rocedure a--lies to (ot s-ares2 :uring com-onent re-lacement for a RA1:-" &olume* data is reco&ered in one of t'o 'a0s2 )(e data is reco&ered eit(er from a (ot s-are currentl0 in use or from using t(e RA1:-" -arit0* '(en no (ot s-are is in use2 5(en 0ou re-lace a com-onent for a RA1:-1 &olume* Solaris Volume Manager automaticall0 starts res0nc(roni<ing t(e ne' com-onent 'it( t(e rest of t(e &olume2 5(en t(e res0nc(roni<ation com-letes* t(e re-laced com-onent +ecomes reada+le and 'rita+le2 1f t(e failed com-onent (as +een re-laced 'it( data from a (ot s-are* t(e (ot s-are is -laced in t(e EA&aila+leF state and made a&aila+le for ot(er (ot s-are re-lacements2 )(e ne' com-onent must +e large enoug( to re-lace t(e old com-onent2 As a -recaution* +ack u- all data +efore 0ou re-lace EDast ?rredF de&ices2 1ntroduction to :isk Sets A disk set is a set of -(0sical storage &olumes t(at contain logical &olumes and (ot s-ares2 Volumes and (ot s-are -ools must +e +uilt on dri&es from 'it(in t(at disk set2 ;nce 0ou (a&e created a &olume 'it(in t(e disk set* 0ou can use t(e &olume 7ust as 0ou 'ould use a -(0sical slice2 Bou can use t(e &olume to create and to mount a file s0stem and to store data2 0ote 3 :isk sets are su--orted on +ot( SPAR@ and =86 +ased -latforms2 )0-es of :isk Sets )(is section discusses t(e different t0-es of disk sets a&aila+le in SVM2 Docal :isk Sets ?ac( (ost (as a local disk set2 )(e local disk set consists of all of t(e disks on a (ost t(at are not in a named disk set2 A local disk set +elongs e=clusi&el0 to a s-ecific (ost2 )(e local disk set contains t(e state data+ase for t(at s-ecific (ostCs configuration2 Volumes and (ot s-are -ools in t(e local disk set consist onl0 of dri&es from 'it(in t(e local disk set2 Named :isk Sets 1n addition to local disk sets* (osts can -artici-ate in named disk sets2 A named disk set is an0 disk set t(at is not in t(e local disk set2 Bou can im-lement t(e follo'ing t0-es of named disk sets to manage &olumes* de-ending on t(e configuration of 0our s0stem2 S(ared :isk Sets A s(ared disk set can +e s(ared +0 multi-le (osts2 Alt(oug( a s(ared disk set is &isi+le from all t(e -artici-ating (osts* onl0 t(e o'ner of t(e disk set can access it2 ?ac( (ost can control a s(ared disk set* +ut onl0 one (ost can control it at a time2 Additionall0* s(ared disk sets -ro&ide a distinct names-ace 'it(in '(ic( t(e &olume is managed2 A s(ared disk set su--orts data redundanc0 and data a&aila+ilit02 1f one (ost fails* anot(er (ost can take o&er t(e failed (ostCs disk set 2 6$

0ote 3 S(ared disk sets are intended* in -art* for use 'it( Sun @luster* Solstice GA 3Gig( A&aila+ilit04* or anot(er su--orted t(ird--art0 GA frame'ork2 SVM +0 itself does not -ro&ide all t(e functionalit0 necessar0 to im-lement a failo&er configuration2 Alt(oug( eac( (ost can control t(e set of disks* onl0 one (ost can control it at a time2 Autotake :isk Sets 9efore t(e autotake feature +ecame a&aila+le in t(e Solaris / !,$! release* Solaris Volume Manager did not su--ort t(e automatic mounting of file s0stems on disk sets t(roug( t(e ,etc,&fsta+ file2 Solaris Volume Manager re6uired t(e s0stem administrator to manuall0 issue a disk set take command +0 using t(e metaset -s setname -t command +efore t(e file s0stems on t(e disk set could +e accessed2 5it( t(e autotake feature* 0ou can set a disk set to +e automaticall0 accessed at +oot time +0 using t(e metaset -s setname -A ena+le command2 )(e autotake feature makes it -ossi+le for 0ou to define at +oot t(e mount o-tions for a file s0stem in t(e ,etc,&fsta+ file2 )(is feature allo's 0ou to define t(e mount o-tions in t(e ,etc,&fsta+ file for file s0stems on &olumes in t(e ena+led disk set2 ;nl0 single-(ost disk sets su--ort t(e autotake feature2 )(e autotake feature re6uires t(at t(e disk set is not s(ared 'it( an0 ot(er s0stems2 A disk set t(at is s(ared cannot +e set to use t(e autotake feature* and t(e metaset -A command 'ill fail2 Go'e&er* after ot(er (osts are remo&ed from t(e disk set* it ma0 t(en +e set to autotake2 Similarl0* an autotake disk set cannot (a&e ot(er (osts added to it2 1f t(e autotake feature is disa+led* additional (osts can t(en +e added to t(e disk set2 0ote 1n a Sun @luster en&ironment* t(e autotake feature is disa+led2 Sun @luster (andles t(e take and release of a disk set2 Multi-;'ner :isk Sets Named disk sets created in a Sun @luster en&ironment are called multi-o'ner disk sets2 Multi-o'ner disk sets allo' multi-le nodes to s(are t(e o'ners(i- of t(e disk sets and to simultaneousl0 access t(e s(ared disks2 All disks and &olumes in a multi-o'ner disk set can +e directl0 accessed +0 all t(e nodes in a cluster2 ?ac( multio'ner disk set contains a list of (osts t(at (a&e +een added to t(e disk set2 @onse6uentl0* eac( multi-o'ner disk set 'it(in a cluster configuration can (a&e a different 3and sometimes o&erla--ing4 set of (osts2 ?ac( multi-o'ner disk set (as a master node2 )(e function of t(e master node is to manage and u-date t(e state data+ase re-lica c(anges2 Since t(ere is a master node -er disk set* multi-le masters can e=ist simultaneousl02 )(ere are t'o 'a0s t(at t(e master is c(osen2 )(e first 'a0 is t(at a node +ecomes t(e master if it is t(e first node to add a disk to t(e disk set2 )(e second 'a0 is '(en a master node -anics and fails2 )(e node 'it( t(e lo'est node id +ecomes t(e master node2 Multi-o'ner disk set functionalit0 is ena+led onl0 in a Sun @luster en&ironment to manage multi-o'ner disk set storage2 )(e Solaris Volume Manager for Sun @luster feature 'orks 'it( releases of Sun @luster +eginning 'it( t(e Sun @luster 1$,$! soft'are collection and 'it( a--lications like ;racle Real A--lications @lusters2 9efore 0ou can configure multi-o'ner disk sets* t(e follo'ing soft'are must +e installed in addition to t(e Solaris ;S: Sun @luster initial cluster frame'ork KSun @luster Su--ort for ;racle Real A--lication @lusters soft'are ; K racle Real A--lication @lusters soft'are Solaris Volume Manager :isk Set Administration >nlike local disk set administration* 0ou do not need to manuall0 create or delete disk set state data+ases2 Solaris Volume Manager -laces one state data+ase re-lica 3on slice A4 on eac( disk across all disks in t(e disk set* u- to a ma=imum of "$ total re-licas in t(e disk set2 5(en 0ou add disks to a disk set* Solaris Volume Manager automaticall0 creates t(e state data+ase re-licas on t(e disk set2 5(en a disk is acce-ted into a disk set* Solaris Volume Manager mig(t re-artition t(e disk so t(at t(e state data+ase re-lica for t(e disk set can +e -laced on t(e disk2 A file s0stem t(at resides on a &olume in a disk set normall0 is not mounted automaticall0 at +oot time 'it( t(e ,etc,&fsta+ file2 )(e necessar0 Solaris Volume Manager RP@ daemons 3r-c2metad and r-c2metam(d4 do not start earl0 enoug( in t(e +oot -rocess to -ermit t(is2 Reser&ing a :isk Set 61

9efore a (ost can use t(e disks in a disk set* t(e (ost must reser&e t(e disk set2 )(ere are t'o met(ods of reser&ing a disk set: Sa,ely ' 5(en 0ou safel0 reser&e a disk set* Solaris Volume Manager attem-ts to take t(e disk set* and t(e ot(er (ost attem-ts to release t(e disk set2 )(e release 3and t(erefore t(e reser&ation4 mig(t fail2 ?orcibly ' 5(en 0ou forci+l0 reser&e a disk set* Solaris Volume Manager reser&es t(e disk set '(et(er or not anot(er (ost currentl0 (as t(e set reser&ed2 )(is met(od is generall0 used '(en a (ost in t(e disk set is do'n or not communicating2 All disks 'it(in t(e disk set are taken o&er2 )(e state data+ase is read in on t(e (ost -erforming t(e reser&ation and t(e s(ared &olumes configured in t(e disk set +ecome accessi+le2 1f t(e ot(er (ost (ad t(e disk set reser&ed at t(is -oint* it 'ould -anic due to reser&ation loss2 Normall0* t'o (osts in a disk set coo-erate 'it( eac( ot(er to ensure t(at t(e disks in a disk set are reser&ed +0 onl0 one (ost at a time2 A normal situation is defined as +ot( (osts +eing u- and communicating 'it( eac( ot(er2 0ote 1f a disk (as +een determined une=-ectedl0 not to +e reser&ed 3-er(a-s +ecause anot(er (ost using t(e disk set forci+l0 took t(e disk4* t(e (ost 'ill -anic2 )(is +e(a&ior (el-s to minimi<e data loss '(ic( 'ould occur if t'o (osts 'ere to simultaneousl0 access t(e same disk2 Releasing a :isk Set Releasing a disk set can +e useful '(en 0ou -erform maintenance on t(e -(0sical disks in t(e disk set2 5(en a disk set is released* it cannot +e accessed +0 t(e (ost2 1f +ot( (osts in a disk set release t(e set* neit(er (ost in t(e disk set can access t(e disks in t(e disk set2 1m-orting a :isk Set 9eginning 'it( t(e Solaris / /,$! release* t(e metaim-ort command ena+les 0ou to im-ort disk sets* including re-licated disk sets* into e=isting Solaris Volume Manager configurations t(at (a&e de&ice 1: su--ort in t(e disk set2 Bou can also use t(e metaim-ort command to re-ort on disk sets t(at are a&aila+le for im-ort2 Re-licated disk sets are created using remote re-lication soft'are2 1n order for a re-licated disk set to +e im-orted 'it( t(e metaim-ort command* t(e slice containing t(e state data+ase re-lica for eac( disk in t(e disk set must also +e re-licated onto t(e same slice of t(e re-licated disk set2 )(is corres-onds to slice A for non-?%1 disks and slice 6 for ?%1 disks2 9efore re-licating a disk set* make sure t(at t(e disk configurations of t(e data to +e re-licated and of t(e remote site matc(2 )(is ste- ensures t(at +ot( t(e state data+ase re-lica and t(e data are re-licated accuratel02 )(e metaim-ort command also does not im-ort a disk in a disk set if t(e disk does not contain a &olume or a state data+ase re-lica2 )(is scenario occurs if a &olume or a state data+ase re-lica (as not +een added to a disk or (a&e +een deleted from a disk2 1n t(is case* '(en 0ou im-ort t(e disk set to anot(er s0stem* 0ou 'ould find t(at t(e disk is missing from t(e disk set2 %or e=am-le* ma=imum of "$ state data+ase re-licas are allo'ed -er Solaris Volume Manager disk set2 1f 0ou (a&e 6$ disks in a disk set* t(e 1$ disks t(at do not contain a state data+ase re-lica must contain a &olume in order to +e im-orted 'it( t(e disk set2 0ote 3 1n a Sun @luster en&ironment* t(e metaim-ort command is not a&aila+le2 Automatic :isk Partitioning 5(en 0ou add a ne' disk to a disk set* Solaris Volume Manager c(ecks t(e disk format2 1f necessar0* Solaris Volume Manager re-artitions t(e disk to ensure t(at t(e disk (as an a--ro-riatel0 configured slice A 'it( ade6uate s-ace for a state data+ase re-lica2 )(e -recise si<e of slice A de-ends on t(e disk geometr02 Go'e&er* t(e si<e 'ill +e no less t(an ! M+0tes* and -ro+a+l0 closer to 6 M+0tes 3de-ending on '(ere t(e c0linder +oundaries lie42 90 default* SVM -laces one state data+ase re-lica on slice A2 Bou can increase t(e default si<e of slice A or decrease t(e si<e of t(e state data+ase re-lica in order to fit more t(an one state data+ase re-lica onto t(e slice2 )(e default si<e for a state data+ase re-lica in a multi-o'ner disk set is 16 M+0tes2 %or use in disk sets* disks must (a&e a slice A t(at meets t(ese criteria: KStarts at sector $ 6#

K1ncludes enoug( s-ace for a disk la+el and state data+ase re-licas K@annot +e mounted : K oes not o&erla- 'it( an0 ot(er slices* including slice # 1f t(e e=isting -artition ta+le does not meet t(ese criteria* Solaris Volume Manager re-artitions t(e disk2 A small -ortion of eac( dri&e is reser&ed in slice A for use +0 Solaris Volume Manager2 )(e remainder of t(e s-ace on eac( dri&e is -laced into slice $2 An0 e=isting data on t(e disks is lost +0 re-artitioning2 -ip3 After 0ou add a dri&e to a disk set* 0ou ma0 re-artition it as necessar0* 'it( t(e e=ce-tion t(at slice A is not altered in an0 'a02 )(e follo'ing out-ut from t(e E-rt&tocF s(o's a disk +efore it is added to a disk set2 Eroot<le7icon:appsF> prtvtoc dev rdsk c1t$d0s0 X ,de&,rdsk,c1t6d$s$ -artition maX X :imensions: X "1# +0tes,sector X 1.. sectors,track X #A tracks,c0linder X ."/1 sectors,c0linder X !/#6 c0linders X !/#! accessi+le c0linders X X %lags: X 1: unmounta+le X 1$: read-onl0 X X %irst Sector Dast X Partition )ag %lags Sector @ount Sector Mount :irector0 $ # $$ $ !1116/" !1116/! 1 . $1 !1116/" 1#.".$! ".!6//8 # " $1 $ 1A68#$8! 1A68#$8. . $ $$ ".!6/// !1/A8A/ /"!!8AA ! $ $$ /"!!8A8 !1/A8A/ 1.A!#A"6 " $ $$ 1.A!#A"A ././.#A 1A68#$8. )(e a+o&e out-ut s(o's t(at t(e disk does not contain a slice A2 )(erefore* '(en t(e disk is added to a disk set* Solaris Volume Manager re-artitions t(e disk2 )(e follo'ing out-ut from t(e -rt&toc command s(o's t(e disk after it is added to a disk set2 Eroot<le7icon:appsF> prtvtoc dev rdsk c1t$d0s0 X ,de&,rdsk,c1t6d$s$ -artition maX X :imensions: X "1# +0tes,sector X 1.. sectors,track X #A tracks,c0linder X ."/1 sectors,c0linder X !/#6 c0linders X !/#! accessi+le c0linders X X %lags: X 1: unmounta+le 6.

X 1$: read-onl0 Solaris Volume Manager :isk Set Administration @(a-ter 18 S :isk Sets 3;&er&ie'4 1/1 X X %irst Sector Dast X Partition )ag %lags Sector @ount Sector Mount :irector0 $ $ $$ 1$AA. 1A6A1.11 1A68#$8. G % %$ % $%GG# $%GG" Eroot<le7icon:appsF> )(e out-ut s(o's t(at t(e disk (as +een re-artitioned to include a slice A t(at starts at c0linder $ and t(at (as sufficient s-ace for t(e state data+ase re-lica2 1f disks 0ou add to a disk set eac( (a&e an acce-ta+le slice A* t(e0 are not reformatted2 Go' to @reate a :isk Set i() -o create a disk set ,rom scratch ,rom the command line. +se the ,ollowing ,orm o, the metaset command: # metaset -s diskset-name -a -- -) -ostname -s diskset-name S-ecifies t(e name of a disk set on '(ic( t(e metaset command 'ill 'ork2 -a Adds (osts to t(e named disk set2 Solaris Volume Manager su--orts u- to four (osts -er disk set2 -) S-ecifies t(at t(e disk set +eing created is a multi-o'ner disk set2 -- -ostname S-ecifies one or more (osts to +e added to a disk set2 Adding t(e first (ost creates t(e set2 )(e second (ost can +e added later2 Go'e&er* t(e second (ost is not acce-ted if all t(e disks 'it(in t(e set cannot +e found on t(e s-ecified (ostname2 (ostname is t(e same name found in t(e ,etc,nodename file2 ii() !heck the stat+s o, the new disk set) # metaset ?=am-le: @reating a :isk Set 1n t(e follo'ing e=am-le* 0ou create a s(ared disk set called +lue* from t(e (ost (ost12 )(e metaset command s(o's t(e status2 At t(is -oint* t(e disk set (as no o'ner2 )(e (ost t(at adds disks to t(e set +ecomes t(e o'ner +0 default2 # metaset -s blue -a -- -ost1 # metaset Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 ?=am-le: @reating a Multi-;'ner :isk Set 1n t(e follo'ing e=am-le* 0ou create a multi-o'ner disk set called red2 )(e first line of t(e out-ut from t(e metaset command dis-la0s EMulti-o'ner*F indicating t(at t(e disk set is a multi-o'ner disk set2 # metaset -s red -a -) -- nodeone # metaset -s red Multi-o'ner Set name M red* Set num+er M 1* Master M Gost ;'ner Mem+er 6!

nodeone Bes Go' to Add :isks to a :isk Set ;nl0 disks t(at meet t(e follo'ing conditions can +e added to a disk set: )(e disk must not +e in use in a &olume or (ot s-are -ool2 K)(e disk must not contain a state data+ase re-lica2 K)(e disk must not +e currentl0 mounted* s'a--ed on* or ot(er'ise o-ened for use +0 an a--lication2 i() -o add disks to a disk set ,rom the command line. +se the ,ollowing ,orm o, the metaset command: # metaset 's diskset-name -a disk-name -s diskset-name S-ecifies t(e name of a disk set on '(ic( t(e metaset command 'ill 'ork2 -a Adds disks to t(e named disk set2 disk-name S-ecifies t(e disks to add to t(e disk set2 disk names are in t(e form c=t=d=2 )(e Es=F slice identifiers are not included '(en adding a disk to a disk set2 )(e first (ost to add a disk to a disk set +ecomes t(e o'ner of t(e disk set2 ii() Veri,y the stat+s o, the disk set and disks) # metaset

?=am-le: Adding a :isk to a :isk Set # metaset -s blue -a c1t$d0 # metaset Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 Bes :ri&e :+ase c1t6d$ Bes 1n t(is e=am-le* t(e (ost name is (ost12 )(e s(ared disk set is +lue2 ;nl0 t(e disk* c1t6d$* (as +een added to t(e disk set +lue2 ;-tionall0* 0ou could add multi-le disks at once +0 listing eac( disk on t(e command line2 %or e=am-le* 0ou could use t(e follo'ing command to add t'o disks to t(e disk set simultaneousl0: # metaset -s blue -a c1t$d0 c2t$d0 Go' to Add Anot(er Gost to a :isk Set i() -o add hosts to a disk set ,rom the command line. +se the ,ollowing ,orm o, the metaset command: # metaset -s diskset-name -a -- -ostname -s diskset-name S-ecifies t(e name of a disk set on '(ic( to add t(e (ost2 -a Adds t(e (ost to t(e named disk set2 6"

-- -ostname S-ecifies one or more (ost names to +e added to t(e disk set2 Adding t(e first (ost creates t(e disk set2 )(e (ost name is t(e same name found in t(e ,etc,nodename file2 ii() Veri,y that the host has been added to the disk set) # metaset ?=am-le: Adding Anot(er Gost to a :isk Set # metaset -s blue -a -- -ost2 # metaset Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 Bes (ost# :ri&e :+ase c1t6d$ Bes c#t6d$ Bes )(is e=am-le s(o's t(e addition of t(e (ost* (ost#* to t(e disk set* +lue2 G K o' to @reate Solaris Volume Manager @om-onents in a :isk Set After 0ou create a disk set* 0ou can create &olumes and (ot s-are -ools using t(e disks 0ou added to t(e disk set2 Bou can use eit(er t(e ?n(anced Storage tool 'it(in t(e Solaris Management @onsole or t(e command-line utilities2 >se t(e same command line utilities 'it( t(e same +asic s0nta= to create &olumes* state data+ase re-licas* or (ot s-are -ools2 Go'e&er* add -s disk-set immediatel0 after t(e command for e&er0 command2 # command -s disk-set ?=am-le: @reating Solaris Volume Manager Volumes in a :isk Set )(e follo'ing e=am-le s(o's t(e creation of a mirror* d1$* in t(e disk set* +lue2 )(e mirror consists of su+mirrors 3RA1:-$ &olumes4* d11 and d1#2 # metainit -s blue d11 1 1 c1t$d0s0 +lue,d11: @oncat,Stri-e is setu# metainit 's blue d12 1 1 c2t$d0s0 +lue,d1#: @oncat,Stri-e is setu# metainit -s blue d10 -m d11 +lue,d1$: Mirror is setu# metattach 's blue d10 d12 +lue,d1$: su+mirror +lue,d1# is attac(ed # metastat -s blue +lue,d1$: Mirror Su+mirror $: +lue,d11 State: ;ka0 Su+mirror 1: +lue,d1# State: Res0ncing Res0nc in -rogress: $ Qdone Pass: 1 Read o-tion: roundro+in 3default4 5rite o-tion: -arallel 3default4 Si<e: 1A6A!/$# +locks +lue,d11: Su+mirror of +lue,d1$ 66

State: ;ka0 Si<e: 1A6A!/$# +locks Stri-e $: :e&ice Start 9lock :+ase State Reloc Got S-are c1t6d$s$ $ No ;ka0 +lue,d1#: Su+mirror of +lue,d1$ State: Res0ncing Si<e: 1A6A!/$# +locks Stri-e $: :e&ice Start 9lock :+ase State Reloc Got S-are c#t6d$s$ $ No ;ka0 Go' to @(eck t(e Status of a :isk Set *se the ,ollowing ,orm o, the metaset command to view disk set stat+s) # metaset -s diskset-name 0ote 3 :isk set o'ners(i- is onl0 s(o'n on t(e o'ning (ost2 ?=am-le: @(ecking t(e Status of a S-ecified :isk Set )(e follo'ing e=am-le s(o's t(e metaset command 'it( t(e -s o-tion follo'ed +0 t(e name of t(e disk set* +lue2 )(e out-ut from t(is command dis-la0s status information for t(at disk set2 )(e out-ut indicates t(at (ost1 is t(e disk set o'ner2 )(e metaset command also dis-la0s t(e disks in t(e disk set2 red# metaset -s blue Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 Bes :ri&e :+ase c1t6d$ Bes c#t6d$ Bes )(e metaset command +0 itself dis-la0s t(e status of all disk sets2 Go' to :elete :isks %rom a :isk Set i() *se the ,ollowing ,orm o, the metaset command to delete a disk ,rom a disk set) # metaset -s diskset-name -d disk-name -s diskset-name S-ecifies t(e name of a disk set on '(ic( to delete t(e disk2 -d disk-name S-ecifies t(e disks to delete from t(e disk set2 :isk names are in t(e form c=t=d=2 )(e Es=F slice identifiers are not included '(en deleting a disk from a disk set2 ii() Veri,y that the disk has been deleted ,rom the disk) # metaset s diskset-name 0ote 3 )o delete a disk set* 0ou must first delete all t(e disks from t(e disk set2

6A

?=am-le: :eleting a :isk from a :isk Set )(e follo'ing e=am-le s(o's t(e deletion of t(e disk* c1t6d$ from t(e disk set* +lue2 host$# metaset -s blue -d c1t$d0 host$# metaset -s blue Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 (ost# :ri&e :+ase c#t6d$ Bes

Go' to )ake a :isk Set *se the ,ollowing ,orm o, the metaset command) # metaset -s diskset-name -t -f -s diskset-name S-ecifies t(e name of a disk set to take2 -t S-ecifies to take t(e disk set2 -f S-ecifies to take t(e disk set forci+l02 ;nl0 one (ost at a time can o'n a disk set2 5(en one (ost in a disk set takes t(e disk set* t(e ot(er (ost in t(e disk set cannot access data on t(e disks in t(e disk set2 )(e default +e(a&ior of t(e metaset command is to allo' 0our (ost to take t(e disk set onl0 if a release is -ossi+le on t(e (ost t(at (as o'ners(i- of t(e disk set2 >se t(e -f o-tion to forci+l0 take t(e disk set2 )(is o-tion takes t(e disk set '(et(er or not anot(er (ost currentl0 (as t(e set2 >se t(is met(od '(en a (ost in t(e disk set is do'n or not communicating2 1f t(e ot(er (ost (ad t(e disk set taken at t(is -oint* it 'ould -anic '(en it attem-ts to -erform an 1,; o-eration on t(e disk set2 0ote 3 :isk set o'ners(i- is onl0 s(o'n on t(e o'ning (ost2 ?=am-le: )aking a :isk Set 1n t(e follo'ing e=am-le* t(e (ost* (ost1* communicates 'it( t(e (ost* (ost#2 )(is communication ensures t(at t(e (ost (ost# (as released t(e disk set +efore t(e (ost* (ost1 attem-ts to take t(e disk set2 host$# metaset 222 Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 (ost# 222 host$# metaset -s blue -t host"# metaset 222 Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 Bes (ost# 222 1f (ost# o'ned t(e disk set* +lue* t(e E;'nerF column in t(e -receding out-ut 'ould still (a&e +een +lank2 )(e metaset command onl0 s(o's '(et(er t(e (ost issuing t(e command o'ns t(e disk set2 68

Go' to Release a :isk Set Releasing a disk set is useful '(en 0ou -erform maintenance on t(e -(0sical disks in t(e disk set2 5(en a disk set is released* it cannot +e accessed +0 t(e (ost2 1f +ot( (osts in a disk set release t(e set* neit(er (ost in t(e disk set can access directl0 t(e &olumes or (ot s-are -ools t(at are defined in t(e disk set2 Go'e&er* if +ot( (osts release t(e disk set* t(e (osts can access t(e disks directl0 t(roug( t(eir cXtXdX names2 0ote )(is o-tion is not a&aila+le for multi-o'ner disk sets2

i() -o release ownership o, the disk setH +se the ,ollowing ,orm o, the metaset command: # metaset s diskset-name -r -s diskset-name S-ecifies t(e name of a disk set on '(ic( t(e metaset command 'ill 'ork2 -r Releases o'ners(i- of a disk set2 )(e reser&ation of all t(e disks 'it(in t(e disk set is remo&ed2 )(e &olumes 'it(in t(e disk set are no longer accessi+le2 0ote 3 :isk set o'ners(i- is onl0 s(o'n on t(e o'ning (ost2 ii() Veri,y that the disk set has been released on this host) # metaset ?=am-le: Releasing a :isk Set )(e follo'ing e=am-le s(o's t(e release of t(e disk set* +lue2 Note t(at t(ere is no o'ner of t(e disk set2 Vie'ing status from t(e (ost (ost1 could +e misleading2 A (ost can onl0 determine if it does or does not o'n a disk set2 %or e=am-le* if (e (ost* (ost#* 'ere to take o'ners(i- of t(e disk set* t(e o'ners(i- 'ould not a--ear from t(e (ost* (ost12 ;nl0 t(e (ost* (ost#* 'ould dis-la0 t(at (ost# (as o'ners(i- of t(e disk set2 host$# metaset 3s blue -r host$# metaset s blue Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 (ost# :ri&e :+ase c1t6d$ Bes c#t6d$ Bes G K o' to :elete a Gost or :isk Set :eleting a disk set re6uires t(at t(e disk set contains no disks and t(at no ot(er (osts are attac(ed to t(e disk set2 :eleting t(e last (ost destro0s t(e disk set2 i() -o delete the host +se the ,ollowing ,orm o, the metaset command) # metaset s diskset-name -d -- -ostname -s diskset-name S-ecifies t(e disk set on '(ic( t(e metaset command 'ill 'ork2 -d :eletes a (ost from a disk set2 -- -ostname S-ecifies t(e name of t(e (ost to delete2 >se t(e same form of t(e -receding metaset command to delete a disk set2 :eleting a disk set re6uires t(at t(e disk set contains no disks and t(at no ot(er (osts o'n t(e disk set2 :eleting t(e last (ost destro0s t(e disk set2

6/

ii() Veri,y that the host has been deleted ,rom the disk set by +sing the metaset command) 0ote that only the c+rrent 6owning( host is shown) 9ther hosts have been deleted) # metaset -s disk-set

?=am-le: :eleting a Gost %rom a :isk Set )(e follo'ing e=am-le s(o's t(e deletion of t(e (ost* (ost# from t(e disk set* +lue2 # metaset -s blue Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 Bes 22(ost# :ri&e :+ase c1t#d$ Bes c1t.d$ Bes c1t!d$ Bes c1t"d$ Bes c1t6d$ Bes c#t1d$ Bes # metaset s blue -d -- -ost2 # metaset s blue Set name M +lue* Set num+er M 1 Gost ;'ner (ost1 Bes :ri&e :+ase c1t#d$ Bes c1t.d$ Bes c1t!d$ Bes c1t"d$ Bes c1t6d$ Bes c#t1d$ Bes ?=am-le: :eleting t(e Dast Gost from a :isk Set )(e follo'ing e=am-le s(o's t(e deletion of t(e last (ost from t(e disk set* +lue2 host$# metaset -s blue -d -- -ost1 host$# metaset -s blue metaset: (ost: setname Y+lueY: no suc( set G K o' to Print a Re-ort on :isk Sets A&aila+le for 1m-ort i() Aecome s+per+ser) ii() 9btain a report on disk sets available ,or import) # metaimport -r -v -r Pro&ides a re-ort of t(e unconfigured disk sets a&aila+le for im-ort on t(e s0stem2 -v Pro&ides detailed information a+out t(e state data+ase 3metad+4 re-lica location and status on t(e disks of unconfigured disk sets a&aila+le for im-ort on t(e s0stem2 A$

?=am-le: Re-orting on :isk Sets A&aila+le for 1m-ort )(e follo'ing e=am-les s(o' (o' to -rint a re-ort on disk sets a&aila+le for im-ort2 )(e out-ut from t(e metaim-ort command distinguis(es +et'een regular disk sets and re-licated disk sets2 # metaimport -r # metaimport -r :ri&es in regular diskset including disk c1t#d$: c1t#d$ c1t.d$ More info: metaim-ort -r -& c1t#d$ 1m-ort: metaim-ort -s Tne'setnameO c1t#d$ :ri&es in re-licated diskset including disk c1t!d$: c1t!d$ c1t"d$ More info: metaim-ort -r -& c1t!d$ 1m-ort: metaim-ort -s Tne'setnameO c1t!d$ # metaimport r -v c1t2d0 1m-ort: metaim-ort -s Tne'setnameO c1t#d$ Dast u-date: Mon :ec #/ 1!:1.:." #$$. :e&ice offset lengt( re-lica flags c1t#d$ 16 81/# a u c1t.d$ 16 81/# a u Go' to 1m-ort a :isk Set %rom ;ne S0stem to Anot(er S0stem i() Aecome s+per+ser) ii() Veri,y that a disk set is available ,or import) # metaimport -r -v iii() 5mport an available disk set) I# metaimport -s diskset-name disk-name - s diskset-name S-ecifies t(e name of t(e disk set +eing created2 disk-name 1dentifies a disk 3cRtRdR4 containing a state data+ase re-lica from t(e disk set +eing im-orted2 iv() Veri,y that the disk set has been imported) # metaset s diskset-name ?=am-le: 1m-orting a :isk Set )(e follo'ing e=am-le s(o's (o' to im-ort a disk set2 # metaimport s red c1t2d0 :ri&es in diskset including disk c1t#d$: c1t#d$ c1t.d$ c1t8d$ A1

More info: metaim-ort -r -& c1t#d$ # metaset -s red Set name M red* Set num+er M 1 Gost ;'ner (ost1 Bes :ri&e :+ase c1t#d$ Bes c1t.d$ Bes c1t8d$ Bes )o--:o'n Volume @reation Go' to @reate RA1:-1 3mirror4 Volumes >sing t(e metassist @ommand i() 5denti,y the available storage on which to create the vol+me) 1f 0ou do not e=-licitl0 s-ecif0 storage* Solaris Volume Manager identifies unused storage on t(e s0stem and uses it* as a--ro-riate2 1f 0ou c(oose to s-ecif0 storage* eit(er +roadl0 3for e=am-le* all storage on controller 14 or s-ecificall0 3for e=am-le* use c1t!d#* +ut do not use c1t!d14* Solaris Volume Manager uses t(e storage 0ou s-ecif02 ii() -o create vol+mes ,rom the command line. +se the ,ollowing ,orm o, the metassist command) # metassist create -s diskset -f -r redundanc" -a dev1' dev2999 -, si.e -v verbosit" create 1s t(e su+command used to create &olumes2 -s diskset S-ecifies t(e name of t(e disk set to use for t(e &olume2 -f S-ecifies t(at t(e &olume +e associated 'it( a (ot s-are2 -r redundanc" S-ecifies t(e le&el of redundanc0 3num+er of data co-ies4 to create2 -a dev1' dev2222 S-ecifies t(e de&ices t(at are a&aila+le for creating t(e &olume2 -, si.e S-ecifies t(e si<e of t(e &olume to create in H9* M9* G9* or )92 -v verbosit" S-ecifies (o' &er+ose t(e out-ut s(ould +e2 Allo'a+le &alues range from $ 3nearl0 silent out-ut4 to # 3significant out-ut42 )(e default le&el is 12 iii() -o create vol+mes +sing an inp+t ,ile to speci,y vol+me characteristics. +se one o, the ,ollowing ,orms o, the metassist command) # metassist create [-v n] [-c] -! confi/%file # metassist create [-v n] [-c : -d] -! re;uest%file -c S-ecifies to out-ut t(e command scri-t t(at 'ould im-lement t(e s-ecified or generated &olume configuration2 )(e command scri-t are not run* and -rocessing sto-s at t(is stage2 -d S-ecifies to out-ut t(e &olume configuration t(at satisfies t(e s-ecified or generated &olume re6uest2 No command scri-t is generated or e=ecuted* and -rocessing sto-s at t(is stage2 -! confi/%file : re;uest%file S-ecifies t(e &olume re6uest or &olume configuration file to -rocess2 1f configNfile or re6uestNfile is s-ecified as a das( 3-4* it is read from standard in-ut2 )(e -d o-tion cannot +e s-ecified '(en in-ut file is a &olume configuration file2 A &olume configuration file descri+es detailed configurations of t(e &olumes to +e created* '(ile a &olume re6uest file -ro&ides c(aracteristics for t(e &olumes to +e -roduced2 A#

iv() 9nce yo+ have created the vol+mes. view the new vol+mes) # metastat -s diskset-name ?=am-le: @reating a )'o-5a0 Mirror >sing t(e metassist @ommand )(e follo'ing e=am-le s(o's (o' to create a t'o-'a0 mirror* 1$ M+0tes in si<e2 )(e metassist command identifies unused disks and creates t(e +est mirror -ossi+le using t(ose disks2 )(e -s m0set argument s-ecifies t(at t(e &olumes 'ill +e created in t(e m0set disk set2 )(e disk set is created* if necessar02 # metassist create -s m"set -r 2 -, 10mb ?=am-le: @reating a )'o-5a0 Mirror and Got S-are >sing t(e metassist @ommand )(e follo'ing e=am-le s(o's (o' to use t(e metassist command to create a t'o-'a0 mirror* 1$ M+0tes in si<e* 'it( a (ot s-are to -ro&ide additional fault tolerance2 )(e -f o-tion s-ecifies t(e fault tolerance2 # metassist create -s m"set -f -r 2 -, 10mb ?=am-le: @reating a Stri-e 5it( a S-ecific @ontroller >sing t(e metassist @ommand )(e follo'ing e=am-le s(o's (o' to use t(e metassist command to create a stri-e using disks a&aila+le on controller 12 )(e -a o-tion s-ecifies t(e a&aila+le controller2 # metassist create -s m"set -a c1 -, 10mb ?=am-le: S-ecif0ing ;ut-ut Ver+osit0 %rom t(e metassist @ommand )(e follo'ing e=am-le s(o's (o' to use t(e metassist command to create a t'o-'a0 mirror* 1$ M+0tes in si<e* 'it( a (ot s-are to -ro&ide additional fault tolerance2 )(e -f o-tion s-ecifies fault tolerance2 )(e final argument 3-& #4 s-ecifies a &er+osit0 le&el of t'o* '(ic( is t(e ma=imum le&el and 'ill -ro&ide t(e most information -ossi+le a+out (o' t(e metassist command 'orked2 # metassist create -s m"set -f -r 2 -, 10mb -v 2 Scanning s0stem -(0sical de&ice configuration222 )(ese G9A,@ontrollers are kno'n:2 c$ ,-ciP1f*$,-ciP1*1,ideP. c1 ,-ciP1f*$,-ciP1,-ciP#,S>N5*is-t'oP! )(ese disks are kno'n: c$t$d$ id1*dadPAS).!.!#AMNNNNNNNNNNNNVG:/A1$1 c1t1d$ id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$D88P$$$$#1$/AZND c1t#d$ id1*sdPSS?AGA)?NS)./1$#D@S>N/2$GDW5##86A$$$$1/1A1W:% c1t.d$ id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$DARV$$$$A1$8)G$G c1t!d$ id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$D:%R$$$$#1$8AR1) c1t"d$ id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$D$M#$$$$#1$/81#D c1t6d$ id1*sdPSS?AGA)?NS)./#$!D@S>N/2$G.9V$D8H8$$$$#1$8AR$V 2 2 3out-ut truncated4 )(e follo'ing e=am-le s(o's (o' to use t(e metassist command to create a t'o-'a0 mirror* 1$ M+0tes in si<e* 'it( a (ot s-are to -ro&ide additional fault tolerance2 )(e -f o-tion s-ecifies fault tolerance2 )(e final argument 3-& $4 s-ecifies a &er+osit0 le&el of <ero* t(at 'ill -ro&ide nearl0 silent out-ut '(en t(e command runs2 # metassist create -s m"set -f -r 2 -, 10mb -v 0 m0set,(s-$$$: Gots-are -ool is setum0set,(s-$$$: Gots-are is added m0set,d#: @oncat,Stri-e is setum0set,d1: @oncat,Stri-e is setuA.

m0set,d$: Mirror is setum0set,d$: su+mirror m0set,d1 is attac(ed ?=am-le: @reating a Volume >sing an 1n-ut %ile )(e follo'ing e=am-le s(o's (o' to use t(e metassist command to create a &olume using an in-ut file2 # metassist create -! re;uest9<ml @reating a Volume @onfiguration %ile 5it( t(e metassist @ommand 90 running t(e metassist command 'it( t(e -d argument* 0ou can generate an ZMD-+ased &olume configuration file t(at s-ecifies t(e &olumes and t(eir com-onents in detail* including all o-tions and rele&ant information a+out t(e &olumes2 Re&ie'ing t(is file (el-s 0ou to understand t(e configuration t(at t(e metassist command recommends2 Making careful c(anges to t(is file can also ena+le 0ou to fine-tune t(e configuration* t(en to use t(e &olume configuration file as in-ut to t(e metassist command to actuall0 create &olumes2 Go' to @reate a Volume @onfiguration %ile >sing t(e metassist @ommand i() 5denti,y the available storage on which to create the vol+me) 1f 0ou do not e=-licitl0 s-ecif0 storage* Solaris Volume Manager identifies unused storage on t(e s0stem and uses it* as a--ro-riate2 1f 0ou c(oose to s-ecif0 storage* eit(er +roadl0 3for e=am-le* all storage on controller 14 or s-ecificall0 3for e=am-le* use c1t!d#* +ut do not use c1t!d14* Solaris Volume Manager uses t(e storage 0ou s-ecif02 ii() *se the metassist command and the appropriate options ,or yo+r task) >se t(e -d o-tion to s-ecif0 t(at t(e &olume s(ould not actuall0 +e created2 1nstead* an ZMD-+ased &olume configuration file is sent to standard out-ut: # metassist create -s diskset -f -r redundanc" -a dev1' dev299 -, si.e -v verbosit" [-d] create 1s t(e su+command used to create &olumes2 -s diskset S-ecifies t(e name of t(e disk set to use for t(e &olume2 -f S-ecifies t(at t(e &olume +e associated 'it( a (ot s-are2 -r redundanc" S-ecifies t(e le&el of redundanc0 3num+er of data co-ies4 to create2 -a dev1' dev2222 S-ecifies t(e de&ices t(at are a&aila+le for creating t(e &olume2 -, si.e S-ecifies t(e si<e of t(e &olume to create in H9* M9* G9* or )92 -v verbosit" S-ecifies (o' &er+ose t(e out-ut s(ould +e2 Allo'a+le &alues range from $ 3nearl0 silent out-ut4 to # 3significant out-ut42 )(e default le&el is 1 -d S-ecifies t(at t(e &olume s(ould not actuall0 +e created2 0ote 3 )(e ZMD-+ased &olume configuration file re6uired +0 t(e d argument is sent to standard out-ut2 Go'e&er* t(e rest of t(e out-ut from t(e metassist command goes to standard error2 Bou can redirect t(e out-ut streams as 0ou c(oose2 ?=am-le: @reating a Volume @onfiguration %ile >sing t(e metassist @ommand )(is e=am-le s(o's (o' to use t(e metassist command to create a t'o-'a0 mirror* 1$ M+0tes in si<e* 'it( a (ot s-are to -ro&ide additional fault tolerance2 )(e -f o-tion s-ecifies fault tolerance2 )(e final argument 3-d4 s-ecifies t(at t(e &olume s(ould not actuall0 +e created2 Rat(er* a &olume configuration file t(at could e&entuall0 +e used to create t(e s-ecified configuration s(ould +e sent to standard out-ut2 # metassist create -s m"set f -r 2 -, 10mb -d 23out-ut truncated4 2 A!

2 Volume re6uest com-leted successfull02 T[=ml &ersionMY12$Y[O T\:;@)BP? &olume-config SBS)?M Y,usr,s(are,li+,=ml,dtd,&olume-config2dtdYO T&olume-configO Tdiskset nameMYm0setY,O Tdisk nameMYc1t.d$Y,O Tdisk nameMYc1t6d$Y,O Tdisk nameMYc1t!d$Y,O Tslice nameMYc1t.d$sAY si<ein+locksMY$Y,O Tslice nameMYc1t.d$s$Y si<ein+locksMY1A6!/A6"Y startsectorMY1$AA.Y,O Tslice nameMYc1t6d$sAY si<ein+locksMY$Y,O Tslice nameMYc1t6d$s$Y si<ein+locksMY1A6!/A6"Y startsectorMY1$AA.Y,O Tslice nameMYc1t!d$sAY si<ein+locksMY$Y,O Tslice nameMYc1t!d$s$Y si<ein+locksMY1A6!/A6"Y startsectorMY1$AA.Y,O T(s- nameMY(s-$$$YO Tslice nameMYc1t.d$s1Y si<ein+locksMY#1"!6Y startsectorMY1A66$".8Y,O T,(s-O Tmirror nameMYd$Y readMYR;>N:R;91NY 'riteMYPARADD?DY -assnumMY1YO Tconcat nameMYd#YO Tslice nameMYc1t!d$s1Y si<ein+locksMY#1"!6Y startsectorMY1A66$".8Y,O T(s- nameMY(s-$$$Y,O T,concatO Tconcat nameMYd1O Tslice nameMYc1t6d$s1Ysi<ein+locksMY#1"!6Y startsectorMY1A66$".8Y,O T(s- nameMY(s-$$$Y,O T,concatO T,mirrorO T,&olume-configO R ?=am-le: Sa&ing a Volume @onfiguration %ile >sing t(e metassist @ommand )(is e=am-le s(o's (o' to use t(e metassist command to create a t'o-'a0 mirror* 1$ M+0tes in si<e* 'it( a (ot s-are to -ro&ide additional fault tolerance2 )(e -f o-tion s-ecifies fault tolerance2 )(e final argument 3-d4 s-ecifies t(at t(e &olume s(ould not actuall0 +e created2 Rat(er* a &olume configuration file t(at could e&entuall0 +e used to create t(e s-ecified configuration s(ould +e sent to standard out-ut2 )(e end of t(e command redirects standard out-ut to create t(e ,tm-,metassist-&olume-config2=ml &olume configuration file t(at can later +e used to create t(e s-ecified &olume2 # metassist create -s m"set -f -r 2 -, 10mb -d 8 tmp metassist-volume-confi/9<ml @(anging t(e :efault 9e(a&ior of t(e metassist @ommand Bou can use t(e &olume defaults file 3,etc,defaults,metassist2=ml4 to c(ange t(e default +e(a&ior for t(e metassist command2 90 c(anging t(e defaults file* 0ou can e=-licitl0 e=clude from consideration* or include for consideration* s-ecific disks or controllers2 Bou can also s-ecif0 re6uirements for most &olume settings used +0 t(e metassist command2 )(e format of t(e ,etc,defaults,metassist2=ml is s-ecified +0 t(e ,usr,s(are,li+,=ml,dtd,&olume-defaults2dtd :ocument )0-e :efinition 3:):42 @(anging t(e Volume :efaults %ile ?dit t(e &olume defaults file 3,etc,defaults,metassist2=ml4 to s-ecif0 (o' t(e metassist command s(ould +e(a&e2 A"

0ote 5(en 0ou edit t(e file* 0ou must ensure t(at t(e file continues to +e com-liant 'it( t(e ,usr,s(are,li+,=ml,dtd,&olume-defaults2dtd :ocument )0-e :efinition 3:):42 1f t(e ZMD file is not com-liant 'it( t(e :):* t(e metassist command 'ill fail 'it( an error message2 ?=am-le: @reating a Volume 5it( @(anged :efaults >sing t(e metassist @ommand 9efore creating a &olume* edit t(e ,etc,default,metassist2=ml file to s-ecif0 t(e default settings t(at 0ou 'ant to a--l0 to all &olumes 0ou 'ill create 'it( t(e metassist command2 1n t(is e=am-le* t(e metassist command onl0 creates &olumes on controller c1 and* '(en creating stri-es* onl0 creates stri-es 'it( e=actl0 four com-onents and an interlace of &alue "1#H92 )(ese constraints a--l0 to all uses of t(e metassist command until t(e ,etc,default,metassist2=ml file is c(anged again2 # cat etc default metassist9<ml T\:;@)BP? &olume-defaults SBS)?M ] Y,usr,s(are,li+,=ml,dtd,&olume-defaults2dtdYO T&olume-defaultsO Ta&aila+le nameMYc$Y ,O Tstri-e mincom-MY&Y ma=com-MY&Y interlaceMY:$"JAY OT,stri-eO T,&olume-defaultsO # metassist create -s m"set -, 100b )(e metassist command creates a 1$-G+0te stri-e* using e=actl0 four slices and an interlace &alue of "1# H+0tes* as s-ecified in t(e ,etc,default,metassist2=ml file2 )rou+les(ooting Solaris Volume Manager General Guidelines for )rou+les(ooting Solaris Volume Manager Bou s(ould (a&e t(e follo'ing information on (and '(en 0ou trou+les(oot Solaris Volume Manager -ro+lems: ;ut-ut from t(e metad+ command ;ut-ut from t(e metastat command ;ut-ut from t(e metastat -- command 9acku- co-0 of t(e ,etc,&fsta+ file 9acku- co-0 of t(e ,etc,l&m,mdd+2cf file :isk -artition information from t(e -rt&toc command or t(e fdisk command 3=864 )(e Solaris &ersion on 0our s0stem A list of t(e Solaris -atc(es t(at (a&e +een installed A list of t(e Solaris Volume Manager -atc(es t(at (a&e +een installed Go' to Re-lace a %ailed :isk i() 5denti,y the ,ailed disk to be replaced by e7amining the /var/adm/messages ,ile and the metastat command o+tp+t) ii() Bocate any state database replicas that might have been placed on the ,ailed disk) >se t(e metad+ command to find t(e re-licas2 )(e metad+ command mig(t re-ort errors for t(e state data+ase re-licas t(at are located on t(e failed disk2 1n t(is e=am-le* c$t1d$ is t(e -ro+lem de&ice2 # metadb flags first +lk +lock count a m u 16 1$.! ,de&,dsk,c$t$d$s! a u 1$"$ 1$.! ,de&,dsk,c$t$d$s! A6

a u #$8! 1$.! ,de&,dsk,c$t$d$s! 5 -c luo 16 1$.! ,de&,dsk,c$t1d$s! 5 -c luo 1$"$ 1$.! ,de&,dsk,c$t1d$s! 5 -c luo #$8! 1$.! ,de&,dsk,c$t1d$s! )(e out-ut s(o's t(ree state data+ase re-licas on eac( slice ! of t(e local disks* c$t$d$ and c$t1d$2 )(e 5 in t(e flags field of t(e c$t1d$s! slice indicates t(at t(e de&ice (as 'rite errors2 )(ree re-licas on t(e c$t$d$s! slice are still good2 iii() Record the slice name where the state database replicas reside and the n+mber o, state database replicas) -hen. delete the state database replicas) )(e num+er of state data+ase re-licas is o+tained +0 counting t(e num+er of a--earances of a slice in t(e metad+ command out-ut2 1n t(is e=am-le* t(e t(ree state data+ase re-licas t(at e=ist on c$t1d$s! are deleted2 # metadb -d c0t1d0s4 !a+tion 1f* after deleting t(e +ad state data+ase re-licas* 0ou are left 'it( t(ree or fe'er* add more state data+ase re-licas +efore continuing2 :oing so (el-s to ensure t(at configuration information remains intact2 iv() Bocate and delete any hot spares on the ,ailed disk) >se t(e metastat command to find (ot s-ares2 1n t(is e=am-le* (ot s-are -ool (s-$$$ included c$t1d$s6* '(ic( is t(en deleted from t(e -ool2 # metahs -d -sp000 c0t1d0s$ (s-$$$: Gots-are is deleted v() Replace the ,ailed disk) )(is ste- mig(t entail using t(e cfgadm command* t(e lu=adm command* or ot(er commands as a--ro-riate for 0our (ard'are and en&ironment2 5(en -erforming t(is ste-* make sure to follo' 0our (ard'areCs documented -rocedures to -ro-erl0 mani-ulate t(e Solaris state of t(is disk2 vi() Repartition the new disk) >se t(e format command or t(e fmt(ard command to -artition t(e disk 'it( t(e same slice information as t(e failed disk2 1f 0ou (a&e t(e -rt&toc out-ut from t(e failed disk* 0ou can format t(e re-lacement disk 'it( t(e fmt(ard -s ,tm-,failed-disk--rt&toc-out-ut command2 vii() 5, yo+ deleted state database replicas. add the same n+mber back to the appropriate slice) 1n t(is e=am-le* ,de&,dsk,c$t1d$s! is used2 # metadb -a -c 3 c0t1d0s4 viii() 5, any slices on the disk are components o, R45D': vol+mes or are components o, R45D'% vol+mes that are in t+rn s+bmirrors o, R45D'$ vol+mes. r+n the metareplace 'e command ,or each slice) 1n t(is e=am-le* ,de&,dsk,c$t1d$s! and mirror d1$ are used2 # metareplace -e d10 c0t1d0s4 i7() 5, any so,t partitions are b+ilt directly on slices on the replaced disk. r+n the metarecover ' m 3p command on each slice that contains so,t partitions) -his command regenerates the e7tent headers on disk) 1n t(is e=am-le* ,de&,dsk,c$t1d$s! needs to (a&e t(e soft -artition markings on disk regenerated2 )(e slice is scanned and t(e markings are rea--lied* +ased on t(e information in t(e state data+ase re-licas2 # metarecover c0t1d0s4 -m -p 7() 5, any so,t partitions on the disk are components o, R45D': vol+mes or are components o, R45D'% vol+mes that are s+bmirrors o, R45D'$ vol+mes. r+n the metareplace 'e command ,or each slice) 1n t(is e=am-le* ,de&,dsk,c$t1d$s! and mirror d1$ are used2 AA

# metareplace -e d10 c0t1d0s4 7i() 5, any R45D'% vol+mes have so,t partitions b+ilt on them. r+n the metarecover command ,or each R45D'% vol+me) 1n t(is e=am-le* RA1:-$ &olume* d1A* (as soft -artitions +uilt on it2 # metarecover d17 -m -p 7ii() Replace hot spares that were deleted. and add them to the appropriate hot spare pool or pools) 1n t(is e=am-le* (ot s-are -ool* (s-$$$ included c$t1d$s62 )(is slice is added to t(e (ot s-are -ool2 # metahs -a -sp000 c0t1d0s$ (s-$$$: Gots-are is added 7iii() 5, so,t partitions or nonred+ndant vol+mes were a,,ected by the ,ail+re. restore data ,rom back+ps) 5, only red+ndant vol+mes were a,,ected. then validate yo+r data) @(eck t(e user and a--lication data on all &olumes2 Bou mig(t (a&e to run an a--lication-le&el consistenc0 c(ecker* or use some ot(er met(od to c(eck t(e data2 Go' to Reco&er %rom 1m-ro-er ,etc,&fsta+ ?ntries 1f 0ou (a&e made an incorrect entr0 in t(e ,etc,&fsta+ file* for e=am-le* '(en mirroring t(e root 3,4 file s0stem* t(e s0stem a--ears to +e +ooting -ro-erl0 initiall02 )(en* t(e s0stem fails2 )o remed0 t(is situation* 0ou need to edit t(e ,etc,&fsta+ file '(ile in single-user mode2 )(e (ig(-le&el ste-s to reco&er from im-ro-er ,etc,&fsta+ file entries are as follo's: 12 9ooting t(e s0stem to single-user mode #2 Running t(e fsck command on t(e mirror &olume .2 Remounting file s0stem read-'rite o-tions ena+led !2 ;-tional: running t(e metaroot command for a root 3,4 mirror "2 Verif0ing t(at t(e ,etc,&fsta+ file correctl0 references t(e &olume for t(e file s0stem entr0 62 Re+ooting t(e s0stem Reco&ering t(e root 3,4 RA1:-1 3Mirror4 Volume 1n t(e follo'ing e=am-le* t(e root 3,4 file s0stem is mirrored 'it( a t'o-'a0 mirror* d$2 )(e root 3,4 entr0 in t(e ,etc,&fsta+ file (as some(o' re&erted +ack to t(e original slice of t(e file s0stem2 Go'e&er* t(e information in t(e ,etc,s0stem file still s(o's +ooting to +e from t(e mirror d$2 )(e most likel0 reason is t(at t(e metaroot command 'as not used to maintain t(e ,etc,s0stem and ,etc,&fsta+ files2 Anot(er -ossi+le reason is t(at an old co-0 of t(e,etc,&fsta+ file 'as co-ied +ack into t(e current ,etc,&fsta+ file2 )(e incorrect ,etc,&fsta+ file looks similar to t(e follo'ing: Rde&ice de&ice mount %S fsck mount mount Rto mount to fsck -oint t0-e -ass at +oot o-tions R ,de&,dsk,c$t.d$s$ ,de&,rdsk,c$t.d$s$ , ufs 1 no ,de&,dsk,c$t.d$s1 - - s'a- - no ,de&,dsk,c$t.d$s6 ,de&,rdsk,c$t.d$s6 ,usr ufs # no R ,-roc - ,-roc -roc - no s'a- - ,tm- tm-fs - 0es 9ecause of t(e errors* 0ou automaticall0 go into single-user mode '(en t(e s0stem is +ooted: ok boot 222 configuring net'ork interfaces: (me$2 Gostname: (ost1 A8

mount: ,de&,dsk,c$t.d$s$ is not t(is fst0-e2 setmnt: @annot o-en ,etc,mntta+ for 'riting 1N1): @annot create ,&ar,adm,utm- or ,&ar,adm,utm-= 1N1): failed 'rite of utm-= entr0:Y Y 1N1): failed 'rite of utm-= entr0:Y Y 1N1): S1NGD? >S?R M;:? )0-e @trl-d to -roceed 'it( normal startu-* 3or gi&e root -ass'ord for s0stem maintenance4: Troot-pass&ordO At t(is -oint* t(e root 3,4 and ,usr file s0stems are mounted read-onl02 %ollo' t(ese ste-s: i() R+n the ,sck command on the root 6/( mirror) 0ote 3 9e careful to use t(e correct &olume for t(e root 3,4 mirror2 # ,sck dev md rdsk d0 XX ,de&,md,rdsk,d$ XX @urrentl0 Mounted on , XX P(ase 1 - @(eck 9locks and Si<es XX P(ase # - @(eck Pat(names XX P(ase . - @(eck @onnecti&it0 XX P(ase ! - @(eck Reference @ounts XX P(ase " - @(eck @0l grou-s ##A! files* 1181" used* 1$.$# free 31"8 frags* 1#68 +locks* $2AQfragmentation4 ii() Remo+nt the root 6/( ,ile system as read/write ,ile system so that yo+ can edit the /etc/v,stab ,ile) # mo+nt -o r+'remount dev md dsk d0 mount: 'arning: cannot lock tem- file T,etc,2mnt2lockO iii() R+n the metaroot command) # metaroot d0 )(is command edits t(e ,etc,s0stem and ,etc,&fsta+ files to s-ecif0 t(at t(e root 3,4 file s0stem is no' on &olume d$2 iv() Veri,y that the /etc/v,stab ,ile contains the correct vol+me entries) )(e root 3,4 entr0 in t(e ,etc,&fsta+ file s(ould a--ear as follo's so t(at t(e entr0 for t(e file s0stem correctl0 references t(e RA1:-1 &olume: Rde&ice de&ice mount %S fsck mount mount Rto mount to fsck -oint t0-e -ass at +oot o-tions R ,de&,md,dsk,d$ ,de&,md,rdsk,d$ , ufs 1 no ,de&,dsk,c$t.d$s1 - - s'a- - no ,de&,dsk,c$t.d$s6 ,de&,rdsk,c$t.d$s6 ,usr ufs # no R ,-roc - ,-roc -roc - no s'a- - ,tm- tm-fs - 0es v() Reboot the system) )(e s0stem returns to normal o-eration2 A/

Go' to Reco&er %rom a 9oot :e&ice %ailure 1f 0ou (a&e a root 3,4 mirror and 0our +oot de&ice fails* 0ou need to set u- an alternate +oot de&ice2 )(e (ig(-le&el ste-s in t(is task are as follo's: K9ooting from t(e alternate root 3,4 su+mirror : K etermining t(e erred state data+ase re-licas and &olumes KRe-airing t(e failed disk KRestoring state data+ase re-licas and &olumes to t(eir original state 1nitiall0* '(en t(e +oot de&ice fails* 0ouCll see a message similar to t(e follo'ing2 )(is message mig(t differ among &arious arc(itectures2 Re+ooting 'it( command: 9oot de&ice: ,iommu,s+us,dmaPf*81$$$,es-Pf*8$$$$,sdP.*$ )(e selected S@S1 de&ice is not res-onding @anCt o-en +oot de&ice 222 5(en 0ou see t(is message* note t(e de&ice2 )(en* follo' t(ese ste-s: i() Aoot ,rom another root 6/( s+bmirror) Since onl0 t'o of t(e si= state data+ase re-licas in t(is e=am-le are in error* 0ou can still +oot2 1f t(is 'ere not t(e case* 0ou 'ould need to delete t(e inaccessi+le state data+ase re-licas in single-user mode2 5(en 0ou created t(e mirror for t(e root 3,4 file s0stem* 0ou s(ould (a&e recorded t(e alternate +oot de&ice as -art of t(at -rocedure2 1n t(is e=am-le* disk# is t(at alternate +oot de&ice2 ok boot disk2 Sun;S Release "2/ Version s81N"1 6!-+it @o-0rig(t 1/8.-#$$1 Sun Micros0stems* 1nc2 All rig(ts reser&ed2 Gostname: demo 222 demo console login: root Pass'ord: Troot-pass&ordO :ec 16 1#:##:$/ (ost1 login: R;;) D;G1N ,de&,console Dast login: 5ed :ec 1# 1$:"":16 on console Sun Micros0stems 1nc2 Sun;S "2/ s81N"1 Ma0 #$$# 222 ii() Determine how many state database replicas have ,ailed by +sing the metadb command) # metadb flags first +lk +lock count M - unkno'n unkno'n ,de&,dsk,c$t.d$s. M - unkno'n unkno'n ,de&,dsk,c$t.d$s. a m - luo 16 1$.! ,de&,dsk,c$t#d$s. a - luo 1$"$ 1$.! ,de&,dsk,c$t#d$s. a - luo 16 1$.! ,de&,dsk,c$t1d$s. a - luo 1$"$ 1$.! ,de&,dsk,c$t1d$s. 1n t(is e=am-le* t(e s0stem can no longer detect state data+ase re-licas on slice ,de&,dsk,c$t.d$s.* '(ic( is -art of t(e failed disk2 iii() Determine that hal, o, the root 6/(. swap. and /+sr mirrors have ,ailed by +sing the metastat command) # metastat d$: Mirror Su+mirror $: d1$ 8$

State: Needs maintenance Su+mirror 1: d#$ State: ;ka0 222 d1$: Su+mirror of d$ State: Needs maintenance 1n&oke: Ymetare-lace d$ ,de&,dsk,c$t.d$s$ Tne' de&iceOY Si<e: !A6#8 +locks Stri-e $: :e&ice Start 9lock :+ase State Got S-are ,de&,dsk,c$t.d$s$ $ No Maintenance d#$: Su+mirror of d$ State: ;ka0 Si<e: !A6#8 +locks Stri-e $: :e&ice Start 9lock :+ase State Got S-are ,de&,dsk,c$t#d$s$ $ No ;ka0 d1: Mirror Su+mirror $: d11 State: Needs maintenance Su+mirror 1: d#1 State: ;ka0 222 d11: Su+mirror of d1 State: Needs maintenance 1n&oke: Ymetare-lace d1 ,de&,dsk,c$t.d$s1 Tne' de&iceOY Si<e: 6/66$ +locks Stri-e $: :e&ice Start 9lock :+ase State Got S-are ,de&,dsk,c$t.d$s1 $ No Maintenance d#1: Su+mirror of d1 State: ;ka0 Si<e: 6/66$ +locks Stri-e $: :e&ice Start 9lock :+ase State Got S-are ,de&,dsk,c$t#d$s1 $ No ;ka0 d#: Mirror Su+mirror $: d1# State: Needs maintenance Su+mirror 1: d## State: ;ka0 222 d1#: Su+mirror of d# State: Needs maintenance 1n&oke: Ymetare-lace d# ,de&,dsk,c$t.d$s6 Tne' de&iceOY Si<e: #86A!$ +locks Stri-e $: :e&ice Start 9lock :+ase State Got S-are ,de&,dsk,c$t.d$s6 $ No Maintenance d##: Su+mirror of d# State: ;ka0 81

Si<e: #86A!$ +locks Stri-e $: :e&ice Start 9lock :+ase State Got S-are ,de&,dsk,c$t#d$s6 $ No ;ka0 1n t(is e=am-le* t(e metastat command s(o's t(at t(e follo'ing su+mirrors need maintenance: KSu+mirror d1$* de&ice c$t.d$s$ KSu+mirror d11* de&ice c$t.d$s1 KSu+mirror d1#* de&ice c$t.d$s6 iv() alt the system. replace the disk) *se the ,ormat command or the ,mthard command. to partition the disk as it was be,ore the ,ail+re) -ip3 1f t(e ne' disk is identical to t(e e=isting disk 3t(e intact side of t(e mirror* in t(is e=am-le4* 6uickl0 format t(e ne' disk2 )o do so* use t(e -rt&toc ,de&,rdsk,c$t#d$s# ^ fmt(ard -s - ,de&,rdsk,c$t.d$s# command 3c$t.d$* in t(is e=am-le42 # halt 222 Galted 222 ok boot 222 # ,ormat dev rdsk c0t3d0s0 v() Reboot the system) Note t(at 0ou must re+oot from t(e ot(er (alf of t(e root 3,4 mirror2 Bou s(ould (a&e recorded t(e alternate +oot de&ice '(en 0ou created t(e mirror2 # halt 222 ok boot disk2 vi() -o delete the ,ailed state database replicas and then add them back. +se the metadb command) # metadb flags first +lk +lock count M - unkno'n unkno'n ,de&,dsk,c$t.d$s. M - unkno'n unkno'n ,de&,dsk,c$t.d$s. a m - luo 16 1$.! ,de&,dsk,c$t#d$s. a - luo 1$"$ 1$.! ,de&,dsk,c$t#d$s. a - luo 16 1$.! ,de&,dsk,c$t1d$s. a - luo 1$"$ 1$.! ,de&,dsk,c$t1d$s. # metadb -d c0t3d0s3 # metadb -c 2 -a c0t3d0s3 # metadb flags first +lk +lock count a m - luo 16 1$.! ,de&,dsk,c$t#d$s. a - luo 1$"$ 1$.! ,de&,dsk,c$t#d$s. a - luo 16 1$.! ,de&,dsk,c$t1d$s. a - luo 1$"$ 1$.! ,de&,dsk,c$t1d$s. a u 16 1$.! ,de&,dsk,c$t.d$s. 8#

a u 1$"$ 1$.! ,de&,dsk,c$t.d$s. vii() Re'enable the s+bmirrors by +sing the metareplace command) # metareplace -e d0 c0t3d0s0 :e&ice ,de&,dsk,c$t.d$s$ is ena+led # metareplace -e d1 c0t3d0s1 :e&ice ,de&,dsk,c$t.d$s1 is ena+led # metareplace -e d2 c0t3d0s$ :e&ice ,de&,dsk,c$t.d$s6 is ena+led After some time* t(e res0nc(roni<ation 'ill com-lete2 Bou can no' return to +ooting from t(e original de&ice2 Go' to Reco&er %rom 1nsufficient State :ata+ase Re-licas i() Aoot the system) ii() Determine which state database replicas are +navailable) # metadb i iii() 5, one or more disks are known to be +navailable. delete the state database replicas on those disks) 9therwise. delete eno+gh erred state database replicas 6K.M.D. ?. or R stat+s ,lags reported by metadb( to ens+re that a maLority o, the e7isting state database replicas are not erred) # metadb -d disk-slice -ip3 State data+ase re-licas 'it( a ca-itali<ed status flag are in error2 State data+ase re-licas 'it( a lo'ercase status flag are functioning normall02 iv() Veri,y that the replicas have been deleted) # metadb v() Reboot the system) # reboot vi() 5, necessary. replace the disk. ,ormat it appropriately. then add any state database replicas that are needed to the disk) ;nce 0ou (a&e a re-lacement disk* (alt t(e s0stem* re-lace t(e failed disk* and once again* re+oot t(e s0stem2 >se t(e format command or t(e fmt(ard command to -artition t(e disk as it 'as configured +efore t(e failure2 ?=am-le: Reco&ering %rom Stale State :ata+ase Re-licas 1n t(e follo'ing e=am-le* a disk t(at contains se&en re-licas (as gone +ad2 As a result* t(e s0stem (as onl0 t(ree good re-licas2 )(e s0stem -anics* t(en cannot re+oot into multiuser mode2 -anic_c-u$`,t(readMA$a!1e$$: md: state data+ase -ro+lem !$.#.8a8 md:mdd+NcommitrecN'ra--er86c 3#* 1* A$a66ca$* !$.#./6!* A$a66ca$* .c4 Ql$-A: $$$$$$$a $$$$$$$$ $$$$$$$1 A$++cce$ A$++cd$! A$//"!$$ $$$$$$$# $$$$$$$$ !$.#./$8 md:allocNentr08c! 3A$+$$8!!* 1* /* $* !$.#./e!* ff$$4 Ql$-A: A$+A/6a! $$$$$$$1 $$$$$$$$ A$"$6!cc A$a66ca$ $$$$$$$# $$$$$$#! $$$$$$$$ !$.#./68 md:mdNsetde&name8#d! 3A$$.+/88* 6* $* 6.* A$aA1618* 1$4 8.

Ql$-A: A$aA16#$ $$$$$$$$ A$"$6!cc A$+$$8!! $$$$$$1$ $$$$$$$$ $$$$$$$$ $$$$$$$$ !$.#./f8 md:setnmNioctl81.! 3A$$.+/68* 1$$$$.* 6!* $* $* ff+ffc$$4 Ql$-A: A$$.+/88 $$$$$$$$ A$aA1618 $$$$$$$$ $$$$$$$$ $$$##"f$ $$$$$$$$ $$$$$$$$ !$.#.a"8 md:mdN+aseNioctl8/+! 31"Affff* "6$"* ff+ffa.c* 1$$$$.* !$.#.+a8* ff1+"!A$4 Ql$-A: ff.f##$8 ff.f#1.8 ff.f#6a$ $$$$$$$$ $$$$$$$$ $$$$$$6! ff1./6e/ $$$$$$$$ !$.#.ad$ md:mdNadminNioctl8#! 31"Affff* "6$"* ff+ffa.c* 1$$$$.* !$.#.+a8* $4 Ql$-A: $$$$"6$" ff+ffa.c $$1$$$$. $1"Affff $aa6!#!" $$$$$$$$ Aefefeff 81$1$1$$ !$.#.+!8 md:mdioctl8e! 31"Affff* "6$"* ff+ffa.c* 1$$$$.* A$16d+6$* !$.#.cAc4 Ql$-A: $1"Affff $$$$"6$" ff+ffa.c $$1$$$$. $$$.ffff A$//""/8 A$//""A$ $1!Ac8$$ !$.#.++$ genuni=:ioctl81dc 3.* "6$"* ff+ffa.c* fffffff8* ffffffe$* ff+ffa6"4 Ql$-A: $11!c"Ac A$/.A!#8 ff.f#6a$ $$$$$$$$ $$$$$$$1 ff.+1$d! $aa6!#!" $$$$$$$$ -anic: sto--ed at edd$$$d8: ta Qicc*Qg$ 8 1#" )0-e CgoC to resume ok boot -s Resetting 222 Sun >ltra ",1$ >PA,P@1 3>ltraSPAR@-11i #A$MG<4* No He0+oard ;-en9oot .211* 1#8 M9 memor0 installed* Serial R/8!1AA62 ?t(ernet address 8:$:#$:/6:#c:A$* Gost 1:: 8$/6#cA$2 Re+ooting 'it( command: +oot -s 9oot de&ice: ,-ciP1f*$,-ciP1*1,ideP.,diskP$*$:a %ile and args: -s Sun;S Release "2/ Version s81N./ 6!-+it @o-0rig(t 1/8.-#$$1 Sun Micros0stems* 1nc2 All rig(ts reser&ed2 configuring 1P&! interfaces: (me$2 Gostname: dodo metainit: dodo: stale data+ases 1nsufficient metade&ice data+ase re-licas located2 >se metad+ to delete data+ases '(ic( are +roken2 1gnore an0 YRead-onl0 file s0stemY error messages2 Re+oot t(e s0stem '(en finis(ed to reload t(e metade&ice data+ase2 After re+oot* re-air an0 +roken data+ase re-licas '(ic( 'ere deleted2 )0-e control-d to -roceed 'it( normal startu-* 3or gi&e root -ass'ord for s0stem maintenance4: root-pass&ord single-user -ri&ilege assigned to ,de&,console2 ?ntering S0stem Maintenance Mode Wun A $8:"A:#" su: Csu rootC succeeded for root on ,de&,console Sun Micros0stems 1nc2 Sun;S "2/ s81N./ Ma0 #$$# # metadb -i flags first +lk +lock count a m - lu 16 81/# ,de&,dsk,c$t$d$sA a - l 8#$8 81/# ,de&,dsk,c$t$d$sA a - l 16!$$ 81/# ,de&,dsk,c$t$d$sA M - 16 unkno'n ,de&,dsk,c1t1d$s$ M - 8#$8 unkno'n ,de&,dsk,c1t1d$s$ M - 16!$$ unkno'n ,de&,dsk,c1t1d$s$ M - #!"/# unkno'n ,de&,dsk,c1t1d$s$ M - .#A8! unkno'n ,de&,dsk,c1t1d$s$ M - !$/A6 unkno'n ,de&,dsk,c1t1d$s$ M - !/168 unkno'n ,de&,dsk,c1t1d$s$ # metadb -d c1t1d0s0 # metadb 8!

flags first +lk +lock count a m - lu 16 81/# ,de&,dsk,c$t$d$sA a - l 8#$8 81/# ,de&,dsk,c$t$d$sA a - l 16!$$ 81/# ,de&,dsk,c$t$d$sA # )(e s0stem -anicked +ecause it could no longer detect state data+ase re-licas on slice ,de&,dsk,c1t1d$s$2 )(is slice is -art of t(e failed disk or is attac(ed to a failed controller2 )(e first metad+ -i command identifies t(e re-licas on t(is slice as (a&ing a -ro+lem 'it( t(e master +locks2 5(en 0ou delete t(e stale state data+ase re-licas* t(e root 3,4 file s0stem is read-onl02 Bou can ignore t(e mdd+2cf error messages t(at are dis-la0ed2 At t(is -oint* t(e s0stem is again functional* alt(oug( it -ro+a+l0 (as fe'er state data+ase re-licas t(an it s(ould2 An0 &olumes t(at used -art of t(e failed storage are also eit(er failed* erred* or (ot-s-ared2 )(ose issues s(ould +e addressed -rom-tl02 1m-ortant Solaris Volume Manager %iles S0stem %iles and Startu- %iles )(is section e=-lains t(e files t(at are necessar0 for SVM to o-erate correctl02 5it( t(e e=ce-tion of a fe' s-eciali<ed configuration c(anges* 0ou do not need to access or modif0 t(ese files2 !a+tion :o not edit t(is files2 1f 0ou c(ange t(is file* 0ou could corru-t 0our SVM configuration2 ,etc,l&m,mdd+2cf )(e ,etc,l&m,mdd+2cf file records t(e locations of state data+ase re-licas2 5(en state data+ase re-lica locations c(ange* SVM makes an entr0 in t(e mdd+2cf file t(at records t(e locations of all state data+ases2 ,etc,l&m,md2cf )(e ,etc,l&m,md2cf file contains automaticall0 generated configuration information for t(e default 3uns-ecified or local4 disk set2 5(en 0ou c(ange t(e SVM configuration* SVM automaticall0 u-dates t(e md2cf file 3e=ce-t for information a+out (ot s-ares in use42 1f 0our s0stem loses t(e information t(at is maintained in t(e state data+ase* and as long as no &olumes 'ere c(anged or created in t(e meantime* 0ou can use t(e md2cf file to reco&er 0our configuration2 ,kernel,dr&,md2conf )(e md2conf configuration file is read +0 SVM at startu-2 )(e md2conf file contains t(e state data+ase re-lica configuration information2 As of Solaris 1$* t(e nmd and mdNnsets -arameters are no longer edited manuall02 SVM (as +een en(anced to configure &olumes d0namicall0* as needed2 Manuall0 @onfigured %iles ,etc,l&m,md2ta+ )(e ,etc,l&m,md2ta+ file contains SVM configuration information t(at can +e used to reconstruct 0our SVM configuration2 SVM can use t(is file as in-ut to t(e command-line utilities metainit* metad+* and meta(s to reconstruct a configuration2 Volumes* disk sets* and (ot s-are -ools mig(t (a&e entries in t(is file2 0ote )(e configuration information in t(e ,etc,l&m,md2ta+ file mig(t differ from t(e current &olumes* (ot s-ares* and state data+ase re-licas in use2 )(is file is used manuall0* +0 t(e s0stem administrator* to ca-ture t(e intended configuration2 After 0ou c(ange 0our SVM configuration* recreate t(is file and -reser&e a +acku- co-02 ;nce 0ou (a&e created and u-dated t(e file* t(e metainit* meta(s* and metad+ commands t(en acti&ate t(e &olumes* (ot s-are -ools* and state data+ase re-licas defined in t(e file2 1n t(e ,etc,l&m,md2ta+ file* one com-lete configuration entr0 for a single &olume a--ears on eac( line using t(e s0nta= of t(e metainit* metad+* and meta(s commands2 8"

0ote SVM does not 'rite to or store configuration information in t(e ,etc,l&m,md2ta+ file2 Bou must manuall0 edit t(e file and run t(e metainit* meta(s* or metad+ commands to create SVM com-onents2 Solaris Volume Manager Quick Reference @ommand-Dine Reference Disted (ere are all t(e commands t(at 0ou use to administer Solaris Volume Manager2 SVM @ommand gro'fs2 metaclear Metad+ metadetac( metade&adm meta(s metaim-ort metainit metaoffline metaonline meta-aram metareco&er metarename metare-lace metaroot metaset metastat metas0nc metattac( :escri-tion ?=-ands a >%S file s0stem in a nondestructi&e fas(ion :eletes acti&e &olumes and (ot s-are -ools2 @reates and deletes state data+ase re-licas2 :etac(es a &olume from a RA1:-$ or RA1:-1 3mirror4 &olume* or a log de&ice from a transactional &olume2 0ote )ransactional &olumes are no longer su--orted2 @(ecks de&ice 1: configuration2 Manages (ot s-ares and (ot s-are -ools2 1m-ort disk sets* including re-licated disk sets* into e=isting Solaris Volume Manager configurations t(at (a&e de&ice 1: su--ort in t(e disk set2 @onfigures &olumes2 Places su+mirrors offline2 Places su+mirrors online2 Modifies &olume -arameters2 Reco&ers configuration information for soft -artitions2 Renames and e=c(anges &olume names2 Re-laces com-onents in su+mirrors and RA1:-" &olumes2 Sets u- s0stem files for mirroring t(e root 3,4 file s0stem2 Administers disk sets2 :is-la0s t(e status of &olumes or (ot s-are -ools2 Res0nc(roni<es &olumes during re+oot2 Attac(es a com-onent to a RA1:-$ or RA1:-1 &olume2

86

Você também pode gostar