Vous êtes sur la page 1sur 320

Hastatus sum

Hagrp switch

Shutdown i6 g0 -y

Internet (IP) address: A host's IP address identi ies where a host is on the Internet! which a""ows networ# tra ic to $e directed to that host% &his so tware address is p"aced in the 'etc'inet'hosts i"e% (thernet address -A host's uni)ue hardware address% A num$er disp"ayed as *+ he,adecima" digits% -or e,amp"e! 0.:00:+0:*c:/0:1e% &his address is stored in the 234A5 (non6o"ati"e random access memory) chip% The Solaris Operating Environment Software Installation Options Solaris Web Start 3.0 Installation - Pro6ides a graphica" user inter ace-$ased! 7a6a techno"ogy-powered so tware app"ication that guides you through the insta""ation o the So"aris 8perating (n6ironment and other so tware on a sing"e system rom a "oca" or remote 9:-485 dri6e% Solaris Interactive Installation Program -Pro6ides a graphica" user Inter ace that guides you step-$ystep through insta""ing the So"aris 8perating (n6ironment so tware! 'this insta""ation program does not ena$"e you to insta"" a"" the additiona" so tware! as with So"aris ;e$ Start! it insta""s on"y the So"aris 8perating (n6ironment so tware% Solaris Installation Over the Network - Pro6ides the capa$i"ity to insta"" the So"aris 8perating en6ironment so tware on a "arge num$er o systems that do not ha6e -a "oca" 9:-485 dri6e% &his e"iminates the need to insert the So"aris 8perating (n6ironment so tware 9:-485 on e6ery system% <ou can insta"" these systems rom the remote So"aris 8perating (n6ironment so tware 9: images! which ha6e $een copied to an insta"" ser6er system's hard dri6e% Solaris JumpStart Installation - Pro6ides the capa$i"ity to automatica""y insta"" the So"aris 8perating (n6ironment so tware on a new system on"y! $y inserting the 9: "a$e"ed So"aris =So tware * o + SPA49 P"at orm (dition or Inte" P"at orm (dition into the 9:-485 dri6e and turning on the system% &he so tware components insta""ed are speci ied $y a de au"t pro i"e that is se"ected $ased on the mode" and dis# si>e o the system% Solaris Custom JumpStart Installation - A type o insta""ation in which the So"aris 8perating (n6ironment so tware is automatica""y insta""ed on a system $ased on a user-de ined pro i"e% <ou can customi>e pro i"es or di erent types o users and systems! and this is the most cost-e ecti6e option or insta""ing the So"aris 8perating (n6ironment so tware in a "arge enterprise% Pro6ides hands o insta""ation across the networ# $ased on a centra" con igured ser6er%

Software Packages: A so tware pac#age contains a group o i"es and directories in a category o re"ated so tware ( or e,amp"e! system or app"ication) and so tware insta""ation scripts Software Clusters::uring the so tware insta""ation process! "ogica" co""ections o so tware pac#ages are grouped into so tware c"usters! -or e,amp"e! the 9:( so tware c"uster inc"udes the o""owing pac#ages:
S?2;dt$as S?2;dt$as S?2;dtdem S?2;dtdm S?2;dtdst S?2;dthe S?2;dthed S?2;dthe6 S?2;dtmad S?2;dtrme S?2;eudhr S?2;eudhs S?2;eudis

S?2;dticn S?2;dtim S?2;dtinc S?2;dtma

S?2;dtwn

S?2;eud$a S?2;ud$d S?2;eudda

S?2;eud"g S?2;m man

Some so tware c"usters can contain on"y one so tware pac#age% Cluster Configuration: &he c"uster con igurations are re erred to during the insta""ation process as the So"aris So tware @roups% &here are current"y i6e so tware groups a6ai"a$"e! which inc"ude:

(ntire So"aris So tware @roup P"us 8(5 -S?2;9Aa"" (ntire So"aris So tware @roup S?2;9a"" :e6e"oper So"aris So tware @roup - S?2;9prog (nd ?ser So"aris So tware @roup - S?2;9usr 9ore So"aris So tware @roup - S?2;9re)

Software Packages: So tware administration in6o"6es adding and remo6ing so tware rom systems% Sun and its third-party 6endors de"i6er products in a orm ca""ed a so tware pac#age% &he term pac#age to the method or distri$uting and insta""ing so tware products to systems where the products! wi"" $e used% In its simp"est orm! a pac#age is a co""ection o i"es and directories Pac#age administration commands - p#gadd! p#grm! p#gin o! and p#gch# &he admintoo" uti"ity - A graphica" ront-end to the p#gadd and p#grm commands Command format: p#gin o B -d B de6ice C pathname D D -or e,amp"e: F p#gin o C more Gsome output omittedH app"ication app"ication system system S?2;A,g S?2;aadm S?2;a$+m S?2;a$+r So"aris A@I J %J Answer Koo# So"aris System Administrator 9o""ection So"aris :ocumentation Ser6er Ioo#up So"aris :ocumentation Ser6er B -* D p#gEname

system system app"ication app"ication app"ication

S?2;a$+s S?2;a$+u S?2;a$da S?2;a$e S?2;a$sd#

So"aris :ocumentation Ser6er So"aris :ocumentation Ser6er Sun u"tra /'*0 Hardware AnswerKoo# So"aris ?ser 9o""ection So"aris So tware :e6e"oper 9o""ection

&he co"umns o in ormation that are disp"ayed are descri$ed $e"ow% 9A&(@84< Is the pac#age category! such as app"ication! system! AI(! or 9&I% PL@I2S& Is the so tware pac#age nameM i it $egins with S?2;! it is a Sun 5icrosystems productM otherwise! it represents a third-party pac#age 2A5( Is a $rie description o the so tware product%

&o 6iew a"" the a6ai"a$"e in ormation a$out the so tware pac#ages! use the p#gin o command with the option: F p#gin o -" C more Displaying Detailed Information for a Specific Pac age: F p#gin o -* S?2man PL@I2S&: 2A5(: 9A&(@84<: A49H 3(4SI82: KAS(:I4: 3(2:84: :(S9: PS&A5P: I2S&4(I(AS(: H8&II2(: S&A&?S -II(S: 'usr Sun 5icrosystems! Inc% System 4e erence 5anua" Pages tin#ertoym8S*JJJJ* 5ay *O +000 *6:/0 P"ease contact your "oca" ser6ice pro6ider comp"ete"y Insta""ed 60+0 insta""ed pathnames S?2;man 8n-"ine 5anua" Pages system sparc 0*%0!4(3NJ*

J shared pathnames 10 directories 1JO+/ $"oc#s used (appro,) &he "ast "ine (1JO+/ $"oc#s used (appro,)! identi ies the si>e o the pac#age% A $"oc# is a /*+-$yte dis# $"oc#% &he $"oc#s used num$er de ines how much space is needed on the dis# to insta"" this pac#age% &o determine how many pac#ages are current"y insta""ed on dis#! use the o""owing command: F p#gin o C wc -*

&o disp"ay in ormation a$out so tware pac#ages that resides on the So"aris So tware 9:-485 (or other re"ease media)! use the p#gin o command with the -d option F p#gin o -d 'cdrom' 0's0'So"arisE,'Product C more

F p#gin o -d 'cdrom'cdrom0's0'So"arisE*0'Product -* S?2;audio Command Format: P#grm p#gEEname -or e,amp"e: F p#grm S?S;audio &he o""owing pac#age is current"y insta""ed: S?2;audio Audio app"ications (spare) J%6%0!4(3N*%O.%*+%0J :o you want to remo6e this pac#ageP y FF 4emo6ing insta""ed pac#age instance GS?2;audioH FF 3eri ying pac#age dependencies% ;A42I2@: &he GS?2;o"rteH pac#age depends on the pac#age 9urrent"y $eing remo6ed% ;A42I2@: &he GS?2;o"audH pac#age depends on the pac#age9urrent"y $eing remo6ed% ;A42I2@: &he GS?2;o"dc6H pac#age depends on the pac#age 9urrent"y $eing remo6ed% ;A42I2@:

&he !S?2;,w#eyH pac#age depends on the pac#age9urrent"y $eing remo6ed% :ependency chec#ing ai"ed% :o you want to continue with the remo6a" o this pac#age By!n!P!)D y 2ote - &he message i"ename Gshared pathname not remo6edH is disp"ayed i a i"e is shared $y two or more pac#ages% It is remo6ed on"y when the "ast pac#age it is shared with remo6ed% he pkga!! Command: ;hen a so tware pac#age is added! the p#add command uncompresses and copies i"es rom the insta""ation media to the "oca" systemQs dis#% &his command wi"" as# or con irmation to continue with pac#age add process% Command Format : P#gadd B-d Bde6ice C pathname D D p#gEname -or e,amp"e: F p#gadd d 'cdrom'cdrom0's0'so"arisE*0'Product S?2;audio Processing pac#ages instance GS?2;audioH rom G'cdrom'so"E*0Esparc's0'So"arisE*0'ProductH Audio app"ications (sparc) J%6%0! 4(3N*% O.%*+%0J copyright *OOO Sun 5icrosystems! I29% A"" rights reser6ed% ?sing G'H as the pac#age $ase director% FF processing pac#age in ormation% FF Processing system in ormation% + pac#age pathnames are a"ready proper"y insta""ed FF 3eri ying pac#age dependencies% FF 3eri ying dis# space re)uirements% FF 9hec#ing or con "icts with pac#ages a"ready insta""ed% FF 9hec#ing or setuid'setgid programs% This package contains scripts, which will be executed with super-user permission during the process of installing these packages. Do you want to continue with the installation of <SU !audio" # y, n, $% y &nstalling 'udio applications as <SU !audio" (( &nstalling part ) of ). &nstallation of <SU !audio" was successful.

The pkgchk *ommand+ The pkgchk command checks installation completeness pathname, file contents, and file attributes of a package. *ommand ,ormat + -akgchk # options % #-p path .% #pkg/name%

The following example checks the contents and attributes of a software package currently installed on the system. ( pkgchk SU !audio ote + If the pkgchk command does not display a message, it indicates that the package was installed successfully. &o "ist the i"e contained in a so tware pac#age! type F p#gch# 6 S?2;audio &o "ist the i"e contained in a so tware pac#age! type F p#gch# 6 S?2;audio &o chec# any i"e to determine i its content and attri$utes ha6e changed since it was insta""ed with its so tware pac#age! type: F p#gch# p 'etc' passwd (4484: 'etc'passwd -i"e si>e G0*0H e,pected GJJO*H actua" -i"e c#sum GJ0JOH e,pected G*1+/0H actua" &he origina" 'etc'passwd i"e has changed in si>e since the initia" So"aris 8perating (n6ironment so tware insta""ation% &his is indicated $y the di erences in i"e si>e and chec#sum% &he chec#sum is used to 6a"idate transported data% The '6ar'sadm'Insta""'contents "ile: &he '6ar'sadm'insta""'contents i"e is a comp"ete record o a"" the so tware pac#ages insta""ed on the "oca" system dis#% It re erences e6ery i"e $e"onging to e6ery so tware pac#age! and the con iguration o products insta""ed can $e 6iewed% F more '6ar'sadm'insta""'contents &he p#gadd command update the contents i"e whene6er new pac#ages are insta""ed% &he p#grm command uses the contents i"e to determine where i"es or a so tware pac#age are "ocated on the system% 8nce a pac#age is remo6ed! p#grm updates the contents i"e% &his i"e can $e )ueried to determine i a particu"ar i"e has $een insta""ed on the system dis#:

Identifying the Directory #ocation of a Command : ?se the grep command to search the '6ar'sadm'insta""'contents i"e to determine i a particu"ar i"e was insta""ed! and the directory where it is "ocated% -or or e,amp"e! 6eri y that the command showre6 is insta""ed on the system dis# F grep showrev "var"sa!m"install"contents 'usr'$in'showre6 none 01// root sys J0**6 0+01. O0J.6J10/ S?2;admc (6ery so tware pac#age contained! on the distri$ution media has its own p#gmap! which contains a content "ist o each pac#age% F grep showrev "c!rom"c!rom0"s0"Solaris#$0"Pro!uct"%"pkgmap 'cdrom'so"E*0Esparc's0'So"arisE*0'Product'S?2;admc'p#gmap:" usr'$in'showre6 01// root sys J*+16 00616 OJ.616010 ?sing a Spool Directory :-or con6enience! re)uent"y insta""ed so tware pac#ages can $e copied rom the So"aris So tware 9:-485 to a spoo" directory on the system% &he p#gadd command! $y de au"t! "oo#s in the '6ar'spoo"'p#g directory or any pac#ages speci ied on the command "ine% 9opying pac#ages rom the 9:-485 into spoo" directory is not the same as insta""ing the pac#ages on dis#% o cop& a package into the "var"spool"pkg !irector&' # pkga!! (! "c!rom"c!rom0"s0"Solaris $0"Pro!uct (s spool S)NWau!io &rans erring GS?2;audioH pac#age instance &he -s option with the #eyword spoo" copies the pac#age into the '6ar'spoo"'p#g directory $y de au"t% none

Spooling Packages: <ou can speci y a di erent directory "ocation using the -s option% In this e,amp"e!
a new directory is created! and then p#gadd is instructed to copy the pac#age into the new spoo" directory% mk!ir "e*port"pkgs + pkga!! (! "c!rom"c!rom0"s0"Solaris#$0"Pro!uct -s "e*port"pkgs S)NWau!io -S)NWau!io. package instance F F "s 'e,port'p#gs S?2;audio 4emo6ing Pac ages from the Spoo" Directory: <ou remo6e so tware pac#ages rom a spoo" directory using the p#grm command with the -s option% F pkgrm (s spool S)NWau!io rans,erring

F pkgrm (s "e*port"pkgs S)NWau!io &he o""owing section summari>es the tas#s in6o"6ed in pac#age administration% P#gin o p#gadd p#grm p#gch# Iists pac#ages insta""ed on the system ora6ai"a$"e on distri$ution media% Insta""s pac#ages! 4emo6es pac#ages% 3eri ies the attri$utes and contents o thepath names $e"onging to pac#ages% So tware pac#age'map o the entiresystem%

'6ar'sadm'insta""'contents 'opt'p#gname

Pre erred "ocation or the insta""ation o un$und"ed pac#ages% Pre erred "ocation or the e,ecuta$"e i"es o un$und"ed pac#ages% Pre erred "ocation or "og i"es o un$und"ed pac#age%

'opt'p#gname'$in or 'opt'$in '6ar'opt'p#gname or 'etc'opt'p#gname

Patch /!ministration'

&he administration o patches in6o"6es insta""ing or remo6ing So"aris 8perating en6ironment patches rom a running So"aris 8perating (n6ironment% A patch contains a co""ection o i"es and directories that rep"ace e,isting i"es and directories that are pre6enting proper e,ecution o the so tware% Some patches contain product enhancements% A patch is distri$uted as a directory that is identi ied $y a uni)ue num$er% &he num$er assigned to a patch inc"udes the patch $ase code irst! a hyphen! and a num$er that represents the patch re6ision num$er% -or e,amp"e! a patch directory named *0*O0/-0+! indicates that *0*O0/ is the $ase code! and 0+ is the re6ision num$er% Patch Distribution: Su$ customers ha6e access to a genera" set o security patches and other recommended patches through the ;or"d ;ide ;e$ or anonymous tp% Sun customers who ha6e a Sun Ser6ices S5 contract! ha6e access to the Sunso"6e data$ase o patches and patch in ormation! such as technica" white papers! the Symptom and 4eso"ution data$ase! and more% &hese are a6ai"a$"e using the ;or"d ;ide ;e$ or anonymous tp% ;or"d ;ide ;e$ Patch Access: &o access patches on the ;or"d ;ide ;e$ site! the wor#station has to $e: A$"e to access the Internet 9apa$"e o running ;e$ $rowsing so tware! such as 2etscape http:''sunso"6e%sun%com ?nited States 8r use the o""owing ?4I! and na6igate to the SunSo"6e patch data$ase rom the Support entry% http:''www%sun%com

-rom the Sun 5icrosystems home page! c"ic# on the Sa"es and Ser6ice $utton and na6igate to the SunSo"6e patch data$ase% &he patch data$ases or pu$"ic"y a6ai"a$"e patches are "a$e"ed RPu$"ic patch access%R &he patch data$ase o customers is "a$e"ed R9ontract customer patch access%R &he customer's assigned Sun r the comprehensi6e set o patches and patch in ormation a6ai"a$"e to contract c Ser6ice password is re)uired to access this data$ase% Anonymous ftp Patch Access: &o access patches using anonymous tp! the wor#station must $e: A$"e to access the Internet 9apa$"e of running the tp program &o access patches using tp! use the tp command to connect to: sunso"6e%sun%com ;hen tp prompts or a "ogin! enter anonymous as the "ogin name% ;hen prompted or the password! enter your comp"ete emai" address% A ter the connection is comp"ete! the pu$"ic"y a6ai"a$"e patches are "ocated in the 'pu$'patches directory% The ftp Patch Access Procedure : &he tp uti"ity has many commandsM howe6er! on"y a ew are necessary or mo6ing i"es rom system to system% <ou can "ocate and copy patches to the "oca" system with a ew $asic tp commands% &he o""owing e,amp"e shows the procedure or changing to the 'tmp directory on the "oca" system! connecting to the remote tp site! "ocating a patch and its 4(A:5( i"e in the 'pu$'patches directory! and trans erring (copying) $oth i"es to the "oca" systems directory% 2ote - &o trans er patches! change the tp trans er mode to $inary! $y typing $in at the tp prompt% &o access patches using the ;or"d ;ide ;e$! use the o""owing ?4Is:
-or e,amp"e: F cd 'tmp F tp sunso"6e% sun%com

2ame (sunso"6e%sun% com: root): anonymous JJ* JJ* ;e"come to the SunSo"6e 8n"ine -&P ser6er% JJ*JJ*-Pu$"ic users %may "og in as anonymous% JJ*JJ* 9ontract customers shou"d use the o""owing +-tier "ogin procedure: JJ* JJ*-At the irst "ogin prompt sunso"6e JJ* JJ*passwd: sunmicro

JJ*-At the second "ogin prompt: Gsunso"6e "ogin nameH 'Gsunso"6e passwdH JJ* e,amp"e: myssI:'mypasswd JJ* JJ* Pu$"ic users may "og in as anonymousM contract customers JJ*- Shou"d use the standard sunso"6e "ogin and password! JJ*- -o""owed $y their suso"6e account'password when prompted% JJ*JJ*- Sunso"6e6 -&P ser6e (3ersion wu-+%6%0(J) ;ed 7an / */:0+: +1 5S& +000) ready% JJ*- @uest "ogin o#! send your comp"ete e-mai" address as password% Password: Goutput omittedH +J0 @uest "ogin o#! access restrictions app"y% tpH $in +00 &ype set to I% tpH cd 'pu$'patches tpH Is *0.+11S *0.+11-0*%>ip *0.+11% readme tpH mget *0.+11S mget *0.+11-0*%>ipP <% mget *0.+11%readmeP < tpH cd tpH Is tpH $ye cd% ' tmp M *s *0.+11-0*%>ip! *0.+1$% readme %

Downloading Patches :;hen patches are down"oaded to the "oca" system! the patches must $e
p"aced in a temporary directory to prepare them or insta""ation% &he directory most o ten used is the '6ar'tmp directory% &he most common reason or patch insta""ation ai"ure is directory permission'ownership pro$"ems% &he '6ar'tmp directory is open to a"" and e"iminates any o these types o pro$"ems% Patch informational Documents: &here are important summary documents that "ist a"" recommended patches or e6ery 6ersion o the operating system! inc"uding a detai"ed "ist o a"" patches or each operating system re"ease%

Patch :ocument

9ontents

So"aris*0%Patch4eport re"ease%

A summary o a"" recommended patches or the So"aris 8perating (n6ironment

*0E4ecornmended%>ip (n6ironment re"ease%

A patch c"uster containing a"" the recommended patches or the So"aris 8perating

.E4ecororaended 4(A:5( 8perating (n6ironment%

Instructions or how to insta"" the recommendedpatches or the So"aris

Start with the Patch 4eport document irst% &his report is di6ided into se6era" di erent categories regarding in ormation a$out a"" patches or a So"aris 8S 4e"ease% &he o""owing e,amp"e demonstrates how to use tp to "ocate the Patch 4eport using a wi"dcard i"e search% 8nce oundM the document is copied to a directory on the "oca" system% -or e,amp"e :)
F cd '6ar'tmp F tp sunso"6e% sun% com

Goutput omittedH tpH cd 'pu$'patches tpH Is S.%Patch4eport +00 P84& command success u"% */0 8pening AS9II mode data connection So"aris*0 Patch 4eport So"aris*0E,.6 Patch 4eport ++6 &rans er comp"ete! remote: S *0S Patch4eport 0. $ytes recei6ed in 0%000J/ seconds (*%0eT0+ L$ytes's) tpH get So"aris*0%Patch4eport tpH $ye So"aris 8$so"ete Patches: -------------------------------------------So"aris 9omp"ete Iisting o 4e"eased Patches: &ota" Patches: J0 or i"e "ist%

&ota" Kug i,es: /O Sun8S 4e"eased Patch Iist: NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN Patch-I:S *0./00-0J Synopsis: Sun8S /%.: ("iteJ: A-K @raphics Patch Kui"d is i,ed with this patch: 0+J000/ 0+O0O6J 0J000.O 0J0J../ 0J0.*+/ 9hanges incorporated in this 6ersion: 0J0J.6/ 0J0.1+/ :ate: La,'*6'00

Patch-I:S *-0.60/-0J Synopsis: Sun8S /%.: 9reator . --K @raphics Patch KugId's i,ed with this patch: 0+J00*/ 0+O0O/J 0J0J../ 0J0.1+/ 9hanges incorporated in this 6ersion: 0J0J6./ 0J0.1+/ :ate: Lar'*6'98

Patch-I:N *0J60O-0* Synopsis: Sun8S /%.: Kuttons':ia"s Patch KugI: is i,ed with this patch: 0+OO/+6 Goutput truncatedHU -igure *6-+ Samp"e So"aris S Patch 4eport

2ote - 2o! a"" patches a6ai"a$"e rom Sun 5icrosystems need to $e insta""ed% It is on"y necessary to insta"" the 4ecommended Patches! Security Patches! and those re)uired to i, pro$"ems speci ic to your site%

The "var"sa!m"patch :irectory:Historica" in ormation a$out a"" patches current"y insta""ed on a system is stored in '6ar'sadm'patch directory% -or e,amp"e: F "s ' 6ar'sadm'patch% *01//.-0/ *016O6-0* *01/O0-00 *01.*1-0* *016J0-0* *01/.+-0* *0166J-0* *016*+-06% *016.J-0* *01600-0J

<ou shou"d ne6er modi y or de"ete this directory% I you damage this directory! you can ma#e it impossi$"e to add or remo6e patches! add new so tware! or upgrade the So"aris 8perating (n6ironment without ha6ing to irst re"oad the entire system so tware% &he So"aris and So"aris O 8perating (n6ironment patches are in >ip ormat! or e,amp"e: $00000(0$ .1ip.

-or the So"aris /%, and So"aris O 8perating (n6ironments! use the un>ip patch i"es% + "usr"bin"un1ip $00000(0$.1ip

command to e,tract the

-or So"aris +%6 8perating (n6ironment patches use the >cat command to uncompress the patch i"es and the tar command to create the patch directories% F 'usr'$in'>cat *00000-0*% tar %> C tar ,6

patchadd - ?sed to insta"" unpac#ed patches to the So"aris 8perating (n6ironment% patchrm-?sed to remo6e patches insta""ed on the So"aris 8perating (n6ironment%

Installing a Patch: ;hen a patch is insta""ed! patchadd ca""s the p#gadd command to insta"" the
patch pac#ages% Patch insta""ation procedure di ers depending on the current 6ersion o (n6ironment so tware insta""ed on the system% the So"aris 8perating

&he e,amp"es $e"ow descri$e the procedure or patch insta""ation on Pre-So"aris +%6 8perating (n6ironment! and those systems current"y Insta""ed with So"aris +%6 and a$o6e! ( or e,amp"e! the So"aris /%, or So"aris O 8perating (n6ironments)% Koth e,amp"es assume the patch to $e insta""ed e,ists in the '6ar'tmp directory and has $een prepared! or e,tracted or insta""ation%
&nstalling a -atch in the Solaris 0.1 2perating 3n4ironment and 5ater 6ersions

-or the So"aris +%6 and a$o6e 8perating (n6ironments! use the patchadd command% &he o""owing shows how to insta"" a patch using the patchadd command% Fcd 'tmp F patchadd *0/0/0-0*
9hec#ing insta""ed patches%%% 3eri ying su icient i"e system capacity (dry run method) Insta""ing patch pac#ages%%% Patch num$er *0/0/0-0* has $een success u""y insta""ed% See '6ar'sadm'patch'*0/0/0-0*'"og or detai"s% Patch pac#ages insta""ed: S?2;hea

i""ustrates those components o the '6ar'sadm directory that are update0d during the insta""ation o patch *0/0/0-0* 6ar

sadm

p#g

patch

*0/0/0-0* S?2;csu% S?2;hea

4(A:5(%*0/0/0-0* p#gin o sa6e

"og

p#gin o

sa6e

(?pdated

$y patch)

*0/0/0-0*

undo%V

4emo6ing a Patch:

;hen you remo6e a patch! the patchrm command restores a"" i"es that were modi ied or rep"aced $y that patch! un"ess: &he patch was insta""ed with patchadd -d (which instructs patchadd not to sa6e copies o i"es $eing updated or rep"aced)% &he patch is re)uired $y another patch

&he patch has $een o$so"eted $y a "ater patch &he patchrm command ca""s p#gadd to restore pac#ages that were sa6ed rom the initia" patch insta""ation%
-or the So"aris +%6 and a$o6e 8perating (n6ironments! use the patchrm command% &he o""owing shows how to remo6e a patch using the patchrm command%

+ patchrm $02343(0$
9hec#ing insta""ed pac#ages and patches%%% Kac#ing out patch *06*OJ-0*%%% Patch *061OJ-0* has $een $ac#ed out%
7emo4ing a -atch from the -re-Solaris0.1 2perating 3n4ironments

Ke ore the So"aris +%6 8perating -(n6ironment! the patchrm command was not a6ai"a$"e% Instead! each patch contained a $ac#outpatch program% + c! "var"sa!m"patch"$0530$(0$ + ."backoutpatch. $0530$(0$

Chec ing Current Patch Status:

Ke ore insta""ing patches! you shou"d #now a$out patches that ha6e $een pre6ious"y insta""ed on a system% &here are two commands a6ai"a$"e that pro6ide use u" in ormation a$out current"y insta""ed patches%

# showre (p
Patch: *061OJ-0* 8$so"etes: 4e)uires: Incompati$"es: Pac#ages: S?2;hea

+ patcha!! (p
Patch: *061OJ-0* 8$so"etes: 4e)uires: Incompati$"es: Pac#ages: S?2;hea

&wo important responsi$i"ities o the system administrator are contro""ing access and securing data on a system% &he So"aris operating en6ironment pro6ides some standard Security eatures or contro""ing access $y unauthori>ed users and or protecting i"es on "oca" and remote systems% Some $asic steps that you shou"d ta#e to manage security at the user! i"e! system! and networ# "e6e" inc"ude:

5aintaining password and "ogin contro" 5onitoring system usage 4estricting access to data contained in i"es &rac#ing root "ogins 5onitoring setuid programs 9ontro""ing remote access on the networ#

5anaging Iogin and Access 9ontro": A"" accounts on the system must ha6e a password% Any account without a password a""ows unauthori>ed access to the "oca" host and to the entire networ#% The pwconv Command: &he pwcon6 command creates and updates the 'etc'shadow i"e with in ormation rom the 'etc'passwd i"e% It is the pwcon6 command that re"ies on the specia" 6a"ue o ',' in the password ie"d o 'etc'passwd &he ',' indicates that the password or the user a"ready e,ists in the 'etc'shadow i"e% I the 'etc'shadow i"e does not e,ist! pwcon6 creates with the in ormation rom 'etc'passwd% I the 'etc'shadow i"e does e,ist! the o""owing tas#s are per ormed: (ntries that are in the 'etc'passwd i"e and not in the 'etc'shadow i"e are added to the shadow i"e% (ntries that are in the 'etc'shadow i"e and not in the 'etc'passwd i"e are remo6ed rom the shadow i"e

Recording Failed Login Attempts: ;hen a user "ogs in to a system! "oca""y or remote"y! rom the command "ine on"y! the "ogin program consu"ts the 'etc'passwd and 'etc'shadow i"e to authenticate the user $y 6eri ying the user name and password entered I the user pro6ides a "ogin I: name rom the 'etc'passwd i"e and the correct password or that "ogin name! the "ogin program grants access to the system It the user name is not in the 'etc'passwd i"e or the password is not correct or the user name! the "ogin program denies access to the system <ou can sa6e ai"ed "ogin attempts to a i"e! which is a use u" too" or determining i attempts are $eing made to $rea# into a system%

<ou can record ai"ed "ogin attempts can $e recorded in the i"e '6ar'adm'"ogin"og Ky de au"t! the "ogin"og i"e does not e,ist% &o ena$"e "ogging! you must create this i"e with read and write permissions or root on"y% + touch "var"a!m"loginlog A"" ai"ed "ogin acti6ity is written to this i"e automatica""y a ter i6e ai"ed attempts% &he "ogin"og contains one entry or each o the ai"ed attempts% (ach entry contains the user's "ogin name! &&< de6ice! and time o the ai"ed attempt%

5onitoring System Access:

A"" systems shou"d $e monitored routine"y or unauthori>ed user access% ?se the who command% to see who is on the system% It "oo#s in the '6ar'adm'utmp, i"e to o$tain this in ormation% The who command displays a list of users currently logged on to the local system, with their login name, login de4ice 8TT9 port:, login date and time, and the elapsed time since last acti4ity. &f a user is logged on remotely, the remote hostname for that user is displayed.
F who user+ ?ser/ userO conso"e pts'J pts'1 5ay +0 5ay +0 5ay +0 *0:*1 *1:J6 0.:+* (:0) (:0%0) (:0%0)

conso"e - &he de6ice used to disp"ay system $oot and error messages% pts -&he pseudo de6ice that represents a "ogin or window session without a physica" de6ice% 4emote "ogins are represented $y this type o de6ice! term - ' de4ice physically connected to a serial port, such as a terminal or a modem . 6ispla&ing )ser In,ormation &o disp"ay detai"ed in ormation a$out users either "oca""y or remote"y! use the inger command% Command Format:

,inger (m username ,inger (m username7remotehostname


-m - 5atch arguments on"y on username (not irst or "ast name)% &he inger command disp"ays the user's "ogin name! home directory path! "ogin time! "ogin de6ice name! data contained in the comment ie"d o the 'etc'passwd i"e (usua""y the user's u"" name)! "ogin she""! and the name o the host i "ogged in remote"y%

+ ,inger user4

Iogin name: userO :irectory: 'home'userO

In rea" "i e: userO's Account She"": '$in'#sh

8n since Apr *0 0.:/1:J1 on conso"e rom : 0 2o unread mai" 2o% P"an% I a user creates the standard AS9II i"es %p"an or %proWects in their home directories! the content o those i"es is shown as part o the output o the inger command% &hose i"es are traditiona""y used to out"ine a user's current p"ans or proWects! and must $e created with i"e access permissions set to 600 (rw-r--r--)% ?se the "ast command to disp"ay a record o a"" "ogins and "ogouts with the most recent acti6ity at the top o the output% It "oo#s in the '6ar'adm'wtmp, i"e! which records a"" "ogins and "ogouts% (ach entry inc"udes user name! the "ogin de6ice! host "ogged in rom! date and time "ogged in! time o "og out! and tota" "ogin time in hours and minutes! inc"uding entries or system re$oot times% &he o""owing is an e,amp"e o the "ast command:

&he "ast command can a"so disp"ay in ormation a$out an indi6idua" user! or e,amp"e: F"ast Iist o a"" users

+ last user4
userO pts'1host" &ue :ec . 0O:JO - 0O:0O (00:*0)

+ last reboot
re$oot system $oot re$oot system $oot re$oot system $oot -ri -e$ ** *0:*/ ;ed 7an +6 *0:/. 5on 7an J *6:J0

6ispla&ing )sers on 8emote S&stems :&he rusers command produces output simi"ar to the who command $ut disp"ays users "ogged in on remote hosts% &he "ist is disp"ayed in the order the responses are recei6ed rom the hosts X disp"aying the user's name and the host's name% A remote host responds on"y to the rusers command! i its rpc% rusersd daemon is ena$"ed% It is the networ# ser6er daemon that returns the "ist o users on the remote hosts%

rusers B -* D

&he rusers -* command disp"ays a "ist o "ogin names o users who are "ogged in on remote systems! a"ong with the name o the system a user is "ogged into! the &&< port ("ogin de6ice)! the month! date! "ogin time! and id"e time% I the user is not id"e! no time is disp"ayed in the "ast ie"d% F rusers -* userS root user0 user6 remotehost" :pts'0 remotehost":conso"e remotehost/:pts'*+ remotehost+:conso"e -e$ ++ **:0. -e$ ++ 0O:J* -e$ ++ .:00 -e$ ++ *J:0* +1 +.:*0 *:0J O (:0) (:0) (:0) (:0)

As the system administrator! you shou"d "og in on"y to the root account to per orm administration tas#s% <ou shou"d a6oid per orming routine wor# as root%

9ogging in !irectl& as root: an! suppl&ing the root passwor!. 9ogging in as a regular user: then invoke the su comman! an! suppl& the root passwor!.
&o use su! you must supp"y the appropriate password un"ess the user is a"ready root% &he root user can run su without passwords ;hen you run the su command! the e ecti6e user I: ((?I:) and the e ecti6e group I: ((@I:) are changed to the new user to whom you ha6e switched% Access to i"es and directories is determined $y the 6a"ue o the (?I: and (@I: or the switched user! rather than the ?I: and @I: o the user who origina""y "ogged in to the system% &he whoami command disp"ays the switched user's e ecti6e current user I:%
&o use the su command io $ecome root: *% +% ; su Password: J% &o disp"ay the origina" "ogin! type the command whoami and press 4eturn% Iog in direct"y ( rom the "ogin window) as a regu"ar user% -or e,amp"e: user" At the she"" prompt! in a termina" window! type su and press 4eturn% &ype the root password and press 4eturn%

+ who am i userl
0%

pts"$$

/pr 50 $0'<0

='0.0>

&o determine the "ogin name o the user switched to! type whoami and press 4eturn%

+ whoami root
/% &o determine where the user is current"y "ocated! type pwd and press 4eturn% &he Iocation is the origina" user's home directory% F pwd 6% &o e,it the root session and return to the origina" user! type e,it and press 4eturn%

F e,it

o switch a another user an! have that user environment' At the she"" prompt! type su
with the dash (-) option! the name o the user to $ecome! and press return% &ype the password or the user account and press return ro e,amp"e:

S su ? user5
Password :etermine the "ogin name o the user switched to $y typing whoamin and pressing return% S whoami ?ser+ :etermine where the user is indicated! type pwd and press 4eturn the "ocation is the new user home directory% Pwd

he s&sa!min @roup' Any user who is a mem$er o the sysadmin group (@I: *0) can run admintoo" or the purpose o managing "oca" system i"es and unctions! such as adding and remo6ing users! groups! so tware! printers! and seria" de6ices%
I you ha6e not added any user to this group then on"y root can run the admintoo" uti"ity %
2ote - 5em$ers o the sysadmin group can a"so in6o#e So"stice AdminsuiteY! a So"aris 8perating (n6ironment ser6er product used to "oca""y or remote"y manage important system i"es and unctions%

Aanaging )ser /ccess

Iocated in the 'etc'de au"t directory are three system i"es root can modi y to monitor who is using the su commandM restrict root accessM and set up system-wide password aging or e6ery user who "ogs in to the system%

&he 'etc'de au"t'su i"e contro"s how su attempts are "ogged% &he 'etc'de au"t'"ogin i"e can $e set to restrict root access% &he 'etc'de au"t'password i"e can $e set up to en orce system-wide password aging %

Aonitoring su /ttempts : -or security reasons! you must monitor who has $een using the su
command! especia""y those user's who are trying to gain root! access on the system% <ou can set this using the 'etc'de au"t'su i"e% &he o""owing is the content o the 'etc'de au"t'su i"e% Fident RZFsu%d " *%6 OJ'0.'*0 SLIR 'S S3r0%0 *%+ S'

FS?I8@ determines the "ocation o the i"e used to "og a"" su attempts t F S?I8@N'6ar'adm'su"og F982S8I( determines whether attempts to su to root shou"d $e "oggedto the named de6ice

F982S8I(N'de6'conso"e F PA&H sets the initia" she"" PA&H 6aria$"e FPA&HN'usr'$in: F S?PA&H sets the initia" she"" PA&H 6aria$"e or root FS?PA&HN'usr's$in: 'usr'$in FS<SI8@ determines whether the sys"og(J) I8@EA?&H aci"ity shou"d $e Fused to "og a"" su attempts% I8@E28&I9( 'messages are generated or Fsu's to root! I8@EI2-8 messages are generated or su's to other Fusers! and I8@E94I& messages are generated or ai"ed su attempts% S<SI8@N<(S

he CONSO9B Cariable :<ou can set the 982S8I( 6aria$"e to speci y one o three possi$"e
conditions or restricting root "ogins: I the 6aria$"e is de ined as 982S8I(N'de6'conso"e! root "ogin on"y at the system conso"e% Any attempt to "ogin as root rom any other de6ice generates the error message:

+ rlogin hostl
2ot on system conso"e 9onnection c"osed% I the 6aria$"e is not de ined! root can "og in to the system rom any de6ice either across the networ#! through a modem! or using an attached termina"% I the 6aria$"e does not ha6e a 6a"ue assigned to it ( or e,amp"e 982S8I(N) then root cannot "og in rom anywhere! not e6en the conso"e! &he on"y way to $ecome root on the system is to "og in as a regu"ar user and $ecome root using the su command%

Implementing S&stem(Wi!e Passwor! /ging :<ou can orce e6ery user on the system to
change their password on a regu"ar $asis! without ha6ing to set up indi6idua" password aging or each user in the 'etc'shadow i"e% &his is done $y modi ying the 'etc'de au"t'passwd i"e% &here are! three di erent 6aria$"es in the i"e: 5AA;((LS! 5I2;((LS! and PASSI(2@&H! as shown in the o""owing samp"e i"e% F cat passrwd F ident Z (F) passwd%d " 5AA;((LSN 5I2;((LSN PASSI(2@&HN6 *%J O+'01'*0 S5IR

The /etc/default/passwd File Variables:


&he o""owing sections descri$e the 'etc'de au"t'passwd i"e 6aria$"es% &he 5AA;((LS 3aria$"e% &he 6a"ue set or the 5AA;((LS 6aria$"e speci ies the ma,imum num$er o wee#s (se6en-day wee#s) a password is 6a"id $e ore it must $e changed or a"" regu"ar users% I there is no 6a"ue set or this 6aria$"e! which is the de au"t setting! on"y users who ha6e a 6a"ue or 5a, 9hange speci ied in the ourth ie"d o the 'etc'shadow i"e must change their passwords at the speci ied num$er o days% The M !"##$% Variable: &he 6a"ue sot or the 5I2;((LS 6aria$"e speci ies the minimum num$er o wee#s $etween password changes or a"" regu"ar users% I there is no 6a"ue set or this 6aria$"e! which is the de au"t setting! on"y users who ha6e a 6a"ue or 5in 9hange speci ied in the i th ie"d o the 'etc'shadow i"e are "imited as to when they can change their passwords% 2ote - &he password aging entries in the 'etc'shadow i"e ta#e precedence o6er the 'etc'de au"t'passwd i"e entries or indi6idua" users &he PASSI(2@&H 3aria$"e: &he PASSI(2@&H 6aria$"e speci ies a minimum password "ength or a"" regu"ar users $etween the si, and eight 6a"ues% 2um$ers $e"ow si, de au"t to si, character passwords! and num$ers a$o6e eight de au"t to eight character passwords%

8estricting /ccess to 6ata in Diles'


;hen you ha6e esta$"ished "ogin restrictions! the ne,t tas# is to contro" access to the data on the systems% 8 course! some users need to $e a""owed to read 6arious i"es! other users need permission to change and de"ete i"es! and there are some i"es that no user shou"d $e a$"e to access%?sers who need to share i"es shou"d $e put in a group% 2ote - In genera"! you use i"e access permissions to determine what users or groups ha6e permission to read! modi y! or de"ete i"es% + groups sta c"ass + groups user0 sta c"ass sysadmin ; i! uid *0*(user") gidNJ00(c"ass) &o 6iew i"" the account in ormation or a speci ic user! use the -a option:

; i! (a userl
uidN*0*(user") gidNJ00(c"ass) groupsN*0(sysadmin)

The setuid Permission :


;hen set-user identi ication (setuid) permission is set on an e,ecuta$"e i"e! a user or process that runs this e,ecuta$"e i"e is granted access $ased on the owner o the i"e (usua""y root) instead o the user who started the e,ecuta$"e%&his a""ows a user to access i"es and directories that are norma""y accessi$"e on"y $y the owner% P"us many e,ecuta$"e programs must $e run as root! sys! or $in to wor# proper"y% -or e,amp"e: -r-sr-,r-, * root sys *1*/6 7an / *1:0J 'usr'$in'su

&he setuid permission disp"ays as an RsR in the owner's e,ecute ie"d% 2ote - I a capita" [SR appears! it simp"y indicates that the setuid $it is on and the e,ecute $it R,R is o or denied% &he root user and the owner can set the setuid permissions on an e,ecuta$"e i"e using the chmod command and the octa" 6a"ue 0000% -or e,amp"e: + chcno! <000 e*ecutable#,ile (,cept or those setuid e,ecuta$"e i"es that e,ist $y de au"t in the So"aris 8perating (n6ironment! the system administrator shou"d disa""ow the use o setuid programs! or at "east restrict their use% &o search or i"es with setuid permissions and to disp"ay their u"" pathname! e,ecute the o""owing command: + ,in! " (perm (<000

2ote - I a capita" [SR appears! it simp"y indicates that the setuid $it is on and the e,ecute $it R,R is o or denied% he setgi! Permission he set(group i!enti,ication =setgi!> permission is simi"ar to setuid! e,cept that the e ecti6e group I: o the user or the process is changed to the group owner o the i"e% A"so! access is granted $ased on the permissions assigned to that group% -or e,amp"e! the mai" program has a setgid permission used to read mai"! or send mai" to other users% -r-,XsX, * root mai" 6*+.. 7an / *6:/1 'usr'$in'mai"

&he setgid permission disp"ays as an RsR in the group e,ecute ie"d% 2ote -I a "owercase "etter R*%R appears! it indicates that the setgid $it is on and the e,ecute $it is o or denied% &his indicates that mandatory i"e and record "oc#ing occurs during access%

&he root user and the owner can set setgid permissions on an e,ecuta$"e i"e using the chmod command and the octa" 6a"ue +000%-or e,amp"e: F chmod +/// e,ecuta$"eE i"e %hared &irectories : &he setgid permission is a use u" eature or creating shared directories% ;hen a setgid permission is app"ied to a directory! i"es created in the directory $e"ong to the group to which the directory $e"ongs% -or e,amp"e! i a user has write permission in the directory and creates a i"e there! that i"e $e"ongs to the same group as the directory! and not the user's group% &o create a shared directory! you must set the setgid% $it using sym$o"ic mode: + chmo! gEs share!#!irector&

Searching ,or setgi! Dlies an! 6irectories


&o search or i"es with setgid permissions and disp"ay their u"" pathname! e,ecute the o""owing command: + ,in! " (perm (5000

he Stick& Fit Permission'


&he Stic#y Kit is a specia" permission that protects the i"es within a pu$"ica""y writa$"e directory% I the directory has the Stic#y Kit set! a i"e can $e de"eted on"y $y the owner o the i"e! the owner o the directory! or $y root% &his pre6ents a user rom de"eting other users' i"es rom pu$"ic"y writa$"e directories% -or e,amp"e: + Is (I! "tmp drw,rw,rwt 6 root sys 1*O 5ay J* 0J:J0 'tmp

&he Stic#y Kit is disp"ayed as the "etter RtR in the e,ecute ie"d or other% 2ote - I a capita" [&R appears! it indicates that the Stic#y Kit is on! howe6er! the e,ecute $it is o or denied% &he root user and the owner can set the Stic#y Kit permission on directories using the chmod command and the octa" 6a"ue *000% -or e,amp"e: + chmo! $333 public#!irector& 2ote - I a capita" [&R appears! it indicates that the Stic#y Kit is on! howe6er! the e,ecute $it is o or denied%

&he root user and the owner can set the Stic#y Kit permission on directories using the chmod command and the octa" 6a"ue *000% -or e,amp"e: + chmo! $333 public#!irector&

%earching for &irectories with a %tic'( )it *ermission


&o search or directories with Stic#y Kit permissions and disp"ay their u"" pathname! e,ecute the o""owing command: F ind ' -type d -perm -*000 2ote - -or more detai"ed in ormation on the Stic#y Kit! e,ecute the o""owing command: man stic#y

Access 9ontro" Iists:Access 9ontro" Iists (A9Is) can pro6ide greater contro" o6er

i"e access permissions when traditiona" i"e protection is not enough%An A9I pro6ides $etter i"e security $y ena$"ing you to de ine i"e permissions or the i"e owner! i"e group! other! speci ic users and groups% A9Is a"so ena$"e you to set de au"t permissions or each o these categories%-or e,amp"e! i the system administrator wanted e6eryone in a particu"ar group to $e a$"e to read a i"e! you wou"d simp"y gi6e the group read permissions on that i"e% Howe6er! what i the system administrator wanted on"y one person in that group to $e a$"e to write to that i"eP A9Is can pro6ide that "e6e" o i"e security! where traditiona" ?2IA i"e access protection cannot%<ou shou"d 6iew A9Is as e,tensions to the standard ?2IA i"e permissions% &he A9I in ormation is stored and associated with each i"e or directory indi6idua""y% 9ommand'8ption :escription

get ac" i"ename (s) set ac" options i"ename% set ac" -m ac"Eentries set ac" -s ac"Eentries set ac" d ac"Eentries entries i"e(s)

:isp"ays A9I entries on a i"e(s)% Sets! adds! modi ies! and de"etes A9I entries on a i"e(s)% 9reates or modi ies A9I entries on i"es 4emo6es o"d A9I entries on a i"e(s)% and rep"aces with new A9I entries% :e"etes-one or more A9I entries on a

set ac" - ac"E i"e Speci y an A9I con iguration i"e containing "ist o permissions to $e set on other i"es% ac"E i"e is used an argument with this command on"y% set ac" -r 4eca"cu"ates permissions or the A9Imas#*

). -ermissions specified in the '*5 mask are ignored and replaced by the maximum permissions needed to gi4e access to any additional user, owner group, and additional group entries in the '*5.

(ach A9I entry consists o the ie"ds descri$ed in &a$"e J-+! which are separated $y co"ons% /C9 Diel!s
entry- type

6escription
&ype o entry to set i"e permissions or owner! owner's group! speci ic users! additiona" groups! or the A9I mas#% &he user's name or identi ication num$er (?&:)%&he group's name or identi ication Permissions set or entry-type% <ou can set Permissions sym$o"ica""y using r! w! ,! and - or $y using octa" 6a"ues rom 0 to 1%

?I: or @I: num$er (@I:)%

%perm

&he set ac" command uses these A9I entries to set permissions on ti"es! or e,amp"e: uBserD : : perm - Sets the permissions or the ti"e owner% @BroupDperm set the permissions or the ownerQs group o BtherD -perm - Sets the permissions or users other than the owner or mem$ers o the owner's group% uBserD :?I::permor uBserD -usemame:perm - Sets the permissions or a speci ic user% &he username must e,ist in the 'etc'passwd i"e% gBroupD :@I::perm or gtroupD groupnaome:perm - Sets the permissions or a speci ic group% &he groupname must e,ist in the 'etc'group i"e% mBas#D :perm - Sets the A9I mas#% &he mas# entry indicates the ma,imum permissions a""owed or a"" users! e,cept the owner! and or a"" groups% &he mas# is a )uic# way to change permissions or a"" the users and groups% &he o""owing e,amp"e creates an A9I entry on i"e% t,t or user. with permissions to read and write the i"e%%%

+ set,acl
F get ac" i"e%t,t F i"e: i"e%t,t

(m

user'userG'2

,ile.t*t

F owner: user" F group: c"ass user::rw, user: :user.:rwgroup::rmas#:r-other: ---&he ne,t e,amp"e modi ies the permissions o the A9I mas# to read and write% F e ecti6e:r-F e ecti6e :r--

+ set,acl

(m

m'2

,ile.t*t

F get ac" F i"e:

i"e%t,t i"e%t,t

F owner: user" F group: c"ass user::rw, user : :user. :rw group: : rmas#: rX other:--F e ecti6e :r-F e ecti6e : rX

&here are two ways to determine i a i"e has an A9I ?sing the get ac" command and ?sing the Is -* command?sing the "s -* command on any i"e that has an A9I disp"ays a p"us (T) sign at the end o the permission mode ie"d% -or e,amp"e: F Is -* i"e%t,t -rw,r-------T I user" c"ass *61 Apr *. **:*J i"e%t,t

2ote - I a i"e has no A9I entries or additiona" users or groups! the i"e is considered to $e a tri6ia" A9I i"e and the T sym$o" is not disp"aye 6eleting an /C9 Bntr& on a ,ile &o de"ete an A9I entry rom a i"e! use the set ac" -d command% An A9I entry can $e one or more commaseparated A9I entries without permissions% &o de"ete an A9I! speci y the entry type and the ?I: (user name) or @I: (group name)%<ou cannot de"ete the A9I entries or the i"e owner! i"e group owner! other! and the A9I mas#% set,acl (! /C9#entr& ,ilename =s> or set,tcl (! /C9#entr&:/C9#entr& ,ilename =s>

&he o""owing is an e,amp"e o de"eting an A9I entry% + set,acl ! u'userG ,ile.t*t

8eplacing an Bntire /C9 on a Dile &o rep"ace the entire A9I on a i"e! rom the command "ine! you must speci y at "east the $asic set o user! group! other! and mas# permissions and i"e name(s)% Command Formal: set ac" -s u: :perm!g: :perm! o:perm!m:perm! Bu: ?I:-%permD ! Bg:@I::permD i"ename (s) An #+ample of %etting an ACL on a File &he o""owing e,amp"e sets the i"e owner permissions to read and write! group permissions to read on"y! and other permissions to none on i"e% te,t%In addition! 6iser. is gi6en read'write permissions on the i"e!

and the A9I mas# is set to read'write! which indicates that no user or group can ha6e e,ecute permissions on the i"e% + set,acl (S user' 'rw(:group' 'r((:other'((:mask'rw(:user 'userG'a "( &o 6eri y which A9I entries were set on the i"e! use the get ac" command% + get,acl ,ile.t*t
F i"e: i"e%t,t F owner: user" F group: c"ass user::rwuser:user.:rwgroup::r-mas#:rwother:-In addition! user. is gi6en read and write permissionsM howe6er! due to the A9I mas#! the e ecti6e permissions or user. are read on"y% + set,acl (s u''3:g''<:o'0:m'<:u'userG'3 ,ile.t*t F e ecti6e:rwF e ecti6e::

,ile.t*t

3eri y which A9I entries were set on the i"e with the get ac" command% F set ac" i"e%tact F i"e: i"e%t,t

F owner: user" F group: c"ass user::rw, user:user.:rw, group::r-mas#:rF e ecti6e:r-F e ecti6e:r--

other:---

5anaging 4emote Access Issues:


&he more access that is a6ai"a$"e o6er the networ#! the more $ene icia" it is or remote system users% Howe6er! unrestrained access and sharing o data and resources wi"" create security pro$"ems% A "oca" host's remote security measures are genera""y $ased on $eing a$"e to 6a"idate! "imit! or $"oc# operations

rom remote system users% &he three networ# i"es "isted here pro6ide certain schemes or hand"ing $asic security issues in6o"6ing remote user access o a "oca" system% he"etc"hosts.eHuiv ,ile : he ;IOAB" .rhosts ,ile : he "etc",tpusers ,ile

he "etc"hosts. eHuiv an! ;IOAB". rhosts Diles


&ypica""y! when a remote user re)uests "ogin access to a "oca" host! the irst i"e read $y the "oca" host is its 'etc'passwd i"e% An entry or that particu"ar user in this i"e ena$"es that user to "og in to the "oca" host rom a remote system% I a password is associated with that account! then the remote user is re)uired to supp"y this password at "ogin to gain system access%;hen there is no entry in the "oca" host's 'etc'passwd i"e or the remote user! access is denied% The ;etc;hosts. e<ui4 and =>2?3; .rhosts files bypass this standard password-based authentication to determine if a remote user should be allowed to access the local host, with the identity of local user.

Bntries in "etc"hosts . eHuivan! ;IOAB " . rhosts '


;hi"e the 'etc'hosts%e)ui6 and \H85('%rhosts i"es ha6e the same ormatM the same entries in each i"e ha6e di erent e ects% &he genera" ormat is presented here% (,p"anations and e,amp"es o the meanings o each type o entry are presented on the o""owing pages% Koth i"es are ormatted as a "ist o one-"ine entries! which can contain the o""owing types o entries: Iostname hostname username

T
2ote - &he host name(s) in the 'etc'hosts%e)ui6 and \H85(' %rhosts i"es must $e the o icia" name o the host! not one o its a"ias name(s)% I on"y the hostname is used! then a"" users rom the named host are trusted! pro6ided they are #nown to the "oca" host% I $oth hostname and username are used! then on"y the named remote user rom the named remote host can access the "oca" host% A sing"e p"us sign (T) character p"aced in the i"e indicates that e6ery remote host on the networ# is trusted $y the "oca" host% (na$"ing remote users to "ogin rom anywhere on the networ#! with no passwords re)uired%

&he 'etc'hosts%e)ui6 -i"e


-or regu"ar users! the 'etc'hosts%e)ui6 i"e is used to identi y remote hosts and remote users who are considered trusted% 2ote - &he 'etc'hosts%e)ui6 i"e is not chec#ed at a"" i the remote user re)uesting "oca" access is root%

I the "oca" host has 'etc'hosts%e)ui6 i"e contains the host name o a remote host! then a"" regu"ar users o that remote host are trusted and do not need to supp"y a password to "og in to the "oca" host% Pro6ided that each remote user is #nown to the "oca" host $y ha6ing an entry in the "oca" 'etc'passwd i"eM otherwise! access is denied% &his is particu"ar"y use u" or sites where it is common or regu"ar users to ha6e accounts on many di erent systems! e"iminating the security ris# o sending AS9II passwords o6er the networ#% &he 'etc'hosts%e)ui6 i"e does not e,ist $y de au"t% It must $e created i remote user access is re)uired en the "oca" host%

The ,-.M# / / rhosts File


;hi"e the 'etc'hosts%e)uiy i"e app"ies system-wide or non-root users! the %rhosts i"e app"ies to a speci ic user% A"" users! inc"uding root! can create and maintain their own% rhosts i"es in their home directory%-or e,amp"e! i you run an r "ogin process rom a remote host to gain root access to a "oca" host! it chec#s or a ' %rhosts i"e in the root home directory on the "oca" host% I the remote host name is "isted in the i"e! it is considered to $e a trusted host and remote user access! in this case root access! is granted on the "oca" host% &he \H85('%rhosts ie does not e,ist $y de au"t! you must creates at in the user's home directory

8estricting D P 9ogins'
&he So"aris 8perating (n6ironment pro6ides an AS9II i"e named 'etc' tpusers% &he tpusers i"e is used to "ist the names o users who are prohi$ited rom running an tp "ogin on the system%(ach "ine entry in this i"e contains a "ogin name or each restricted user! or e,amp"e:

?sername Ky de au"t! the tpusers i"e has the o""owing system account entries:
4oot daemon $in s&s adm IP uucp nuucp "isten no$ody

noaccess no$ody0 As with any user name that you can add! these entries must match the user account names "ocated in the 'etc'passwd i"e% Kecause the new de au"t security po"icy in the So"aris 8perating (n6ironment is to disa""ow remote root "ogins! the root entry is inc"uded in 'etc' tpusers% I root "ogin pri6i"eges are a""owed $y de"eting the root! entry in 'etc' tpusers! ensure the etc de au"t "ogin i"e re "ects remote root "ogin pri6i"eges%

he "etc"shells Dile
&he'etc'she""s i"es contain a "ist o the she""s on the system App"ications! such as sendmai" and tp! can use this i"e to determine whether a she"" is 6a"id% &his i"e does not e,ist $y de au"t% 2ote - I this i"e does not e,ist! then getusershe""s (Jc) uses its own "ist o she""s% Ky creating this i"e! each she"" that you want to $e recogni>ed $y the system! must ha6e a sing"e "ine entry! consisting o the she""'s path! re"ati6e to ' (root)%-or e,amp"e:

+ touch "etc"shells
's$in'sh '$in'sh '$in'#sh ;hi"e the 'etc' tpusers i"e prohi$its tp connections or a speci ic user! you can create an 'etc'she""s i"e to a""ow tp connections on"y to those users running she""s that you ha6e de ined in this i"e% I an entry or a she"" does not e,ist in this i"e! any user running the unde ined she"" is not a""owed tp connections to the system%

The %oot P&O' Concept


(ach Sun system has a $oot P485 chip% &his .-#$yte chip is typica""y "ocated on the same $oard as the 9P?% &he main unctions o the $oot P485 are to test the system hardware and $oot the operating system% &he $oot P485 irmware! re erred to as the monitor program! contro"s the operation o the system $e ore the #erne" is a6ai"a$"e% &he $oot P485 irmware has the capa$i"ities to per orm system initia"i>ation at power on and pro6ide a user inter ace% 2ote -&he $oot P485 does not understand the So"aris 8perating (n6ironment i"e systems or i"esM it dea"s main"y with hardware de6ices% 9urrent"y there are three generations o Sun $oot P485s% (ach generation has its own $ase re6ision num$er as descri$ed in the o""owing "ist: *%,- &he origina" SPA49Y $oot P485 +%,- &he irst 8penKoot P485 (8KP)

J%,- &he 8penKoot P485 with a "ash update eature% <ou can update the J%, irmware without ha6ing to rep"ace the P485 chip% 2ote - &here is no 8penKoot P485 in the Inte" en6ironment%

The !VRAM Component


Another important hardware e"ement in each Sun system is the 234A5 chip M &he 234A5 is .L$ytes o non6o"ati"e random access memory% &his p"ugga$"e chip is o ten "ocated on the main system $oard%&he 234A5 stores the (thernet address! host I:! and the time-o -day (&8:) c"oc#% A sing"e "ithium $attery within the 234A5 modu"e pro6ide $attery $ac#up or the 234A5 and c"oc#% &he 234A5 modu"e a"so contains the ((P485 or the storage o user-con igura$"e parameters that ha6e $een changed or customi>ed rom the $oot P485's de au"t parameters settings% &his gi6es you a certain "e6e" o "e,i$i"ity in con iguring the system to $eha6e in a particu"ar manner or a speci ic set o circumstances% &he user-inter ace commands and de6ice a"iases are stored in the 234A5% 2ote - &he 234A5 chip has a ye""ow stic#er with a $ar code on it% 5any so tware pac#ages that are "icensed are $ased on the system host I: in 234A5% I the chip ai"s! Sun wi"" rep"ace it with a new chip containing the same host I: and (thernet address%

Power On Self Test (POST):


;hen a system's power is turned on! a "ow-"e6e" power on se" -test (P8S&) is initiated% &his "ow"e6e" P8S& code is stored in the $oot P485 and is designed to test the most $asic unctions o the system hardware%At the success u" comp"etion o the "ow-"e6e" P8S& phase! the $oot P485 irmware ta#es contro" and per orms the o""owing Initia"i>ation se)uence: Initia"i>es the system Pro$es the memory and then the 9P? Pro$es $us de6ices! interprets their dri6ers! and $ui"ds a de6ice tree

Insta""s the conso"e A ter system initia"i>ation! the $anner disp"ays on the! conso"e and the high "e6e" testing $egins% ;hen the high-"e6e" tests are inished! the system chec#s parameters stored in the 234A5 to determine i and how to $oot the operating system%
The .pen)oot 0oal

&he o6era"" goa" o the 8penKoot Institute o ("ectrica" and ("ectronics (ngineers! (I((() standard is to pro6ide the capa$i"ities to: &est and initia"i>e system hardware ! :etermine the systems hardware con iguration Koot the operating system ! Pro6ide interacti6e de$ugging aci"ities (na$"e the use o third-party de6ices

Third party Device Configuration

A"" 6ersions o the 8penKoot architecture a""ow a third-party $oard to identi y itse" and "oad its own p"ug-in de6ice dri6er% (ach de6ice identi ies its type and urnishes its p"ug-in de6ice dri6er when re)uested $y the 8KP during the system hardware con iguration phase o the $oot process%

Kasic Koot P485 Configurations


$asic KootP485 con igurations%

&he o""owing sections descri$e

the

%(stems Containing a %ingle %(stem )oard


&he o""owing Sun systems are con igured with on"y one system $oard! which ho"ds $oth the $oot P485 and 234A5 chip%

SPA49stationY 0! /!*0! and +0

?"traY *! +! *+*0! J0! 60! .0! ++0! +/0! 0+0! and 0/0 &he ?"tra systems use a re-programma$"e $oot P485 ca""ed a flash P&O'+ (or -P485)% &his a""ows new $oot program data to $e "oaded into the P485 6ia so tware! instead o ha6ing to rep"ace the chip% &hese updates are distri$uted on 9:485!

%(stems Containing Multiple %(stem )oards


&he o""owing S?2 systems are con igured with mu"tip"e System $oards%

(nterprise JA00 (nterprise 0A00 (nterprise /A00 (nterprise 6A00

Systems containing mu"tip"e system $oards ha6e a specia" $oot P485 and 234A5 arrangement- &hese systems a"so ha6e a c"oc# $oard to o6ersee the $ac#p"ane communications%

Some characteristics o these particu"ar systems are: &he 9P? "ocated in the "owest card Rcage s"ot $ecomes the 5aster R9P? $oard% (ach 9P? $oard runs its own indi6idua" P8S&% &he host I: and (thernet address are on the 9"oc# $oard and are automatica""y down"oaded to a"" 9P? $oard 234A5s when P8S& is comp"ete% P485 contents are 6eri ied $y chec#sum comparisons% 9"oc# $oard and a"" system $oards are compared% In6a"id P485 6a"ues can $e manua""y rewritten and 6eri ied% I the P485 contents on the 9"oc# $oard are ound to $e di erent! it is re"oaded with the contents rom the 5aster 9P? $oard 234A5% <ou can update the "ash P485s (-P485s) to newer irmware 6ersions without rep"acing them% &hese updates arc distri$uted on 9:485%

Controlling the P8S& Phase&he Stop #ey! "ocated on the "e t side o
e ect the P8S&! phase%

the #ey$oard! is used to

&o s#ip the P8S& phase at power up! power on the system! whi"e ho"ding down the Stop #ey% &o run e,tensi6e P8S& diagnostics during power up using S&8P-d Power on the system whi"e ho"ding down the Stop #ey and the RdR #ey simu"taneous"y% &his action sets the 6a"ue o the parameter diag-switchP to true% &his a"so orces the system to $oot rom the parameter diag-de6ice-Its de au"t 6a"ue is usua""y set to net% &he irmware automatica""y switches to diagnostic mode to run e,tensi6e P8S& diagnostics on the system hardware% Ky de au"t! the parameter diag-"e6e" de au"ts to the ma,imum! (ma,) setting! this instructs P8S& to run a"" a6ai"a$"e tests% Ky modi ying the 6a"ue o diag-"e6e" to the minimum (min) setting! P8S& on"y runs an a$$re6iated set o tests! (in appro,imate"y ha" the time o the ma,imum setting)% o reset the NC8/A parameter settings to the !e,ault values' I a system does not $oot and the 234A5 settings are suspect! power on the system whi"e ho"ding down the Stop #ey and the RnR #ey simu"taneous"y% 8nce the #ey$oard I(:'s ("ight emitting diodes') start to "ash! re"ease the #eys and the system continues to $oot %

-alting the %olaris .perating #nvironment


&o ha"t the So"aris 8perating (n6ironment to get to the P485 monitor prompt! ho"d down the Stop #ey and the [aR #ey simu"taneous"y% An o# prompt disp"ays on the screen indicating that the monitor program is a6ai"a$"e% ;arning - <ou shou"d not interrupt the So"aris 8perating (n6ironment $ecause i"e systems can $e corrupted% Howe6er! i a system is ro>en! you can use this method to re$oot the system% I the So"aris 8perating (n6ironment had $een running $e ore the Stop-a #ey se)uence! enter the reset command at the o# prompt to c"ear a"" $u ers and registers ,efore entering any diagnostic commands

Basic Boot PROM Commands


&he $oot P485 monitor pro6ides a user inter ace or in6o#ing 8penKoot commands! such as those "isted $e"ow% 2ote - &he o# prompt indicates the So"aris 8perating (n6ironment is current"y not running% &he o""owing are some common"y used commands:

ok banner ok boot ok help ok printenv

ok setenv ok reset

ok set(!e,aults ok probe(i!e ok probe(scsi ok probe(scsi(all

The banner Command


&he $anner command "ists se6era" "ines o use u" in ormation a$out the system! such as Rthe mode" name! amount o memory! host I:! (thernet address! and the $oot P485 6ersion num$er! ( or e,amp"e!*%,! + %,! or J %,)% o# $anner Sun ?"tra /'*0 ?PA'P9I (?"traSPA49-IIi +105H>)! Ley$oard Present 8penKoot J%**! *+. 5K memory insta""ed! Seria" F**O00O6/% (thernet- addresses .:0:+0:$/:O.:+/! Host I:: .0$/O.+/%

The boot Command

<ou use the $oot command to $oot the So"aris 8perating (n6ironment rom the o# prompt% &his command has se6era" options a6ai"a$"e or $ooting the system in di erent situations%

Command-Format

8# $oot Bde6ice-nameD BoptionsD (ntering the $oot command at the o# prompt $oots the system to mu"ti-user mode automatica""y% -or e,amp"e: 8# $oot
Options &he o""owing "ist descri$es the options or the $oot command:

s-Koots the system to a sing"e user mode and prompts or the root password% -or e,amp"e: ok boot ?s 2ote- &o continue the process and $ring the system to mu"tiuser mode! process the contro" d #eys% A Koots the system interacti6e"y% &his is use u" i you need to ma#e a temporary change to the system i"e or the #erne"% &he $oot program as#s you or the o""owing in ormation% ok boot ?a
(nter i"ename o the #erne" (#erne" ' uni,): (nter de au"t directory or modu"es (#erne"M 'usr ' #erne"): (nter name o system i"e (etc ' system): (nter de au"t root i"e system type (u s): (nter physica" name o root de6ice: -or e,amp"e: ok help (nter 'he"p command-name' or 'he"p category-name' or more he"p (?se 82I< the irst word o a category description) (,amp"es: he"p se"ect -or- he"p "ine 5ain categories are:4epeated "oops ! :e ining new commands ! ! 2umeric output !4adi, (num$er $ase con6ersions) ! Arithmetic !5emory access !Iine editor !System and $oot con iguration parameters ! Se"ect I'8 de6ices !-"oppy eWect !Power on reset! :iag (diagnostic routines) ! 4esume e,ecution ! -i"e down"oad and $oot ! n6ramrc (ma#ing new commands permanent) o#

Detailed Help
To 4iew specific information for one of the main categories listed abo4e, type the following+ o# he"p "ine o# he"p system o# he"p diag o# he"p i"e

The printen6 9ommand <ou can use the printen6 command to "ist a"" the 234A5 parameters% &he name o each parameter is disp"ayed a"ong with the 6a"ues o its de au"t setting and current setting (i the parameter can $e modi ied)% (&he o""owing output is edited to it the page%)
o# printerr6 3aria$"e 2ame tpe-"in#-testP scsi-initiator-id #ey$oard-c"ic#P tty$-rts-dtr-o tty$-ignore-cd ttya-rts-dtr-o ttya-ignore-cd tty$-mode ttya-mode pcia-pro$e-"ist pci$-pro$e-"ist diag-"e6e" output-de6ice input-de6ice $oot-command auto-$ootP diag-de6ice $oot-de6ice "oca"-mac-addressP screen-Fco"umns screen-Frows use-n6ramrcP security-mode security-password none &rue net dis# net a"se .0 0 a"se a"se *!+!J!0 *!+!J ma, screen #ey$oard $oot true net dis# net a"se .0 J0 a"se a"se true a"se true O600!.!n!"!O600!.!n!"!*!+!J!0 *!+!J ma, screen! #ey$oard $oot true O600!.!n!"!O600!.!n!"!3a"ue true 1 a"se a"se true a"se true 1 :e au"t 3a"ue

security-F $ad"ogins diag-switchP o# a"se

0 a"se

<ou can a"so use the printen6 command to disp"ay on"y a sing"e parameter and its 6a"ues% -or e,amp"e! to disp"ay on"y the $oot-de6ice parameter: o# printen6 $oot-de6ice $oot-de6ice N dis# net &he possi$"e 6a"ues to $oot-de6ice inc"ude: dis#! net! and cdrom% 2ote - I an 8KP parameter ends in a )uestion mar# (P)! or e,amp"e: auto-$ootP the parameter 6a"ue is either true or a"se%

The seten6 Command <ou use the seten6 command to change the current 6a"ues assigned
to 234A5 parameters%In this e,amp"e! the auto-$ootP parameter is changed rom its de au"t setting o true to a new current 6a"ue o a"se% o# printen6 auto-$ootP auto-$ootP N true o# o# seten6 auto-$ootP a"se auto-$ootP N a"se o# reset 4esetting &he reset command reads the changes to the en6ironment 6aria$"es%

&he set-de au"ts Command


o# set-de au"ts

<ou use the set-de au"ts command to reset a"" parameters to their de au"t 6a"ues% It a ects on"y those parameters that ha6e assigned de au"t 6a"ues%

Setting 234A5 parameters to de au"t 6a"ues% o# &o reset on"y a speci ic parameter to its de au"t 6a"ue! use the set-de au"t command% o# set-de au"t parameter-name -or e,amp"e:

o# set-de au"t diag-"e6e"


&o see the entire de6ice tree! use the show-de6scommand%
o# show-de6s 'S?2;!?"traSPA49-IIiZ0!0 'pciZ" !0 '6irtua"-memory 'memoryZ0!*0000000 'pciZ" !0'pciZ" 'pciZ" !0'pciZ"!" 'pciZ" !0'pciZ"'pciZ" 'pciZ" !0'pciZ"'pciZ"'S?2;!isptwoZ0 'pciZ" !0'pciZ"'pciZ"'S?2;!hmeZ0!-" 'pciZ" !0'pciZ"'pciZ"'S?2;!isptwoZ0'st 'pciZ" !0'pciZ"'pciZ"'S?2;!isptwoZ0'sd 'pciZ" !0'pciZ"%*'ideZJ 'pciZ" !0'pciZ"%*'sunw! m60KZ+ 'pciZ" !0'pciZ" * 'networ#s *! * 'pciZ" !0'pciZ" 'e$usZ* 'pciZ" !0'pci%ei! "'ideZJ'cdrom 'pciZ" !0'pciZ" 'ideZJ'dis# 'pciZ" !0'pciZ" "'e$usZ"'S?2;!9S0+J*Z*0!+00000 'pciZ" !0'pciZ"!"'e$usZi' "ashpromZ*0!0 'pciZ" !0'pciZ"!"'e$usZ"'eepromZ*0!0 "'e$usZ"' dthree(+*0!J0+J 0 'pciZ" !0'pciZ"!"'e$usZ"'ecppZ*0!J00J$c 'pciZ" !0'pciZ"!*'e$usZ*'suZ*0! J06+ . 'pciZ" !0'pciZ"!*'e$usZ*'suZ*0! J0.J . 'pciZ" !0'pciZ"!"'e$usZ"'seZ*0!000000 'pciZ" !0'pciZ"!"'e$usZ"'a,o,ioZ*0!1+6000 Goutput truncatedH o# 'pciZ" !0'pciZ"!"'e$usZ"'powerZ*0!1+0000 'pciZ" ! 0'pciZ"!

%oot Dis Device Path E-ample

&he paths $ui"t in the de6ice tree $y the 8penKoot irmware wi"" 6ary depending on the system type and its de6ice con iguration%

.sing pro,e/ Commands to Identify Devices


&o identi y the periphera" de6ices! such as dis#s! tape dri6es or 9:485s current"y connected to the system! use the 8KP commands: probe(i!e probe(scsi probe(scsi(all

ote - Use the probe -fcal 2@- command to identify peripheral de4ices on systems containing the ,iber *hannel 'rbitrated 5oop 8,*-'5: A@&* Aigabit &nterface *on4erters. Periphera" de6ices are connected to the System $oard ,y I'8 (input'output) $uses%

<ou can con igure Sun systems with a sma"" computer s&stem inter,ace =SCSI>

bus or integrate! !rive electronics =I6B> bus.


A pro e! "arning #essage ;arning - &he o""owing warning message is disp"ayed i you in6o#e the pro$e-commands on Sun systems that contain a J, $oot P485% Shutting down the So"aris operating system a$rupt"y with the stop a se)uence! or with the ha"t command! creates a condition where running the pro$e command hangs the system un"ess you run the reset-a"" command irst% ;hen 8perating (n6ironment has $een running $e ore the stop a #ey se)uence! you must comp"ete the o""owing steps $e ore using the price commands! $ecause these commands can cause the system to ree>e% 2ote - i a pro$e- command causes a system to ree>e! turn o the system and then turn it $ac# on $y togg"ing the power switch "ocated on the $ac# o the system unit% $. /t the ok prompt: set the NC8/A auto(bootJ Parameter to ,alse

ok setenv auto(bootJ ,alse

5. /t the ok prompt: enter the reset comman! to clear all bu,,ers an! registers be,ore entering an& !iagnostic comman!s. ok reset

The pro e!scsi $ommand


&he pro$e-scsi command! identi ies the periphera" de6ices (dis#s! tape dri6es! or 9:485s) attached to the on-$oard S9SI contro""er! $y their target address% -or e,amp"e: Ok prob(scsi. &arget J ?nit 0 :is# S(A@A&( S&*0.0 S?200+06+6600*O00*6 &arget 6 ?nit 0 4emo6a$"e 4ead on"y de6ice S82< 9:485
The pro$e-scsi -a"" Command &he pro$e-scsi-a"" command identi ies the periphera" de6ices attached to the on-$oard S9SI contro""er and a"" periphera" de6ices attached to separate SKus or P9I S9SI contro""ers% ok probe(scsi(all 'pciZ* ! 0'pciZ*'pciZ*'S?2;!insptwoZ0 &arget J ?nit 0 :is# -?7I&S?5AKJ00/S S?20%+@*O01 &arget 0 ?nit 0 4emo6a$"e &ape (AAK<&( (AK-./0/S5KA2SH+00O0
&he pro$e-ide Command &he pro$e-ide command identi ies the periphera" de6ices! current"y on"y dis#s and 9:485s! attached to the on-$oard ide contro""er% &his command does not disp"ay target addresses! on"y de6ice num$ers%-or e,amp"e: o# pro$e-ide :e6ice 0 :e6ice * :e6ice + :e6ice J ( Primary 5aster ) (Primary S"a6e ) 2ot Present (Secondary 5aster) 4emo6a$"e A&API 5ode" : 94:-.+0%0K ( Secondary S"a6e ) 2ot Present A&A 5ode" : S& J0J0+A

Identifying the System's %oot


o# printen6 $oot-de6ice $oot-de6ice N dis# net

Device&he system's $oot de6ice is set in the 234A5 as the $oot-de6ice parameter! which is $y de au"t set to dis#%

&o identi y the current $oot de6ice or the system! use the de6a"ias command%

o# de6a"ias screen net cdrorti dis# dis#J dis#+ dis#^ dis#8 ide "oppy tty$ ttya #ey$oard^ #ey$oard mouse name 'pc"Z" !0'pciZ"!"'S?2;!m60KZ+ 'pciZ" !0'pciZ"!"'networ#]"!" 'pciZ" !0'pciZ"!"'ideZJ'cdrcsnZ+!0: 'pciZ" !0'pciZ"!"'ideZJ'dis#Z0!0 'pciZ" !0'pciZ"!"'ideZJ'dis#ZJ!9 'pciZ* 0'pciZ"!"'ideZJ'dis#Z+!0 'pciZ" 0'pciZ"!"'ide_J'dis#Z"!0 'pciei !0'pciei!"'ideeJ'dis#Z0!0 'pcid" !0'pciZ"!"'ideZJ 'pciZ" !0'pciZI!"'e$usG+"' dthree 'pciZ" !0'pciZ"!"'e$usZ"'se:$ 'pciZ" ! 0'pciZ"!"'e$usZ"'se:ci % 'pciZ" !0'pciZ"!"'e$usZ"'suZ*0%J9.J .: orcemode 'pci_" !0'pciei!"'e$usZ"'suZ*0!J0.J . 'pciZ" !0'pci(P"!"'e$usZ"'suZ*0!J06+ . a"iases

:e6ice a"ias names are "isted on the "e t side o the command output! and the physica" address o each de6ice is shown on the right side o the output%:e6ice a"iases are hard-coded into the 8KP irmware! and they are easier to remem$er and use than the physica" de6ice addresses%&he dis# de6ice a"ias identi ies the de au"t $oot de6ice or the system% &o $oot the system rom the de au"t de6ice simp"y type the $oot command% ok boot Creating Custom Device 0liases <ou can $oot rom an e,terna" de6ice% (,terna" de6ices do not! $y de au"t! ha6e $ui"t-in de6ice a"iases associated with them% A portion o the 234A5 ca""ed 234A549 contains registers to ho"d parameters and is a"so! reser6ed or storing new de6ice a"ias names% &he 234A549 is e ected $y the commands n6a"ias! n6una"ias! n6edit and the parameter use-n6ramrcP

The n%alias and n%unalias $ommands: &o create a new de6ice a"ias name to access the
new"y attached e,terna" de6ice! use the command n6a"ias% &o create a custom de6ice a"ias name: .

ok nvalias alias(name !evice(path &he e ect o n6a"ias is to store this entire command "ine in the 234A549% &o remo6e a custom de6ice a"ias name: ok nvunalias alias(name &he e ect o n6una"ias is to de"ete the a"ias name rom 234A549% !sing nvalias to Create Custom De ice Aliases &he o""owing procedure shows how to add a new $oot de6ice a"ias! ca""ed my dis + and $oot the system rom this new $oot de6ice a"ias%?sing show-dis#s se"ect the de6ice path that re"ates to the dis# to $e used% ?sing n6a"ias create a new de6ice a"ias ca""ed mydis#% ok show(!isks
(select a dis from the list) o# n6a"ias mydis# 'pciZ* ! 0'pciZ"'pciZ"'S?2;! ispt6ro(5'sd &o paste the de6ice path! or the se"ected dis#! on the command "ine press 9ontro"-y%

Removing Custom Device Aliases <ou use n6una"ias to de"ete the a"ias name mydis#
234A549! and set the $oot-de6ice to dis#% o# n6una"ias mydis# o# seten6 $oot-de6ice dis# $oot-de6ice N o# reset 4esetting %%%% dis#

rom

The n%edit $ommand 8n Sun systems with P485 6ersions *%, and +%, the n6a"ias command
might not $e a6ai"a$"e to create custom de6ice a"ias names% 8n these systems you use the n6edit command to edit the 234A549 direct"y% &he n6edit editor is a simp"e "ine editor that has a set o editing commands and operates in a temporary $u er% &he o""owing is a samp"e n6edit session: ok setenv use(nvramrcJ true use-n6ramrcPN true ok nve!it 0' !evalias m&(!isk "pci7(l, :0"pci7l: l"i!e73"!isk-k.:0 $' Control(c ok nvstore

o# reset 4esetting %%%%% o# $oot mydis# <ou use the n6store J command! which is in6o#ed a ter e,iting n6editp to ma#e permanent changes to 234A549% &he o""owing "ists some $asic n6edit commands:

`9- (,its the editor `? - :e"etes the current "ine :e"ete - (rases the pre6ious characters 4eturn - 9"oses the current "ine! opens a new "ine
`K -@oes $ac# one character `- -@oes orward one character `P-@oes $ac# one "ine `2-@oes orward one "ine

Changing 12&0' Parameters with the eeprom Command


<ou use the 'usr's$in'eeprom command to 6iew and change the 234A5 parameters whi"e the So"aris 8perating (n6ironment is running%<ou shou"d $e aware o the o""owing guide"ines when using the eeprom command:

8n"y root can change the 6a"ue o a parameter% Parameters with a trai"ing )uestion mar# must $e enc"osed in sing"e )uotes when e,ecuted in the 9 she""% A"" changes are permanent &here is no reset command to $e run%

&'amples
&o "ist a"" o the parameters with de au"t and current 6a"ues! type: + eeprom &o "ist a sing"e parameter and its 6a"ue! type: + eeprom boot(!evice boot(!eviceK!isk F &o change the 6a"ue o the de au"t $oot de6ice! type: + eeprom boot(!eviceK!isk5 F &o change the 6a"ue o the auto-$ootP parameter! type: F eeprom auto-$ootPNtrue auto-$ootPNtrue F

Interrupting an !nresponsi e System ;hen a system

ree>es! or stops responding to the #ey$oard! you must Interrupt it% Interrupting the system stops the processor immediate"y and does not a""ow or memory to $e "ushed! or i"e systems to $e synchroni>ed%&o interrupt an unresponsi6e system: *% Attempt a remote "ogin on the unresponsi6e system to "ocate and #i"" the o ending process% 34 Attempt to re$oot the users system grace u""y% J% Ho"d down the Stop-a #ey se)uence on the #ey$oard o the unresponsi6e system% &he system is p"aced at the o# prompt% 2ote - I an AS9II: termina" is $eing used as the system! conso"e! use the Krea# se)uence #eys% 0 5anua""y synchroni>e the i"e systems using the 8KP sync command% o# sync % %

&his command causes the system to create a crash dump o memory and then re$oot the system%

9reate and manage user accounts on the "oca" system using the admin too" uti"ity :escri$e the ormat o the i"es 'etc'passwd and 'etc'shadow or securing "ogin access :escri$e the ormat o the 'etc'group i"e or maintaining shared and restricted access to i"es and directories Add! modi y! and de"ete user accounts on the "oca" system with the commands useradd! usermod! and userde" Add! modi y! and de"ete group accounts or the "oca" system with the commands groupadd! groupmod! and groupde" :e ine the two di erent types o she"" initia"i>ation i"es :escri$e the she"" startup acti6ities during "ogin or the three main So"aris 8perating (n6ironment Iist the she"" initia"i>ation i"es used to set up a user's wor# en6ironment at "ogin :escri$e the purpose o the 'etc's#e" directory 5odi y initia"i>ation i"es to customi>e a userQs wor# en6ironment%

Setting ?p ?ser Accounts


An important system administration tas# is setting up user accounts or each user re)uiring system access% (ach user account consists o i6e main components:

)ser name - A uni)ue name a user enters to "og in to a system! a"so ca""ed a "ogin name% Passwor! - A com$ination o si, to eight "etters! num$ers! or specia" characters that a user must enter with the "ogin name to gain access to a system% )serLs home !irector& - A directory the user is p"aced in a ter "ogin! or creating and storing i"es% )serLs login shell - &he user's wor# en6ironment is set up $y the initia"i>ation i"es de ined $y the user's "ogin she""% &here are si, possi$"e "ogin she""s in the So"aris 8perating (n6ironment! which inc"ude the Kourne she""! Lorn she""! 9 she""! V she""! KASH she""! and the &9 she""% ?ser initia"i>ation i"es - She"" scripts that determine how a user's wor# en6ironment is to $e set up when the user "ogs in to a system%

Aanaging )ser /ccount: <ou can add! modi y! and de"ete user accounts on the system using either command-"ine too"s or the graphica" inter ace uti"ity ca""ed admintoo"%Howe6er! $e ore you can add user accounts to the system! you must determine the o""owing in ormation or each new user

9ogin name - (ach user's name must $e uni)ue and consist o two to eight "etters (AEV! a->) and num$ers (0-O)% &he irst character must $e a "etter! and at "east one character must $e a "owercase etter% ?ser names cannot contain underscores or spaces% )ser i!enti,ication =)I6> number - &he user's uni)ue numerica" I: or the system% ?I: num$ers or regu"ar users range rom *00 to 60000% A"" ?I: num$ers must $e uni)ue% 2ote - As o the So"aris +%6 8perating (n6ironment! the ma,imum 6a"ue or a ?I: is +*010_J601% Howe6er! the ?I:s o6er 60000 do not ha6e u"" unctiona"ity and are incompati$"e with some the So"aris 8perating (n6ironment eatures% So a6oid using ?I:s o6er 60000 to $e compati$"e with ear"ier 6ersions o the operating system% @roup i!enti,ication =@I6> number - &he uni)ue numerica" I: o the group to which the user $e"ongs% (ach @I: num$er must $e an integer $etween *00 to 60000% 2ote - <ou can add a user to prede ined groups o users "isted in the 'etc'group i"e% Comment - Identi ies the user% @enera""y contains the u"" name o the user and optiona" in ormation such as a phone num$er or "ocation%
Home directory identi ies the userQs home directory pathname Iogin She"" Identi ies the userQs "ogin she"" Password Aging 8ptica"

5anaging ?ser Accounts with admintoo" '&he administration uti"ity! admintoo"! ena$"es system administrators to
maintain and modi y "oca" system i"es rom the o""owing categories:

?sers @roups Hosts Printers Seria" ports So tware

2ote - <ou e,ecute the admintoo" uti"ity rom the 9ommon :es#top (n6ironment (9:() or 8pen ;indowsY en6ironment% &o set up and manage user accounts with admintoo"! "og in as root and run the o""owing command rom! a termina" window in a 9:( en6ironment% + a!mintool M

Storing )ser an! @roup /ccount in,ormation he So"aris 8perating (n6ironment stores user account and
group account in ormation in the o""owing system i"es: 'etc'passwd 'etc'shadow 'etc'group Authori>ed system users ha6e "ogin account entries in the 'etc'passwd i"e%

A"" passwords are encrypted and maintained in a separate shadow i"e named 'etc'shadow% &o urther contro" user passwords! you can o ten en orce password aging! which is maintained in the 'etc'shadow i"e% &he "etc"group i"e de ines the de au"t system group accounts% <ou use this i"e to create new group accounts or modi y e,isting group accounts on the system%

he "etc"passw! -i"e :ue to the critica" nature o the 'etc'passwd i"e! you se"dom! i e6er! opens this i"e to edit it direct"y% Instead! the i"e is maintained through the use o adminitoo"! or the command "ine too"s: useradd! usermod! and userde"%
&he o""owing is a samp"e 'etc'passwd i"e! containing initia" system account entries: 4oot:,:0:*:Super-?ser:':'s$in'sh :aemon:,:*:*::': $in:,:+:+::'usr'$in: sys:,:J:J: :': adm:,:0:0:Admin:'6ar'adm: "p:,:1*:.:Iine printer admin:'usr'spoo"'"p: smtp:,:0:5ai" daemon ?ser:': ?ucp:,:/:/:uucp Admin: usr'"i$'uucp: 2uucp:,:O:O??9P Admin: '6ar'spoo"'uucppu$"ic:'usr'"i$'uucp'uucicio Iisten:,:J1:0:2etwor# Admin: usr'ner'net'n"s: 2o$ody:,:6000*:6000*: 2o$ody:': 2oaccess:,:6000+:6000+: 2o Access ?ser:': 2o$ody0:,:6//J0:6//J0:Sun8S 0%, 2o$ody:': (ach "ine entry in this i"e contain the o""owing se6en ie"ds separated $y co"ons: "oginI::,:?I::@I:: 9omment: homeEdirectory:I8@I2ESH(II

loginI6-4epresents the user's "ogin name% It shou"d $e ?2Ia?(% &he ie"d is a string o no more than eight characters consisting o numeric characters! period (%)! underscore (E)! and (-)% &he irst character must $e a "etter! and it must contain at "east one "owercase character 4epresents a p"aceho"der or the user's encrypted password! which is #ept in the 'etc'shadow i"e% )I6 9ontains the ?I: used $y the system to identity the user% ?I: num$ers or users range rom *00 to 60000% 3a"ues 0 through OO are reser6ed or system accounts ?I: 6000* is reser6ed or the no$ody account ?I: 600+ is reser6ed or the noaccess account dup"icate ?I:s are a""owed $ut shou"d $e a6oided% I two users ha6e the same ?I:! they ha6e identica" access to each users i"es @I6- 9ontains the @I: used $y the system to identi y the user's primary group% @I: num$ers or users range rom *00 to 60000% (&hose $etween 0 and OO are reser6ed or system accounts%)

comment -9ontains the user's u"" name% home#!irector& -9ontains the u"" pathname to the user's home directory% login#shell(:e ines the user's "ogin she""! which can $e '$in'sh! '$in'#sh! '$in'csh! '$in'>sh! '$in'$ash! or '$in'tcsh%
0 Superuser account% Has a"most no restrictions and o6errides a"" other "ogins! protections! and permissionsM has access to the entire system% System account that contro"s $ac#ground processing% Administrati6e account that owns most o the commands% Administrati6e account that owns many system i"es% Administrati6e account that owns certain administrati6e i"es%

root

daemon $in sys adm smtp

* + J 1* 0

Print ser6ice account that owns the o$Wect and spoo"ed data i"es or the printer% &he smtp mai"er uses the Simp"e 5ai" &rans er Protoco" (S5&P) to trans er a message% S5&P is the standard mai" protoco" used on the Internet%

uucp nuucp "isten

/ 6 J1

&he uucp account that owns the o$Wect and spoo"ed data i"es or the ?2IA-to-?2IA copy program (??9P)% &he uucp account used $y remote systems to "ogin to the host and start i"e trans ers% 2etwor# "istener account%

no$ody

6000*

Anonymous user account! assigned $y an 2-S ser6er when an unathori>ed root user ma#es a re)uest% &he no$ody user account is assigned to so tware processes that do not need any specia" permissions% Account assigned to a user or a process that needs access to a system through some app"ication without actua""y "ogging into the system% Sun8SY 0%0 or 0%* 6ersion o the no$ody account%

noaccess no$ody0

6000+ 6//J0

*% &he no$ody account is used or securing 2-S resources% ;hen a user is "ogged in as root on an 2-S c"ient and attempts to access a remote i"e resource! the ?I: is changed rom 0 to the ?I: o no$ody (6000*)M no$ody gets the same access permissions as those de ined or e6eryone e"se%

&he 'etc'shadow i"e:ue to the critica" nature o

the 'etc'shadow i"e! you shou"d ne6er edit it direct"y% Instead! you maintain the i"e's ie"ds using admintoo" or the commands useradd! usermod! or passwd% &he 'etc'shadow i"e can $e read on"y $y a user with root permission% &he o""owing is an e,amp"e o the 'etc'shadow i"e containing its initia" system account entries: root:IAeo#t9o5twV2:600/:::::: daemon:2P:600/:::::: $in:2P:600/:::::: sys:2P:600/:::::: adm:2P:600/:::::: "p:2P:600/: : : : : : smtp:2P:600/:::::: uucp: 2P : 600/ :::::: nuucp: 2P:600/:::::: "isten : S ILS :::::: no$ody:2P:600/ :::::: noaccess :2P: 600/ :::::: no$ody0 :2P: 600/ :::::: (ach "ine entry contains the o""owing nine ie"ds! separated $y co"ons: "ogin I:: password: "astchg:min:ma,: warn: inacti6e:e,pire: loginI6- 9ontains the user's "ogin name% passwor! -9ontains a *J-character encrypted password! or the string SILS ! which indicates a "oc#ed account! or the string 2P! which indicates no password% lastchg - Indicates the num$er o days $etween 7anuary *!*O10! and the "ast password modi ication date% min -9ontains the minimum num$er o days re)uired $etween password changes% ma*-9ontains the ma,imum num$er o days the password is 6a"id $e ore the user is prompted to enter a new password at "ogin% warn - 9ontains the num$er o days the user is warned $e ore the password e,pires% inactive - 9ontains the num$er o inacti6e days a""owed or that user $e ore the user's account is "oc#ed% e*pire -9ontains the date when the user account e,pires% 8nce e,ceeded! the user can no "onger "og in% &he ninth ie"d is reser6ed or uture use! and is current"y not used

he "etc"group Dile (ach user must $e"ong to a group! which is re erred to as the user's primary group and speci ied $y the @I: "ocated in the user's account entry within the 'etc'passwd i"e% (ach user can a"so $e"ong up to */ additiona" groups! #nown as secondary groups! which are speci ied in 'etc'group i"e on"y%&he o""owing is a samp"e o the de au"t entries in an 'etc'group i"e% F cat 'etc 'group root: :0 :root

8ther: : * : $in : : + : root ! $in ! daemon sys : : J : root ! $in ! sys ! adm adm : : 0 : root ! adm ! daemon uucp : : / : root ! uucp mai" : : 6 : root tty : : 1 : root ! tty ! adm "p : : . : root ! "p ! adm nuucp : : O : root ! nuucp sta ::*0: daemon : : *+ : root ! daemon sysadmin: : *0 : "ister! torey no$ody: : 6000*: noaccess: : 6000+ : nogroup: : 6//J0 : F (ach "ine entry in the 'etc'group i"e contains the o""owing our ie"ds! each separated $y a co"on character% groupname : group -password: "ID: username-list groupname -9ontains the name assigned to the group% @roup names can contain a ma,imum o eight characters% group(passwor! - 9ontains an asteris# or is an empty ie"d% &his ie"d is a re"ic o ear"ier 6ersions o ?2IA% &here is no uti"ity to set a password on a group% &o p"ace a password on a group! cut and paste an e,isting password rom the 'etc'shadow i"e into the 'etc'group i"e entry 2ote X A group password is used $y the newgrp command% &his command is used to "og a user into a new group% I that new group has a password! and the user is not a mem$er o that group! the password has to $e entered $e ore newgrp wi"" continue%

@I6-9ontains the group's @I: num$er% It must $e uni)ue on the "oca" system and shou"d $e uni)ue across the organi>ation% 2um$ers 0 to OO! 6000*! and 6000+ are reser6ed or system group accounts% ?ser-de ined groups can range rom *00 to 60000% username-"ist-9ontains a comma-separated "ist o user names that represent the user's secondary group mem$erships% Ky de au"t! each user can $e"ong to a ma,imum o */ secondary groups%

9reating ?ser Accounts

<ou can add new user accounts on the "oca" system using the useradd command% &his command adds an entry or the new user into the 'etc'passwd and 'etc'shadow i"es%

&he useradd command a"so automatica""y copies a"" the initia"i>ation i"es in the 'etc's#e" directory to the user's new home directory%

9ommand -ormat

usera!! B -u uid D B -g gid B -@ gid B!gid! % % DD B -d dir D B -m D B -s she"" D B -c


comment D "oginname <ou can use the o""owing options with the useradd command: -u uid -Sets the uni)ue ?I: or the new user% -g group - Speci ies a prede ined group's I: or name% -@ group - :e ines the new user's secondary group mem$erships% -d dir- :e ines the u"" pathname or the user's home directory% -m-9reates the new home directory i it does not a"ready e,ist% -s she"" - :e ines the u"" pathname or the she"" program to $e used as the user's "ogin she""% I not de ined! it de au"ts to '$in'sh% -c comment - &ypica""y used to speci y the user's u"" name and "ocation% -o -A""ows a ?I: to $e dup"icated% -e e,pire - Sets an e,piration date on the user account% Speci ies the date (mm'dd'yy) on which a user can no "onger "og in and access the account% &he account is "oc#ed inacti6e - Sets the num$er o inacti6e days a""owed on a user account% I the account is not "ogged into during the speci ied num$er o days it is "oc#ed% -# s#e"Edir- Speci ies an a"ternati6e directory "ocation containing customi>ed initia"i>ation i"es to $e copied into the user's home directory% (&he de au"t is 'etc's#e"%)
Adding a 1ser with useradd <ou can use the useradd command to create an account or a user named user"! assign the ?I:! add the user to the group other! create a home directory in 'e,port'home! and set the "ogin she"" or the account% + usera!! (u $00 (g other (! "e*port"home"newuserl (m (s "bin"ksh (c Nregular )ser /ccountO newusarl Ky con6ention! a user's "ogin name is a"so the user's home directory name% 5odi ying ?ser Accounts <ou can use the usermod command to modi y the components e,isting in a user account%

usermo! B -u uid B -o D D B -g group b ( -@ group B % group % % % D D -d dir D B -m D D B -s she"" D B -c comment b B -* new"ogname b B% - inacti6e b B -e e,pire D "ogin
In genera"! the options or the usermod command unction the same as or the useradd command! with the e,ception o the o""owing options: -* new"ogname - 9hanges a user's "ogin name or the speci ied user account% -m-5o6es the user's home directory to the new "ocation speci ied with the -d option% &he o""owing e,amp"e changes the "ogin name and home directory or user" to guest":

usermo! (! "e*port"home"guestl (m (i guestl newuserl

6eleting )ser /ccounts : <ou can use the userde" command to de"ete a user's "ogin account rom
the system% &his command a"so remo6es the user's home directory and a"" o its contents!i re)uested to do so%
Command Format : userdel 2 3r 4 login .ptions : <ou

can use the o""owing option with the userde" command:

-r-4emo6es the user's home directory rom the "oca" i"e system% &his directory must e,ist%

#+amples &he o""owing e,amp"e remo6es the "ogin account or user guest":

+ user!el guestl
&o re)uest that $oth the user's "ogin account and home directory $e remo6ed rom the system at the same time! e,ecute the o""owing:

+ user!el (r

guestl

Adding @roup Accounts As root! you can create new group accounts on the "oca" system using the groupadd command% &his command adds an entry or the new group into the 'etc'group i"e% Command Format groupa!! P (g gi!

P (o Q

Q groupname

.ptions <ou can use the o""owing options with the groupadd command:

-g gid - Assigns the group I: gid or the new group% -o -A""ows the gid to $e dup"icated%

#+ample &he o""owing groupadd command creates the new account c"ass" on the "oca" system:

groupa!! (g 30$ classl


5odi ying @roup Accounts : <ou can use the groupmod command to modi y the de initions o the speci ied group $y modi ying the appropriate entry in the 'etc'group i"e%

groupmo! P (g gi! P (o QQ P (n name Q groupname


.ptions <ou can use the o""owing options with the groupmod command:

-g gid - Speci ies the new @I: or the group% -o - A""ows the @I: to $e dup"icated% -n name-- Speci ies the new name or the group%

&he o""owing e,amp"e changes the c"ass account group @I: to 000:

+ groupmo! (g <00 class :e"eting @roup Accounts <ou can use the groupde" command to de"ete a group account rom the system% It
de"etes the appropriate entry rom the 'etc'group i"e%

group!el groupname
&he o""owing e,amp"e remo6es the group account c"ass" rom the "oca" system%

+ group!el classl

?nderstanding Initia"i>ation Pi"es

;hen users "og in to the system! their "ogin she""s "oo# or the e,ecute two di erent types o initia"i>ation! i"es% &he irst type contro"s the system -wide en6ironment% &he second type contro"s the user's en6ironment%

%(stem3"ide nitiali5ation Files <ou maintain the system initia"i>ation i"es to pro6ide an
en6ironment or the entire community o users who "og in to the system% &hese i"es are pro6ided $y the So"aris 8perating (n6ironment and reside in the 'etc directory%&he two main system initia"i>ation i"es are ca""ed "etc"pro,ile an! "etc". login. &he Kourne and Lorn "ogin she""s "oo# or and e,ecute the system initia"i>ation i"e 'etc'pro i"e during "ogin%&he 9 "ogin she"" "oo#s or and e,ecutes the system initia"i>ation i"e 'etc'%"ogin during the "ogin process% 2ote -&he de au"t i"es 'etc'pro i"e and 'etc'%"ogin chec# dis# usage )uotas! print the message o the day rom the 'etc'motd i"e! and chec# or mai"% 2one o the messages are printed to the screen i the i"e %hush"ogin e,ists in the user's home directory%

)ser Initiali1ation Diles <ou set up the user's initia"i>ation i"es and p"ace them in each user's
home directory% &he primary Wo$ o a user initia"i>ation i"e is to de ine the characteristics o a user's wor# en6ironments such as userQs search path! en6ironment 6aria$"es! and windowing en6ironment%&he owner(s) o the i"e(s) or root can change or customi>e the content o these i"es%
She""s System-wide Initia"i>ation -i"es ?ser Initia"i>ation -i"es 4ead at Iogin User &nitialiBation ,iles 7ead !hen a ew Shell is Started 'fter 5ogin She"" Pathname

Kourne

'etc'pro i"e

\H85('%pro i"e

'$in'sh

Lorn

'etc'pro i"e

\H85('%pro i"e \H85('%#shrc

\H85('%#shrc

'$in'#sh

'etc'%"ogin

\H85('%cshrc

'$in'csh

'etc'>shen6 'etc'>pro i"e 'etc'>shrc 'etc'>"ogin

\H85(-'% >sheri6 \H85('%>pro i"e \H85('%>"ogin %

\H85('%>shrc

'$in'>sh

KASH

'etc'pro i"e

\H85('%$ashEpro i"e \H85('%$ashE"ogin \H85('%pro i"e

\H85('%$ashrc

'$in'$ash

&9

'etc'csh%cshrc 'etc'csh%"ogin

\H85('%tcshrc or \H85('%cshrc

'$in'tcsh

2ote - &he root user's "ogin she"" $y de au"t is the Kourne she""! and root' s she"" entry in the 'etc'passwd i"e appears as 's$in'sh% ;hen a user "ogs in to the system! the user's "ogin she"" is in6o#ed% &he she""program "oo#s or its initia"i>ation i"es in a speci ic orderM e,ecutes the commands contained in each i"e! and when inished! disp"ays the she"" prompt on the user's screen% Customi1ing the Work Bnvironment &he she""s a"" pro6ide $asic eatures and a set o 6aria$"es that determine what root or a regu"ar user can do when customi>ing user initia"i>ation i"es or each she""%

%hell Variables &he en6ironment maintained $y the she"" inc"udes 6aria$"es that are de ined $y the
"ogin program! system initia"i>ation i"e! and the user initia"i>ation i"es% &he she""s support two types o 6aria$"es: (n6ironment 6aria$"es - (6ery she"" program started recei6es its in ormation a$out the user's en6ironment rom these 6aria$"es%Ioca" 6aria$"es - &his a ects on"y the current she""% Any su$she"" started wou"d not ha6e #now"edge o these 6aria$"es%

Kourne or Lorn She""

3A4IAKI(N6a"ue M

e,port 3A4IAKI( -or e,amp"e:

R\H8S&2A5( * \ e,port PS" 9 She"" :e au"t ?ser Initia"i>ation -i"es She"" Initia"i>ation -i"e &emp"ates Kourne Lorn 9 'etc's#e"'"oca"%pro i"e 'etc's#e"'"oca"%pro i"e 'etc's#e"'"oca"%"ogin 'etc's#e"'"oca"%cshrc \H85('%pro i"e \L85('%pro i"e \H85('%"ogin \H85('%cshrc ?ser s Initia"i>ation -i"es Seten6 6aria$"e 6a"ue-or e,amp"e

&he root user can customi>e these temp"ates to create a standard set o user initia"i>ation i"es to pro6ide a common wor# en6ironment or each user%?ser's can then edit their initia"i>ation i"es to urther customi>e their en6ironments or each she""%

;hen new user accounts are created $y root! these initia"i>ation i"es are automatica""y copied to each new user's home directory A dis# is physica""y composed o a series o "at! magnetica""y coated p"atters stac#ed on a spind"e% &he spind"e turns whi"e the read'write heads mo6e $etween p"atters! in unison! racia""y reading and writing data on the p"atters%

he ,ollowing !escribes the components o, a !isk'


One or more platters. Platters rotate aroun! the spin!le. Iea! actuator arm moves the rea!"write hea!s as a unit above an! below each platter.
A dis# is di6ided into the o""owing components: sectors! trac#s! and cy"inders%

Sector - &he sma""est addressa$"e unit on a p"atter! 8ne sector can ho"d /*+ $ytes o data% Sectors are a"so #nown as dis# $"oc#s% rack - A series o sectors positioned end-to-end in a circu"ar path% C&lin!er - A stac# o trac#s%

2ote - &he num$er o sectors per trac# 6aries with the radius o a trac# on the p"atter% &he outermost trac#s are "arger and can ho"d more sectors than the inner trac#s% Kecause a dis# spins continuous"y and the read'write heads mo6e as a sing"e unit! the most e icient see#ing occurs when the sectors to $e read or written to are "ocated in a sing"e cy"inder%

:e ining :is# S"ices :is#s can! $e di6ided into indi6idua" partitions! #nown as s"ices%
S"ices are groupings o cy"inders common"y used to organi>e data $y unction% -or e,amp"e! you can store critica" system i"es and programs in one s"ice! whi"e you can store user-created i"es in another s"ice on the same dis#% Note - Ky grouping cy"inders in this way! the amount o mo6ement re)uired $y the read'write heads to access a i"e is reduced! which impro6es dis# I'8 per ormance% A dis# under Sun8S can $e di6ided into eight s"ices! "a$e"ed s"ice 0 through s"ice 1% Ky con6ention! s"ice + is used to represent the entire dis#% It records items! such as the si>e o the actua" dis#! and the tota" num$er o cy"inders a6ai"a$"e or the storage o i"es and directories% &he Koot :is# &he s"ices shown a possi$"e con iguration con6ention or "ogica""y organi>ing data that is to $e stored on the $oot dis#% 2ot a"" s"ices ha6e to $e de ined on a dis#%

Disk (lice )aming $on%ention


&he u"" name o a s"ice is represented $y an eight character string which inc"udes the contro""er num$er! the target num$er the dis# num$er! and the s"ice num$er%

Controller number - Identi ies the host $us adapter! which contro"s communications $etween the system and dis# unit% It ta#es care o mo6ing dis# heads! data trans er! and "ocation o data on the de6ice% &he contro""er num$er is assigned in se)uentia" order! such as c0! c*! c+ and so on% arget number &arget num$ers such as t0! t*! t+ ! and tJ correspond to a uni)ue address switch setting that is se"ected or each dis#! tape! or 9:-485% An e,terna" dis# dri6e has an address switch! "ocated on the rear pane"% An interna" dis# has address pins which are Wumpered to assign its target num$er% 6isk number X &he dis# num$er is a"so #nown as the "ogica" unit num$er (I?2)% &his num$er re "ects the num$er o dis#s at the target "ocation% &he dis# num$er is a"ways set to do with em$edded S9SI dis#s% Slice number X A s"ice num$er ranging rom 0 to 1%
cFtFdFsF contro""er num$er! target num$er!:is# num$er! S"ice 2um$er%

:e6ice 2aming 9on6entions


In the So"aris 8perating! (n6ironment! a"" de6ices ha6e three di erent types o names! depending on how the de6ice is $eing re erenced%

9ogical !evice names Ph&sical !evice names Instance names

2ote - KS: de6ice names a"so e,ist in the So"aris 8perating (n6ironment i the KS: compati$i"ity pac#ages are insta""ed with either the :e6e"oper! (ntire :istri$ution! or (ntire :istri$ution p"us 8(5 So"aris So tware @roup% &he KS: de6ice names are typica""y used or $ac#wards compati$i"ity with o"d scripts! ( or e,amp"e! 'de6'sd8a)% Logical &evice !ames

<ou use "ogica" de6ice names! and in some cases $y regu"ar users! primari"y to re er to a de6ice on the command "ine% A"" "ogica" de6ice names are #ept in the 'de6 directory% Iogica" de6ice names are sym$o"ic "in#s to the physica" de6ice names #ept in the 'de6ices directory% &he "ogica" dis# de6ice names contain the contro""er num$er! target num$er! dis# num$er! and s"ice num$er% (6ery dis# de6ice has an entry in $oth the 'de6'ds# and 'de6'rds# directories! or the $"oc# and character (raw) dis# de6ices respecti6e"y%
F or e,amp"e:

+ ls "!ev"!sk
C0t0!0s0 through c0t0!0s3
Identi ies the de6ice names or dis# s"ices 0 through 1! or a dis# that is attached to contro""er 0! at target 0! on dis# unit 0% C0t3!0s0 throughc0t3!0s3 X Identi ies the de6ice names or dis# s"ices 0 through 1! or a dis# that is attached to contro""er 0! at target J! on dis# unit 0% c0t2!0s0 through c0t2!0s3 X Identi ies the de6ice names or dis# s"ices 0 through 1% 2orma""y! 9:485 de6ices are treated the same as dis#s% &his indicates a de6ice on contro""er 0! at target 6! and dis# unit 0%

*h(sical &evice !ames Physica" de6ice names uni)ue"y identi y the physica" "ocation o the hardware

de6ices on the system! and are maintained in the 'de6ices directory% 2ote 3arious hardware p"at orms ha6e di erent de6ice trees%A physica" de6ice name uni)ue"y identi ies the "ocation o the de6ice% It contains the hardware in ormation! represented as a series o node names! separated $y s"ashes! to indicate the path to the de6ice that re "ects hardware connecti6ity% -or e,amp"e: + ls ($ "!ev"!sk"c0t0!0s0 % Irw,rw,rw, * root root 06 7un *6 *O:01 'de6'ds#'c0t0d0s0 -H

. . " . . "!evices"pci7l, :0"pci7l: l"i!e73"!a!70 : 0 'a ,or example, an Ultra C system has the de4ice configuration tree-structure shown in ,igure C-D 8not all possible

de4ices are included


&he top-most directory in the hierarchy is ca""ed the root node o the de6ice tree% An o$Wect $e"ow the root node has a de6ice dri6er associated with it! which is ca""ed a "ea ! or $us ne,us node% 2ote - A de6ice dri6er is the so tware that communicates with the de6ice% &his so tware must $e a6ai"a$"e to the #erne" to use the de6ice%
&he #erne" identi ies the physica" "ocation o a de6ice $y associating a node with an address! nodenameZaddress! which is ca""ed the

physica"%de6ice name! or e,amp"e! dadZ0 %

Instance Names : Instance names are a$$re6iated names assigned $y the #erne"

or each de6ice on the system% An instance name is simp"y a shortened name or the physica" de6ice name% &wo e,amp"es are shown $e"ow:

s!n ;here sd is the dis# name and n is the dis# num$er! such as sd0! or the irst S9SI (sma"" computer system inter ace) dis# de6ice: !a!n where dad (direct access de6ice) is the dis# name and n is the dis# num$er! such as dad0! or the irst ide (integrated dri6e e"ectronics) dis# de6ice% #isting a System's Devices &he o""owing sections descri$e how to "ist a system's de6ices%

#he "etc"path#to#inst $ile


&n the Solaris 2perating 3n4ironment, the system records, for each de4ice, its instance name and number along with its physical name in the *etc*path+to+.inst file. These name are used by the kernel to identify e4ery possible de4ice. This file is read only at boot time. 2ote - &he de6ice instance num$er! shown in $o"d $e"ow! appears to the right o the de6ice instance name when recorded in this i"e% &he 'etc'pathEtoEinst i"e is maintained $y the #erne"! and it is genera""y not necessary! nor is it ad6isa$"e or the system administrator to e6er change this i"e%
+ more "etc"path#to#inst 5 F F F pciZ" ! 0R 0 RpciR F 'pciZ" !0'pciZ"!"'ideZJ'sdZ+!0R + RsdR F 'pciZ" !0'pciZ"!"'ideP3dadZ0!0R 0 [dadR F 'pciZ" ! 0'pciZ"!"'e$usZ"R 0 Re$usR (CD/&O') (dis ) 9aution^ &his i"e contains critica" #erne" state

(e-tended ,us) (floppy dis )

F 'pciZ" !0'pciZ"'"'e$usZ"' dthreeZ*0!J0+J 8R 0 R dR

F 'pciZ" !0'pciZ"("'e$usZ"'suZ*0!J06+ .R * RsuR (mouse) F 'pciZ" !0'pciZ"!"'e$usZ"'seZ*0!000000R 0 RseR (serial ports 0 and %) F 'pciei !0'pciZ"!"'e$usZ"'suZ*0!J0.J .R 0 RsuR #ey$oardM ('e,tended

F 'pciZ" ! 0'pciZ"!"'e$usZ"'ecppZ*0!J00J$cR 0 RecppR capa,ility parallel port)

FpciZ" ! 0''pciZ"! "'e$usZ"'S?2;!9S0+J*Z*0! +00000R 0 RaudiocsR semiconductor) F 'pciZ" ! 0'pciZ"! "'e$usZ"'po6MerZ*0! 1+0000R 0 RpowerR

(crystal

'power management ,us)

F 'pciZ" !0'pciZ"! "'networ#Z" ! *R 0 RhmeR

(-ast (thernet)

2ote X :i erent systems ha6e di erent physica" de6ice paths% &his e,amp"e shows an on$oard periphera" component interconnect (P9I) $us con iguration%

Sample "etc"path#to#inst $ile &he o""owing is a pathEtoEinst i"e rom a system that has a di erent $us architecture% In this case! it is an e,amp"e o a system that has an on$oard Sun system $us (S$us)%

+ more "etc"path#to#inst
F F 9aution^ &his i"e contains critica" #erne" state F F 's$usZ" !0R 0 Rs$usR F 's$usZ" !0'espdmaZe! .000000R 0 RdmaR F 's$usZ" !0'espdmaZe! .000000'espZe!..00000c 0 [espc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' sdZJ!0c J [sdc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' sdZ+!0c + [sdc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' sdZ*!0c * [sdc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' sdZ0!0c 0 [sdc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' sdZ6!0c 6 [sdc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' sdZ/!0c / [sdc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' sdZ0!0c 0 [sdc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' stZJ!0c J [stc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' stZ+!0c + [stc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' stZ*!0c * [stc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' stZ+!0c + [stc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' stZJ!0c J [stc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' stZ0!0c 0 [stc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' stZ/!0c / [stc F 's$usZ" !0'espdmaZe! .000000'espZe!..00000 ' stZ0!0c 0 [stc

he prtcon, Command

<ou use the prtcon command to disp"ay the systems con iguration in ormation! inc"uding the tota" amount o mem$ers insta""ed and the con iguration o system periphera"s ormatted as a de6ice ree%&he prtcon command "ists a"" instances o de6ices whether the de6ice is attached or not attached to the system &o 6iew on"y a "ist o attached de6ices on the system! e,ecute the o""owing commands%

+ prtcon, R grep (v not


System 9on iguration: Sun 5icrosystems sun0u 5emory si>e: 60 5ega$ytes System Periphera"s (So tware 2odes): S?2;!?"tra-/E*0 options! instance F0 pci! instance F0 pci! instance F0 e$us! instance F0 The ormat Command : <ou use the ormat command to disp"ay $oth "ogica" and physica" de6ice names or a"" current"y a6ai"a$"e dis#s% -or e,amp"e

+ ,ormat
Searching or dis#s %%% done A3AIIAKI( :ISL S(I(9&I82S: 0% c8t8d8 GS?20%+@ cy" J..0 a"t + hd *6 sec *J/H 'pciZ" !0'pciZ"!"'ideZe'dadZ0!0

*% clt3!O -S)N<.5@ c&l 3GG0 alt 5 h! $2 sec $30.


'pciZi !0'pciZ"'isptwoZ0'sdZJ!0 Speci y dis# (enter its num$er) : 2ote - Press 9ontro" Td to e,it the ormat command% power! instance F0 se! instance F0 su! instance F0 su! instance F" : dthree! instance F0 networ#! instance F0 S?2;!m60K! instance F0

ide! instance F0 dad! instance F0 sd! instance F+ pci! nstance F"

pseudo! instance F0 2ote - &he command grep -6 not is used to omit a"" containing the word RnotR rom the output%

%econfiguring De ices &he system recogni>es a new"y added periphera" de6ices i a


reconfiguration ,oot is in6o#ed% &his particu"ar $oot process adds the new de6ice to a new"y generated de6ice tree and to the 'de6 and 'de6ices directories%% &he o""owing steps recon igure a system to recogni>e a new"y attached dis#% * 9reate the 'recon igure i"e% &his i"e causes the system to chec# or the presence o any new"y instated de6ices the ne,t time it is powered on or $ooted% + touch "recon,igure +% Shut down the system% &his command $rings the system to an appropriate s"ate or turning the system power o to sa e"y a""ow or adding or remo6ing de6ices% + init 0 J% 0% &urn o the power to a"" e,terna" de6ices% Insta"" the periphera" de6ice! ma#ing sure the de6ice $eing added has no con "icting address with other de6ices on the system% &urn on the power to a"" e,terna" de6ices% &urn on the power to the system% &he system $oots to the "ogin screen% 3eri y that the periphera" de6ice has $een added $y issuing one o the o""owing commands: prtcon or ormat%
<8?

/% 6% 1%

8nce the dis# is recogni>ed $y the system!

can $egin the process o de ining dis# s"ices%

2ote - I the 'recon igure i"e was not created $e ore the system was shut down! you can in6o#e a manua" recon iguration $oot with the P485 "e6e" command: $oot -r % Configuring the Solaris Operating Environment Devices Ke ore the So"aris 8perating (n6ironment re"ease! you used the dr6con ig command to con igure! de6ices% &his command managed the physica" de6ice entries in the 'de6ices directory% &he commands dis#s! tapes! de6"in#s! and ports manage the "ogica" de6ice entries in the 'de6 directory% 2ote - &he ports command creates 'de6 entries or seria" "ines% 2ow! $oth the recon iguration $oot process and the updating o the! 'de6 and 'de6ices directories or dynamic recon iguration e6ents are hand"ed $y the de6 sadm command%

,or compatibility purposes, dr4config and the other commands are symbolic links to de4f sadm. &he de6 sadm command attempts to "oad e6ery dri6er in the system and attach to a"" possi$"e de6ice instances% It then creates the de6ice i"es in the 'de6ices directory and the "ogica" "in#s in the 'de6 directory% In addition to managing these directories! de6 sadm a"so maintains the! 'etc'pathEtoEinst i"e% !ev,sa!m Options &o restrict the use o the de6 sadm command to a speci ic de6ice c"ass! use the -c option% +!ev,sa!m (c !evice#class + !ev,sa!m (c !isk ;here the 6a"ues to de6iceEc"ass inc"ude: dis#! tape! port 6ideo and pseudo% -or e,amp"e: <ou can use the -c option more than once on the command "ine to speci y mu"tip"e de6ice c"asses% -or e,amp"e: # !ev,sa!m -c !isk -c tape (c au!io &o restrict the use o the de6 sadm command to con igure on"y de6ices or a named dri6er! user the -i option% -or e,amp"e:

!ev,sa!m (i !river#name

Some e,amp"es o using the -i option inc"ude: &o con igure on"y those dis#s supported $y the dad dri6er: + !ev,sa!m (i !a! &o con igure on"y those dis#s support $y the sd dri6er: # !ev,sa!m (i s! &o con igure de6ices supported $y the st dri6er: + !ev,sa!m (i st Adding a !ew &is' or Tape &rive 9ommon"y! the types o periphera" de6ices added to a wor#station are dis#s and tape dri6es/ ;hen adding a new dis#! you must issue the dis# command to create the 'de6 entries or the new"y attached dis#(s)% ;hen adding a tape dri6e! you must issue the tape command to create the 'de6 entries or the new"y attached tape dri6e(s)% Note - I adding misce""aneous de6ices or pseudo-de6ices! you use the de6"in#s command to add 'de6 entries or the new de6ices% Adding a !ew &is' &evice &he o""owing steps i""ustrate how to add a new tape de6ice: In6o#e the dr6con ig command

+ !rvcon,ig (i !a! or F dr6con ig -i sd +% In6o#e the dis#s command%

# !isks &his command creates sym$o"ic "in#s in the 'de6'ds# and 'de6'rds# directories pointing to the actua" dis# de6ice i"es "ocated in the 'de6ices directory% Adding a !ew Tape &rive &he o""owing steps i""ustrate how to add a new tape dri6e:

*%

In6o#e the dr6con ig command%

+ !rvccon,ig (i st
+% In6o#e the tapes command%

+ tapes
&his command creates sym$o"ic "in#s in the 'de6'rmt directory to the actua" tape de6ice i"es "ocated in the 'de6ices directory%

&is' %lices and the format 1tilit(


&he ormat uti"ity is a system administration too" used primari"y to prepare hard dis# dri6es or use in the So"aris 8perating (n6ironment% &hough you can use the ormat uti"ity to per orm a 6ariety o dis# management acti6ities! the main reason you use the ormat uti"ity is to di6ide a dis# into dis# s"ices% 2ote - &he So"aris 8perating (n6ironment insta""ation program a"so di6ides dis#s into dis# s"ices as part o insta""ing the So"aris 8perating (n6ironment re"ease% &o di6ide a dis# into s"ices! the system administrator wi"" need to:

Identi y the correct dis# P"an the "ayout o the dis# ?se the ormat uti"ity to di6ide into s"ices Ia$e" the dis# with new s"ice in ormation

8n"y the root user can use the ormat uti"ity% I ormat is run $y a regu"ar user! the o""owing error message is disp"ayed: ; ,ormat

Searching or dis#%%%done 2o permission (or no dis# ound) Disk &abels and Partition #ables (6ery dis# in the So"aris 8perating (n6ironment has a specia" area set aside or storing in ormation a$out the dis#'s contro""er! geometry! and s"ices% &his in ormation is ca""ed the dis#'s la,le4 Another term used to descri$e a dis# "a$e" is the 6o"ume ta$"e o contents (3&89)% &he dis#'s "a$e" 3&89 is stored on the irst sector o the dis#% &o "a$e" a dis# means to write s"ice in ormation onto the dis#% I the system administrator ai"s to "a$e" a dis# a ter de ining s"ices! the s"ice in ormation is "ost% An important part o the dis# "a$e" is the partition ta,le+ which identi ies! a dis# s"ices! the s"ice $oundaries (in cy"inders)! and the tota" si>e o the s"ices%
2ote -&he terms dis slice and dis partition are interchangea$"e%

9urrent partition ta$"e (origina"):


&ota" dis# cy"inders a6ai"a$"e ..O+ T + (reser6ed cy"inders)

part 0 * + J 0 / 6 1

&ag root swap $ac#up unassigned unassigned unassigned usr unassigned

-"ag wm wu wm wm wm win wm wm

9y"inders 0 +/+* 0 0 0 0 + .0* 0 -.000 (i,e -+/+0 *%* 0@J -+.00 -..O+ *01% 66LK 0 %0*@K 0 0 0 +%1J@K 0 -locks (+/+*'0'0) (J+0'0'0) (..O+'0'0) (0'0'0) (0'0'0) (0'0'0) +J.+J0/ J0+000 .00+O00 0 0 0

(60/*'0'0) /1*.*O/ (0!0'0) 0

Partition $oundaries must $egin and end with entire cy"inders%


-ie"d :escription

Part

S"ice num$er% 3a"id s"ice num$ers inc"ude 0 through 1%

&ag

A 6a"ue used to indicate how the s"ice is $eing used% 0 N unassigned * N$oot + N root J N swap 0 N usr / N $ac#up 6 N stand 1 N 6ar . N home O N a"ternates

-"ag

wm- dis# s"ice is writa$"e and mounta$"e% wu -dis# s"ice is writa$"e and unmounta$"e% This is the defaults state of slice dedicated for swap areas4 rm N dis# s"ice is read on"y and mounta$"e% ru - dis# s"ice is read on"y and unmounta$"e%

9y"inders

&he starting and ending cy"inder num$er or the dis# s"ice%

Si>e

&he s"ice si>e: 5$ytes (m$)! @$ytes (g$)! K"oc#s ($)! or 9y"inders (c)%

K"oc#s

&he tota" num$er o cy"inders and the tota" num$er o sectors per s"ice%

Defining Dis Slices :is# s"ices are de ined $y an o set and a si>e in cy"inders% &he o set is the distance rom cy"inder 0% -or e,amp"e:

(lice . !! O%erlaps &ntire Disk S"ice 0

S"ice * Si>e

S"ice 6

(i,e ./.0 $ylinders

J+0 9y"inders

(i,e 12/0 $ylinders

8 set 0 Digure 6-+

8 set +/+*

8 set +.0*

8 sets and Si>es or :is# Partitions

&he o set or s"ice 0 is 0 cy"inders and its si>e is +/+* cy"inders% S"ice 0 $egins on cy"inder 0 and ends on cy"inder +/+0% &he o set or s"ice * is +/+* cy"inders and its si>e is J+0 cy"inders% S"ice * $egins on cy"inder +/+* and ends on cy"inder +.00% &he o set or s"ice 6 is +.0* cy"inders and its si>e is 60/* cy"inders% S"ice 6 $egins on cy"inder +.0* and ends on the "ast a6ai"a$"e cy"inder ..O+% Defining Dis Partitions &he o""owing sections descri$e conditions that can occur when you are de ining dis# partitions% 1ndesirable Conditions ;hen creating or changing dis# s"ices! two types o undesira$"e conditions can occur: wasted dis# space and o6er"apping dis# space% ;asted :is# Space ;asted dis# space occurs when one or more cy"inders are not a""ocated to a dis#
s"ice% 8 set 0 8 set - +/+*

SiBe E 0CFFcyl

wasted

SiBe -G0F cyl

8 set 0

8 set +/+*

&he wasted dis# space condition can occur when you decrease the si>e o one s"ice! and do not adWust the starting cy"inder num$er o the ne,t dis# s"ice% (In the e-ample a,ove+ cylinders 3*6$ through 3*36 are unusa,le4)

Overlapping Disk Slices 86er"apping dis# s"ices occurs when one or more cy"inders are a""ocated to more than one dis# s"ice%

SiBe- 0C0) cyl

SiBe E G0F cyl

8 set 0

8 set - +/+*

SiBe E 0CHFcyl
8 set 0

wasted

SiBe -G0F cyl

8 set +/+*

:is# S"ices ;ith 86er"apping 9y"inders &his type o condition can occur when you increase the si>e o one s"ice and do not adWust the starting cy"inder num$er o the ne,t dis# s"ice% In the e,amp"e a$o6e cy"inders +/+* through +/O0 are o6er"apping two dis# s"ices% &he ormat uti"ity does-not warn you o o6er"apping dis# s"ices% ;arning - :o not change the si>e o dis# s"ices that are current"y in use% 9aution - ;hen a dis# with e,isting s"ices is repartitioned and re"a$e"ed! any e,isting data wi"" $e inaccessi$"e% (,isting data must $e copied to $ac#up media $e ore the dis# is repartitioned and restored a ter the dis# is re"a$e"ed% 9ocations o, 6isk Partition ables As a root user! when you se"ect a dis# to $e partitioned using the ormat uti"ity! a copy o the dis#Qs partition ta$"es is read into memory and is the current dis# "a$e"% &he ormat uti"ity a"so wor#s with a i"e ca""ed 'etc' ormat%dat! which is read when you in6o#e the ormat uti"ity% &he ormat%dat i"e is a ta$"e o a6ai"a$"e dis# types and a set o prede ined partition ta$"es that you can use to partition a dis# )uic#"y% On !isk In memor& "etc",ormat.!at

:is# 3&89

9urrent partition ta$"e


sa6e dis#

Prede ined partition ta$"es


name

6eri yR

"a$e"

print

Se"ect

<ou can se"ect a prede ined partition ta$"e rom 'etc' ormat%dat to $e read in as the dis#'s current "a$e" $y using the o""owing commands within the ormat uti"ity% se"ect - Se"ects a prede ined partition ta$"e rom the "ist o ta$"es stored in 'etc' ormat %dat% print - :isp"ays the se"ected partition ta$"e% "a$e" - ;rites the se"ected partition ta$"e to the dis#'s "a$e"% 6eri y - Iocates the dis#'s "a$e" and disp"ays the new in ormation% <ou can a"so sa6e a modi ied partition ta$"e to the 'etc' ormat %dat i"e or "ater use on other dis#s $y using the commands within -ormat% dis# - Se"ects a dis# name - 9reates a name or the modi ied partition ta$"e sa6e - Sa6es the named ta$"e to ' ormats or utures use &he ormat uti"ity! $y de au"t! sa6es dis# "a$e"s 6isk Partitioning &he o""owing steps descri$e how to di6ide a dis# into s"ices: As root! type ormatM at the prompt and press 4eturn% + ,ormat Searching or dis#s%%%done A3AIIAKI( :ISL S(I(9&I82S: 0% c0t0d0 GS?20%+@ cy" J..0 a"t + hd *6 sec *J/H 'pciZi !0000'pciZ"!"'ideZJ'dadZ0!0 *% 9"tJd0 GS?20%+@ cy" J..0 a"t + hd *6 sec *J/H 'pciZi ! 0000'pciZ"'isptwoZ0'sdZJ!0 Speci y dis# (enter its num$er): *&he ormat uti"ity searches or a"" attached dis#s% -or each dis# ound! ormat disp"ays its "ogica" de6ice name! hardware name! physica" parameters! and physica" de6ice name% + 9hoose the second dis# $y se"ecting the num$er "ocated to the "e t o that dis#'s "ogica" de6ice name ( or e,amp"e! *)%

&he ormat uti"ity's main menu is disp"ayed% se"ecting c"tJd0 Bdis# ormattedD -845A& 5(2?: dis# - se"ect a dis#

type partition current


ormat repair show "a$e" ana"y>e de ect $ac#up 6eri y sa6e-

- se"ect (de ine) a dis# type - se"ect (de ine) a partition ta$"e - descri$e the current dis#
- ormat and ana"y>e the dis# - repair a detecti6e sector - trans"ate a dis# address - write "a$e" to the dis# - sur ace ana"ysis - de ect "ist management - search or $ac#up ta$"es - read! and disp"ay ta$"es - sa6e new dis#'partition de initions

6o"name - set . character 6o"ume name &he speci ic menu se"ections that are used to di6ide a dis# into s"ices Partition X :isp"ays the partition menu "a$e"% X ;rites the current partition de inition to the dis# "a$e" 6eri y X 4eads and disp"ays the dis# "a$e" )uit X (,its the ormat uti"ity type partition at the ormat prompt%

- change '0' partition - change '*' partition - change '+' partition - change 'J ' partition - change d0Q partition - change d/' partition - change '6' partition - change d1' partition

se"ect a prede ined ta$"e modi y a prede ined partition ta$"e name the current ta$"e disp"ay the current ta$"e write partition map and "a$e" to the dis# e,ecute GcmdH! then return

&he partition menu is disp"ayed% &his menu ena$"es you to per orm the o""owing unctions:

- Speci ies the o set and si>e o up to eight partitions

se"ect - 9hooses a prede ined partition ta$"e rom ormat%dat modi y - 9hanges a prede ined partition ta$"e

name - Identi ies the current partition ta$"e print "a$"e - :isp"ays the current partition ta$"e - ;rites the current partition ta$"e to the dis# "a$e"

0% &ype print at the part it ion prompt to disp"ay the dis# "a$e" that was copied to 4A5 when the ormat uti"ity was started% 9urrent partition ta$"e (origina")
&ota" dis# cy"inders a6ai"a$"e: +0J6 T+ (reser6ed cy"inders)

Part

&ag

-"ag

9y"inders

Si>e Blocks

0 * + J 0 / 6 1

root swap $ac#up unassigned unassigned unassigned usr unassigned

wm wu wm wm wm wm wra wm

0 - +/+0 +/+* - +.00 0 - ..O+ 0 0 0 +.0* - ..O+ 0

*%*0@K *01%665K 0%0*@K 0 0 0 +%1J@K 0

(+/+*'0'0 ) (J+0'0'0) (..O+'0'0 ) (0'0'0) (0'0'0) (0'0'0) (60/*'0'0 ) (0'0'0)

+J.+J0/ J0+000 .00+O00 0 0 0 /1*.*O/ 0

&he name o the partition ta$"e is disp"ayed in parentheses in the irst "ine o the ta$"e% &he co"umns o the ta$"e ha6e the o""owing meanings:

Part - &he dis# s"ice num$er &ag - &he prede ined! optiona" tag -"ag - &he prede ined! optiona" "ag 9y"inders - &he starting and ending cy"inder num$er or the s"ice Si>e - &he s"ice si>e (',ytes+ 7,ytes+ %loc s+ or Cylinders) K"oc#s - &he tota" num$er o cy"inders and the tota" num$er o sectors per s"ice /% &ype 0 (>ero) to se"ect s"ice 0%
Partition.0 Pa"t 0 &ag 4oot -"ag wm 9y"inders 0-*.J0 Si>e O0*%+05K K"oc#s *.0/600

(nter partition id tag B root D: Gpress 4eturnH (nter partition permission "agsiwmD: cpress 4eturnH (nter new starting cy"B0D: Gpress 4eturnH (nter partition si>eB*.0S60.$! *.J*c! O0* % : 008m$

6%

;hen prompted or the Id tag enter a )uestion mar# (P) and press return! to "ist the a6ai"a$"e choice a tag can $e changed $y typing a new tag name%

(nter partition id tag(root) : P (,pecting one o the o""owing: (a$$re6iations o#):

unassigned usr home

$oot $ac#up a"ternates

root stand

swap 6ar

(nter partition id tagBrootD: I. -ress the 7eturn key to except the default tag.

.% when prompted or the permission "ags! enter a )uestion mar# (P) and press 4eturn! to "ist the a6ai"a$"e choices% 0 flag can ,e changed ,y typing the new flag name4 (nter partition permission "agsBwm): P (,pecting one o the o""owing: (a$$re6iations o#) : wm - read-write! maunta$"e wu - read-write! unmounta$"e rm - read on"y! mounta$"e ru - read on"y! unmount a$"e (nter partition permission "agsBwmW: O% *0% **% *+% partitionH print 9urrent partition ta$"e (unnamed): &ota" dis# cy"inders a6ai"a$"e: +0J6 T + (reser6ed cy"inders) Part 0 * + J 0 &ag -"ag root swap $ac#upM unassigned unassigned wm wu wm wm wm 9y"inders Si>e *%*0@K *01%665K 0%0*@K 0 0 K"oc#s (+/+*'0'0) (J+0'0'0) (..O+'0'0) (0'0'0) (0'0'0) 0 +J.+J0/ J0+000 .00+O00 0 %

Press the 4eturn #ey to e,cept the de au"t "ags% Press the 4eturn #ey to e,cept the starting cy"inder o 0 (>ero)% (nter the new partition si>e or s"ice 0% &ype print% % %

0 - +/+0 +/+* - +.00 0 - ..O+ 0 0

/ 6 1

unassigned usr wm wm unassigned

wm +.0* - ..O+ wm

0 +%1J@K 0

(0'0'0) (60/* 0'0) /1*.*J/

(0'0 '0) 0

The current partition table shows the change to slice F. &his change has resu"ted in wasted dis# space $etween s"ice 0 and s"ice *% &o remo6e this undesira$"e condition! adWust the starting cy"inder or the ne,t s"ice% *J% &ype * to se"ect s"ice num$er *%% * &ag swap -"ag wu 9y"inders *.J* - *O.J Si>e K"oc#s */0+*J

partitionH Part 0

1/%J05K (*/J'0'0)

(nter partition id tag BswapD : (nter partition permission "ags BwuD: (nter new starting cy"B*.J*D : .*J (nter partition si>e B*/0++R0$! */Jc! 1/%J0m$D: 60m$ *0% */% *6% *1% partitionH print 9urrent partition ta$"e (unnamed) : &ota" dis# cy"inders a6ai"a$"e: +0J6 T + (reser6ed cy"inders) Part 0 * + &ag root swap $ac#up -"ag wm wu wm wm wm wm 9y"inders 0 - +/+0 +/+* - +.00 0 - ..O+ 0 0 0 Si>e *%*0@K *01%665K 0%0*@K 0 0 0 K"oc#s (+/+*'0'0) (J+0'0'0) (..O+'0'0) (0'0'0) (0'0'0) (0'0'0) +J.+J0/ J0+000 .00+O00 0 0 0 Press the 4eturn #ey to se"ect the de au"t tag and the de au"t "ags% (nter the new starting cy"inder or s"ice *% (nter the new partition si>e or s"ice *% &ype print%

J unassigned 0 unassigned / unassigned

usr

wm wm

+.0* - ..O+ 0

+%1J@K 0

(60/*'0'0) (0'0'0)

/1*.*O/ 0

1 unassigned

&he current! partition ta$"e shows the change to s"ice *% &he new starting cy"inder or s"ice * is one greater than the ending cy"inder or partition 0% &his change- has resu"ted in wasted dis# space $etween s"ice * and s"ice 1% &o remo6e this undesira$"e condition adWust the starting cy"inder or the ne,t s"ice% *.% partitionH Part 1 1 &ag home -"ag wm 9y"inders *O.0-+0J0 Si>e +/%*05K K"oc#s (/*'0'0) /*000 &ype 1 to se"ect s"ice num$er 1%

(nter partition id tagBhomeD: (nter partition permission "agsBwmD: (nter new starting cy"B*.J*7: OJ/ (nter partition si>eB*/0++0$! */Jc! 1/%J0m$D: \ *O% +0% +*% Press the 4eturn #ey to se"ect the de au"t tag and the de au"t "ags% (nter the new starting cy"inder or s"ice 1% (nter the new partition si>e or s"ice 1! $y typing a \ sign%

2ote - (ntering a \ sign as a 6a"ue or the "ast partition si>e automatica""y assigns the ending cy"inder $oundary or the "ast s"ice% ++% partitionH print 9urrent partition ta$"e (unnamed): &ota" dis# cy"inders a6ai"a$"e: +0J6 T + (reser6ed cy"inders) Part 0 * + J 0 &ag -"ag 9y"inders (i,e root wm swap wu $ac#up wm unassigned wm unassigned wm 0 -+/+0 +/+* -+.00 0 -..O+ 0 0 *%*0@K *01%665K % 0% 0"@K 0 0 (+/+*'0'0) (J+0'0'0) (..O+'0'0) (0'0'0) (0'0'0) ' +J.+J0/ J0+000 .00+O00 0 0 K"oc#s &ype print to disp"ay the partition ta$"e%

/ 6 1

unassigned wm usr wm unassigned wm

0 +.0* -..O+ 0

0 +%1J@K 0

(0'0'0) (60/*'0'0) (0'0'0)

0 /1*.*O/ 0

Add up the cy"inders in the K"oc#s co"umn or s"ice 0! s"ice *! and s"ice 1% &he num$er shou"d e)ua" the tota" num$er o cy"inders contained in s"ice +% +J% partitionH "a$e" 4eady to "a$e" dis#! continueP y partitionH A ter chec#ing the partition ta$"e to ensure there are no errors! "a$e" the dis#%

Sa ing a Partition #able to the "etc",ormat.!at

$ile <ou can use this optiona" procedure to add the new"y created partition ta$"e to the 'etc' ormat%dat i"e% <ou sa6e a customi>ed partition ta$"e so you can use it to )uic#"y partition other dis#s o the same type on the system% &o sa6e a customi>ed partition ta$"e! at the partition menu:

*% &ype name to enter a uni)ue name or the current partition ta$"e% ("re8uently the dis
manufactures name is used4) partition. name (nter ta$"e name (remem$er )uotes) : S?20%+ +% (,it the partitionmenu% partition. Suit J% &ype sa6e to sa6e the new partition ta$"e in ormation% (nter the - u"" pathname or the 'etc' ormat%dat i"e% ,ormat. save Sa6ing new partition de inition% (nter i"e nameBR%' ormat%datRD: 'etc' ormat%dat Locating and 1sing the Customi5ed *artition Table &o retrie6e a customi>ed partition ta$"e! at the ormat menu: *% +% &ype partition- ormat partition Iocate and se"ect the customi>ed-partition ta$"e rom the "ist! using its assigned num$er% partition. select

0% origina" *% unamed +% S?20%+ Speci y ta$"e (enter its num$er)(8) : + J% Ia$"e the dis# with the se"ect partition ta$"e partitions label 4eady to "a$e" dis#! continueP yes 0% (,it the partition menu partitionH )uit /% 4ead the new dis# "a$e"% ormatH 6eri y

(,it the ormat uti"ity% ormatH )uit

&epartitioning a Dis with the modify Command <ou wi"" need to change the si>e o s"ices on a dis#! as storage re)uirements grow! or diminish% &he easiest way to accomp"ish this is using the modi y command rom the partition menu% ;arning - ;hen a dis# with e,isting s"ices is repartitioned and re"a$e"ed! any e,isting data is inaccessi$"e% (,isting data must $e copied to $ac#up media $e ore the dis# is repartitioned and restored a ter the dis# is re"a$e"ed% &he modi y command a""ows root to create s"ices $y speci ying the si9e o each s"ice without ha6ing to #eep trac# o starting cy"inder $oundaries% It a"so #eeps trac# o any dis#-space remainder in the ree hog s"ice% &he ree hog s"ice is used as a dis# space accumu"ator that e,pands and contracts as other s"ice si>es are changed% !sing the mo!i,& Command &he o""owing steps descri$e how to change the si>e o a dis# s"ice% In this procedure s"ice 0 is increased rom *+.5$ytes to +005$ytes% *% +% F ormat &ype ormat at the prompt and press 4eturn% Se"ect a dis# $y typing the appropriate num$er%

Searching or dis#s%%%done A3AIIAKI( :ISL S(I(9&I82S: 0% c0t0d9 GS?20%+@ cy" J..0 a"t + hd *6 sec *J/H 'pciii !0000'pciZ"!"'ideZJ'dadZ0!0

*% c"tJd8 GS?20%+@ cy" JJ.0 a"" + hd *6 sec *J/H


'pciZi ! 0000'pciZ"'isptwoZ0'sdZJ! 0 Speci y dis# (enter its num$er): * &he ormat uti"ity's main menu is disp"ayed% Se"ecting c"tJdo (dis# ormatted) -845A& 5(2? dis# type - se"ect a dis# - se"ect (de ine) a dis# type

partition- se"ect (de ine) a partition current ormat repair show "a$e" - descri$e the current dis# - ormat and ana"y>e the dis# - repair a de ecti6e sector - trans"ate a dis# address - write "a$e" to the dis#

ana"y>e - sur ace ana"ysis de ect $ac#up 6eri y sa6e in)uiry 6o"name - de ect "ist management - search or $ac#up "a$e"s - read and disp"ay "a$e"s - sa6e new dis#'par tit ion de initions - show 6endor! product and re6ision - set .-character 6o"ume name

:GcmdH - e,ecute GcmdH! then return )uit

J% &ype partition% &he partition menu is disp"ayed% ormatH partition PA4&I&I82 5(2?: 0 * + J 0 / 6 $ / change - change - change - change - change - change - change - change d0Q d*Q d+Q dJQ d0Q d/Q d6Q d1Q partition partition partition partition partition partition partition partition

se"ect modi y name print "a$e"

- se"ect a prede ined ta$"e - modi y a prede ined partition ta$"e - name o the current ta$"e - disp"ay the current ta$"e - write partition map

^GcmdH - e,ecute GcmdH% &hen return )uite partitionH 0% &ype modi y and press 4eturn% partitionH modi y Se"ect partitioning $ase: 0% 9urrent partition ta$"e (origina")% *% A"" -ree Hog 9hoose $ase (enter num$er) /% B0DP G4eturnH

Press the 4eturn #ey to accept the de au"t se"ection% &he current partition ta$"e is disp"ayed%

Part Tag 0 * + J 0 / 6 1

-"ag 9y"inders root wm swap wu $ac#up wm unassigned wm unassigned wm unassigned wm ?sr wm unassigned wm 0 *O0 0 0 0 0 J*+ 0 -..O+ - *.O - J** -..O+ (i,e +00%JO5K *+.%615K 0%00@K 0 0 0 J%61@K 0 -locks (*O0'0'0) (*++'0'0) (..O+'0'0) (0'0'0) (0'0'0) e0'0'0b (J/6.'0'0) (0'0'0) 0*0000 +6J/+0 .00+O00 0 0 0 1./J160 0

:o you wish to continue creating a new partition ta$"e $ased on a$o6e ta$"e ByesDP G4eturnH 6% 1% Se"ect the de au"t option $y pressing the 4eturn #ey! or typing yes Press the 4eturn #ey to accept s"ice 6 (the de au"t) as the -ree Hog partition% I s"ice 6 does not ha6e space a""ocated to it! then you must speci y another s"ice%

-ree Hog partition B6D P G4eturnH

1sing the Free -og %lice ;hen root in6o#es the ormat uti"ity to change the si>e o one or more dis# s"ices! a RtemporaryR s"ice must $e designated that e,pands and shrin#s to accommodate the resi>ing operations% &his temporary s"ice is used to donate space when another s"ice is e,panded! and it recei6es! or hogs! the discarded space when a s"ice is shrun# -or this reason! the designated temporary s"ices sometimes ca""ed the tree hog% &he ree hog s"ice e,ists on"y during insta""ation! ormat% &here is no permanent ree hog s"ice during norma" operations% .% (nter the si>e o s"ice 0 as +00m$ and press 4eturn%

(nter si>e o] partition '0' B+6J/+0$! *++c! *+.%61m$! 0%*Jg$D: +00m$ (nter si>e o partition d*Q B+6J/+0$! *++c! *+.%61m$! 0%*Jg$D: G4etunH B0$! 0c! 0%00m$! 0%00g$D: G4etunH B0$! 0c! 0%00m$! 0%00g$D: G4etunH

(nter si>e o partition 'J' (nter si>e o partition '0'

(nter si>e o partition '/Q B0$! 0c! 0%00m$! 0%00g$D: G4etunH (nter si>e o partition '1' B0$! 0c! 0%00m$! 0%00g$D: G4etunH

O% Press the 4eturn #ey through the remaining s"ices (*! J! 0! /! 1) to de au"t to their current si>es% S"ice 6 is s#ipped $ecause it has $een designated as the -ree Hog partition% In the partition ta$"e! s"ice 6 has decreased in si>e as the si>e o s"ice 0 increased% *0% Press 4eturn to con irm using this modi ied partition ta$"e% 8#ay to ma#e this the current partition ta$"e ByesDP G4eturnH **% 2ame the modi ied partition ta$"e and press 4eturn% (nter ta$"e name (remem$er )uotes): c"tJd0%0g$ ;rite the modi ied partition ta$"e to the dis# $y typing yes and pressing 4eturn% 4eady to "a$e" dis#! continueP yes *J% &ype )uit (or )) and press 4eturn to e,it the partition menu% partitionH auit &hy main ormat menu is disp"ayed% 3iewing the :is#'s 3&89 <ou can use two methods or "ocating and 6iewing a %%"in#'s "a$e"! or 3&89% &he irst method is to use the 6eri y command rom the ormat uti"ity% &he second method is to in6o#e the prt6toc command rom the command "ine%

*+%

Reading a &is'6s VT.C 1sing the verif( Command


I4 ormatH 6eri y Primary "a$e" contents: ascii name N GS?20%+@ cy" J.O0 a"t +'hd *6 sec *J/H pcy" ncy" N JJ.+ N J..0 At the ormat prompt! enter the command 6eri y and press 4eturn%

acy"

+ *6

nhead N nsect

N *J/

Part

Tag

Flag

Cylinders

Size

Blocks

0 * + J 0 / 6 1

root swap $ac#up

wm wu wm

0-*.O *O0 - J** 0 - ..O+ 0 0 0

+00%JO5K *+.%615K 0%00@K 0% 0 0 J%61@K 0

(*O0'0'0) (*++'0'0) (..O+'0'0) (0'0'0)

0*0000 +6J/+0 .00+O00 0

unassigned wm unassigned wm assigned usr wm

(0'0'0) (0'0'0) (J/6.'0'0) (0'0-0) 0

wm J*+ - ..O+ 0

1./J160 0

unassigned wm

ormatH )uit

+%

&ype )uit (or )) and press 4eturn to e,it the ormat menu%

%eading a Disk's (#)C !sing the prtvtoc Command &he prt6toc command gi6es you the a$i"ity to 6iew a dis#'s 3&89 rom the command "ine% -or e,amp"e! F prt6toc 'de6'rds#'c"tJd8s+ S 'de6'rds#'c0t0d0s+ partition map S :imensions: S S S S S /*+ $ytes'sector *J/ sectors'trac# *6 trac#s'cy"inder +*60 sectors'cy"inder J..+ cy"inders

J..0 accessi$"e cy"inders

S -"ags: S
S

*: unmounta$"e
*0: read-on"y -irst Sector 9ount Iast Sector 5ount :irectory

S Partition 0 * + 6

&ag + J / 0

-"at 00 0* 00 00

Sector 0 0*0000 0

00.+00 00.+00 ' 61*160 *0.+*/O .J.0.00 .J.01OO

61JO+0 1106..0 .J.01OO 'usr

&he dis# "a$e" in ormation inc"udes the o""owing ie"ds: :imension- :escri$es the physica" dimensions o the dis#%

-"ags - :escri$es the "ags "isted in the partition ta$"e% Partition (or s"ice) - :escri$ed in &a$"e 6-* on page 6-/ &ag - :escri$ed in &a$"e 6-* on page 6-/ -"ags - :escri$ed in &a$"e 6-* on page 6-/ 00Nwm ' 0*Nwu ' *0Nrm ' ""Nru -irst Sector - :e ines the irst sector '(dis# $"oc#) o the s"ice%

Sector 9ount - :e ines the tota" num$er o sectors in the s"ice% IastR Sector - :e ines the "ast sector num$er in the s"ice% 5ount :irectory - Indicates i it is a i"e system current"y in use% I the ie"d is empty the s"ice is current"y not $eing used% I a directory name appears in this ie"d! the s"ice is current"y $eing used to store data used to store data% The mthard Command <ou shou"d sa6e a dis#'s 3&89 to a i"e! using the prt6toc command% &his a""ows you to re"a$e" the dis# using the mthard command! shou"d one o the o""owing situations occur% &he 3&89 on the dis# has $een destroyed% <ou accidenta""y changed the partition in ormation on the dis#! and did not sa6e a $ac#up "a$e" in the 'etc' ormat %dat i"e% Ky sa6ing the output o the prt6toc command into a i"e on another dis#! you can use it as the data file argument to mthard to re"a$e" the dis#% ,mthar! (s datafile "!ev"r!sk"c+t+!+s5 ;arning - &he mthard command cannot write a dis# "a$e" on an un"a$e"ed dis#% ?se the ormat uti"ity or this purpose%

I one o the situations descri$ed a$o6e has occurred! and the 3&89 was pre6ious"y sa6ed to a i"e! you can: *% 4un ormat! se"ect the dis#! and "a$e" it with the de au"t partition ta$"e%

34 ?se the mthard command to write the desired "a$e" in ormation! sa6e to a data i"e $ac# to the dis#% -or e,amp"e: + ,mthar! -s "vtoc"clt3!O "!ev"r!sk"clt3!Os5

$ile System #ypes Supported by the Solaris )perating *n ironment


&he So"aris 8perating (n6ironment supports three di erent types o i"e systems:

6isk(base! ,ile s&stems 6istribute! ,ile s&stems Pseu!o ,ile s&stems

Dis /%ased "ile System :is#-$ased i"e systems inc"ude hard dis#s! 9:-485s! dis#ettes! and :3:%

u,s &he standard ?2IA i"e system% ?nder the So"aris 8perating (n6ironment! the u s i"e system is $ased on the Ker#e"ey ast i"e-system% hs,s - &he High Sierra i"e system is a specia" purpose i"e system de6e"oped or use on 9:-485 media% pc, s - &he P9 i"e system is a ?2IA imp"ementation o the :8S i"e attri$ute ta$"e (-A&J+) i"e system% It a""ows the So"aris 8perating (n6ironment to access P9-:8S ormatted i"e systems! gi6ing users direct read'write access to P9-:8S i"es using ?2IA commands% u!, -&he ?ni6ersa" :is# -ormat i"e system or optica" storage targeted at :3: and 9:-485 media% Pro6ides or uni6ersa" data e,change and supports road-write operations% Distri,uted "ile Systems :istri$uted i"e systems pro6ide networ# access to i"es system resources%

n,s - &he 2etwor# i"e system a""ows users to share i"es $etween many types o systems on the networ#% It pro6ides a method o ma#ing a dis# on one system appear as though it was connected to another system%

*seudo File %(stem Pseudo i"e systems are memory-$ased% &hese -i"e system types pro6ide access to #erne" in ormation and aci"ities%

tmp,s - &he &emporary i"e system or i"e storage in memory without o6erhead o writing to a dis#-$ased i"e system% It is created and destroyed e6ery time the system is re$ooted% swap,s -&he Swap i"e system used $y the #erne" to manage swap space on dis#(s)% ,!,s - &he -i"e :escriptor i"e system pro6ides e,p"icit names or opening i"es using i"e descriptors ( or e,amp"e!'de6' d'0! 'de6' d'*! 'de6' d'+) in the 'de6' d directory%

proc,s -&he Process i"e system contains a "ist o acti6e processes! $y process num$er! in the 'proc directory% In ormation in this 'directory is used $y commands such as the ps command% Introducing &he So"aris 8perating (n6ironment ? s -i"e System

&o a user in the So"aris 8perating (n6ironment! a i"e system is a co""ection o i"es and directories used to store and organi>e data or access $y the system and users% &o the operating system! a i"e system is a co""ection o contro" structures and data $"oc#s that occupy the space de ined $y a partition and a""ow or the storage and management o data% &he So"aris 8perating (n6ironment stores data in a "ogica" i"e hierarchy% &his i"e hierarchy is re erred to as the So"aris directory tree! which is ormed $y a num$er o i"e systems%
root ( ' )

opt

usr

de6

#erne"

etc

6ar

e,port

tmp

$in

"i$

rds#

ds#

de au"t

init%d

shadow adm

home

passwd

"ogin

su

user*

user+ user

2ote - &his is not a comp"ete representation o a So"aris directory tree% (6ery u s i"e system must $e created on a dis# s"ice $e ore it can $e used in the So"aris 8perating (n6ironment% 9reating a i"e system on a dis# s"ice ena$"es the So"aris 8perating (n6ironment to store ?2IA directories and i"e +asic Disk Structures

#he Disk &abel ,(#)C- &he dis# "a$e" (3&89) contains the partition ta$"e or! the dis#! and is "ocated in the irst dis# sector (/*+-$yte $"oc#s)% A dis# partition can contain a i"e system that the So"aris 8perating (n6ironment interprets as an organi>ation o directories and i"es% #he +oot +lock &he $ootstrap program ($oot$"#) is ound in the ne,t */ dis# sectors% 8n"y the root i"e system has an acti6e $oot $"oc#! a"though space is a""ocated or a $oot $"oc# at the $eginning o each i"e system% #he Superblock &he i"e system is descri$ed $y its super$"oc#% &he super$"oc# is contained in the *6 dis# sectors o""owing the $oot $"oc#% &he super$"oc# is a ta$"e o in ormation a$out the i"e system inc"uding: &he num$er o data $"oc#s &he num$er o cy"inder groups &he si>e o a data $"oc# and ragment A description o the hardware (deri6ed rom the "a$e") &he name o the mount point -i"e system state "ag: c"ean! sta$"e! acti6e! "ogging! or un#nown +ackup Superblocks Kecause the super$"oc# contains critica" data! it is rep"icated in each cy"inder group to protect against catastrophic "oss% &his is done when the i"e system is created%

Cylinder "roups :Ky di6iding the partition into cy"inder groups% (the minimum de au"t si>e is *6 cy"inders

per group)! dis# access is impro6ed% &he i"e system constant"y optimi>es the dis# $y p"acing i"e data in one cy"inder group! thus reducing head tra6e"% &he i"e system stores i"es across se6era" cy"inder groups i needed%
C(linder 0roup )loc's

&he cy"inder group $"oc# is a ta$"e that descri$es the cy"inder group! inc"uding: &he num$er o inodes &he num$er o data $"oc#s in the cy"inder group &he num$er o directories -ree $"oc#s! ree inodes! and ree ragments in the cy"inder group &he ree $"oc# map &he used inode map Inode #able &he inode ta$"e contains the inodes or the cy"inder group% An inode ( rom the term indenode) is the interna" description o a i"e and the "ocation o its data $"oc#s% (ach cy"inder group contains a portion o the tota" num$er o inodes% Data +locks A data $"oc# is the unit o storage or data in the So"aris 8perating (n6ironment i"e system% &he data $"oc# is .*O+ $ytes in si>e $y de au"t Inodes An inode contains the o""owing in ormation a$out a i"e:

&he type o i"e and the access modes &he ?I: and @I: num$ers o the i"ers owner and group &he si>e o the i"e &he time the i"e was "ast accessed or modi ied! and the inode changed &he tota" num$er o data $"oc#s used $y! or a""ocated to the i"e

&he inode contains two types o pointers: direct pointers and indirect pointers%

ndirect *ointers &he three types o indirect pointers are: Single in!irect pointer - A sing"e indirect pointers re ers to a i"e system $"oc# containing pointers to data $"oc#s% &his i"e system $"oc# contains +00. additiona" addresses o .-L$yte data $"oc#s! which can point to an additiona" *6 5$ytes o data% 6ouble in!irect pointer - A dou$"e indirect-pointer re ers to a i"e system $"oc# containing sing"e indirect pointers% (ach indirect pointer re ers to a i"e system! $"oc# containing the data $"oc#! pointers% :ou$"e indirect pointers points to an additiona" J+ @$ytes o data% riple in!irect pointer - A trip"e indirect pointer can re erence up to an additiona" 10 &$ytes o data% Howe6er! the ma,imum i"e si>e is "imited to * &$yte in a u s i"e system% Data +locks &he rest o the space a""ocated to the i"e system is occupied $y data $"oc#s! a"so ca""ed storage $"oc#s% :ata $"oc#s are a""ocated $y de au"t in .-L$yte "ogica" $"oc# si>es! and urther di6ided into a *-L$yte ragment% -or a regu"ar i"e! the data $"oc#s contain the contents o the i"e% -or a directory! the data $"oc#s contain entries that gi6e the inode num$er and the i"e name o those i"es contained in that directory% &ata )loc's and Fragmentation &he method used $y the u s i"e system to store the contents o a i"e% which is not "arge enough to i"" one data $"oc# is ca""ed fragmentation4
:ata $"oc#s can $e di6ided into eight ragments o *0+0 $ytes each! or the storage o sma"" i"es% i a i"e! contained in a ragment! -grows and re)uires more space! it is a""ocated one or more ragments in the same data $"oc#%

Creating u,s Dile S&stems (6ery dis# s"ice on a new"y partitioned dis# that is used to store directories or i"es must ha6e a i"e system created on it irst% As root! you can construct a u s i"e system on a dis# s"ice using the new s command% &he new s command is a ront-end to the m# s command used to create i"e system i"e systems% &he new s command is "ocated in the 'usr's$in directory% 9aution - &he new s command is destructi6eM it o6erwrites any data that resides on the se"ected dis# s"ice% Creating a u s "ile System *% As root! create a i"e system on the irst s"ice o a new"y partitioned dis#% -or e,amp"e:

+ new,s "!ev"r!sk"clt3!0s0 new s: construct a new i"e system 'de6'rds#'c"tJd0s0: (y'n)P y 'de6'rds#'c"tJd0s0: 0*01+0 sectors in J0+ cy"inders *1 trac#s .0 sectors +00%/5K in *O cy" groups (*6 c'g!% *0%6+5K'g!- /*+0 i'g) super-$"oc# $ac#ups ( or sc# -- u s -o $NF) at:

J+! +*.1+! 0J1*+! 6///+! .1JO+! *0O+J+! *J*01+! */+O*+! *101/+! +00+1+! +6+**+! +.JO/+! J0/1O+! J+16J+! J0O01+! J1*J*+! JOJ*/+

*O6/O+! +*.0J+!

+% &he new s command as#s or con irmation $e ore continuing% 3eri y that the correct dis# s"ice on the correct dis# is se"ected% &o proceed! type: y &o terminate the process'type: n &he new s command disp"ays in ormation a$out the new i"e system $eing created% &he irst "ine printed $y new s descri$es the $asic dis# geometry% &he second "ine descri$es the u s i"e system created in this s"ice &he third and remaining "ines "ist the "ocations o the $ac#up super $"oc#s% 2ote - &his process a"so creates a "ostT ound directory or the u s i"e system% A directory that is used $y the i"e system chec# and repair ( sc#) uti"ity% J% Steps * and + a$o6e are repeated or e6ery dis# s"ice (on any new"y partitioned dis#) that needs to contain a i"e system% &he new s command uses a minimum percentage o ree space to $e maintained in the new i"e system% &his ree space in the i"e system is re erred to as minfree44 It speci ies the amount o space on the s"ice that is reser6ed or he"d $ac# rom regu"ar users% <ou can use the new s -m :free command! to preset the percentage o ree space when you create a new i"e system% &o change the minimum percentage 6a"ue o i"e system! the system administrator can use the command: tune,s (m T ,ree -or e,amp"e: + tune,s (m $ "!ev"r!sk"clt3!OsO

;or ing ;ith "ile Systems


8nce you ha6e created a i"e system! you must attach it to the So"aris 8perating (n6ironment directory tree! at a mount point4 Amount point! is a directory that is the point o connection or a i"e system! i"e systems are common"y re erred to $y the names o their mount points% -or e,amp"e! the ' (root) i"e system or the usr i"e system! In the So"aris 8perating (n6ironment! you use the mounting process to attach indi6idua" i"e systems to their mount points on the directory tree% &his action ma#es a i"e system accessi$"e to the system and to the users! <ou use the unmounting process to detach a i"e system rom its mount point in the directory tree% &his action ma#es a i"e system una6ai"a$"e to the system or users%

-igure .-* i""ustrates how the directory tree spans rom one i"e system to the ne,t% -i"e system do not contain their own mount point directories%

Identifying 'ounted "ile Systems

#he mount Command


A"" users can determine which i"e systems are current"y mounted $y running the mount command! which is "ocated in the 's$in directory% #he "etc"mnttab Dile &he mount command maintains the 'etc'mntta$ i"e! mounted i"e system ta$"e%

(ach time a i"e system is mounted! an entry is added to this i"e $y mount% ;hene6er a i"e system is unmounted! its entry is remo6ed rom the mntta$ i"e% A typica" 'etc'mntta$ i"e is shown $e"ow: + mount ' on 'de6'ds#'c0t0d0s0 read'write'setuid on &hu Apr *J *1:+/:+O +000 'usr on 'de6'ds#'c0t0d0s6 read'write'setuid on &hu Apr *J *1:+6:J0 +000 '6ar on 'de6'ds#'c0t0d0s" 'read'write on 5on 5ar 6 *1:/.:+0 +000

'proc on 'proc read'write'setuid on &hu Apr *J *1:+6:+. +000 'de6%' d on d read'write'setuid on &hu Apr *J *1%+6:J* +000 'etc'mntta$ on mntta$ read'write'setuid on &hu Apr *J *1:+6:J0 +000 '6ar'run on swap read'write'setuid on &hu Apr *J *1:+6:J0 +000 'tmp on swap read'write'setuid on &hu Apr *J *1:+6:J. +000 'opt on 'de6'ds#'c0t0d0s/ read'write'setuid on &hu Apr *J *1:+6:J. +000 'e,port'home on 'de6'ds#'c0t0d0s1 'read'write on 5on 5ar 6 *1:/.:+* +000 &he ie"ds in the mount output are descri$ed in the e,amp"e $e"ow% 'e,port'home on 'de6'ds#'c0t0d0s1 'read'write on 5on 5ar 6 *1:/.:+* +000

mount point

de6ice name

mount options

date and time mounted

Aount Point - &he mount point! or directory name where the system is to $e attached to within the root i"e system! ( or e,amp"e: 'usr! 'opt)% 6evice Name - &he name o the de6ice that is mounted at the mount point% &his $"oc# de6ice is where the i"e system is physica""y "ocated% Aount Options - &he "ist o mount options in e ect or the i"e system% 6ate an! ime Aounte! - &he date and time the i"e system was mounted to the directory tree%
2ote - 2o administration is re)uired or the 'etc'mntta$ mount ta$"e

.ount #able Changes in "etc"mnttab In pre6ious So"aris 8perating (n6ironment re"eases! 'etc'mntta$ was a te,t i"e that stored in ormation a$out mounted i"e systems% In So"aris this i"e is an mnt s i"e system -that pro6ides read-on"y' in ormation direct"y rom the #erne" a$out mounted i"es systems or the "oca" host% 2ote - 2o administration is re)uired or the 'etc'mntta$ mount ta$"e The /var/run File %(stem &he '6ar'run i"e system is a new tmp s mounted i"e system! in the So"aris 8perating (n6ironment% It is the repository or temporary system i"es that are not needed across system re$oots in this So"aris 8perating (n6ironment re"ease% It is mounted as a pseudo i"e system rather than a dis#-$ased i"e system% &he '6ar'run directory re)uires no administration% or security reasons! it is owned $y root% &he ' tmp directory continues to $e repository or temporary i"es .ounting file Systems The 'usr's$in'mount

&he mount command not on"y "ists which i"e systems are current"y mounted! it is a"so pro6ides the root user with a method or mounting i"e systems% <ou can mount i"e systems manua""y $y root running the mount command! or the system can automatica""y mount i"e systems at $oot time a ter consu"ting the 'etc'6 sta$ i"e% 2ote - he "etc"v,stab i"e "ists i"e systems to $e mounted when the system is $ooted% &his i"e is co6ered in detai" "ater in this modu"e 'ounting file Systems #he "usr"sbin"mount &he mount command not on"y "ists which i"e systems are current"y mounted! it is a"so pro6ides the root user with a method or mounting i"e systems% <ou can mount i"e systems manua""y $y root running the mount command! or the system can automatica""y mount i"e systems at $oot time a ter consu"ting the 'etc'6 sta$ i"e% 2ote -&he 'etc'6 sta$ i"e "ists i"e systems to $e mounted when the system is $ooted% &his i"e is co6ered in detai" "ater in this modu"e%
Command format mount

B option (s)<

de6iceEname mountEpoint

Mounting a Local File %(stem Manuall( &o mount a "oca" i"e system manua""y! you need to #now the name o the de6ice where the i"e system resides! and its mount point directory name% -or e,amp"e:

+ mount "!ev"!sk"c0t0!0s3 "e*port"home In this e,amp"e! the de au"t action is to mount the i"e system with the o""owing pre erences: read'write! setuid! no"ogging! and "arge i"es% rea!"write( Indicates the i"e permissions% Access is $ased on the permissions o the i"es and directories in the i"e system% (&he de au"t or hs s i"e systems is ro%) setui!- Permits the e,ecution o setuid programs in the i"e system%f no logging - :isa$"es "ogging or the u s i"e system% large ,iles X A""ows or the creation o i"es "arger than + giga$ytes% A i"e system mounted with this option may contain "arge si>e i"es% 2ote - :ue to i"e system o6erhead! the "argest i"e si>e that can $e created is .66 @$ytes%

!sing )ptions /ith the mount Command


;hen using mount options on the command "ine! the options are preceded $y the -o "ag% ;hen mu"tip"e options are used! they are entered as a comma separated "ist o""owing the o "ag% mount (o options0 option0... !evice name mount point Some options used to mount "oca" i"e systems inc"ude: ro! nosetuid! noatime! no"arge i"es! and "ogging%

ro ( Aounts the ,ile s&stem as rea!(onl&.

&he o""owing is an e,amp"e using this option on the command "ine: + mount (o ro "!ev"!sk"c0t0c0s3 "e*port"home nosui! - Prohi$its the e,ecution o setuid programs in the i"e system% &his does not restrict the creation o setuid programs% &he o""owing e,amp"e shows the use o mu"tip"e options on the command "ine: + mount (o ro: nosui!. "!ev"!sk"c0t0!0s3 "e*port"home noatime - Suppresses the time "ast accessed modi ication on i"es! reducing dis# acti6ity on a i"e system where access times are not important% Speci ying this option genera""y impro6es i"e access times and $oots o6era"" per ormance% -or e,amp"e: + mount (o noatime "!ev"!sk"c$t0!0s3 "e*port"home nolarge,iles Pre6ents a i"e system containing one or more ["arge i"esc rom $eing mounted% -or e,amp"e% + mount (o nolarge,iles "!ev"!sk"c0t0!0s3 " e*port"home ?sing the no"arge i"es option ai"s i the i"e system to $e mounted contains a "arge i"e! or did contain a "arge i"e at one time% I the i"e system current"y contains a "arge i"e! and root needs to mount it with this option! then the "arge i"e(s) must $e "ocated! and mo6ed or remo6ed rom the i"e system% &hen you must run the i"e system chec# program manua""y to update the super$"oc# in ormation% &he mount wi"" a"so ai" i the i"e system at one time contained a "arge i"e! e6en though it was mo6ed or remo6ed% <ou must run the i"e system chec# program to c"ear the o"d in ormation and a""ow the i"e system to $e mounted% 2ote - 5odu"e O! R5aintaining -i"e SystemsR descri$es the i"e system chec# program ( sc#)% "ogging-(na$"es "ogging or a u s i"e system% -or e,amp"e: + mount (o logging "!ev"!sk"cOtO!Os3 "e*port"home

?-S i"e system "ogging is a process o storing i"e system transactions! or changes that ma#e up a comp"ete i"e or directory operation! into a "og $e ore they are app"ied to the i"e system% 8nce a transaction is stored! the comp"ete transaction can $e app"ied or reapp"ied to% the i"e system "ater% &he u s "og is a""ocated rom ree $"oc#s in the i"e system% It is si>ed appro,imate"y * 5$yte per * @$yte! up to a ma,imum o 60 5$ytes% As a u s "og reaches its ma,imum si>e! it $egins to write transactions to the i"e system ( or e,amp"e! dis#)% ;hen the i"e system is unmounted the entire u s "og is emptied and a"" transactions are written to dis#%

?-S "ogging o ers two ad6antages% -irst it pre6ents i"e systems rom $ecoming inconsistentM there ore! e"iminating the need to run "engthy sc# scans% Second"y! you can $ypass sc# scanning! which reduces the time re)uired to re$oot a system i it was stopped $y a method other than an order"y shutdown% Automatic .ounting of $ile systems The 2irtual "ile System Ta,le: 'etc'6 sta$ &he So"aris 8perating (n6ironment pro6ides se6era" methods or automating i"e system mounts% 8ne method is to add the i"e system(s) to the 'etc'6 sta$ i"e% &his i"e "ists a"" the i"e systems that are to $e automatica""y mounted at system $oot time% &he 'etc'6 sta$ i"e pro6ides you with another important eature% I the 'etc'6 sta$ i"e contains the mapping $etween the mount point and the actua" de6ice name! root can manua""y mount a i"e system speci ying on"y the mount point on the mount command-"ine% -or e,amp"e: + mount "e*port"home #he "etc"v,stab Dile A de au"t 'etc'6 sta$ i"e is created during the So"aris 8perating (n6ironment so tware insta""ation! $ased on your se"ections% Howe6er! the system administrator can edit the 'etc'6 sta$ i"e whene6er i"e entries need to $e added or modi ied% &he o""owing is an e,amp"e o an 'etc'6 sta$ i"e! on a system with one dis# (c0t0d0)% &he i"e ormat inc"udes se6en ie"ds per "ine entry! each ie"d is separated $y a &a$% A - (dash) character indicates an empty ie"d% 9ommented "ines $egin with the F sym$o"% + cat "etc"v,stab F de6ice
F to mount F 'de6'ds#'c"d0s+ d 'proc 'de6'ds#'cdt0d0s" de6'ds#'c0t0d0s0 'de6'ds#'c0t0d0s6 'de6'ds#'c0t0d0sJ

de6ice
to sc# point

mount
type

-S
pass 'usr 'de6' d 'proc ' 'usr 'opt

sc#
at $oot

mount
options us ds proc s swap s us us us

mount

'de6'rds#'c"d0s+ ---'de6'rds#'c0t0d0s0 'de6'rds#'c0t0d0s6 'de6'rds#'c0t0d0sJ

* * * *

yes no no no no no yes

noatime

'de6'ds#'c0t0d0s1 swap

'de6'rds#'c0t0d0s1 --

'e,port'home 'tmp

us tmp s

* -

yes yes

"ogging

&o add a "ine entry! you need the o""owing in ormation: the de6ice where the i"e system residesM the name o the mount pointM the type o i"e systemM whether it is to $e mounted automatica""y during a system $ootM and any mount options% -or e,amp"e: !evice to mount X &he $"oc# de6ice to $e mounted% -or e,amp"e! a "oca" u s i"e system: 'de6'ds#'cFtFdFsF or a -pseudo i"e system: 'proc% !evice to ,sck X &he raw or character de6ice to $e chec#ed $y the i"e system chec# program ( sc#)% mount point X &he name o the directory where the de6ice shou"d $e added to the So"aris 8perating (n6ironment directory tree% DS t&pe X &he type o i"e system to $e mounted% ,sck pass X Indicates whether the i"e system is to $e chec#ed $y sc# at $oot time% A who"e num$er p"aced in this ie"d indicates a yes4 A - (dash) or a 0 (>ero) indicates a no4 mount at boot X (nter a yes to ena$"e the mounta"" command to mount the i"e systems at $oot time% (nter a no to pre6ent a i"e system mount at $oot time% 2ote - -or ' (root) and 'usr! the mount at $oot ie"d 6a"ue is speci ied as no% &hese i"e systems are mounted $y the #erne" as part o the $oot se)uence $e ore the mounta"" command is run% mount options X A comma-separated "ist o options to $e passed to the mount command% #he usr"sbin"mountall Command &he 'etc'6 sta$ i"e is read $y the 'usr's$in'mounta"" command during the system $oot se)uenceM and mounts a"" i"e systems speci ied in 6 sta$ that ha6e a yes in the mount at $oot ie"d% &he root user can use this command to manua""y mount e6ery i"e system in 'etc'6 sta$ that has a yes in the mount at $oot ie"d% -or e,amp"e: F mount a"" &o mount on"y the "oca" i"e systems speci ied in the 'etc'6 sta$ i"e: F mount a"" -* Chec'ing File %(stems )efore Mounting (ach "oca" i"e system in the 6 sta$ i"e that has a de6ice to sc# entry and a sc# pass num$er is chec#ed $y sc# to determine i the i"e system is in a usa$"e state to $e sa e"y mounted% I the i"e system is ound to $e in an unusa$"e state ( or e,amp"e! corrupted)! it is repaired $y sc# $e ore the mount is attempted% Any "oca" i"e systems with a '-' or '0' (>ero) entry in the sc# pass ie"d wi"" attempt to $e mounted without $eing chec#ed%

.nmounting "ile Systems The 'usr's$in'umount Command


?nmounting a i"e system using the umount command remo6es it rom the i"e system mount point and de"etes the entry rom the 'etc'mntta$ i"e% Some i"e system administration tas#s cannot $e per ormed on mounted i"e systems% A i"e system is common"y unmounted i it is no "onger needed! i it needs to $e chec#ed and repaired $y sc#! or i it needs to $e $ac#ed up comp"ete"y% 2ote - 2oti y users $e ore unmounting a i"e system they are current"y accessing% &o manua""y unmount a i"e system using the mount point or directory name: F umount 'e,port'home or F umount 'de6'ds#'c0t0d0s1

Automatic !nmounting of $ile Systems The 'usr's$in' umounta"" Command &he 'etc'matta$ i"e is a"so read $y the 'usr's$in'umounta"" command during the system shutdown se)uence and unmounts a"" i"e systems speci ied in 6 sta$ e,cept ' (root)! 'usr! 'proc! 'de6' d! '6ar! '6ar'run! and 'tmp% 'anually .nmounting all "ile Systems &his command can $e run $y root to manua""y unmount a"" the i"e systems "isted in 'etc'mntta$% -or e,amp"e:
+ umountall &o unmount a"" "oca" i"e systems speci ied in the 'etc'mntta$ i"e: + umountall ($ &o 6eri y that a i"e system or a num$er o i"e systems ha6e $een unmounted! in6o#e the mount command and chec# the output%

Commands to !nmount a +usy file System Any i"e system that is $usy is not a6ai"a$"e or unmounting% Koth the umount and umounta"" command disp"ay the error message: umount' ,ile system1name bus& A i"e system is considered to $e $usy i one o the o""owing conditions e,ists: a program is accessing a directory in the i"e systemM a user is in the i"e system mount point directoryM a program has a i"e open in that i"e system! or it is $eing shared% &here are two methods to ma#e a i"e system a6ai"a$"e or unmounting i it is $usy%

,user comman! -&o "ist a"" the processes accessing the i"e system! and #i"" them i necessary% umount. (, comman! - &o orce the unmount o a i"e system% 2ote - &he umount - command is new in the So"aris 8perating (n6ironment% .sing the user Command &o stop a"" processes rom accessing a i"e system: *% As root! "ist a"" the processes accessing the i"e system% ?se the o""owing command to identi y which processes need to $e terminated% + ,user (cu mount#point &his disp"ays the name o the i"e system and the user "ogin name or each process current"y acti6e in the i"e system% +% Li"" a"" processes accessing the i"e system%

+ ,user ?ck mount#point A SI@LIII is sent to each process using the i"e system% J% 3eri y there are no processes accessing the i"e system%

+ ,user -c mount1point 0% ?nmount the i"e system%

+ umount mount1point !sing the umount (, Command 's root, you can unmount a file system e4en if it is busy using the -f 8force: option with umount. This is a new option in the Solaris 2perating 3n4ironment. +umount (, mount#point &he i"e system is unmounted e6en i there are open i"es% A orced unmount can resu"t in "oss o data% Howe6er! it is particu"ar"y use u" or unmounting a shared i"e system i the remote i"e ser6er is non unctiona"% Procedure for .ounting a 2ew $ile System &he genera" procedure out"ined $e"ow $rie "y descri$es the steps or adding a new dis# to the system! preparing the dis# to ho"d a i"e system! and mounting the i"e system% *% +% J% 0% Set up the dis# hardware% Inc"udes setting address switches and connecting ca$"es% Per orm a recon iguration $oot to add support or the new de6ice% ?se the ormat uti"ity to partition the dis# into one or more s"ices% 9reate a new i"e system structure on one s"ice using the new s command%%

/% 9reate a mount point or the i"e system $y creating a new directory in the root i"e system using the m#dir command% -or e,amp"e: + mk!ir "!atabase

6%

5ount the new i"e system manua""y using the mount command! -or e,amp"e: + mount "!ev"!sk"clt3!Os3 "!atabase

1%

9hec# to see i the i"e system is mounted with the mount command%

+ mount .% (dit the 'etc'6 sta$ i"e to add a "ine entry or the new i"e system% &he i"e system wi"" automatica""y $e mounted whene6er the system $oots% F de6ice F to mount de6ice to sc# mount point -S type sc# pass mount at $oot mount options

%emo able .edia De ice .anagement &o access i"e systems on dis#ettes and 9:-485S! the So"aris 8perating (n6ironment gi6es users a standard inter ace re erred to as 3o"ume 5anagement% 3o"ume 5anagement pro6ides three maWor $ene its: It automatica""y mounts dis#ettes and 9:-485s or users% It a""ows access to dis#ettes and 9:-485s without ha6ing to $ecome root% It can gi6e other systems on the networ# automatic access to any dis#ettes and 9:485s current"y inserted in the "oca" system% &he 6o"ume management ser6ice is contro""ed $y the 'usr's$in'6o"d daemon% Ky de au"t! this ser6ice Is a"ways running on the system to automatica""y manage dis#ettes and 9:-485s or regu"ar users% 3o"ume management pro6ides automatic detection o 9:-485s% Howe6er! it does not detect the presence o a dis#ette that has $een inserted in the dri6e unti" it is in ormed! $y the 6o"chec# command% <ou run this command to instruct 6o"d to chec# the dis#ette dri6e or insta""ed media% 2ote - Automatic detection o dis#ettes wou"d cause e,cessi6e reads! which wou"d )uic#"y wear out the dri6e% Accessing Mounted &is'ettes and C&3R.Ms &o ma#e wor#ing with dis#ettes and 9:-485s simp"e or your users! each de6ice is mounted in an easyto-remem$er "ocation $y 6o"d

-or dis#ettes! 6o"d automatica""y mounts the de6ice a"ter you insert the dis#ette and run the 6o"chec# command% -or 9:-485s! 6o"d automatica""y mounts the de6ice when you insert the 9: into the dri6e

I 6o"d detects that the mounted dis#ette or 9:-485 contains a i"e system! then the de6ice is mounted at the directory "ocation descri$ed in &a$"e .-*%
&a$"e .-* :irectory Iocations

5edia :e6ice

Access i"e systems 8r%

-irst dis#ette dri6e -irst 9:-485 dri6e

' "oppy' "oppy8 'cdrom'cdrom8

I 6o"d detects the mounted dis#ette or 9:-485 does not contain a i"e system! the raw de6ice is accessi$"e using the o""owing paths descri$ed in &a$"e .-+% able .-+ Paths or Accessing 4aw :e6ices

5edia :e6ice

Access 4aw :e6ice 8n

-irst :is#ette :ri6e -irst 9:-485 :ri6e

'6o"'de6'a"iases' "oppy8 '6o"'de6'a"iases'cdrom8

;hen 6o"ume management is running on the system! a regu"ar user can easi"y access a dis#ette or 9:485 o""owing these $asic steps: *% +% J% 0% Insert the media% -or dis#ettes on"y! use the 6o"chec# command% ;or# with i"es on the media% (Wect the media%

Administering Volume Management &o restrict regu"ar users rom accessing dis#ettes or 9:-485s on the systems root can terminate the 6o"ume management ser6ice% &o stop 6o"ume management rom running on a system temporari"y the o""owing command wou"d $e run $y root% + "etc"init.!"volmgt stop &o restart the 6o"ume management ser6ice! the o""owing command is in6o#ed $y root%

# 3etc3init4d3 olmgt start Administering Volume Management &wo con iguration i"es are used $y 6o"ume management% -i"e :escription

"etc"vol!.con, &he 6o"ume management con iguration i"e% &his de ines items such as what action shou"d $e ta#en when media is inserted or eWected! what de6ices are used! and what i"e system types are unsa e to eWect% "etc"rmmount.con, &he rmmount command con iguration i"e% &he rmmount command is a remo6a$"e media mounter that is e,ecuted $y the 6o"ume management daemon whene6er a 9:-485 or dis#ette is inserted% Accessing a &is'ette or C&3R.M "ithout Volume Management ;hen 6o"ume management is not running! then on"y root can mount and access a dis#ette or 9:-485! using the o""owing: * +% J 0 / 6 1% .% O% Insert the media de6ice% Kecome root% 9reate a mount point! i necessary% :etermine the i"e system type% 5ount the de6ice using the proper mount options% ;or# with i"es on the media de6ice% ?nmount the media de6ice% (Wect the media de6ice% (,it the root session%

.ounting Different types of $ile Systems :i erent i"e system types ha6e uni)ue properties that a ect how the mount command unctions% Ky de au"t the mount command assumes it is mounting a u s type i"e system% Howe6er! when mounting a di erent type o i"e system! its type may ha6e to $e speci ied on the command "ine% <ou use -- option on the mount command to speci y the type o i"e system to $e mounted% %pecif(ing a hsfs File %(stem T(pe As root! to mount a i"e system that resides on a 9:-485! when the 6o"ume management ser6ices are stopped: + mount (D hs,s (o ro "!ev"!sk"c0t2!0s0 "c!rom

In this e,amp"e the i"e system type is hs s! the i"e system resides! on dis# s"ice 'de6'ds#'c8t6d9s8! and the mount point used! 'cdrom is a pre-e,isting directory in the So"aris 8perating (n6ironment% Specifying a pc s file System Type As root! to mount a i"e system that resides on a dis#ette! when the 6o"ume management ser6ices are stopped: + mk!ir "pc,s + mount (D pc,s "!ev"!iskette "pc,s In this e,amp"e! the i"e system type is pc s! the i"e system resides on the de6ice 'de6'dis#ette! and the mount point used! 'pc s had to $e created% Determining a $ile System's #ype Kecause the mount commands needs the i"e system type to $e speci ied to unction proper"y! it must $e e,p"icit"y speci ied! or it wi"" ha6e to $e determined $y searching the o""owing i"es%

&he 'etc'6 sta$ or -S type ie"d% &he 'etc'de au"t' s i"e or "oca" i"e system type% &he 'etc'd s' stypes i"e or remote i"e system type%

I the i"e system's type has not $een e,p"icit"y speci ied on the command "ine using mount -- "Stype option! mount "oo#s in 'etc'6 sta$ to determine the i"e systems type! using its $"oc# de6ice name! raw de6ice name! or mount point directory name% I you cannot determine the i"e system's type $y searching 'etc'6 sta$! mount uses the de au"t i"e system type speci ied in either 'etc'de au"t' s or 'etc'd s' stypes! depending on whether the i"e system is "oca" or remote% &he de au"t "oca" i"e system type is speci ied in 'etc'de au"t' s $y the "ine entry I89AIN stype% -or e,amp"e: 9OC/9Ku,s &he de au"t remote i"e system type is determined $y the "ine entry in the'etc'd s'd stypes i"e% -or e,amp"e: n s 2-S ?ti"ities Finding a File %(stem6s T(pe &o determine a i"e system's type to use with the option o the mount command! run the o""owing grep command to disp"ay the in ormation + grep mount(point ,s(table mount(point X Speci ies the mount point directory name o the i"e system% -or e,amp"e! the '6ar directory%

,s(table Speci ies the a$so"ute path to the i"e system ta$"e used to search or the i"e systemQs type% I the i"e system is mounted! s-ta$"e shou"d $e 'etc'mntta$%I the i"e system is not mounted! s/ta,le should $e 'etc'6 sta$% &he o""owing e,amp"e uses the 'etc'6 sta$ to determine the type o the 'e,port'home i"e system% F grep " e*port "home "etc"v,stab 'de6'ds#'c0t0d0s1 de6'rds#'c0t0d0s1 'e,port'hone us * yes -

he ,st&p Command &he styp command can a"so $e used with the raw de6ice name o the dis# s"ice to determine a i"e system's type% -or e,amp"e: + ,st&p "!ev"r!sk"c0t0!0s3 us

The (olaris Operating &n%ironment 3ile Types


&he So"aris 8perating en6ironment supports a standard set o i"es: - ound in near"y a"" ?2IA-$ased operating systems% In genera"! i"es pro6ide a means o storing data! acti6ating de6ices! or a""owing interprocess communication% 8 the di erent types o i"es that e,ist! our cou"d $e descri$ed types in the So"aris 8perating (n6ironment! which inc"ude: 8egular or or!inar& ,iles 6irectories S&mbolic links 6evice ,iles 4egu"ar -i"es! directories! and sym$o"ic "in#s a"" store one or more #ind o data% :e6ice i"es di er rom the other three $ecause they do not store dataM instead! they pro6ide access to de6ices%

-i"es that pro6ide inter-process communication inc"ude soc#ets named pipes! and doors% &hese "ast three types o i"es are not descri$ed in this modu"e F cd 'de6ices'pciZ" !0'pciZ"!"'ideZJ F "s -* tota" 0 $rw--------crw ------$rw-----* root * root * root sys sys sys *J6! *J6! *J6! 0 Apr 0 Apr i Apr J **:** dadZ0!0:a J **:** dadZ0! 0:a% raw 0 **:06 da!diP0!0:$

crw-------

* root

sys

*J6!

* Apr

J **:** dadZ0! 0:$!raw

&he character in the irst co"umn identi ies each i"e's type! as o""ows:

X 4egu"ar i"es d - :irectories * -Sym$o"ic "in#s $ - K"oc# specia" de6ice i"es c 9haracter specia" de6ice i"es

-i"e 2ames! Inodes! and :ata K"oc#s A"" i"es in the So"aris 8perating (n6ironment ma#e use o a i"e name and a record ca""ed an inode% 5ost i"es a"so ma#e use o data $"oc#s% -i"e names are the o$Wects most o ten used to access and manipu"ate i"es Inodes are the o$Wects the system uses to record in ormation a$out a i"e% :ata $"oc#s are units o dis# space used to store data% &o e,ist! a i"e must ha6e a name that is associated with an inode% In genera"! inodes contain two parts% -irst they contain in ormation a$out the i"e! inc"uding who owns it! its permissions and si>e% Second! they contain pointers to data $"oc#s associated with the i"e%

Su$se)uent modu"es that descri$e the u s i"e system descri$e the content o inode records in detai"% Howe6er! in genera"! a i"e name is associated with an inode! and an inode pro6ides access to data $"oc#s% Inodes are num$ered! and each i"e system its own separate o inodes when you create a new i"e system it generates a comp"ete "ist o inodes ound in that i"e system% 8egular Piles A regu"ar i"e simp"y ho"ds data% Perhaps the most common i"e type ound in the So"aris 8perating (n6ironment are regu"ar i"es! which a""ow you to store many di erent #inds o data% 4egu"ar i"es can ho"d AS9II te,t! $inary data! image data! data$ases! app"ication-re"ated data! and more% <ou can create regu"ar i"es in many ways% -or! e,amp"e! you cou"d use 6i to create an AS9II te,t i"e! or you cou"d use a compi"er to create a i"e that contains $inary data% &he touch command creates a new! empty regu"ar i"e% S&mbolic 9inks A sym$o"ic "in# is a i"e that points to another i"e% Ii#e directories! sym$o"ic "in#s contain on"y one #ind o data%

' symbolic link contains the pathname of the file to which it points @ecause symbolic links use pathnames to point to other files, they can -oint to files found in, other file systems. 'lso, the siBe of a symbolic link always matches the number of characters found in the pathname it contains.
-or e,amp"e! the sym$o"ic "in# ca""ed '$in points to the directory %'usr'$in% Its si>e is O $ytes $ecause the pathname %'usr'$in contains nine characters%

F cd ' F "s -* tota" *J/ Irw,rw,rw, * root (output truncated)% Symbolic links can point to regular files, directories, other symbolic links, and de4ice files. 'nd can use absolute or relati4e pathnames. they root 0 Apr J *0:JO $in -H %'usr'$in

-igure 0-0 descri$es a sym$o"ic "in# i"e ca""ed "in#"% As i""ustrated! the name "in#" is associated with inode num$er J/6*% &he data $"oc#s associated with "in#" contain the pathname o the i"e to which "in#" points%

:epending on the "ength o the pathname the "in# contains! it can either reside direct"y in the "in#'s "node record or in data $"oc#s% &he In command with the -s option creates a sym$o"ic "in#% Sym$o"ic "in#s direct read and write operations to the i"e to which they point% In the e,amp"e a$o6e it shows how using "in#" as a command's argument wou"d cause that command to re er to the i"e ca""ed i"e"%

:e6ice -i"es A de6ice i"e pro6ides access to a de6ice% ?n"i#e regu"ar i"es! directories! and sym$o"ic "in#s! de6ice i"es do not use data $"oc#s% Instead! in their inode in ormation! they ho"d num$ers that re er to de6ices% ;here the i"e si>e disp"ays or other i"e types! "istings o de6ice i"es disp"ay two num$ers! separated $y a comma% &hese two num$ers are ca""ed maWor and minor de6ice num$ers% In the e,amp"e $e"ow! the de6ice i"e dadZ0!0a re ers to maWor de6ice num$er*J6 and minor de6ice num$er 0% + c! "!evices"pci7l,:0"pciMl:l"i!e73 F "s -* tota" 0 $rw------ * root crw------ " root sys sys *J6! 0 Apr J **:** dadZ0!0:a *J6! 0 Apr J **:** dadZ0!0:a!raw

(output truncated) A maWor de6ice num$er identi ies the speci ic de6ice dri6er re)uired to access a de6ice% A minor de6ice num$er identi ies the speci ic unit o the type that the de6ice dri6er contro"s% Device Files &he de6ice i"e dadZ0!0:a descri$ed in -igure 0%/ occupies inode num$er O06.*% &hat inode contains the maWor and minor de6ice num$ers that re er to a speci ic de6ice! in this case! a s"ice or a dis#% In genera"! de6ice i"es are created automatica""y when you per orm a recon iguration re$oot% In the So"aris 8perating (n6ironment! you can use the de6 sadm command to create new de6ice i"es manua""y% Ke ore the So"aris 8perating (n6ironment you used dr6con ig% In ormation a$out interpreting de6ice i"e names and procedures or creating de6ice i"es manua""y and automatica""y are descri$ed in "ater modu"es%

-igure 0-6 i""ustrates the re"ationship $etween the de6ice i"e dad_0! 0:a and the dis# de6ice it contro"s% &he inode in ormation or dadZ0!0: a contains maWor num$er *J6 and minor num$er 0% 5aWor de6ice num$er *J6 identi ies the dad de6ice dri6er% &he dad de6ice dri6er contro"s I:( dis# dri6es% 5inor num$er 0 identi ies s"ice 0 o the master dis# on the irst I:( $us%

:e6ice i"es a"" into two categories: character-specia" de6ice and $"oc#-specia" de6ices% 9haracter-specia" de6ices are a"so ca""ed simp"y character or raw de6ices% K"oc# specia" de6ices are o ten ca""ed simp"y $"oc# de6ices% &hese two categories o de6ice i"es interact with de6ices di erent"y% $haracter De%ice 3iles &he i"e type [cQ identi ies character de6ice i"es% -or dis# de6ices! character de6ice i"es ca"" or I'8 operation $ased on the dis#s sma""est addressa$"e unit or sectors (ach sector is /*+ $ytes in si>e% K"oc# :e6ice -i"es &he i"e type [$c identi ies $"oc# de6ice i"es% -or dis# de6ices! $"oc# de6ice i"es ca"" or I'8 operations $ased on a de ined $"oc# si>e% &he $"oc# si>e depends on the particu"ar de6ice! $ut or ?-S i"e systems! the de au"t $"oc# si>e is . L$ytes $rw ------Iar! 9inks A hard "in# is the association $etween a i"e name and an inode% A hard "in# is not a separate type o i"e% (6ery type o i"e uses at "east one hard "in#% (6ery entry in a directory constitutes a hard "in#% &hin# o e6ery i"e name as a hard "in# to an inode% ;hen you create a i"e! using touch or e,amp"e! you create a new directory entry that "in#s the i"e name you speci y with a particu"ar inode%
In -igure 0-1! the i"e ca""ed i"e" is "isted in the directory dir"% In dir"! the name i"e" is associated with inode num$er *+.+! In this way! simp"y creating a new i"e creates a hard "in# %

* root

sys

*J6!

0 Apr

J **:** dadZ0!0: a

In ormation in each inode #eeps count o the num$er o i"e names associated with it% &his is ca""ed a "in# count% In the output rom "s -*! the "in# count disp"ays $etween the i"e permissions and the owner co"umn% In the o""owing e,amp"e! i"e" uses one hard "in#% F touch i"e" F "s * tota" 0 * root -rw-r--r-* root other Apr * */:+6 i"e"

?sing the command! you can create new hard "in#s to regu"ar i"es% &he command in i"e" i"e+ i"e+ creates a new directory entry ca""ed i"e+! associate with the same inode associated with the same inode associated with i"e% igure 0-. i""ustrates the resu"t! where two i"e names are associated with inode num$er *+.+% &hese i"e names are unctiona""y identica"% ?n"i#e sym$o"ic "in#s! hard "in#s cannot span i"e systems%

FIn i"e" i"e+

F Is -* tota" 0 -rw-rXr--rw-rXrX F Is -"i tota" 0 *+.+ -rw-rXr-+ root


+ root

+ root + root

other other 0 Apr

0 Apr

1 */:+6 i"e"

* */:+6 i"e+

other
other

0 Apr
0 Apr

* */:+6 i"e*
1 */:+6 i"e+

*+.+ -rw-r--r--

:e"eting one o the i"e names has no e ect on the other% &he "in# count decrements according"y% + rm ,ilel + ls (li tota" 0 *+.+ -rw-r--r-- * root &he root Su$directories &he directory tree is organi>ed or administrati6e con6enience% Kranches within this tree segregate directories used or di erent purposes% -or e,amp"e directories e,ist to ho"d i"es that are pri6ate to the "oca" system! i"es to share with other systems! and home directories% Iogica""y a"" directories a"" $e"ow the root (') directory% Physica""y! a"" directories can $e "ocated on one i"e system or di6ided among more than one i"e system% (6ery So"aris 8perating (n6ironment has a root i"e system and can ha6e other i"e systems attached at points within the directory tree% -i"e systems are structures created on dis# s"ices! and they contain or ho"d i"es and directories% &he terms i"e systems and dis#-s"ices are on"y $rie "y e,p"ained here $ecause they are descri$ed in detai" in su$se)uent modu"es% &he So"aris 8perating (n6ironment is comprised o a hierarchy o critica" system directories and i"es that are necessary or the operating system to unction proper"y% other 0 Apr */:+6 i"e+

" ( 8oot o the o6era"" i"e system name space% "bin - &his directory is a sym$o"ic "in# to the 'usr'$in directory% It is the directory "ocation or standard system commands! or $inary i"es% "!ev X Primary "ocation or "ogica" de6ice name% &hese are sym$o"ic "in#s that point to de6ice i"es in the 'de6ices directory% &a$"e 0-* descri$es the contents o the 'de6 directory% 2ote - i"e systems are descri$ed in 5odu"e 1% :is# s"ices are descri$ed in 5odu"e 6% See a"so! man -s/ i"e system or in ormation on i"e system organi>ation%

&a$"e 0-*

&he 'de6 :irectory 9ontents

:irectory

:escription

"!ev"cua "!ev"!sk "!ev" , bs "!ev" , ! "!ev"m! "!ev"pts "!ev"r!sk "!ev"rmt "!ev"soun! "!ev"term

:ia" out de6ice i"es or uucp K"oc# dis# de6ices -rame $u er or de6ice i"es -i"e descriptors Iogica" 6o"ume management meta-dis# de6ices Pseudo termina" de6ices 4aw dis# de6ices 4aw magnetic tape de6ices Audio de6ice and audio de6ice contro" i"es Seria" de6ices

"!evices X Primary "ocation or physica" de6ice names% &hese are de6ice i"es "etc( Host-speci ic system administrati6e con iguration i"es and data$ases% &a$"e 0-+ descri$es the contents o the 'etc directory% &he 'etc :irectory 9ontents

&a$"e 0-+

:irectory

:escription

"etc"acct

Accounting con iguration in ormation

"etc"cron. ! "etc"!e,ault "etc"inet "etc"init.! "etc"lib "etc"lp "etc"mail "etc"n,s "etc"openwin "etc"opt "etc"rc+:! "etc"skel

9on iguration in ormation or cron :e au"ts in ormation or 6arious programs 9on iguration i"es or networ# ser6ices Scripts or changing $etween run "e6e"s :ynamic "in#ing "i$raries needed when 'usr is not a6ai"a$"e 9on iguration in ormation or the printer su$system 5ai" su$system con iguration in ormation 2-S ser6er "ogging con iguration i"e 8pen;indows&5 con iguration i"es 9on iguration in ormation or optiona" pac#ages Scripts or entering'"ea6ing run "e6e" F :e au"t pro i"e scripts or new user accounts

'e*port - :e au"t directory or common"y shared i"e systems! such as users home directories! c"ient i"e systems! or other shared i"e systems% 'home - :e au"t directory or mount point or users home directories% ;hen Auto-S is running! you cannot create any new entries in this directory% 'kernel - :irectory o p"at orm-independent "oada$"e #erne" modu"es re)uired as part o the $oot process% It inc"udes the generic part o the core #erne" that is p"at orm independent '#erne" )enuni,% 'mnt con6enient! temporary mount point i"e systems 'opt - :e au"t directory or mount point or add-on app"ication pac#ages% 'sbin - (ssentia" e,ecuta$"es used in the $ooting process and in manua" system ai"ure reco6ery% 'tmp - &emporary i"esM c"eared during $oot se)uence%

The *usr Directory $ontents

:irectory "usr"bin "usr"ccs "usr"!emo "usr "!t "usr"inclu!e

:escription Iocation or standard system commands 9 compi"ation programs and "i$raries :emonstration programs and data :irectory or mount point or 9:( so tware Header i"es ( or 9 programs! and so on)

"usr"Java "usr"lib in6o#ed

:irectories containing 7a6a&29 techno"ogy programs and "i$raries 3arious program "i$raries! architecture- dependent data$ases! and $inaries not

direct"y $y the user "usr"openwin "usr"opt "usr"pub "usr"spool :irectories containing 8pen;indows programs 9on iguration in ormation or optiona" pac#ages -i"es or on"ine man page and character processing Sym$o"ic "in# to the '6ar'spoo" directory

"var - :irectory or 6arying i"es! which usua""y inc"udes temporary! "ogging! or status i"es%

#he $ile System Check Program A i"e system can $ecome damaged i it is corrupted rom a power ai"ure! a so tware error in the #erne"! a hardware ai"ure! or an Improper shutdown o the system% &he i"e system chec# program! sc#! chec#s the data consistency o a i"e system and corrects or repairs any inconsistencies or damage ound% 9aution - 2e6er run sc# on a mounted i"e system% It cou"d "ea6e the i"e system in an unusa$"e state and de"ete data% A"ways run sc# on unmounted i"e systems only4 (6ery time a system $oots! sc# automatica""y per orms a i"e system% consistency chec#! sc# chec#s and repairs any pro$"ems encountered in i"e systems $e ore they are mounted% !hen file system is mounted with the ufs logging option, it eliminates the need to run fsck because logging pre4ents the file system from becoming inconsistent. 2ote -&he status o a i"e system's state "ag determines whether the i"e system needs to $e chec#ed $y sc#% ;hen the i"e system is Rc"ean!R Rsta$"e!R or R"ogging!R i"e system chec#s are not run% Data Inconsistencies Chec ed ,y sc# &he sc# command ma#es se6era" passes through a i"e each time it scans to chec# the o""owing types o i"e system inconsistencies%

The lost7found &irector(


&he sc# command puts i"es and directories that are a""ocated $ut % unre erenced in the "ostT ound directory "ocated in that i"e system% &he inode num$er o each i"e is assigned as its name% I the "ostT ound directory does not e,ist sc# creates it! and i there is not enough space in the "ostT ound directory sc# increases its si>e%

Howe6er! i a more serious inconsistency is ound! and a decision has to $e made! the sc# program terminates and "ea6es the system in sing"e-user mode% <ou must run sc# interacti6e"y to continue% nteractive Mode :uring this process! sc# "ists each pro$"em it encountered! o""owed $y a suggested correcti6e action! in the orm o a )uestion that re)uires a yes or no response% Ky responding yes! sc# app"ies the correcti6e action and mo6es on% Ky responding no! sc# wi"" o ten simp"y repeat the origina" pro$"em and suggest correcti6e action! and not mo6e orward unti" you respond with a yes% -or e,amp"e:

+ ,sck "e*port"home
SS 'de6'rds#'c0t0d0s1 SS "ast 5ounted on 'e,port'home SS Phase * - 9hec# 'K"oc#s and Si>es
I29844(9& KI89L 98?2& IN10J 9844(9&P &he o""owing e,amp"es demonstrate how the system root can use the sc# command to chec# the integrity o i"e systems% (/ shou"d $e +)

&o chec# a sing"e unmounted i"e system! e,ecute the o""owing command%

+ ,sck "!ev"r!sk"c0t0!0s3
&his is the on"y way to chec# %* i"e system that has not $een entered in the 'etc'6 sta$ i"e%

+ ,sck "opt

&o chec# a i"e system using the 'mount point directory name as "isted in the 'etc'6 sta$ i"e! e,ecute the o""owing command

&he o""owing e,amp"e has sc# chec# and repair the i"e system in non-interacti6e mode and e,it i a serious pro$"em re)uiring inter6ention is encountered% + ,sck (o ,:p "!ev"r!sk"c0t0!0s0 'de6'rds#'c0t0d0s/: 11 i"es ! O6+* used! 060.O ree

'de6'rds#'c0t0d0s/: (0 rags! /1 $"oc#s! 0%0g ragmentation) &he option orces chec#ing o the i"e system regard"ess o the state o its super$"oc# c"ean "ag% &he p option chec#s and i,es the i"e system non-interacti6e"y (preen)% &he program e,its immediate"y i a pro$"em re)uiring inter6ention is ound% &his option is re)uired to ena$"e para""e" i"e system chec#ing%

Reconnecting an Allocated 1nreferenced File In this e,amp"e! the sc# program disco6ers an inode that is a""ocated $ut unre erenced or not "in#ed in any directory% A yes response to the 4(9822(9&P )uestion causes sc# to sa6e the i"e to the "ostT ound directory and names it using the inode num$er% SS Phase J - 9hec# 9onnecti6ity ?24(- -II( *N1.. 8;2(4Nroot 58:(N*00600 SIV(N*OOO0 5&I5(N7an *. *0:0O *OOO 4(9822(9&P y &o determine what type o i"e had to mo6ed to the "ostT ound directory $y sc#: *% Iist the contents o the i"e systems "ostT ound directory! or e,amp"e: F Is 'e,port'home'"ostT ound F1.. +% :etermine the i"e type! using the i"e command! or e,amp"e: F ,ile " e*port"home"lostE,oun!"+3GG 'e,port'home'"ostT ound'F1..: ascii te,t J% &o 6iew the contents o the AS9II te,t i"e use the more or cat command% &o 6iew the contents o a $inary i"e use the strings command% I the i"e is associated with an app"ication! (e%g% a word processing document)! it wou"d $e necessary to use the app"ication to 6iew the contents o the i"e%

F cat 'e,port'home'"ostT ound'F1.. 0 I the i"e is intact and you #now where it $e"ongs! the i"e can copied $ac# to its origina" "ocation in the i"e system% -or e,amp"e:

Ad5usting a &ink Counter In this e,amp"e! the sc# program disco6ers that the 6a"ue o a directory inode "in# counter and the actua" num$er o directory "in#s are inconsistent% A yes response to the A:7?S&P )uestion causes sc# to correct the directory inode "in# counter rom 0 to J% SS Phase 0 - 9hec# 4e erence 9ounts II2L 98?2& :I4 *N+ 8;2(4Nroot 58:(N001// SIV(-/*+ 5&I5(N7an *. */:/O *OOO 98?2& 0 SH8?I: K( J

A:7?S&P y F cp e,port'home'"ostT ound'F1.. 'e,port'home'user*'report %alvaging the Free List In this e,amp"e! the sc# program disco6ers that the una""ocated $"oc# count and the ree $"oc# num$er "isted in the super$"oc# are inconsistent% A yes response to the SAI3A@(P )uestion causes sc# to update the in ormation in the i"e system super$"oc#% SS Phase / - 9hec# 9y" groups 9@ 0: KA: 5A@I9 2?5K(4 -4(( KIL 98?2&(S) ;482@ I2 S?P(4KIL SAI3A@(P y 1sing )ac'up %uperbloc's Super$"oc# corruption can cause a i"e system to $e unmounta$"e%<ou #now when a i"e system is unusa$"e when the message R9an' t mount file system name appears% -or e,amp"e: 9an't mount 'de6'ds#'c0t0d0s1 which can appear during a system $oot or when manua""y mounting the i"e system% I sc# ai"s $ecause o a corrupted super$"oc# it returns an error-message in orming you that it must $e run using an a"ternati6e super$"oc# $ac#up to reco6er the i"e system% &he correcti6e action is to run sc# using the -o option with the $ "ag% &he $ "ag is o""owed $y a $ac#up super$"oc# num$er% (6ery i"e system a"ways has an a"ternate $ac#up super$"oc# at $"oc# num$er J+! which can $e gi6en to sc# to repair the main super$"oc#% -or e,amp"e: F sc# -o $NJ+ 'de6'rds#'c*tJd0s0

A"ternate super $"oc# "ocation: J+% SS 'de6'rds#'c"tJd0s0 SS 9urrent"y 5ounted on SS Phase * - 9hec# K"oc#s and Si>es SS Phase + - 9hec# Pathnames SS Phase J - 9hec# 9onnecti6itySS Phase 0 - chec# 4e erence 9ounts SS Phase / - 9hec# 9y" groups *1* i"es! J16+ used! /O.0 ree (1O rags! 10. $"oc#s! 0%*g ragmentation)

&he sc# program ta#es the in ormation in the $ac#up super$"oc#! compares it with the actua" i"e system and attempts to re$ui"d the main super$"oc#% I howe6er! this $"oc# is part o the i"e system that was damaged it is unusa$"e% <ou must se"ect another $ac#up super$"oc# or sc# to continue% &o "ist the "ocations o a"" the a"ternate $ac#up super$"oc#s in the i"e system! run the new s -2 command% -or e,amp"e: +Lnew,s (N "!ev"r!sk"c+t+!+s+ 9aution -&his method wor#s i the under"ying i"e system was $ui"t using the new s de au"t parameters% I the i"e system was not $ui"t with these de au"ts! then you must run new s -2 using the identica" parameters to generate identica" super$"oc# "ocations% <ou use the -2 option to print out i"e system parameters that would ,e used to create a new i"e system without actua""y creating the ti"e system% A portion o that print out is a "ist o a"" the $ac#up super$"oc# "ocations that can $e used with sc# -o $F% -or e,amp"e: + new,s (N "!ev"r!sk"c0t0!0s3 new,s (N "!ev"r!sk"c0t0!0s3 'de6'rds#'c0t0d0s1 : J/J1000 sectors in +J+1 cy"inders o *O trac#s! .0 sectors *1+1%*5K in 1J cy" groups (J+c'g! +J%1/5K'g! /... i'g) super-$"oc# $ac#ups ( or sc# -- u s -o $NF) at: J+! 0.1/+! O101+! *06*O+! *O0O*+! +0J6J+! +O+J/+! J0*01+! J.O1O+! 0.1+J+! /J/O/+! /.061+! 6JJJO+! 1J0.J+! 11O//+! .+.+1+! .16OO+! O+/1*+! O100J+! *0+J*/+! *01*.1+! **6OJ*+! *+*.0J+! *+661/+! *J*/01+ *J60*O+!% *06*6J+!% */*0J/+! *//6/*+! *60/+J+! *6/JO/+! *10+61+! *1/*JO+! *.00**+! *.0..J+! *O06+1+! *OO0OO+! +00J1*+! +0O+0J+! +*0**/+! +*.S.1+! ++J./O+! ++.1J*+! +JJ60J+! +0JJ01+! +0.+*O+! +/J0O*+! +/1O6J+! +6+.J/+! +61101+! +1+/1O+! +110/*+! +.1*O/+! F <ou cou"d use any other a"ternati6e super$"oc# num$er in the "ist with sc#%-or e,amp"e + ,sck (o bK030405 "!ev"r!sk"c0t0!0sJ A"ternate super $"oc# "ocation: /J/O/+.% SS 'de6'rds#'c0t0d0s1 SS Iast 5ounted on SS Phase * - 9hec# K"oc#s and Si>es *0*+O*+! *.O1//+! +J.01/+! +.+J+J+!

SS Phase + - 9hec# Pathnames == Phase J - 9hec# 9onnecti6ity SS Phase 0 9hec# 4e erence 9ounts SSPhase / - 9hec# -9y" groups 1 i"es! *0%used! +1O.+/ ree (*1 rags! J01.O* $"oc#s! 0%0g ragmentation) F

.onitoring $ile System !sages


An important acti6ity o a system administrator is to monitor i"e system usage on a regu"ar $asis% &here are our use u" commands a6ai"a$"e or this tas#! which inc"ude d ! du! and )uot%

d X :isp"ay the num$er o ree dis# $"oc#s and i"es% du - Summari>e dis# usage% - Iist i"es names and statistics or a i"e system% )uot - Summari>e i"e system ownership%

The df Command <ou use the d command to disp"ay the amount o dis# space occupied $y mounted i"e systems% It "ists the amount o used and a6ai"a$"e space! and how much o the i"e system's tota" capacity is used% Command "ormat d B-#D BdirectoryD

Options -# :isp"ays usage in L$ytes and su$tracts the space reser6ed $y the operating system rom the amount o a6ai"a$"e space% &o disp"ay the capacity o i"e systems! use the o""owing command: Fd -# #$ytes J.*** /6//0J used *O*O6 J6*/+O 0 0 +/*/O +10JO 0..6 +0J6+ 0 0 +0+0. 10/0 a6ai" *..11 +0J00O 0 0 +0g 1/g capacity /*g 60g 0g 0g '6ar 'opt 5ounted on ' 'usr 'proc 'de6' d

i"e system 'de6'ds#'c0tJd0s0 'de6'ds#'c0tJd0s6 'proc d 'de6'ds#'c0tJd0s" 'de6'ds#'c0tJd0s/

swap

0/O.0

*+

0/O6.

*g 'tmp

&he amount o space that is reported as used and a6ai" is "ess than the amount o tota" space in the i"e system% A raction o space! rom * percent to *0 percent! is reser6ed in each i"e system% ;hen a"" the reported space on the i"e system is In use! its capacity is disp"ayed as *00 percent% 4egu"ar users recei6e the message R-i"e System -u""R and cannot continue wor#ing% &he reser6ed space is sti"" a6ai"a$"e to root! who can de"ete or $ac# up i"es to ree space in the i"e system% &he o""owing "ists the ie"ds disp"ayed $y d -#

i"e system 5ounted i"e system

#$ytes used a6ai" capacity

Si>e o the i"e system in L$ytes (*0+0 $ytes) 2um$er o L$ytes used 2um$er o L$ytes a6ai"a$"e Percentage o i"e system capacity used

5ounted on% 5ount point

!u Command
<ou use the du command to disp"ay the num$er o dis# $"oc#s (/*+ $ytes) used $y directories and i"es% du B-aD -# -s B-sD B-#D (directory)

:isp"ays in L$ytes% :isp"ays on"y the summary in /*+-$yte $"oc#s% ?sing the s and # options together wi"" show the summary in L$ytes%

-a

:isp"ays the num$er o $"oc#s used $y a"" i"es and directories within the speci ied directory hierarchy%

&o disp"ay dis# usage in #i"o$ytes! e,ecute the o""owing: F cd 'opt F du -# . J 0 %'"ostT ound %'S?2;its'@raphics-sw',i"'"i$ %'S?2;its '@raphics -sw',i"

*6

%'S?2;its'@raphics-sw',g"'demo

J. **JO+ +0J6+

%'netscape'mo6emai"-src %'netscape %

&o disp"ay dis# usage inc"uding i"es! e,ecute the o""owing: + !u (ak "usr *6 + + + + 6 'usr'"ostT ound 'usr'A 'usr'"i$'"i$"9(%so 'usr'"i$'"i$I9(%so%6 'usr'"i$'"i$5rm%so 'usr'#6m 'usr &o disp"ay a summary o dis# usage! e,ecute the o""owing + !u (sk "usr 1+J0/1 The 'usr command pro6ides a "ist o pathnames and inode num$ers o i"es in the i"e system%

Command&he

&he command output is sorted in ascending inode num$er order% -or e,amp"e: F 'de6'ds#'c*tJd0s/ 'de6'ds#'c"tJd0s/: inode5 pathname inodeF pathname inode5 pathname inodeF pathname inodeF pathname

&he Huot

Command &he )uot command disp"ays how much dis# space (in L$ytes) is $eing used $y users
2ote - &he )uot command can on"y $e run $y root

)uot B-a D a

B i"e system%%%D 4eports on a"" mounted i"e systems Inc"udes num$er o i"es

&o disp"ay dis# space $eing used $y users on a"" mounted i"e systems! e,ecute the o""owing: F )uot -a 'de6'rds#'c0t0d0s0 *0J+6 * *+.0 * 'de6'rds#'c0t0d0s6 ('usr): *O1JO0 *6*+0J +*00 * +J+ * 6O6+ **..0 $in "p adm% root root sys

&he co"umns represent L$ytes used! num$er o i"es! and owner! respecti6e"y &o disp"ay a count o the num$er o o""owing: F )uot - 'de6'ds#'c"t0d0s/ 'de6'ds#'c"t0d0s/: *J0 *0J *00 Trou,leshooting 6+ .0 J+ root user* userO i"es and space owned $y each user or a speci ic i"e system! e,ecute the

Repairing mportant Files if )oot Fails &he 'etc'6 sta$ i"e is an important system i"e% I it $ecomes corrupted or contain editing errors! it can cause the system $oot to ai"% &he o""owing procedure descri$es how to $oot rom the So"aris 8perating (n6ironment so tware 9:485 to edit the 'etc'6 sta$ i"e% *% +% Insert the So"aris 8perating (n6ironment so tware 9:-485 * o + into the 9:-485 dri6e% 4un a sing"e-user $oot rom the 9:-485%

0k boot c!rom (s Koot de6ice: 'pciZ" !0'pciZ"!"'ideZJ'cdromZ+!0: -i"e and args -s

Sun8S 4e"ease /%. 3ersion @enericE*06/0*-0+ B?2IA(4) System 3 9opyright (c) *O.J-*OOO $y Sun 5icrosystems! Inc% 9on iguring the 'de6 and 'de6ices directories I2I&: SI2@I( ?S(4 58:( F 2ote - Per orming a sing"e-user $oot operation rom this So tware 9:-485 creates an in/memory copy o the ' (root) i"e system! which supports your a$i"ity to per orm administrati6e tas#s% J% ?se the sc# command on the ' (root) partition to chec# and repair any potentia" pro$"ems in the i"e system% ,sck "!ev"r!sk"c0t0!0s0 0% I sc# comp"eted success u""y! mount the ' (root) i"e system on the 'a directory! to gain access "o the i"e system on dis#% "!ev"!sk"c0t0!0s0 "a /% + Set and e,port the &(45 6aria$"e which ena$"es the 6i editor to wor# proper"y B8AKsun

+ e*port B8A 6% i"e% + vi "a"etc"v,stab 1% F cd ' F umount "a G. 8eboot the s&stem. + reboot Processes &unning on the System A process is any program that is running on the system% A"" processes are assigned a uni)ue process identification num,er (PI:)! which is used $y the #erne" to trac# and manage the process% &he PI: num$ers are used $y root and regu"ar! users to identi y and contro" their processes%
Viewing *rocesses and * &s &he Ps (process status) command is common"y the method used or 6iewing a "ist o processes current"y running on a system% Howe6er! there are two other methods or managing process which inc"ude:

(dit the 'etc'6 sta$ i"e and correct any pro$"ems% &hen e,it the

?nmount the i"e system%

&he 9:( Process 5anager &he prstat command 2ote - &he prstat command is new with the So"aris 8perating (n6ironment% The prastat Command &he prstat command interacti6e"y e,amines and disp"ays in ormation a$out acti6e processes on the system% &his command ena$"es you to 6iew in ormation $y speci ic processes! ?I:s! 9P? I:s! or processor sets% Ky de au"t! prstat disp"ays in ormation a$out a"" processes sorted $y 9P? usage% + prstat &o )uit prstat type: )
9o"umn Heading PI: :escription &he process identi ication num$er o the process%

?S(42A5(

&he "ogin I: name o the owner o the process%

SIV(

&he tota" 6irtua" memory si>e o the process%

4SS

&he resident set si>e o the process in #i"o$ytes! mega$ytes! or giga$ytes%

&he state o the process: S&A&( cpu - process is running on the 9P?% s"eep - process is waiting or an e6ent to comp"ete% run - process is in run )ueue% >om$ie - process terminated and parent not waiting% stop-process is stopped% &he priority o the process% P4I &he 6a"ue used in priority computation% 2I9( &he cumu"ati6e e,ecution time or the process% &I5( &he percentage o recent 9P? time used $y the process% 9P?

&he name o the process% P489(SS'2I;P &he num$er o I;Ps in the process%

-a -c -n nproc -p p"d"ist -s #ey

:isp"ays separate reports a$out processes andusers at the same time% 9ontinuous"y prints new reports $e"ow pre6ious reports% 4estricts the num$er o output "ines% 4eports on"y on processes that ha6e a PI: in the gi6en "ist% Sorts output "ines $y #ey in descending order% &he i6e possi$"e #eys inc"ude: cpu! time! si>e! rss! and pri% <ou can use on"y one #ey at a time% Sorts output "ines $y ey in ascending order 4eports tota" usage summary or each user% 4eports on"y processes that ha6e an e ecti6e user I: in the gi6en "ist% 4eports on"y processes that ha6e an e ecti6e user I: is in the gi6en

-S -*

ey

-u euid"ist -? euid"ist

Scheduling the Automatic *6ecution of Commands ?sers can schedu"e a Wo$ or a one-time e,ecution at a speci ied time $y using the at command% ?sers can schedu"e a Wo$ to $e e,ecuted repetiti6e"y! at regu"ar inter6a"s! $y using a cronta$ i"e% &he cron daemon is responsi$"e or schedu"ingM and runningM these Wo$s% 2ote - &he cron daemon is started at system $oot and runs continuous"y in the $ac#ground% The cron ta$ Command A cronta$ i"e is used to automatica""y e,ecute commands or scripts repetiti6e"y! at regu"ar"y schedu"ed inter6a"s% A"" cronta$ i"es are maintained in '6ar'spoo"'cron'cronta$s'username (s)+&he cronta$ command ena$"es the user to 6iew! edit or remo6e a cronta$ i"e%

Crontab ,or the root !ser A cronta$ i"e! '6ar'spoo"'cron'cronta$s'root! is pro6ided in the So"aris 8perating (n6ironment or the root user% Ky de au"t! regu"ar users do not ha6e cronta$ i"es% The root cronta$ i"e contains the o""owing command "ines $y de au"t:

F ident RZ(F)root

*%*O

O.'01'06 S5IR

'S S3r0%0 *%*%J%*

S'

F &he root cronta$ shou"d $e used to per orm accounting data co""ection% F F &he rtc command is run to adWust the rea" time c"oc# i and when F day"ight sa6ings time changes% F *0 J S S 0!0 'etc'cron%d'"ogchec#er *0 J S S 0 */ J S S 0 'usr'"i$'newsys"og 'usr'"i$' s'u s'n s ind

* + S S = > -, 'usr's$in'rtc D __% 'usr's$in'rtc -c H 'de6'nu"" +H_" J0 J S S S B -, 'usr'"i$'gss'gsscredEc"ean D __

'usr'"i$'gss'gsscredEc"ean &he irst "ine instructs cron to run "ogchec#er at J:*0A5 on Sunday and &hursday% &he second "ine instructs cron to run newsys"og at J:*0A5 e6ery Sunday% &he third "ine instructs cron to e,ecute n s ind e6ery Sunday at J:*/A5% &he ourth "ine instructs cron to chec# dai"y- or :ay"ight Sa6ings &ime and ma#e corrections i necessary% &he i th "ine instructs cron to chec# or and remo6e dup"icate entries in the @eneric Security Ser6ice ta$"e! 'etc'gss gsscredEd$% + crontab ($ username Editing a cronta$ "ile &o create or edit a cronta$ i"e! o""ow these steps: *% 9hec# that the (:I&84 6aria$"e is set to the editor you want to use% &his instruct cron on which editor to use to open the i"e% -or e,amp"e: F (:I&84N6i + e*port (:I&84 +% 4un the o""owing cronta$ command to open your cronta$ i"e! and add the o""owing entry% -

F cronta$ -e

J0 *1 S S / 'usr'$in'$anner R&ime to go^R H 'de6'conso"e :w)

9ontro""ing cronta$ Access 9ontro" access to cronta$ with two i"es in the 'etc' cron% d directory


The at Command

'etc'cron%d'cron%deny 'etc'cron%d'cron%a""ow

&he at command is used automatica""y e,ecute a Wo$ at a speci ied time 7ust once% at >/m< >-r ?o,< >/8 8ueuename< >-t time< >date< &he options that can $e used to instruct cron on how to e,ecute an at o$ inc"ude:

-t time

Speci ies a time or the command to e,ecute% Inc"udes the o""owing ormats: h! hh! hh:mm now noon midnight

A +0-hour c"oc# is assumed un"ess you use am'A5 or pm'P5 on the command "ine% date Speci ies a date or the command to e,ecute% Inc"udes ormats! such as: month o""owed $y a day num$er! (e%g% 7un 6) name o a day! (e%g% -riday) today tomorrow -m -t -)% Sends mai" to the user a ter the Wo$ has inished% &hisis the de au"t or root% 4emo6es a schedu"ed at Wo$ rom the )ueue!

)ueuename Speci y a speci ic )ueue

E-ecuting the at Command &o create an at Wo$ to run at a speci ied time to "ocate and de"ete core i"es: F at .:0/ pm at.,in! "e*port"home"user5 (name core (e*ec rm UV WX atHGPress Control/d here@ commands wi"" $e e,ecuted using '$in'#sh Wo$ .O*//006.%a at &hu Apr + *0:0/:00 +000

&o disp"ay in ormation a$out e,ecution times o Wo$s: F at -* B Wo$E"d D .O1/0JO00! a &hu Apr + *0:0/:00 +000

&o disp"ay the Wo$s )ueued to run at speci ied times $y ran#ing order: F at) 4an#% *st (,ecution :ate Apr 3+ +000 *0:0/ 8wner user+ 7o$ .O*//00@.%a aueue a 7o$ 2ame stdin

&o remo6e a Wo$ rom the at )ueue: * F at -r .O*//006.%a &o 6iew a"" the at Wo$s current"y schedu"ed in the )ueue: F "s -* '6ar'spoo"'cron'atWo$s -r-S--------r-S-------* user+ sta 6J0 Apr + *0:0/ .O*//006.%a * user" sta J+* Apr + +*:0+ O/+1+/600%a

&en(ing at AccessKy de au"t! the So"aris 8perating (n6ironment inc"udes the i"e 'etc'cron%d'at %deny% &his i"e identi ies users who are prohi$ited rom 6ising the at command% &he i"e ormat is one user name per "ine% A user who is denied access to at recei6es the o""owing message when attempting to use this command: at: you are not authori>ed to use at% Sorry%

I the 'etc'cron%d'at%deny i"e-e,ists! $ut is empty! then a"" "ogged in users can access the at command%

Allowing at Access 's root, you can create the file ;etc;cron.d;at.allow to list the names of users who are permitted to use the at command. !hen this file exists, it is read before the ;etc;cron.d;at.deny file. &f a user name exists in both files then that user will be denied access to the at command. ;hen neither the at %deny or the a""ow i"es e,ists! on"y root can use this command%

#he Solaris )perating *n ironment %un &e els


' run le4el is a digit or a letter representing a system state that defines what ser4ices and resources are currently a4ailable to users. The system is always running in one run le4el. 4un "e6e"s are sometimes re erred to as init states $ecause the init process is used to transition $etween run "e6e"s% <ou can use the init command to manua""y initiate run-"e6e" transitions% &he So"aris 8perating (n6ironment has eight run "e6e"s! which are descri$ed in the o""owing ta$"e%

4un

-unction

Ie6e"

0
s or S

Shuts down the So"aris 8perating (n6ironment and disp"ays the $oot P485 o# prompt so it is sa e to turn o power to the system% 4uns as sing"e user with a"" i"e systems mounted and accessi$"e% Indicates system is running I2 a sing"e-user administrati6e state with access to a"" a6ai"a$"e i"e systems% Indicates system is running in mu"ti-user operations% 5u"tip"e users can access the system% A"" system daemons are running e,cept or the 2-S ser6er daemons% Indicates system is running in mu"ti-user operations with 2-S resource-sharing a6ai"a$"e% Speci ied as the de au"t run "e6e" in the 'etc'initta$ i"e% &his "e6e" is current"y not imp"emented% Shuts down the So"aris 8perating (n6ironment and powers o the system% Shuts down the system to run "e6e" 0! and then re$oots to mu"ti-user operations! (or the "e6e" set in the de au"t in the 'etc'initta$ i"e)%

* + J 0 / 6

F who -r run "e6e" J 7un O 0.:J0 J 0 S

:ate and &ime Pre6ious 9urrent run "e6e" o "ast run "e6e" change

current run "e6e" run "e6e"

2um$er o times at this run "e6e" since "ast re$oot

The Boot Process In general, when a system is turned on, the PROM monitor runs a quick self-test procedure that checks the hardware and memory on the system. If no errors are found, the system begins the automatic boot process. he entire boot process is described by four distinct phases!

*)

"oot PROM phase #$ "oot Programs phase %$ &ernel Initiali'ation phase ($ init phase )oot *R.M phase: he following describes the "oot PROM phase! PROM runs PO) * he boot PROM firmware runs the power on self test *PO) $ to +erify the system,s hardware and memory. he PROM displays the system identification banner, for e-ample, model type, amount of installed memory, PROM +ersion number, PROM serial number, .thernet /ddress, and 0ost I1. "oot determines the boot de+ice. "oot locates the bootblk on the boot de+ice. "oot loads the bootblk from its location on the boot de+ice into memory. he primary booth program, bootblk, is located in a fi-ed location on the boot de+ice in sectors 223. Its purpose is to load the secondary boot program located in the ufs file system on the boot de+ice. )oot *rograms phase:

he following describes the "oot Programs phase! "ootblk loads the secondary boot program, ufsboot from the boot de+ice into memory. he path to ufsboot is recorded in the bootblk, which is installed by the solaris utility installboot. 4fsboot locates and loads the appropriate two-part kernel. he kernel is comprised of a two piece static core called genni- kernel file and uni- is the platform specific kernel file. 5hen ufsboot loads these two files into memory, they are combined to form the running kernel. On a %# bit system, the twopart kernel is located in the directory6platform6,uname 7m,6kernel. On a 8( bit system, the twopart kernel is located in the directory6platform6,uname 7 m,6kernel6sparc+9. !ote: o determine the platform name *.g! the sytem hardware class, type the command uname 7m. :or e-ample, by typing this command on a )un 4ltra 2; it would display! sun(u The 'ernel initiali5ation *hase:

he following describes the kernel initiali'ation phase! he kernel initiali'es itself and begins loading modules. he kernel uses ufboot to read the files. 5hen it has loaded enough modules to mount the root file system it unmaps the ufsboot program and continues on. he kernel reads its configuration file called 6 etc6system. he kernel starts the 6sbin6init process. he )unO) kernel consists of a small, static core *genuni- and uni-$ and many dynamically loadable kenel modules. Modules can consist of de+ice dri+ers, file systems, streams, as well as other types used for specific tasks within the system.

he modules which comprise the kernel typically reside in the directories 6kernel and usr6kernel. Platform dependent modules reside in the 6platform6,uname 7m,6kernel and 6platform6,uname 7I,6kernel directories. .ach subdirectory located under these directories is a collection of similar-type modules.

&he ad6antages o this dynamic #erne" arrangement is the o6era"" si>e o the #erne" is sma""er ma#ing more e icient use o memory and a""owing or simp"er modi ication and tuning%
J+-$it Lerne" 'p"at orm'Quname -m''#erne"'genuni, 'p"at orm''uname -m''#erne"'uni, 60-$it Lerne" 'p"at orm' 'uname -m''#erne"'sparc6O'genuni, 'p"at orm' 'uname -m3 #erne"'spar c6O'uni, 5(584<

Static 9ore genuni, uni,

:e6ice :ri6er 5odu"es

5odu"e directories

Streams 5odu"es

5odu"es

-S 5odu"es

'#erne" 'usr'#erne" 'p"at orm' uname mQ'#erne" 'p"at orm'unama -i '#erne" Sch'ed 5odu"es

Sched 5odu"es

Configuring the kernel &he 'etc'system i"e is the contro" i"e or speci ying which modu"es and parameters are to $e "oaded $y the #erne" at $oot time% Ky de au"t! a"" "ines in this i"e are commented out% 5odi ying-the #erne"'s $eha6ior (or con iguration) re)uires editing the 'etc'system i"e% A"tering this i"e a""ows the system administrator to -modi y the #erne"'s treatment o "oada$"e modu"es! as we"" as #erne" parameters or some per ormance tuning% &he $oot program contains a "ist o de au"t "oada$"e #erne" modu"es which are "oaded at $oot time% Howe6er! you can o6erride this "ist $y modi ying the 'etc'system i"e to contro" which modu"es! as-we"" as parameters are "oaded% A"" changes to this i"e ta#e e ect a ter a re$oot% &he 'etc'system i"e e,p"icit"y contro"s: &he search path or de au"t modu"es to $e "oaded at $oot time% &he root type and de6ice% &he modu"es not to $e "oaded automatica""y at $oot time% &he modu"es to $e orcea$"e "oaded automatica""y at $oot time! rather that at irst access% &he new 6a"ues to o6erride the de au"t #erne" parameter 6a"ues% 2ote - 9ommand "ines must $e .0 characters or "ess in "ength and comment "ines must $egin with an asteris# (S) and end with a new "ine character Sample"etc"s&stem Dile S ident RZ (F) system *%*. O1'06'+1 S5& 'S S340 *%/ S'

S S<S&(5 SP(9I-I9A&I82 -II( = S moddir: S Set the search path or modu"es% &his has a ormat simi"ar to the csh path S 6aria$"e% I the modu"e isn't ound in the irst directory it tries! the second% S and so on% &he de au"t is '#erne" 'usr'#erne" S (,amp"e:

S S

moddir: '#erne" 'usr'#erne" 'other'modu"es

S root de6ice and root i"esystem% con iguration-% S &he o""owing may $e used to o6erride the de au"ts pro6ided $y the $oot program': S S S S S S S S S S S S S e,c"ude: S 5odu"es appearing in the moddir path which are 28& to $e "oaded! e6en i re erenced% S 2ote that 'e,c"ude' accepts either a modu"e name! or a i"ename which inc"udes the S directory% S S S S = orce"oad: S 9ause these modu"es to $e "oaded at $oot time! (Wust $e ore mounting the! root S i"esystem) rather than at irst re erence% 2ote that orce"oad e,pects a (,amp"es: e,c"ude: win e,c"ude: sys'shmsys (,amp"e: root s :u s rootde6:'sh isZ"! .000000'espZ0!.00000'sdZJ!0:a (Swap de6ice con irmation shou"d $e speci ied in 'etc'6 sta$%) rootde6: Set the root de6ice% &his shou"d $e a u""y e,panded physica" pathname% &he de au"t is the physica" pathname o the de6ice where the $oot program resides% &he physica" pathname is high"y p"at orm and con iguration dependent% root s: Set the i"e system type o the root%

S i"ename which inc"udes the directory% A"so note that "oading a modu"e does

S not necessari"y imp"y that it wi"" $e insta""ed% S S S set: S Set an integer 6aria$"e in the #erne" or a modu"e to a new 6a"ue% S &his aci"ity shou"d $e used with caution% S = S S S S (,amp"es: &o set 6aria$"es in 'uni,': set nautopushNJ+ set ma,usersN00 &o set a 6aria$"e namea 'de$ug' in the modu"e named test modu"e' See system(0) % (,amp"e: orce"oad: dr6' oo

set testEmodu"e:9+$ug N 0HM*J &he 'etc'system i"e is di6ided into i6e distinct sections:

mo!!ir: Sets the search path or de au"t "oada$"e #erne" modu"es% <ou can "ist together mu"tip"e directories to search! de"imited either $y $"an# spaces or co"ons% I the modu"e is not ound in the irst directory! it tries the second directory! and so on%

root de6ice and root i"esystem con iguration: Sets the root i"e system type to the "isted 6a"ue% &he de au"t is root s:u s Sets the root de6ice% The de au"t is the physica" pathname o the de6ice where the $oot program resides% &he physica" pathname is p"at orm and con iguration dependent% -or e,amp"e: rootde6: 's$usZ"! .000000 'esp.0 ! .00000'sdZJ ! 0 : a

e*clu!e: :oes not a""ow the "oada$"e #erne" modu"e(s) to $e "oaded during #erne" initia"i>ation% -or e,amp"e: e,c"ude: sys'shmsys ,orceloa!: -orces the #erne" modu"e(s) to $e "oaded during #erne" initia"i>ation% -or e,amp"e: orce"oad: dr6'6, &he de au"t action is to automatica""y "oad a #erne" modu"e when its ser6ices are irst accessed during runtime! $y a user or app"ication%

Set:

9hanges #erne" parameters to modi y the operation o the system% -or e,amp"e: set ma,users N 00 Editing the 'etc'system "ile Ke ore editing the 'etc'system i"e! you shou"d ma#e a $ac#up copy% I you enter incorrect 6a"ues in this i"e! the system might not $e a$"e to $oot%

&he o""owing shows how to copy the origina" 'etc'system i"e to a $ac#up i"e! and then edit the 'etc' system "ie% + cp "etc"s&stem 'etc"s&stem%orig + vi "etc"s&stem. I a $oot process ai"s $ecause o an unusa$"e 'etc'system i"e! issue the interacti6e $oot command: $oot -a% ;hen re)uested to enter the name o the system i"e! type in the name o your $ac#up system i"e! or a"ternati6e"y enter: de6'nu""! or a nu"" con iguration i"e% The init Phase &he ina" phase o the $oot process is the 'etc'init phase% :uring this phase init start the run contro" scripts which starts 8ther processes%&he -init process e,ecutes re scripts %which -in turn e,ecute a series o other scripts 8nce the init phase comp"etes success u""y! the system "ogin prompt is disp"ayed% #he "etc"inittab Dile ;hen you $oot a system! or changes run "e6e"s with the init or shutdown command! the init daemon starts processes $y reading in ormation rom the 'etc'initta$ i"e% &he initta$ i"e de ines three important items or the init process: &he system's de au"t run "e6e"% ;hat processes to start! monitor! or restart i terminated% ;hat actions to ta#e when the system enters a new run "e6e"% (ach "ine entry in the 'etc'initta$ i"e has the o""owing our ie"ds: id:rstate:action:process &he ie"ds in an initta$ entry are descri$ed in the o""owing ta$"e: id rstate A * to 0 character identi ier or the entry% 8ne or more ran "e6e"s to which this entry app"ies%

action How the process (in the ne,t ie"d) is to $e treated% process &he command or script to e,ecute%

sJ : J : wait: 's$in'rcJ

H'de6'msg"og +GH 'de6'msg"og G'de6'conso"e

/n"etc"inittab -i"e (ntry 2ote - 5essage output rom system startup (rc) scripts is directed to 'de6'msg"og% Pre6ious"y! a"" o these messages were written to 'de6'conso"e% -or more in ormation re er to msg"og (1:) Some possi$"e #eywords used in the action ie"d inc"ude: init!e,ault Identi ies the de au"t run "e6e"% 4ead when init is initia""y in6o#ed% ?sed $y init to determine which run "e6e" to enter initia""y% &he de au"t is run "e6e" J% 9aution - I the rstate ie"d is empty it is interpreted as 0*+J0/6% and init wi"" enter run "e6e" 6! as the de au"t% &his wi"" cause the system to re$oot continuous"y% s&sinit (,ecutes the process $e ore init tries to access the conso"e ( or e,amp"e! the conso"e "ogin prompt)! init waits or its comp"etion $e ore it continues to read the initta$ i"e% wait Starts the process and waits or it to comp"ete $e ore mo6ing to the ne,t entry containing the same run "e6e"% respawn I the process dies! init wi"" restart it% I the% Process does not e,ist! init starts it and continues reading the initta$ i"e% I the process does e,ist! no action re)uired! and init% continues reading the initta$ i"e% power,ail (,ecutes the process on"y i init recei6es a power ai" signa"%

2ote X Additiona" action #eywords are a6ai"a$"e and de ined in the initta$ man page% Default "etc"inittab Dile
&he o""owing is an e,amp"e o the de au"t 'etc'initta$ i"e% ap::sysinit:'s$in'autopush - 'etc'iu%ap ap::sysinit:'s$in'socon ig - 'etc'soc#+path s::sysinit:'s$in'rcS sysinit H'de6'msg"og +GH'de6'msg"og pJ:s*+J0:power ai":'usr's$in'shutdown -y -i/ g0 H'de6'msg"og +GH'de6'msg"og sS:S:wait:'s$in'rcS H'de6'msg"og +GH'de6'msg"og G'de6'conso"e s0:0:wait:'s$in'rc0 H'de6'msg"og +GH'de6'msg"og G'de6'conso"e s":":respawn:'s$in'rc" H'de6'msg"og +GH'de6'msg"og G'de6'conso"e s+:+J:wait:'s$in'rc+ H'de6'msg"og +GH'de6'msg"og G'de6'conso"e sJ:J:wait:'s$in'rcJ H'de6'msg"og +GH'de6'rosg"og G'de6'conso"e s/:/:wait:'s$in'rc/ H'de6'msg"og +GH'de6'msg"og G'de6'conso"e G'de6'conso"e is:J:initde au"t:

s6:6:wait:'s$in'rc6% H'de6'msg"og +GH'de6'msg"og G'de6'conso"e w:0:wait:'s$in'uadmin + 0 H'dG+6'msg"og +GH'de6'msg"og G'de6'conso"e o :/:wait: 's$in'uadmin + 6 H'6%e6'msg"og +GH'de6'msg"og G'de6'conso"e r$:6:wait:'s$in'uadmin + * H'de6'msg"og +GH'de6'msg"og G'de6'conso"e sc:+J0:respawn:'usr'"i$'sa 'sac Xt J00! co:+J0:respawn:'usr'"i$'sa 'ttymon g -h -p 'uname -n' conso"e "ogin: R -& sun -d 'de6'conso"e -* conso"e -m Idterm! ttcompat &he o""owing descri$es each initta$ "ine entry: *% +% J% 0% /% 6% 1% .% O% *0% **% *+% *J% *0% */% *6% *1% Initia"i>es S&4(A5S modu"es 9on igures soc#et transport pro6iders Initia"i>es i"e systems :e ines de au"t run "e6e" :escri$es a power ai" shutdown :e ines sing"e-user mode :e ines run "e6e" 0 :e ines run "e6e" * :e ines run "e6e" + :e ines run "e6e" J :e ines run "e6e" / :e ines run "e6e" 6 :e ines transition to irmware %% :e ines transition to power o :e ines transition to re$oot Initia"i>es Ser6ice Access 9ontro""er Initia"i>es conso"e

he init Process
&he o""owing i""ustrates the process o $ringing a system to the de au"t run "e6e" J%

&he 'etc'init process reads the 'etc'initta$ i"e to do the o""owing: *% +% Identi y the initde au"t entry! which de ines the de au"t run "e6e" J% (,ecute any process entries that ha6e sysinit in the action ie"d so that any specia" initia"i>ation can ta#e p"ace $e ore users "ogin% (,ecute any process entries that ha6e J in the rstate ie"d! which matches the de au"t run "e6e"! J% &he commands e,ecuted at this run "e6e" inc"ude:

J%

"usr"sbin"shut!own(&he init process runs the shutdown command on"y i the system has recei6ed a power ai" signa"% "sbin"rcS -5ounts and chec#s ' (root)! 'usr! '6ar! and '6ar'adm i"e systems% "sbin"rc5 - Starts the system daemons! $ringing the system up into run "e6e" + (mu"ti-user mode)% "sbin"rc3 - Starts 2-S resource sharing or run level 3. "sbin"rc3 - Starts 2-S resource sharing or run level 3. "usr"lib"sa,"sac-Starts or restarts the port monitors and networ# access or ??9P% "usr"lib"sa,"tt&mon-Starts or restarts the ttymon process that monitors the

conso"e or "ogin re)uests% &he termina" type on a SPA49-$ased system is sun% &he termina" type on an "A-$ased system is A&J./% %un Control Scripts
&he So"aris 8perating (n6ironment pro6ides a series o run contro" (rc) scripts to stop and start processes norma""y associated with run "e6e"s% #he "sbin Directory (ach run "e6e" has an associated rc script "ocated in the 's$in directory% s$in

rc0

rc" %

rc+

rcJ

rc/

rc6

rcs

&he ' s$in :irectory The rc scripts are executed by init to set up 4ariables, test conditions.. and make calls to Jouter scripts that start and stop processes for that run le4el. &he rc scripts rc0! rc/ and rc6 i"es are hard "in#ed% -or e,amp"e: F ca 'etc F *s * rcP Irw,rw,rw, Irw,rw,rw, Irw,rw,rw, Irw,rw,rw, Irw,rw,rw, Irw,rw,rw, "rw,rw,rw, * root * root * root * root * root * root * root root root root root root root root ** -ee ++ *0:*O rc0 -H %%'s$in'rc0 ** -e$ ++ *0%*O rc" -H % %'s$in'rc" ** -e$ ++ *0:*O rc+ -H %%'s$in'rc+ ** -e$ ++ *0:*O rcJ -H % %'s$in'rcJ ** -ee ++ *0:*O rc/ -H %%'s$in'rc/ ** -e$ ++ *0:*O rc6 -H % %'s$in'rc6 ** -e$ ++ *0:*O rcS -H %%'s$in'rcS

FThe 'etc'rc F % dDirectories -or each 's$in'rc script! there is a corresponding directory named 'etc'rcF%d%

+ $s "etc"rc5.!
&he 'etc'rcF %d scripts are a"ways run in the sort order shown $y the

*s command-% &hese i"es ha6e names in the orm o :

PYSQ =0(4> P0(4Q% -i"es $eginning with L are run to terminate (#i"") a system process% -i"es $eginning with S are run to start a system process% 2ote - -i"e names that $egin with a "owercase # or s are ignored $y init and they are not e,ecuted% &o disa$"e a script! rename it with the appropriate "owercase "etter%

&he'etc'init%d :irectory
7un control scripts are located in the ;etc;init.d directory. These files are hard linked to corresponding+ run control scripts in the ;etc /rc#. d directories. 'etc

init%d

cron

dt"ogin

"p

n s% ser6er

&he $ene it o ha6ingM indi6idua" scripts or each run! "e6e" is that you can run scripts in the 'etc'init%d director indi6idua""y $y root% <ou can turn o a process or start a process without changing the system's run "e6e" -or e,amp"e! to stop and restart the "p print ser6ices! run the o""owing script's with a stop or start command: + "etc"init.!"lp stop + "etc"init.!"lp start

rc Script 's$in'rc0

-unction 4uns the 'etc'rc0 %d'LS scripts to per orm the o""owing tas#s - Stops system ser6ices and daemons - &erminates a"" running processes - ?nmounts a"" i"e systems 4uns the 'etc'rc" %d scripts to per orm the o""owing tas#s: - Stops system ser6ices and daemons % - &erminates a"" running processes - ?nmounts a"" i"e systems 4uns the 'etc'rc+%!d scripts to per orm the o""owing tas#s: - 5ounts a"" "oca" i"e systems - 4emo6es any i"es in the 'trop directory I - 9on igures system!

's$in'rc" 's$in'rc+

accounting - 9on igures de au"t router Starts most o the system daemons 's$in'rcJ 's$in'rc/ 's$in'rc6 's$in'rcS 4uns the 'etc'rcJ %discripts to per orm the a""owing tas#s: = 9"eans up 'etc'd s'shareta$ i"e - Starts n sd and mountd 4uns the 'etc'rc0 %d'LS scripts to per orm the o""owing tas#s: - Li""s a"" acti6e processes and unmounts the i"e systems 4uns the 'etc'rcS%d scripts to $ring the system up to run "e6e" S% - (sta$"ishes a minima" networ#! - 5ounts 'usr! i necessary -Sets the system name - 9hec#s the ' (root) and 'usr i"e systems - 5ounts p'seudo i"e systems ('proc and 'de6' d) - 4e$ui"ds the de6ice entries or recon iguration $oots % - 5ounts other i"e systems to $e mounted in sing"e-user mode

Creating a 2ew %un Control Script


<ou can create new scripts to start and stop additiona" processes or ser6ices to customi>e a system% -or e,amp"e! to e"iminate the re)uirement or ha6ing to manua""y start a data$ase ser6er! create a script to automatica""y start the data$ase ser6er once the appropriate networ# ser6ices ha6e started% <ou cou"d then create another script to terminate this ser6ice and shut down the data$ase ser6er $e ore the networ# ser6ices are stopped% % To add run control scripts to start and stop a ser4ice; create the script in the ;etc;init .d directory and create links ion the appropriate ;etc;rc(.d directory for the run le4el the ser4ice is to be started and stopped K

See the 4(A:5( i"e in each ' etc 'rcF%d directory or more in ormation on run contro" scripts% &he o""owing procedure descri$es how to add a run contro" script'% * 9reate the script in the 'etc'init%d directory% + vi "etc"init.!",ilename

F chmod 0100 'etc'init%d' i"ename F chown root:sys 'etc'init%d' i"ename

+%

9reate "in#s to the appropriate'etc'reF! d directory% + c! "etc"init.! F *n i"ename 'etc'rcF%d'SFF i"ename F *n i"ename 'etc'reF%d'L%FF i"ename

J%

?se the *s command to 6erity that the script has "in#s in the appropriate directories%

+ $s "etc"init.! "etc"rc+.! "etc"rc+.! 0% &est the i"ename $y entering the o""owing commands'% F 'etc'init%d' i"ename start

System Shutdown Procedures


<ou can shut down the So"aris 8perating (n6ironment to per orm administration tas#s or maintenance acti6ities! in anticipation o a power outage! or i you need to mo6e the system to a new "ocation% &he So"aris 8perating (n6ironment re)uires a c"ean and order"y shutdown process! which stops process writes data in memory to dis#(s)! and unmounts i"e systems% 8 course! the type o wor# you need to do determines how the system is shut down and what command is used% &he o""owing descri$es the di erent types o system shutdowns% Shut down the system to sing"e-user mode Shut down the system to stop the So"aris 8perating (n6ironment and disp"ay the o# prompt% Shut down the system to turn o power Shut down the system automatica""y-and re$oot to mu"ti-user mode &he commands a6ai"a$"e to root or doing these types o system shutdown procedures inc"ude:

"sbin"init =using run levels S: $: 0: 0 or 2> 'usr's$in'shutdown (using run "e6e"s S! *! 0! / or 6) 'usr's$in'ha"t 'usr's$in'powero 'usr's$in're$oot

The 's$in'init Command

<ou can use the init command to shutdown! powero ! or re$oot a system in a c"ean and order"y manner% It e,ecutes the rc0 #i"" scripts! howe6er! this command does not warn "ogged in users that the system is $eing shutdown! and there is no de"ay%

&o shut down-the system to sing"e user mode! use cither run "e6e" S or *! or e,amp"e: + init S &o shut down the system to stop the So"aris 8perating (n6ironment and disp"ay the o# prompt: + init 0 &o shut down the system and turn its power o : + init 0 &o shut down the system and then re$oot to mu"ti-user mode: + init 2

The 'usr's$in'shutdown 9ommand


The shutdown command is a script that in4okes init to shutdown ,poweroff, or reboot the system. &t does execute the rcF kill scripts to shutdown processes and applications gracefully. Unlike the init command, the shutdown command does the following+

2oti ies a"" "ogged in users that the system is $eing shutdown :e"ays the shutdown or 60 seconds $y de au"t @i6es you the capa$i"ity to inc"ude an optiona" descripti6e message to in orm your users Command "ormat shut!own P (& Q P (g grace(perio!(Q P (i init(state Q P optional message Q &he -y option is used to pro-answer the ina" shutdown con irmation )uestion so the command runs without user inter6ention% &he -g grace-period a""ows root to change the num$er o seconds rom the 60-second de au"t% &he -i init-state speci ics the s"ate init is to $e in%R Ky de au"t! system state S is used% &o shut down the system to sing"e-user mode! enter either run "e6e" S or *! or e,amp"e: + shut!own (is disp"ay the o# prompt: + shut!own (i0 &o shut down the system and turn o its power automatica""y: + shut!own (i0 &o shut down the system and then re$oot to mu"ti-user mode:

+ shut!own (i2

The 'usr's$in'ha"t Command


&he ha"t command per orms an immediate shutdown: It does not e,ecute the rc0 #id scripts! it does not noti y "ogged in users! and there is no de"ay% &o shut down the system to stop the So"aris 8perating (n6ironment and disp"ay the o# prompt: # halt

The usr sbin !oweroff Command


&he powero command per orms an immediate shutdown% It does not e,ecute the rc0 #i"" scripts! no "ogged in users are noti ied! and there is no de"ay% &o shut down the system and turn o its power! + powero,,

The 'usr's$in're$oot Command


&he re$oot command per orms an immediate shutdown and $ring the system to run "e6e" J $y de au"t% &he re$oot command di ers rom the nit 6 command $ecause it does not e,ecute the rc0 #i"" scripts! and it does not noti y "ogged in users% &o shutdown the system and then re$oot to mu"ti-user mode + reboot

%ac ing .p and &estoring "ile Systems


Kac#ing up i"e systems is the tas# o copying i"e systems to remo6a$"e media! such as tape! to sa eguard against "oss! damage! or corruption% 4estoring i"e systems means copying reasona$"y current $ac#up i"es rom remo6a$"e media $ac# to dis#% Importance of 4egular 3ile (ystem -ackups Kac#ing up i"e systems is one o the most crucia" system administration! unctions% Kac#ups shou"d $e per ormed on a regu"ar"y schedu"ed $asis to pre6ent "oss o data due to:


Tape Device &ypes

Accidenta" de"etion o i"es Hardware ai"ures Pro$"ems when reinsta""ing or upgrading a system System crashes System $rea#-in $y an unauthori>ed user compromising data integrity 2atura" disasters

-igure *1-* shows typica" tape de6ices used or storing i"e systems during the $ac#up process%

&he media chosen depends on the a6ai"a$i"ity o the e)uipment that supports it and the media se"ected to store the data%
5edia &ype *'+-inch ree" tape *'0-inch (aI9) cartridge tape .-mm cartridge tape 0-mm :A& cartridge tape :I& *'+-inch cartridge tape 9apacity 00 5$ytes (6+/0 KPI) . @$ytes 00 @$ytes +0 @$ytes 10 @$ytes

The capacities shown are approximate and continue to increase. *heck the documentation that comes with the tape de4ice to determine its capacity.

5ogical Tape De%ice )ames A"" tape de6ices ha6e "ogica" de6ice names that are used to re erence the de6ice on the command "ine% &hese "ogica" de6ice names use the o""owing ormat: 'de6'rmt'Fhn

Iogica" tape num$er &ape density ("!m!h!c!u) 2o rewind -or e,amp"e:

&he irst instance o a tape dri6e: 'de6'rmt'0 &he second instance o a tape dri6e: 'de6'rmt'* &he third instance o a tape dri6e: 'de6'rmt'+

&ape de6ice names are a"ways num$ered 0 and can inc"ude the o""owing optiona" parameters:

2o 4ewind: &he "etter RnR at the end o a tape de6ice name indicates the tape is not to $e rewound when the current operation comp"etes% &ape :ensity: -i6e 6a"ues can $e gi6en in the tape de6ice name: -* ("ow)! m (medium)! h (high)! c (compressed)! or u (u"tra compressed)%

:enstintion the tape dri6e ependent% 9hec# the manu acturer's documentation or the correct densities supported $y a tape de6ice% &he de au"t can a"so $e determined $y de6ice entries in the i"e '#erne"'dr6'st%con %

Data $ompression
&ape de6ices that support data compression contain interna" hardware that per orms theM compression% Hardware-$ased compression is not as space e icient as using the So"aris compress command! though it is much aster% Types of Pile System %ac ups As root! you can per orm the o""owing types o $ac#ups: -u"" - A comp"ete i"e system $ac#up Incrementa" - 8n"y i"es in the i"e system that ha6e $een added or modi ied since a pre6ious $ac#up Ke aware that i a so tware compressed i"e is $ac#ed up using the tape de6ice hardware compression option! the i"e wi"" e,pand on tape to a si>e "arger than its compressed 6ersion%

#he u,s!ump Command


&he "usr"sbin"u,s!ump command is the recommended command or shedu"ed $ac#ups o comp"ete i"e systems! as it is resident command in the So"aris 8perating (n6ironment% 2ote - 8ther $ac#up programs are a6ai"a$"e rom either Sun 5icrosystems! Inc%! or thirdparty pac#ages% Command Format u sdump options B arguments D

i"esystem%Ename

<ou can use this command to $ac# up a comp"ete or a partia" i"e system to $ac#up media% Common "!tions &he o""owing are 8ne common options or the u sdump command:

0-O-EKac#up Ie6e"% Ie6e" 0 is or a u"" $ac#up o the who"e i"e system% Ie6e"s * through O are or incrementa" $ac#ups o i"es that ha6e changed since the "ast "ower"e6e" $ac#up% 6- 3eri y% A ter each type is written! 6eri y the contents o the media against the source i"e system% I any discrepancies occur! prompt the operator to insert new media!-then repeat the process% ?se this option on"y on an unmounted i"e system! any acti6ity in the i"e system causes it to report discrepancies%

S - Si>e estimate% :etermines the amount o space needed on tape to per orm the
$ac#up and disp"ay the estimated num$er o $ytes re)uired% $ - Auto"oad% ?se this option or an auto"oading (stac#"oader) tape dri6e%

o -8

"ine% ;hen inished! ta#e the dri6e o "ine! rewind (i tape)! and i possi$"e eWect

the media%

u-?pdate

the 'etc'dumpdates i"e% An entry indicates the de6ice name or the i"e system dis# s"ice! the $ac#up "e6e" (0-O)! and the date% 2o record is written when the u option is not used! I an entry a"ready e,ists or a $ac#up at the same "e6e"! it is rep"aced%

-Speci y the tape de6ice name where the i"e system wi"" $e copiedR% ;hen the de au"t tape de6ice! 'de6'rmt'0) is $eing used! it is not necessary to speci y this de6ice with the option! it is assumed%

,ile

system to ,ac up - Speci y one o the o""owing to $e $ac#ed up% &he i"e system's mount point name (e%g% 'usr)% &he raw de6ice name ('de6'rds#'cFtFdFsF)%

#he 3etc"!ump!ates $ile (ach "ine in 'etc'dumpdates i"e shows the i"e system $ac#ed up! the "e6e" o the "ast $ac#up! and the day! date! and time o the $ac#up% &he o""owing is an e,amp"e o a typica" 'etc'dumpdates i"e: + cat "etc"!ump!ates 'de6'rds#'c0t+d0s6 'de6'rds#'c0t+d0s0 'de6'rds#'c0t+d0s0 0 -ri 7un + 0 -ri 7un + / &hu 7un . *O:*+:+1 +0:00:0+ *O:0+:+* +000 +000! +000

;hen incrementa" $ac#ups are per ormed! the u sdump command consu"ts 'etc'dumpdates to and the date o the most recent $ac#up o the ne,t "ower "e6e"% &hen it copies a"" i"es that were modi ied or added since the date o that "ower-"e6e" $ac#up to the $ac#up media% A ter the $ac#up is comp"ete! a new entry! descri$ing the $ac#up Wust comp"eted! rep"aces the entry or the pre6ious $ac#up at that "e6e"% <ou can determine i $ac#ups are $eing done $y 6iewing the 'etc'dumpdates i"e% &his is particu"ar"y important i a $ac#up is not comp"eted $ecause o e)uipment ai"ure! it wi"" not $e recorded in 'etc'dumpdates% 2ote- ;hen restoring an entire i"e system! chec# 'etc'dumpdates or a "ist o the most recent dates and "e6e"s o $ac#ups! to determine which tapes are needed to restore the entire i"e system%

Scheduling +ackups
&he dump "e6e" speci ied in the u sdump command (0-O) determines which i"es are to $e $ac#ed up% Speci ying dump "e6e" 0 creates a u"" $ac#up o the i"e system%

&he num$ers * through O are used to schedu"e incrementa" $ac#ups! $ut ha6e no de ined meanings% &hese are Wust a range o num$ers used to schedu"e cumu"ati6e $ac#ups% &he on"y meaning "e6e"s * through O ha6e is in re"ationship to each other! as a higher or "ower num$er% Per orming dai"y! cumu"ati6e incrementa" $ac#ups is the most common"y used $ac#up scheme and is recommended or most situations% &he o""owing e,amp"es i""ustrate an incrementa" $ac#up schedu"e or a particu"ar i"e system% 0 Sample %ac up Strategy &he o""owing is an e,amp"e o using incrementa" "e6e"s to $ac#up a i"e system% Planning $ile System +ackups

&he i"e systems to $ac#up

&he num$er o tapes or $ac#up A $ac#up de6ice ( or e,amp"e! tape dri6e) &he type o $ac#up ( or e,amp"e! u"" or incrementa") &he procedures or mar#ing and storing tapes

Finding File S#stem $ames Display the contents of the ;etc;4fstab file, and look at the mount point column for the name of the file system. Determining the $umber of Ta!es &he si>e o the i"e system $ac#up can $e determined $y using the o""owing command% -or e,amp"e: + u,s!ump 0S ,iIes&stem#name Gnum$er reportedH or + u,s!ump 3S ,iles&stem#name Gnum$er reported@ The estimated number of bytes needed on tape to perform the backup is displayed. :i6ide the reported si>e $y the capacity o the tape to see how may needed to $ac#up the i"e system% %ac ing .p to Tape <ou shou"d $ring the system to sing"e-user mode and unmount the i"e system $e ore doing a $ac#up%

I you cannot unmount the i"e system! you need to $e aware that $ac#ing up a i"e system! whi"e operations! such as creating! remo6ing! and renaming i"es are occurring! means some data wi"" not $e inc"uded in the $ac#up%

+acking !p to #ape
<ou shou"d $ring the system to sing"e-user mode and unmount the i"e system $e ore doing a $ac#up% I you cannot unmount the i"e system! you need to $e aware that $ac#ing up a i"e system! whi"e operations! such as creating! remo6ing! and renaming i"es are occurring! means some data wi"" not $e inc"uded in the $ac#up% *% Kecome root to $ring the system to sing"e-user mode and unmount the i"e systems%

+ "usr"sbin"shut!own (& (g300 OS&stem is being shut!own ,or backupO


Shutdown started% 5on 7un / *0:0/:0/ 5d& +000 %

Kroadcast 5essage rom root (pts'*) on host" 5on 7un / *0:0/:0/%%% &he system host" wi"" $e shut down in%/ minutes

System is $eing shutdown or $ac#up

+%

?nmount a"" i"e systems (e,cept ' and'usr) + unmount "e*port "home

J% 9hec# the integrity o the i"e system data with the sc# command! $ut on"y i the i"e system has $een unmounted% + ,sck "e*port"home 0% Per orm a u"" "e6e" 0 $ac#up o the 'e,port'home i"e system% 'de6'rmt'0 'e,port'home

Fu sdump 8u

:?5P: ;riting J+ Li"o$yte records :?5P: :ate o this "e6e" 0 dump: 5on 7un / +000 *0:*0:*/ P5 5:& :?5P: :ate o "ast "e6e" 0 dump:' the epoch :?5P: :umping 1de6'rds#'c0t0d0s1 (host":'e,port'home) to 'de6'rmt'0% :?5P: 5apping (Pass I) Bregu"ar i"esD :?5P: 5apping (Pass II) BdirectoriesD

:?5P: (stimated *+/+06 $"oc#s (6*%*05K)% :?5P: :umping (Pass III) :?5P: :umping (Pass I3) :?5P: &ape rewinding :?5P: *+/*.+ $"oc#s (6*%*+5J) on * 6o"ume at 101 LK'sec :?5P: :?5P IS :82( :?5P: Ie6e" 0 dump on 5on 7un / +000 *0:*0:*/ P5 5:& Performing &emote %ac ups <ou can use the u sdump command to per orm! a $ac#up on a remote tape de6ice% ;hen doing remote $ac#ups across the networ# the system with the tape dri6e must ha6e entries in its '% rhosts i"e or e6ery system that wi"" $e using the tape dri6e% Command Format u,s!ump opi4+ns remotest: tapede6ice filesystem -or e,amp"e! to per orm a u"" "e6e" 0 $ac#up o the e,port'home i"e system on host" to the remote tape de6ice on host+% use the o""owing command: BdirectoriesD Bregu"ar i"esD

+ u,s!ump Ou, bost5'"!av"rmt"0 "e*port"home

:?5P: ;riting J+ Li"o$yte records :?5P: :ate o this "e6e" 0 dump: 5on / 7un +000 0J:*0:/1 P5 5S& :?5P: :ate o "ast "e6e" 0 dump: the epoch :?5P: :umping 'de6'rds#'c0t0d0s1 (host":'e,port'home) to host+:'de6'rtnt'0% :?5P: 5apping (Pass I) Bregu"ar i"esD

:?5P: 5apping (Pass II) BdirectoriesD :?5P: (stimated *+/+06 $"oc#s (6*%*05K)% :?5P: :umping--(Pass III) BdirectoriesD ! :?5P: :umping (Pass I3) Bregu"ar i"esD :?5P: &ape rewinding :?5P: *+/*.+ $"oc#s (6*%*+5K) on * 6o"ume at 100 LK'sec :?5P: ':?5P IS :82( :?5P: Ie6e" 0 dump on 5on / 7un +000 0J:*0:/1 P5 5S& %estoring $ile Systems ?se the u srestore command to restore i"es and i"e systems that were $ac#ed up using the u sdump command% &he reasons why a i"e system might need to $e restored inc"ude: 4e$ui"ding a damaged i"e system 4einsta""ation or upgrade o the So"aris 8perating (n6ironment so tware 4eorgani>ing i"e' systems on e,isting or new dis#s &he u srestore command copies i"es &o dis re"ati6e to the current wor#ing director rom $ac#ups created using the u sdump command% ?se u srestore to re"oad an entire i"e system hierarchy rom a "e6e" 0 $ac#up and incrementa" $ac#ups that o""ow itM or to-restore one 'or more sing"e i"es rom any dump tape% u srestore% options B arguments D B i"esystem D u srestore options B arguments D B i"enames % % % D

&he o""owing descri$es the some options or the u srestore command:

t - Iists the ta$"e o contents o the $ac#up media: r - 4estores the entire i"e system rom the $ac#up media%

, - 4estores on"y the i"es named on the command "ine% i - In6o#es are interacti6e restore% 6 - Speci ies 3er$ose mode% :isp"ays pathnames to the termina" screen as each ti"e is $eing restored% - Speci ies the tape de6ice name% #he restores&mtable Dile A restoresymta$"e i"e is created whene6er restoring an entire i"e system rom a $ac#up tape% &he restoresymta$"e i"e is used on"y $y u srestore or chec /pointing+ which is in ormation passed $etween incrementa" restores% &he restoresymta$"e i"e is not needed when the restore is comp"ete and shou"d $e remo6ed rom the i"e system% Preparing to 4estore 3ile (ystems &he e,amp"es that o""ow demonstrate how to restore indi6idua" i"es in6o#e restore in interacti6e mode to $rowse the contents o the $ac#up tapeM and restore an entire i"e system% Ke ore restoring i"es or i"e systems! you must determine the o""owing:

;hat i"e system $ac#up tapes are needed &he raw de6ice name to restore the i"e system &he temporary directory name to restore indi6idua" i"es &he type o $ac#up de6ice to $e used ("oca" or remote) &he $ac#up de6ice name ("oca" or remote)

%estoring the root,3- $ile System &o restore the ' (root) i"e system! $oot rom the So"aris 9:-485 and then run u srestore% 2ote - I ' (root)! 'usr! or the '6ar i"e system is unusa$"e $ecause o some type o corruption or damage! the system wi"" not $oot% &he o""owing procedure demonstrates how to restore the ' (root) i"e system on the $oot dis# c0t0d0s0% *% Insert the So"aris So tware 9: * o +! and $oot the 9:-485 with the sing"e-user mode option%

o# $oot cdrom -s +% 9reate the new i"e system structure!%

F new s 'de6'rds#'c0t0d0s0 J% 5ount the i"e system to an empty mount point directory!'a and change to that directory% F mount 'de6'ds#'c0t0d0s 'a F cd 'a

J%

4estore the ' (root) i"e system rom its $ac#up tape! F u srestore r 'de6'rmt'0

2ote - 4emem$er to a"ways restore a i"e system starting with the "e6e" 0 $ac#up tape and continuing with the ne,t "owest "e6e" tape up through the highest "e6e" tape% /% 4emo6e the restoresymta$"e i"e% + rm restores&mtable 6% Insta"" the $oot$"# in sectors *-*/ o the $oot dis#% 9hange to the directory containing the $oot$"#! and run the insta""$oot command% + c! "usr"plat,orm"Luname (m"lib",s"u,s F insta""$oot $oot$"# 'de6'rds#'c0t0d0s0 1% + c! " + umount " a .% ?se the sc# command to chec# the restored i"e system% ?nmount the new i"e system%

+ ,sck "!ev"r!sk"c0t0!0s0 O% 4e$oot the system%

+ init 2 *0% Per orm a u"" $ac#up o the i"e system% -or e,amp"e:

+ u,s!ump Ou, "!ev"rmt"0 "!ev"r!sk"c0t0!0s0 2ote - A"ways $ac# up the new"y created i"e system! as u srestore repositions the i"es and changes the inode a""ocation% M&estoring the 'usr and '6ar "ile Systems &o restore the 'usr and '6ar i"e systems repeat the steps descri$ed a$o6e! e,cept step 6% &his step is re)uired on"y when restoring the ( ' ) root i"e system% 4estoring 4egular 3ile (ystems &o restore a regu"ar i"e system! ( or e,amp"e! 'e,port'home! or 'opt) $ac# to dis#! repeat the steps descri$ed a$o6e! e,cept steps *! 6! and O% E-ample + new,s "!ev"r!sk"c+t+!+s+ + mount "!ev"!sk"c+t+!+s+ "rant F cd 'rant F u srestore r 'de6'rmt'F

+ rm restores&mtable ZZ Z

+ c! " + umount "rant + ,sck "!ev"r!sk"c+t+!+s+ + u,s!ump Ou, "!ev"rmt" + "!ev"r!sk"c+t+!+s+ In oking an Interacti e %estore &he u srestore i-i command in6o#es an interacti6e inter ace or $rowsing through the $ac#up tape's directory hierarchy and se"ects indi6idua" i"es to $e e,tracted% *% Kecome root and change to a temporary directory to p"ace the e,tracted i"es% + c! "var"tmp +% In6o#e the u srestore command with the interacti6e option% + u,srestore iv, "!ev"rmt"0 3eri y 6o"ume and initia"i>e maps 5edia $"oc# si>e is 60 :ump date: 5on 7une 0* */:*1M0O +000

:umped rom: the epoch Ie6e" 9 dump o ' on host": 'de6'ds#'c0tJd0s0 Ia$e": none (,tract directories rom tape Initia"i>e sym$o" ta$"e! /% u,srestore . e*tract (,tract re)uested i"es
<8?

&o restore the se"ected i"e(s) rom the $ac#up tape:

:isp"ay the contents o the directorb' structure

ha6e not read any 6o"umes yet% J% %on the $ac#up tape%

u srestore H Is + + *6* *60 S%' S%%' Aauthority Ade au"ts JO /*++ /*+0 *0+00 de6ices' etc' e,port' hone' J0.01 */J60 +/6** */J.* net' opt'% proc' s$in'

*/O J0./ J J0.1 +/6*0

%rhosts %waste$as#et' $in cdrom' de6'

00 +/60%. J/ J +0/0J

#ad$ #erne"' "i$ "ostT ound' mnt'

J/.6J

tmp' J0.0. tmpEmnt'

+00.0 +/600

usr' 6ar'

&o change directories on the $ac#up! tape: u,srestore . c! etc"inet u,srestore . Is

0%

Add any i"e to $e restored to the e,traction "ist! u srestore H add inetd%con hosts -i"es to $e restored are mar#ed with an asteris# (S) or e,traction% I you are e,tracting a directory% A"" o its contents are mar#ed or e,traction% In this e,amp"e! two i"es are mar#ed or e,tractionM and this command disp"ays an asteris# in ront o the se"ected i"e names: Shosts and S inetd%con % &o de"ete a i"e rom the e,traction "ist! use! the de"ete command: u srestore H de"ete inetd%con &his command disp"ays inetd% con without an asteris#%

?n"ess you #now which 6o"ume your i"e(s) are on you shou"d start! with the "ast 6o"ume and wor# towards the irst% Speci y ne,t 6o"ume F:* e,tract i"e %'etc'inet'hosts Add "in#s% Set director! mode! owner! and times% set owner'mode or '%'P BynD n % % % %

6
1%

(,it the interacti6e restore once the i"es are e,tracted% u srestoreH )uit 9hec# the restored i"es! mo6e them to their origina" or permanent "ocation! and de"ete the i"es rom the temporary directory% +mv "var"tmp"etc"inet"hosts "etc"inet"hosts directory

+ rm (r "var"tmp"etc Controlling the #ape Dri e &he mt 9ommand (magnetic tape contro") is used to send instructions to the tape dri6e% 2ot a"" tape dri6es support a"" mt commands% $ommand 3ormat mt B - cape-de6ice-name D command > count A <ou use the - option to speci y the tape de6ice name! typica""y a no-rewind de6ice name%

status -:isp"ays status in ormation a$out the tape dri6e% rewin!(4ewinds the tape% o,, line-4ewinds the tape and! i appropriate! ta#es the dri6e unit o -"ine $y un"oading the tape% ,s, - -orward s#ips count tape i"es%

&'amples of Handling #ultiple Archi%es &o create a tape archi6e o the current directory on the de au"t tape dri6e! without the no rewind option! use the o""owing command% 7 tar c f 3de 3rmt38 4 &he o""owing e,amp"e creates a tape archi6e o the current directory! on the de au"t tape dri6e! using the no rewind option% ; tar cv, "!ev"rmt"On "etc &his e,amp"e positions the tape at the $eginning o the third tar record% ; mt (, "!ev"rmt"On ,s, $ &o e,tract a"" i"es rom tape and p"ace them into the current directory! use the o""owing command: ; tar *v, " !ev"rmt " 0

Physical Dis s
In a standard So"aris 8perating (n6ironment insta""ation! memory-resident dri6ers access a"" physica" dis#s% (ach type o dis# de6ice has a uni)ue dri6er%
Typical Physical Disk Dri%ers

&ypica" physica" dis# dri6ers inc"ude:


Access Paths

!a! ( I6B !isk !river s! [ he SCSI !isk !rive !river -or e iciency! most dri6ers are "oaded into memory at system $oot time%

&he access path to a"" physica" dis#s is through path names de ined in the 'de6 directory% -or e6ery s"ice on e6ery physica" dis#! there are two uni)ue access pathsXthe $"oc# de6ice path and the raw de6ice path% +lock De ice Path &he $"oc# de6ice path is used $y commands! uti"ities! and processes that re er to the s"ice as a i"e system% -or e,amp"e! the o""owing are typica" $"oc# de6ice path names:

"!ev"!sk"c0t0!0s0 "!ev"!sk"c0t0!0s3 &he o""owing is a typica" mount command using the $"oc# de6ice path name: + mount "!ev"!sk"c0t0!0s3 "mnt %aw De ice Path&he raw de6ice access path is used $y uti"ities and processes that do not use the de6ice as a i"e system $ut trans er data sector $y sector% -or e,amp"e! the o""owing are typica" raw de6ice path names:

'de6'rds#'c0t0d0s0 'de6'rds#'c0t0d0s1 &he o""owing are typica" commands that can $e used with the raw de6ice path name: new,s "!ev"r!sk"c0t0!0s3 ,sck "!ev"r!sk"c0t0!0s3 (irtual Disk Access Paths A #ey eature o a"" 6irtua" 6o"ume management app"ications is that they transparent"y pro6ide a 6irtua" partition that can consist o manyR dis# partitions% &o the So"aris 8perating (n6ironment! a 6irtua" partition appears to $e the same as any other% &he "ogica" de6ice names associated with the 6irtua" partitions are simi"ar to other specia" de6ices in that they ha6e $oth a raw de6ice path and a $"oc# de6ice path% &he o""owing are typica" 6irtua" 6o"ume raw and $"oc# de6ice path names or dis#s created with So"stice :is#Suite: "!ev"m!"r!sk"!<5 "!ev"m!"!sk"!<5 &he o""owing are typica" 6irtua" 6o"ume raw and $"oc# de6ice path names or dis#s created with Sun Stor(dge 3o"ume 5anager: 'de6'6,'rds#'apps'"og6o" 'de6'6,'ds#'apps'"og6o" <ou can use 6irtua" 6o"ume de6ice paths the same way as any other de6ice path $y system uti"itiesM or e,amp"e: + mount "!ev"nva"!sk"!<5 "mnt F new s 'de6'n6a'rds#'d0+ + ,sck "!ev"v*"r!sk"apps"logvol

&o e"iminate the "imitation o one s"ice per i"e system! there are 6irtua" 6o"ume management app"ications that can create 6irtua" 6o"ume structures in which a sing"e i"e system can consist o an a"most un"imited num$er o dis#s or s"ices% &wo 6irtua" 6o"ume managers are a6ai"a$"e through Sun: So"stice :is#Suite Sun Stor(dge 3o"ume 5anager 2irtual 2olume 'anagement So"stice :is#Suite and Sun Stor(dge 3o"ume 5anager assem$"e "arge 6o"umes rom mu"tip"e dis# dri6es! $ut they use di erent approaches% (olstice Disk(uite So"stice :is#Suite uses standard partitioned dis# s"ices that ha6e $een created using the ormat uti"ity% A typica" 6o"ume structure is assem$"ed and managed transparent"y%
'de6'md'c"s#'d0+ d0+ is ca""ed a metade6ice

'de6'rds#'c0t0d0s1 'de6'rds#'c0t"d0s0 'de6'rds#'c0t+d0s6

Sun StorEdge 2olume 'anager Sun Stor(dge 3o"ume 5anager manages dis# space $y using contiguous sectors% &he app"ication ormats the dis#s into on"y two s"ices! S"ice J and S"ice 0% S"ice J is ca""ed a pri6ate area! and S"ice 0 is a pu$"ic area% S"ice J maintains in ormation a$out the 6irtua" to physica" d mappings! whi"e the sectors in S"ice 0 pro6ide space to $ui"d the 6irtua" de6ices% 9ontiguous sector groups can $e con igured into su$dis#sM see -igure 0-+%

An ad6antage o this approach is there is a"most no "imit to the num$er o su$dis#s you can create on a sing"e dis# dri6e% In a standard So"aris-dis# partitioned en6ironment! there is an eight-partition "imit per dis#% Concatenated (olumes A concatenated volume com$ines portions o one or more physica" dis#s into a sing"e 6irtua" structure% &he portions are contiguous! and the irst portion tends to i"" with data $e ore the ne,t portion is used% -igure 0-J i""ustrates a samp"e "ayout o concatenated 6o"umes%

-igure 0-J

9oncatenated 3o"umes

&he o""owing descri$es some o the eatures o a concatenated 6o"ume: It can $e used to create a 6irtua" 6o"ume that is "arger than one physica" dis#% <ou can grow a i"e system as needed $y concatenating additiona" physica" dis# space to it% ?sing this eature! you can increase the si>e o a i"e system whi"e it is mounted and in use% It is not uncommon or i"e systems to run out o space due to company e,pansion that was not anticipated during the system p"anning phase% As a system administrator! you wou"d $e re)uired to increase the si>e o a i"e system% &he So"stice :is#Suite pac#age that is $und"ed with the So"aris 8perating (n6ironment ser6er re"ease can $e used to e,pand (or grow) the si>e o a i"e system using concatenation% Adding a Disk Ke ore you can use the dis# management too"s to con igure additiona" dis# space! you must irst add the additiona" de6ice and then modi y the de6ice con iguration directories to ma#e the de6ice 6isi$"e to the system% &he two methods o ma#ing the de6ice 6isi$"e are:

A recon iguration $oot An e,ecution o the de6 sadm daemon

4econfiguration -oot &raditiona""y! you wou"d per orm a recon iguration $oot operation to recogni>e new de6ices on the system% &he three $asic methods are:

B*ecute a boot (r rom the $oot P485's o# prompt B*ecute a reboot X -r rom the F (system's superuser she"") promptM the X passes the -r to the $oot command 9reate a 'recon igure i"e and re$oot the system

&he disad6antage to these methods is that each re)uires you to re$oot the system% In today's computer en6ironments! many systems ha6e a +0 hours a day! se6en days a wee# (+0,1) uptime re)uirementM there ore! re$ooting the system to add new de6ices is not an option% #he !ev,sa!m Daemon -or systems that ha6e a +0,1-uptime re)uirement! you can add new de6ices without re)uiring a re$oot% Ke ore the So"aris 8perating (n6ironment! you needed a suite o de6 s administration too"s! inc"uding dr6con ig("5)! dis#s("5)! tapes("5)! ports("5)! aud"in#s("5)! and de6"in#s("5) to create the 'de6 and 'de6ices entries necessary or the So"aris 8perating (n6ironment to access new de6ices% &hese commands sti"" e,ist in the So"aris 8perating (n6ironmentM howe6er! each o them is "in#ed to the new de6 sadm administration command that maintains the name space or 'de6 and 'de6ices entries% &here ore! a ter adding new hardware (or hot-p"uga$"e hardware where permitted)! the de6 sadm command is e,ecuted! there$y transparent"y $ui"ding the necessary con iguration entries the new de6ice is then ready or assignment $y the system%

IN 8O6)CIN@ IB SO9/8IS NB WO8Y BNCI8ONABN


Overview &he standard So"aris 8perating (n6ironment comes with the &9P'IP stac# $ui"t into it% &o understand the protoco" stac#! you must understand networ# mode"s%&he most common"y re erred to networ#ing mode"s are the se6en-"ayered Internationa" Standards 8rgani>ation (IS8) ' 8SI mode" and the i6e-"ayered &9P'IP networ# mode"% Koth mode"s pro6ide a ramewor# or descri$ing data communications% 2ote - &he ?%S% :epartment o :e ense created the &9P'IP mode"% &his modu"e re erences the &9P'IP mode"%

Protoco" "ayering produces simp"e protoco"s! each with a ew we""-de ined tas#s% <ou can then assem$"e these protoco"s into a use u" who"e% <ou can a"so remo6e or rep"ace indi6idua" protoco"s as needed or particu"ar app"ications% &he unction o the indi6idua" "ayers o the IS8'8SI mode" are descri$ed in &a$"e +-*% &a$"e +-* IS8'8SI 2etwor# 5ode"

IS8'8SI Iayer

-unction

App"ication

5anages user-accessed app"ication programs and networ# ser6ice (using the under"ying "ayers)% 5anages the presentation o architecture% the data to $e independent o the

Presentation Session &ransport 2etwor#

5anages communication setup and termination% (nsures that messages reach the correct app"ication% 5anages data addressing and de"i6ery $etween networ#s! as we"" as ragmenting data or the :ata Iin# "ayer% A router unctions at this "ayer $y using IP addresses% 5anages the de"i6ery o data across the physica" networ#% &his "ayer pro6ides error detection and pac#et raming% A $ridge'switch unctions at this "ayer% :e"i6ery decisions are $ased on the (thernet address (a"so #nown as the 5edia Access 9ontro" B5A9D address)% :escri$es the networ# hardware! inc"uding e"ectrica" signa" characteristics! such as 6o"tage and current% A repeater unctions at this "ayer%

:ata Iin#

Physica"

&a$"e +-+

&9P'IP 2etwor# 5ode"

&9P'IP Iayer

-unction

App"ication

5anages user-accessed app"ication programs and networ# ser6ices (using the under"ying "ayers)! manages the presentation o the data to $e independent o the architecture! and manages the presentation o the data to $e independent o the architecture% (nsures that messages reach the correct app"ication% 5anages data addressing and de"i6ery $etween networ#s! as we"" as ragmenting data or the data "in# "ayer% A router unctions at this "ayer $y using IP addresses% 5anages the de"i6ery o data across the physica" networ#% &his "ayer pro6ides error detection and pac#et raming% A $ridge'switch unctions at this "ayer% :e"i6ery decisions are $ased on the (thernet address (a"so #nown as the 5edia Access 9ontro" B5A9D address)% :escri$es the networ# hardware! inc"uding e"ectrica" signa" characteristics! such as 6o"tage and current% A repeater unctions at this "ayer%

&ransport Internet 2etwor# Inter ace Hardware

Peer Communication In contrast to the c"ient'ser6er mode"! the peer-to-peer communication mode" is one in which each party has the same capa$i"ities and either party can initiate communication%

Encapsulation and De-encapsulation ;hen systems communicate with each other! data can $e thought o as "owing down the mode" rom the app"ication "ayer to the hardware "ayer! across the networ# connection! and then "owing up the mode" on the target system rom the hardware "ayer to the app"ication "ayer% A header is added to each segment recei6ed on the way down the mode"! and a header is remo6ed rom each segment on the way up the mode"! as shown in -igure +Common Protocols and 0pplications in the Solaris Operating Environment ' protocol is a set of rules go4erning the exchange of data between /. -rotocols can exist at each layer in a telecommunication session. @oth end points must recogniBe and obser4e the protocols. Protoco"s are descri$ed in an industry or internationa" standard% -or e,amp"e! on the Internet! there are the &9P'IP protoco"s consisting o : &ransmission 9ontro" Protoco" (&9P)! which uses a set o ru"es to e,change messages with other Internet points at the in ormation pac#et "e6e"% Internet Protoco" (:P)! which uses a set o ru"es to send and recei6e messages at the Internet-address "e6e"% Speci ic protoco"s are re"ated with each "ayer o the networ# mode"s% &a$"e +-J shows some o the protoco"s associated with each "ayer o the &9P'IP networ# mode"% Protoco"s and 2etwor# 5ode" Iayers

+%

&9P'IP Iayer

&9P'IP Protoco" and App"ications

App"ication

2-S'2IST! :2S! S5&P! :H9P! S25P! H&&P! 4P9! 4IP! r"ogin! te"net! and tp!

&ransport

&9P and ?:P

Internet

IP! A4P! 4A4P! and I95P

2etwor# inter ace

(thernet! A&5! -::I! and PPP

!etwor' nterface La(er *rotocols &he networ# "ayer protoco"s consist o the o""owing: -

(thernet is a type o "oca" area networ# (IA2) that ena$"es rea"-time communication $etween machines connected direct"y through ca$"es% Asynchronous &rans er 5ode (A&5) is a dedicated! connection-switching techno"ogy that organi>es digita" data into /J-$yte ce"" units and transmits them o6er a physica" medium using digita" signa" techno"ogy% -i$er :istri$uted :ata Inter ace (-::I) speci ies a *00-5$ytes-per-second! to#enpassing! dua"-ring IA2 using a i$er-optic transmission medium% It de ines the physica" "ayer and media-access portion o the "in# "ayer% Point-to-Point Protoco" (PPP) transmits IP datagrams o6er seria" point-to-point "in#s%

nternet La(er *rotocols &he internet "ayer protoco"s consist o the o""owing-% Internet Protoco" (IP) determines the path a pac#et must ta#e! $ased on the destination host's IP address% Koth IP60 and IP66 are supported% Address 4eso"ution Protoco" (A4P) de ines the method that map a J+-$it IP address to a 0.-$it (thernet address% 4e6erse Address 4eso"ution Protoco" (4A4P) is the re6erse o A4P% It maps a 0.-$it (thernet address to a J+-$it'IP address% Internet 9ontro" 5essage Protoco" (I95P) de ines a set o error and diagnostic eed$ac# messages or the IP% I95P has support or IP60 (with I95P60) and IP66 (with I95P66)% Transport La(er *rotocols &he transport "ayer protoco"s consist o the o""owing:

&ransmission 9ontro" Protoco" (&9P) is a connection-oriented protoco" that pro6ides the u"" dup"e,! re"ia$"e ser6ice on which many app"ication protoco"s depend% ?ser :atagram Protoco" (?:P) pro6ides a ha" -dup"e,! non-ac#now"edged de"i6ery ser6ice%

Application La(er *rotocols &he app"ication "ayer protoco"s consist o the o""owing:

6iew and! optiona""y! store and update i"es on a remote system as though they were on your own system% 2etwor# In ormation System (2IS) and 2etwor# In ormation System Pius (2IST) are networ#-naming and administration systems% :ynamic Host 9on iguration Protoco" (:H9P) automates the assignment o IP addresses in an organi>ation's networ#% :omain 2ame System (:2S) is a distri$uted data$ase that maps host names to IP addresses% Hyperte,t &rans er Protoco" (H&&P) is used $y the wor"d wide we$ to
2etwor# -i"e System (2-S) is a c"ient-ser6er app"ication that ena$"es you to

disp"ay te,t! pictures! sounds! and other mu"timedia in ormation with a we$ $rowser% 4emote Procedure 9a"" (4P9) is a protoco" that one program can use to re)uest ser6ice rom a on another system in the networ# without needing to understand networ# detai"s% 4outing In ormation Protoco" (4IP) pro6ides or automated distri$ution o routing in ormation $etween systems% Simp"e 5ai" &ransport Protoco" (S5&P) pro6ides or de"i6ery o mai" messages% Simp"e 2etwor# 5anagement Protoco" (S25P) is the "anguage that a""ows or the monitoring and contro" o networ# de6ices% r"ogin is a ser6ice! o ered primari"y $y ?2IAh systems! which ena$"es users o one system to connect to other systems across the intranet! and to interact as i their termina"s were connected to the systems direct"y% te"net is a ser6ice that ena$"es users o one system to connect to other systems across the Intranet! and to interact as i their termina"s were connected to the systems direct"y% B -i"e &rans er Protoco" (-&P) trans ers a i"e $y copying a i"e rom one system to another system%

2etwork $iles and Commands


<ou must con igure networ# inter aces to a""ow peer-to-peer communication% <ou can use many i"es and commands to manipu"ate the networ#ing characteristics o a system insta""ed with the So"aris 8perating (n6ironment% &his section introduces you to some o the common i"es and commands! inc"uding those used or:

Identi ying a host :etermining networ# con iguration &rou$"eshooting a networ# Pro6iding networ# ser6ices Pro6iding remote procedure ca""s

Displaying the .AC Address &here are numerous ways to disp"ay a system's hardware address! a"so #nown as the media access contro" (5A9) address and as the (thernet address% &he 5A9 address is usua""y re)uired $y system administrators when con iguring a system needing to $e Wump-started% #he i,con,ig (a Command <ou can use the i con ig command with the -a switch to disp"ay the system's hardware address% &his address is disp"ayed on"y i the root user issues the i con ig command% 8n"y the IP address in ormation is disp"ayed i a non-root user issues the i con ig command%

i,con,ig (a "o0: "agsN*000.0OG?P!I88PKA9L! 4?22I2@ '5?I&I9AS&! IP60H mtu .+J+ inde, * inet *+1%0%0%* netmas# 000000 hme0: netmas# "agsN*000.0JG?P!K48A:9AS&!5?I&I9AS&!IP60H mtu */00 inde, + inet *O+%*6.%*0%+/ 00 $roadcast *O+%*6.%*0%+//

ether .:0:+0:a+:"":de The anner $ommand <ou can a"so retrie6e the 5A9 address rom a system that has not yet $een $ooted $y typing $anner at the o# prompt% ok banner Sun ?"tra /'*0 ?PA'P9I (?"traSPA49-II J005H>) ! Ley$oard! Present 8penKoot J%*%* 60 5K memory insta""ed! Seria" FOJ6**0+% (thernet address .:0-%+0:.e-%d6:ce! Host":: .0.ed6ce% Configuring Interfaces at +oot #ime System inter aces can $e automatica""y con igured at $oot time i the supporting i"es ha6e appropriate entries% #he "etc"rcS.!"S30network.shDile &he 'etc'rcS%d'SJ0networ#%sh i"e is one o the startup scripts that are run each time the system is $ooted% &his script uses the i con ig uti"ity to con igure each inter ace with an IP address and other re)uired networ# in ormation% &he script searches or i"es ca""ed hostname 4--n in the 'etc directory where 66 is an inter ace type and n is the instance o the inter ace% &he 'etc'hoJi%name%hme8 is an e,amp"e o a hostname i"e% 2ote - &his is a new i"e In So"aris 8perating (n6ironment% It is unctiona""y simi"ar to the i"e 'etc'rcS%SJ0 rootusr in o"der So"aris re"eases% #he "etc "hostname.66n $ile &he 'etc'hostname% ,,n i"e contains on"y an entry or the inter ace% &his host name must e,ist in the 'etc'hosts i"e so that it can reso"6e to an IP address at system $oot time% An e,amp"e o the i"e contents is
+ cat " etc"hostname.hme0 host* F

2ote 9reating an empty 'etc'hostname6%,,n i"e causes the So"aris 8perating (n6ironment to automatica""y IP66 inter ace% &his a"so occurs i the Ip66 is ena$"ed during insta""ation o the So"aris 8perating (n6ironment%

#he "etc"hosts $ile &he 'etc'hosts i"e contains at "east "oop-$ac# and host in ormation% -or e,amp"e: + cat "etc"hosts S Internet host ta$"e *+1%0%0%* "oca"host "oghost

*O+%*%6.%*0%+/ host" &he "oca"host and "oghost are $oth assigned to the "oop-$ac# address and the inter ace name! host"! is assigned to a di erent IP address% Important $iles and !tilities &he o""owing i"es and commands p"ay a #ey ro"e in the administration o the So"aris 8perating (n6ironment% #he "etc"no!ename Dile (ach So"aris 8perating (n6ironment has a host name! which is used $y persons when re erring to a system% <ou can change the host name $y editing the 'etc'nodename i"e and re$ooting% &he o""owing is an e,amp"e o a system's 'etc'nodename i"e: + cat "etc"no!ename host" A system's! host name and the name o its networ# inter aces do not need to $e the same and are o ten di erent% 6etermining the Current Network Con,iguration ?se the i con ig -a command to disp"ay the settings o a"" con igured inter acesM or e,amp"e: + i,con,ig (a "o0: "agsN*000.0OG?P!I88PKA9L!4?22I2J! 5?I&I9AS&! IP60H mtu .+J+ inde, * inet *+1%0%0%* netmas# 000000 hme0: "agsN*000.0JG?P! K48A:9AS&! 4?22H-7@! 5?I&I9AS&! IP60H mtu */00 inde, + inet *O+%*6.%*0%+/ netmas# 00 $roadcast *O+%*6.%*0%+// ether G'0'50'a5 'll'!e hme": "agsN*000.0JG?P! K48A:9AS&! 4?22I2@! 5?I&I9AS&% IP60H mtu */00 inde, + inet *O+%O%+00%+0* netmas# 00 $roadcast *O+%O%+00%+// ether .: p: +0:a+: "":de &he hme0 inter ace is up! running! and con igured with

*O+% *6.% *0% +/ as its IP address% <ou can a"so use the i con ig uti"ity to manua""y change the IP address o an inter ace% -or e,amp"e! to change the IP address to *O+%*6.%*0%J1! e,ecute the o""owing commands: + i,con,ig hme0 !own + i,con,ig hme0 $45.$2G.$0. 33 up + i,con,ig (a "o0: "agsN*000.0OG?P! I88PKA9L! 4?22I2@! 5?I&I9AS&! IP60H mtu .+J+ inde, * inet *+1%0%0%* netmas# 000000 hme0: ]"agsN*000.0JG?P! K48A:9AS&! 4?22I2@! 5?I&I9AS&! IP60H mtu */00 inde, + inet *O+%*6.%*0%J1 netmas# ether .:0:+0:a+:**:de hme": "agsN*000.0JG?P% K48A:9AS& %4?22I2@! 5?I&I9AS&! IP60 H mtu */00 inde, + inet *O+%O%+00%+0* netmas# ether .:0:+0:a+:**:de 00 $roadcast *O+%O%+00%+// 00 $roadcast *O+%*6.%*0%+//

!etwor' Troubleshooting 1tilities


&wo o die most common networ# trou$"eshooting uti"ities are the pac#et internet groper (ping) and the snoop uti"ity% ?se the ping uti"ity to determine i another system can $e contacted o6er the &9P'IP networ#% -or e,amp"e: + ping host5 host+ is a"i6e A response o no answer rom host+ indicates that host+ is not a6ai"a$"e on the networ#% ?se the snoop uti"ity to determine what in ormation is actua""y tra6e"ing $etween systems% &he snoop uti"ity can show what actua""y happens when one system uses the ping uti"ity to communication with another system% -or e,amp"e: + snoop hostl host5 host$ ((. host5 ICAP Bcho reHuest host5 ((. hostel ICAP Bcho repl&

&he snoop uti"ity can a"so use audi$"e c"ic#s to noti y you o any networ# tra ic $y using the -a switch% A"though noisy! this is especia""y use u" when trou$"eshooting a 7umpStartY or :ynamic Host 9on iguration Protoco" (:H9P) $oot without the he"p o a second person in a "arge room%

F snoop -a dhcp Some additiona" snoop options inc"ude:

snoop -3 Pro6ides a summary 6er$ose output

snoop -6 Pro6ides a detai"ed 6er$ose output

snoop -o filename 4edirects the snoop Acti6ity output to i"ename

snoop -i filename -3 Cmore :isp"ays pac#ets that were pre6ious"y captured in filename 2etwork Ser ices
(ach networ# ser6ice re)uires a ser6er process to respond to a c"ient re)uest%

#he Internet Ser ice Daemon =inet!>


A specia" networ# process! inetd! runs on each system to "isten on $eha" o many ser6er processes that are not started at $oot time% &he inetd process starts these ser6er processes when the appropriate ser6ice is re)uested% &he inetd process is in ormed o the ser6ices to "isten or and the corresponding processes to start through the 'etc'inet'inetd%con i"e% -or e,amp"e: + grep ,tp "etc"inet"inet!.con, tp stream tcp nowait root 'usr's$in'in% tpd

I a change is made to the 'etc'inet'inetd%con i"e! a hang-up % signa" must $e sent to the inetd process to orce it to reread the con iguration i"e% -or e,amp"e: + pkill (I)P inet!

Port Numbers (ach networ# ser6ice uses a port that represents an address space! which is reser6ed or that ser6ice% A c"ient usua""y communicates with a ser6er through a we""-#nown port% ;e""-#nown ports are "isted in the 'etc'ser6ices i"e% -or e,amp"e: + grep telnet "etc"services te"net +J'tcp

F &he e,amp"e shows that the te"net ser6ice uses we""-#nown Port +J and uses the &9P protoco"% %emote Procedure Call ,%$C(ach networ# ser6ice must ha6e a uni)ue port num$er that is agreed upon $y a"" hosts in the networ#% &his is an increasing"y di icu"t tas# gi6en the num$er o systems on any networ# and the num$er o networ# ser6ices that the systems are capa$"e o running% Sun 5icrosystemsY de6e"oped an e,tension to the c"ient-ser6er mode" #nown as a remote procedure ca"" (4-9)% ;hen using an 4-9 ser6ice! a c"ient connects to a specia" ser6er process! rpc$ind! which is a we""-#nown registered Internet ser6ice% &he rpc$ind process registers port num$ers associated with each 4-9 ser6ice "isted in the 'etc'rpc i"e% &he rpc$ind process recei6es a"" 4-9-$ased c"ient app"ication connection re)uests and sends the c"ient the appropriate ser6er port num$er% -or e,amp"e! the sprayd entry is "isted in the 'etc'rpc i"e! and "oo#s "i#e the o""owing: + grep spra& "etc"rpc sprayd F &his shows that the sprayd daemon has a program num$er o *000*+ and is a"so #nown as spray% Chec'ing for Registered %ervices ?se the rpcin o uti"ity with the -p switch to "ist registered 4-9 programs% -or e,amp"e! to determine i the sprayd daemon is registered! e,ecute the o""owing: + rpcin,o (p hostl R grep spra&! *000*+ * udp J+.0/ sprayd *000*+ spray

5 Stopping a 1etwor Service ?se the rpcin o uti"ity with the -d switch to unregister an 4-9 program! which e ecti6e"y stops the ser6ice% -or e,amp"e! to stop the spray ser6ice! e,ecute the o""owing: + rpcin,o (! spra&! $ &o 6eri y the ser6ice has $een stopped! e,ecute the o""owing:
+ rpcin,o (p R grep spra&! F %tarting a !etwor' %ervice

<ou can register 4-9 networ# ser6ices $y sending an H?P (Hangup) signa" to the inetd process% -or e,amp"e! to start the spray ser6ice again! e,ecute the o""owing: # pkill (I)P inet!

&o 6eri y the ser6ice has $een registered again! e,ecute the o""owing: + rpcin,o (p R grep spra&! *000*+ * udp 0++.. sprayd

Chec Cour Progress Ke ore continuing on to the ne,t modu"e! chec# that you are a$"e to accomp"ish the o""owing:

:e ine the unction o each "ayer within the se6en-"ayer 8SI mode" and the i6e-"ayer &9P'IP mode" :escri$e the contents o 6arious networ# contro" i"es 9onstruct command strings to per orm $asic monitoring operations on an! acti6e networ# Start and stop networ# ser6ices using the command "ine

The sys"og "acility


&he sys"og () unction sends messages generated $y the #erne" and system uti"ities to the sys"ogd daemon% :epending on the con iguration o the 'etc'sys"og%con i"e! this daemon can:

;rite messages to a system "og ;rite messages to the system conso"e -orward messages to a "ist o users -orward messages to the sys"ogd on other hosts o6er the networ#&he most 6a"ua$"e eature o sys"og is that it puts you in contro" o message "ogging% &his ena$"es you to decide which messages are to $e #ept and where the messages are to $e p"aced% Controlling the +eha ior o, s&slog!

5any processes are programmed to generate messages at 6arious "e6e"s o importance in response to actions ta#en! or conditions encountered! during- operation% <ou can contro" the manner in which sys"ogd manages these messages $y modi ying the 'etc'sys"og % con con iguration i"e% Prom this con iguration i"e! you can instruct sys"ogd to sort messages $y their source or their importance and route them to a speci ied destination%

Configuring the "etc"s&slog. con, $ile


A con iguration entry in the 'etc'sys"og%con i"e consists o two ta$-separated ie"ds: selector and action4

&he se"ector ie"d consists o a aci"ity and a "e6e" written as facility+ level4 -aci"ities represent categories o system processes that can generate messages% Ie6e"s represent the se6erity or importance o the message% &he action ie"d determines where to send the message%

-or e,amp"e! p"acing the o""owing entry in the 'etc'sys"og%con i"e causes error messages or a"" aci"ities to $e sent to the '6ar'adm'messages i"e: % . err where % . err Is the selector ,iel!X is the ,acilit&: is the !elimiter: an! err is the level o, the message "var"a!m"messages

"var"a!m"messages

Is the action ,iel!

Caution (Onl& use tabs as white space in the "etc"s&slog.con, ,ile. (elector 3ield &he se"ector ie"d is a semico"on-separated "ist o priority speci ications o the orm: facility+ levelD facility4 level4 "acility is a system aci"ity that is de ined $y the items shown in &a$"e J-*% &a$"e J-* -aci"ity kern user 5essages generated $y the #erne"% 5essages generated $y user processes% &his is the de au"t priority or messages rom programs or aci"ities not "isted in this i"e% mail !aemon auth s&slog lpr news uucp &he mai" system% System daemons! such as in% tpd and te"netd &he authori>ation system inc"uding "ogin! su! and getty% 5essages generated interna""y $y sys"ogd &he "ine printer spoo"ing system - "pr and "pc% -i"es reser6ed or the ?S(2(& networ# news system% &he ?2IA-to-?2IA copy (??9P) systemM does not use sys"og%

cron 9ocal0-1 mark S

&he cron and at aci"ities! inc"uding cronta$! at! and cron% A ie"d reser6ed or "oca" use% &ime-stamp messages produced interna""y $y sys"ogd A"" aci"ities! e,cept the mar# aci"ity% 2ote - <ou can use the S to se"ect a"" aci"ities ( or e,amp"e S %err)M howe6er! you cannot use it to se"ect a"" "e6e"s or a aci"ity ( or e,amp"e! #ern% S)

#evel is the se6erity o the message% Ie6e"s in order o descending order o se6erity are shown in emerg alert Crit err warning notice in,o !ebug Panic conditions that are norma""y to $e $roadcast to a"" users% 9onditions that shou"d $e corrected immediate"y! such as a corrupted system data$ase% ;arnings a$out critica" conditions! such as hard de6ice errors% 8ther errors% ;arning messages% -or conditions that are not error conditions! $ut might re)uire specia" hand"ing! In ormationa" messages% 5essages that are norma""y used on"y when de$ugging a program%

&he none message is norma""y used on"y when de$ugging a program% &he none message appears when messages are not sent rom the indicated aci"ity to the se"ected i"eM or e,amp"e! a se"ector o S %de$ugM mai"%none sends a"" messages e,cept mai" messages to the se"ected i"e% 2ote - 2ot a"" "e6e"s o se6erity are imp"emented or a"" aci"ities in the same way% -or more in ormation! re er to the on"ine manua" pages% Action $ield &he action ie"d de ines where the message shou"d $e orwarded% It can ha6e any one o the o""owing orms:

' i"ename &he a$so"ute path or "og i"e is re)uired%

2ote Xthis i"e must $e manua""y created i it does not e,ist% 9host <ou must pre i, the host name or IP address with an Z sign% 5essages are orwarded to the sys"ogd o the remote system%

user"! user+ user" and user+ recei6e messages i they are "ogged in%
A"" "ogged-in users wi"" recei6e messages%

#he "etc"s&slog.con, $ile A samp"e 'etc'sys"og%con con iguration i"e is: F ident F F 9opyright (c) *OO*-*OO.! $y Sun 5icrosystems! Inc% F A"" rights reser6ed F F sys"og con iguration i"e% F F &his i"e is processed $y m0 so $e care u" to )uote ('') names F that match mG" reser6ed words% A"so! within i de 's! arguments F containing commas must $e )uoted% F % .errXkern.notice:(auth.notice %. errX kern: !ebugX !aemon: noticeX mail: cr it %.alertXkern .errX!aemon.err %.alert( %.emerg root % "!ev"s&smsg "var"a!m"messages operator RZ( t)sys"og%con *%/ O.'*+'*0 S5IR 'S Sun8S /%0 S'

F i a non-"oghost machine chooses to ha6e authentication messages F sent to the "oghost machine! un-comment out the o""owing "ine: F auth%notice
mai"%de$ug F F non-"oghost machines wi"" use the o""owing "ines to cause RuserR F "og messages to $e "ogged "oca""y%

i :de (HI8@H8S&'! '6ar'"og'auth"og! (P "oghost)


i de (6 I8@H8S&'! '6ar'"og'auth"og! i"oghost)

F i,!e, user.err =\9O@IOS L: "!ev"s&smsg

user.err user.alert user.emerg

"var"a!m"messages Lroot: operatorL %

Starting and Stopping syslogd &he con iguration i"e is read each time sys"ogd starts% &he 'etc'rc+ %d'S10sys"og i"e starts sys"ogd during each system $oot% <ou can manua""y start or stop sys"ogd! i the con iguration i"e has $een modi ied! with the command: + "etc"init.!"s&slog start R stop Sys"ogd and them0 'acro Processor &he sys"ogd daemon! the m0 macro processor! and the 'etc'sys"og%con i"e interact! in conceptua" phases! to determine correct message routing% &hese conceptua" phases are descri$ed as: *% +% J% sys"ogd runs m0% m< processes i,!e, statements in "etc"s&slog .con,. sys"ogd uses m0 output to route messages to the appropriate p"aces%

8n irst e6a"uation! it appears the sys"ogd daemon recei6es message-"og routing in ormation rom the 'etc'sys"og %con i"e% Howe6er! sys"ogd does not read the 'etc'sys"og%con i"e direct"y% Instead! sys"ogd starts m0! which parses the 'etc'sys"og%con i"e or i de statements that can $e interpreted $y m0% I m0 does not recogni>e any m0 commands on a "ine! it passes the output $ac# to sys"ogd as a twoco"umn output that sys"ogd then uses to route messages to appropriate destinations% I m0 encounters an i de statement within the 'etc'sys"og%con i"e! the i de is e6a"uated or a true or a"se condition! and message
routing occurs re"ati6e to the output o the test%

Detailed 8peration

<ou must irst consider two e,amp"es o the host systems "etc"hosts ,ile 2ote-&hese 'etc'hosts i"e e,amp"es ha6e $een e,cepted or $re6ity% (,amp"e A *O+%O%+00%* host" "oghost *O+%O-+00%+ host+ (,amp"e K *O+%O%+00 * host* *O+%O%+00%+ host+ "oghost <ou mist ne,t consider two e,amp"es o the m0 command "ine%

*% +%
Phase $

"usr"ccs"bin"m< "etc"s&slog. Con,. "usr"ccs"bin"m< ?! 9O@IOS "etc "s&slog. con,

;hen sys"ogd starts on $oot! sys"ogd e6a"uates the 'etc'hosts i"e to chec# the IP address associated with the hostname compared to the IP address associated with the "oghost% In (,amp"e A! host" and "oghost are $oth associated with IP address *O+%O%+00%*M there ore! sys"ogd runs the second command "ine! 'usr'ccs'$in'm0 -: I8@H8S& that causes the m0 I8@H8S& 6aria$"e to $e e6a"uated as &4?( during the parsing o the 'etc'sy"og % con i"e% In (,amp"e K! host" is associated with IP address *O+%O% +00 %*! whi"e host+ and "oghost are $oth associated with IP address *O+% O% +00% +M there ore! sys"ogd runs the irst command "ine! 'usr'ccs'$in'm0 (no -: I8@H8S&) that causes the m0 I8@H8S& 6aria$"e to $e e6a"uated as -AIS( during the parsing o the 'etc'sy"og%con i"e% Phase 5 In the second phase! the m0 macro processor parses the 'etc'sys"og%con i"e% -or each uncommented "ine that is parsed! m0 searches the "ine or an i de statement% I no i de is encountered on the "ine! m0 passes the "ine $ac# to sys"ogd daemon% I the m0 inds a "ine with an i de statement! the "ine is e6a"uated or the &4?( or -AIS( condition o the I8@H8S& 6aria$"e! and m0 passes sys"ogd the output! according"y% -or e,amp"e! mail. !ebug i de ('I8@H8S&' ! '6ar'"og'auth"og! Z"oghost) 9onsider! i the I8@H8S& 6aria$"e was e6a"uated as &4?( in Phase *! then the m0 processor returns: mai$.!ebug ' 6ar'"og'auth"og

I the I8@H8S& 6aria$"e was e6a"uated as -AIS( in Phase *! then the m0 processor returns: mail.!ebug Z "oghost In either case! the output has an entry in the se"ector ie"d and an entry in the action ie"d% Phase6 In phase +! or each "ine that was parsed in the 'etc'sys"og %con i"e! m0 produced output in a two-co"umn ie"d: A se"ector ie"d and an action ie"d% &his in ormation is returned to sys"ogd! and sys"ogd uses the in ormation to route messages to their appropriate destinations% 8nce con igured! sys"ogd continues to run with this con iguration% .odifying inet! to !se s&slog &he inetd is the ser6er process or many networ# ser6ices% &he inetd process "istens or ser6ice re)uests on the &9P (or ?:P) ports associated with each o the ser6ice "isted in its con iguration i"e% ;hen a re)uest arri6es! inetd e,ecutes the ser6er program associated with the ser6ice% <ou can modi y the inetd to "og &9P connections using! the sys"ogd% inetd .anual Page *6cerpt &he o""owing on"ine manua" page e,cerpt or inetd shows that on"y the daemon aci"ity and the notice message "e6e" is supported: T man inet! 5aintenance 9ommands inetd (*5) 2A5(
inetd - Internet ser6ices daemon U%% U%%

-t Instructs inetd to trace the incoming connections or a"" o its &9P ser6ices% It does this $y "ogging the c"ient's IP address and &9P port num$er! a"ong with the name o the ser6ice! using the sys"og (J) aci"ity% ?:P ser6ices can not $e traced% ;hen tracing is ena$"ed! inetd uses the sys"og aci"ity code dRdaemon'' and 'Rnotice'' priority "e6e"% )ote ! The Internet daemon, inetd, pro%ides ser%ices for many network protocols including the telnet protocol and 3ile Transfer Protocol 73TP8. The inetd Start up "ile ?sing the -t option as an argument to the inetd command ena$"es &9P tracing% <ou must ena$"e the trace option or- the inetd daemon or sys"og messaging% <ou add the -t option to the entry! which starts inetd in the inets6c script in the 'etc'init%d directory%

&he modi ied entry "oo#s simi"ar to the o""owing: + grep inet! "etc"init.!" inetsvc "usr"sbin"inet! (s (t M F )ote ! 9ou must restart the inetd process for the new option to take effect. &he 'etc'sys"og%con i"e con igures the sys"ogd to se"ecti6e"y distri$ute the messages sent to itM in the pre6ious e,amp"e! rom inetd + grep !aemon: notice "etc"s&slog.con, % .errXkern.!ebugX!aemon.noticeXmail.crit "var"a!m"messages

&he notice entry in the 'etc'sys"og%con i"e causes a"" daemon messages o "e6e" notice to $e sent to the '6ar'adm'messages i"e% )ote ! The *%ar*adm*messages file must e'ist and you must stop and start the syslog daemon. *6ample of syslog &ogged *ntry <ou can monitor the sys"og i"e! 6ar adm'messages! in rea" time using the command tai" - % &his ho"ds the i"e open so you 6iew messages $eing routed into this i"e $y sys"og% F tai" :ate'time '6ar'adm'messages Ioca"
host name

Process
name' PI:F

7un *0 *J:*/:JO host" inetd(+J/OD : BI: J*10*J daemon%noticeD te"net B+J6*M rom *O+%O%+00%* 0/.00

IP address

Port num$er

5sg I:F' se"ector aci"ity% "e6e"

Incoming re)uest'

PPI:F -igure J-J % (,amp"e o sys"og Iogged% (ntry &he preceding output "ogs a te"net re)uest to system host" rom IP address *O+%O%+00%* on port 0/.0:% &o e,it! press 9ontro"-9 )ote ! 9ou can use scripts to automatically parse the log files and send notification to support personnel should any unusual acti%ity e'ist. #he logger !tility ;ith the "ogger command! you can add one-"ine entries to a system "og i"e% &ypica""y! you can use the "ogger command as part o a script% $ommand 3or mat "ogger B -i D B - i"e D t -p priority ) B -t tag D B message D

$ommand Options

(, ,ile ?ses the contents o i"e as the message to "og ( i"e must e,ist)% (I Iogs the process I: o the "ogger process with each "ine% (p priorit& (nters the message with the speci ied priority% (t tag 5ar#s each "ine added to the "og with the speci ied tag% 5essage 9oncatenates the string arguments in the message together! in the order speci ied! separated $y sing"e-space characters%

E-amples &he o""owing e,amp"e "ogs the System re$ooted message to the de au"t priority "e6e" notice and the aci"ity user or sys"ogd + logger S&stem reboote! &he System re$ooted message should $e "ogged to the i"e designated or the user %notice se"ector ie"d% Howe6er! i you in6estigate urther! you wi"" ind that the user %notice se"ector ie"d is not con igured ($y de au"t) in the 'etc'sys"og%con i"e% <ou can either add the user%notice se"ector ie"d to the 'etc'sys"og %con i"e! or you can prioriti>e the output as o""ows: + logger (p user.err S&stem reboote! 9hanging the priority o the message to user %err wi"" route the message to the '6ar'adm'messages i"e as indicated in the 'etc'sys"og%con i"e%

Solaris Pseudo $ile Systems Pseudo i"e systems are sometimes ca""ed 4A5-$ased i"e systems% &heir most! distinguishing eature is that they do not reside on hard physica" media% &hey reside on"y in physica" memory whi"e the operating system is running% <ou use pseudo i"e systems to increase per ormance% &hey enhance per ormance $ecause they pro6ide access to data in physica" memory! instead o dis#-$ased structures% &hey ena$"e the use o typica" i"e system operation semantics ( or e,amp"e! the use o the standard system ca""s) or access to the under"ying data structures% &he pseudo i"e systems supported in the So"aris 8perating (n6ironment inc"ude: proc,s -&he Process i"e system contains a "ist o acti6e processes! named according to process num$er! in the 'proc directory% In ormation in this directory is used $y commands! such as the ps command% See the proc(0) man page% tmp,s -&he &emporary i"e system or i"e storage in memory without the o6erhead o writing to a dis#-$ased i"e system% It is created and destroyed e6ery time the system is re$ooted% ,!,s -&he -i"e :escriptor i"e system pro6ides e,p"icit names or opening i"es using i"e descriptors ( or e,amp"e! 'de6' d'0! 'de6' d'*! 'de6' d'+) in the 'de6']d directory% swap s -&he Swap i"e system is used $y the* %#erne" to manage swap space on dis#(s)%

#he "proc $ile System


&he 'proc directory is a mount point or a pseudo i"e system that pro6ides access to the sta"e o each process and "ight-weight process (I;P) in the system% <ou can write app"ications to access this state in ormation using the standard system ca""s% &he process in ormation stored in the 'proc i"e system changes as the process mo6es through its "i e cyc"e%Keginning with the So"aris +%6 8perating (n6ironment re"ease! the pre6ious"y "at 'proc i"e system was restructured into a directory hierarchy that contains additiona" su$directories or state in ormation and contro" unctions% &he o""owing are the characteristics o the new directory structure o 'proc: &he name o each entry in the 'proc directory is a decima" num$er corresponding to a process I:% (ach process I: named directory in 'proc has i"es that contain more detai"ed in ormation a$out that process% &he owner o each i"e in 'proc directory and $e"ow is determine $y the user I: o the process% &he'proc directory is mounted at system $oot time $y scripts ca"" rom' s$in'rcS% &he o""owing e,amp"e rom the 'etc'6 sta$ i"e shows the mounting o the proc i"e system on the 'proc mount pc% Fde6ice Fto mount 'proc de6ice to sc# mount point 'proc -S type proc sc# pass mount at $oot no mount options -

The tmp s "ile System

&he tmp s i"e system uses the 6irtua" memory (35) su$system% 8nce this i"e system is mounted! it supports standard i"e operations and semantics% -i"es and directories in this i"e system are temporary and are re"eased when the tmp s is unmounted or the system re$oots% &his i"e system supports $etter per ormance $y maintaining i"es and directories in 4A5% &his per ormance enhancement is most noticea$"e when a "arge num$er o short-"i6ed i"es are written and accessed on this i"e system% &he o""owing e,amp"e rom the 'etc'6 sta$ i"e shows the mounting o tmp s on the 6irtua" memory su$system at $oot time: de6ice to mount swap de6ice to sc# mount point 'tmp -S type tmp s sc# pass mount at $oot yes mount options -

As a resu"t o using tmp s! a"" data written to 'tmp is written to 4A5 i space is a6ai"a$"e% I 4A5 space is not a6ai"a$"e! then any data written to 'tmp is written to swap space instead% The d s "ile System &he d s i"e system is a pseudo i"e system that maintains a repository o i"e descriptors or open i"es% 4unning programs access i"es $y using these i"e descriptors% &he o""owing e,amp"e rom the 'etc'6 sta$ i"e shows the mounting o the d s i"e system on the 'de6' d mount point at system $oot time: F de6ice Fto mount d de6ice to sc# mount point 'de6' d -S type d sc# pass mount at $oot no mount options -

&a$"e /-* descri$es each i"e descriptor% &a$"e /-* -i"e :escriptor ?sage

-i"e :escriptor

:escription

'de6' d'0 'de6' d'* 'de6' %d'+ 'de6' d'J

Standard input(stdin) Standard output(stdout) Standard error(stderr) 2ame o i"e ( i"e)

The swap s "ile System &he So"aris 8perating (n6ironment so tware can use dis# partitions or temporary memory storage! in addition to using partitions to store i"e systems% Partitions used to store memory images are ca""ed swap partitions4 Swap partitions are used as 6irtua" memory storage areas when the system does not ha6e enough physica" memory to hand"e the needs o the current"y running processes% Additiona""y! swap files can $e used to augment swap space%

:irtual and Physical Addresses


&he So"aris 6irtua" memory system maps the i"es on dis# to 6irtua" addresses in memory% As the instructions or static data in those i"es are needed! the 6irtua" memory system maps the 6irtua" addresses in memory "o rea" physica" addresses in memory% &he data or instructions in those i"es are then paged rom the dis# into physica" memory or use $y the 9P?% &hese types o physica" pages o memory are a"ways $ac#ed $y #nown i"es on the dis#% Anonymous .emory Pages In addition to containing program instructions or static data! physica" memory pages can contain pri6ate data or stac# in ormation generated $y running processes% &he in ormation in these pages o physica" memory is not $ac#ed $y a i"e in the i"e system% &here ore! these pages can $e $ac#ed on"y $y swap space on dis# in the e6ent that they must $e temporari"y paged out o memory% Kecause these pri6ate data or stac# pages in physica" memory are not $ac#ed $y an actua" i"e on the dis#! $ut so"e"y $y swap space! they are re erred to as anonymous memory pages% %eser ing Swap Space ;hen a process is run $y the #erne"! swap space or any pri6ate data or stac# space used $y the process must $e reser6ed% &his reser6ation occurs Wust in case the pri6ate data or stac# in ormation wou"d ha6e to $e paged out o physica" memory! due to mu"tip"e processes contending or "imited memory space% ;ithout the use o 6irtua" swap! "arge amounts o physica" swap space wou"d ha6e to $e con igured on systems to accommodate these reser6ations% (6en systems capa$"e o a6oiding paging $y ha6ing "arge amounts o physica" memory a6ai"a$"e wou"d sti"" need "arge swap areas con igured or these reser6ations Wust in case%

Howe6er! with the 6irtua" swap space pro6ided in the So"aris 8perating (n6ironment $y the swap s i"e system! the need or con iguring "arge amounts o physica" swap space can $e reduced on systems with "arge amounts o a6ai"a$"e memory% &his reduced need or physica" swap space can occur $ecause swap s pro6ides 6irtua" swap space addresses rather than rea" physica" swap space addresses in response to the re)uests to reser6e swap space% ;ith swap s pro6iding 6irtua" swap space! rea" physica" swap space is re)uired on"y with the onset o paging! due to processes contending or memory% In this situation! swap s must con6ert the 6irtua" swap space addresses to physica" swap space addresses or paging to actua" swap space to occur% $riteria for (wap (pace ;ith the addition o swap s! the si>e o swap space is $ased entire"y on two criteria:

&o sa6e any possi$"e panic dumps resu"ting rom a ata" system ai"ure! there must $e su icient swap space to ho"d the necessary memory pages in 4A5 at the time o the ai"ure% &he amount o 4A5 T swap memory must $e at "east e)ua" to the re)uirements o $oth the So"aris 8perating (n6ironment and any concurrent"y running processes% Swap Space I you use tmp s! you shou"d $e aware o some constraints in6o"6ed i mounting a tmp s i"e system% &he resources used $y tmp s are the same as those used when commands are e,ecuted% &his means that "arge si>ed tmp s i"es can a ect the amount o space "e t o6er or programs to e,ecute% Ii#ewise! programs re)uiring "arge amounts o memory use up the space a6ai"a$"e to tmp s% ?sers running into this constraint ( or e,amp"e! running out o space on tmp s) can a""ocate more swap space $y using the swap command% <ou can add or de"ete swap space using the swap command% ;hen swap i"es or swap partitions are mounted or access $y the #erne" memory manager! the i"e type used is swap (o$ser6e the contents o the 'etc'6 sta$ i"e)%
.sing the swap-9ommand As the system administrator! you can add swap i"es or partitions% swap B options D Options B argument D

(l 9ists swap space (a /!!s to swap (! 6eletes ,rom swap e (s -ig Summari1es swap space are /-* i""ustrates the a""ocation o

0dding a Swap "ile


swap space%

A""ocated

used

swap -s

4eser6ed
-igure /-+ Swap Space A""ocation

&o add a swap i"e! comp"ete the o""owing steps:

*% + swap [ s

Iist a summary o the system's 6irtua" swap space%

tota": +/1+.# $ytes a""ocated T 6*00# reser6ed N J*.6.# used! /60O6# a6ai"a$"e +% + swap ($ swap i"e 'de6'ds#'c0tJd0s"
J%

Iist the detai"s o the system's physica" swap space%

de6 J+!+.

swap"o $"oc#s . O.1/+

ree O0J.0

?sing the d command! disp"ay the amount o dis# space occupied $y current"y mounted i"e systems! the amount o used and a6ai"a$"e space! and how much o the i"e system's tota" capacity has $een used% -rom! this output! determine which partition has enough space or a swap i"e o at "east +0 5$ytes% &he 'e,port'data i"e system appears to ha6e more than enough space to create an additiona" swap i"e% 9reate a +0-5$yte swap i"e named swap i"e in the 'e,port'data directory% + !, (k -i"e system 'de6'ds#'c0tJd0s0 'de6'ds#'c0tJd0s6 'proc d 'de6'md'ds#'d0 'de6'md'ds#'d* swap #$ytes +0/0// 0.0.*/ 0 0 +J*.*/ 61*/O *0J.00 used .106* J1/*6J 0 0 .+ O +00 a6ai" /.*0O *0/*1+ 0 0 +J*/0+ 610.J *0J600 9apacity J6g 1Og 0g 0g *g *g *g 5ounted on ' 'usr 'proc 'de6' d 'e,port'data 'e,port'swap ' tmp

+ mk,ile 50m "e*port"!ata"swap,ile 0% Add a swap i"e to the system's swap space%

+ swap (a "e*port"!ata"swap,ile /% Iist the detai"s o the modi ied system swap space%

+ swap ($
swap i"e 'de6'ds#'c8tJd8s" 'e,port'data'swap i"e de6 J+'+. swap"o . . $"oc#s O.1O+ +001+ ree O0J.0 +001+

6% + swap (s

Iist a summary o the modi ied system swap space%

tota": +/1+.# $ytes a""ocated -t- 6*00# reser6ed N J*.6.# used! 6610.# a6ai"a$"e 4emo%ing a (wap 3ile &o remo6e a swap i"e! comp"ete the o""owing steps: *% &o de"ete a swap i"e whi"e on"ine! issue the o""owing command% (:e"eting the swap i"e stops swapping and empties the speci ied dis# space%) + swap (! "e*port"!ata"swap,ile

*%
Adding a Swap Slice

4emo6e the swap i"e to ree dis# space%

&o add a swap s"ice! comp"ete the o""owing steps *% Add in ormation a$out the swap partition you created to the i"e system ta$"e (the 'etc'6 sta$ i"e)%

+ vi "etc"v,stab F de6ice F to mount 'de6'ds#'c0t+d0s" +% de6ice to sc# mount point -S type swap sc# pass mount at $oot no mount opt -

4e$oot the system or use the swap -a cmmand to add the additiona" swap area%

0dding a Permanent Swap "ile .sing the 'etc'6 sta$ "ile &o add a permanent swap i"e! comp"ete the o""owing steps: *% (dit the 'etc'6 sta$ i"e and add the entry or the i"e%

+ vi "etc"v,stab F de6ice F to mount ' e,port 'data 'swap i"e de6ice to sc# mount point -S type swap sc# pass mount at $oot no mount opt

+%

4e$oot the system or use the swap -a command to add additiona" swap space%

#he !umpa!m Command


&he dumpadm program is an administrati6e command that manages the con iguration o the operating system crash dump aci"ity% 2ote - A panic dump contains a copy o the Rinteresting portionsR o physica" memory at the time o a ata" system error% I a ata" operating system error occurs! a message descri$ing the error is printed to the conso"e% &he operating system then generates a crash dump $y writing the contents o physica" memory to a predetermined dump de6ice! which is typica""y a "oca" dis# partition% &he dump de6ice can $e con igured $y using dumpadm% 8nce the crash dump has $een written to the dump de6ice! the system re$oots% -ata" operating system errors can $e caused $y $ugs in the operating system! its associated de6ice dri6ers and "oada$"e modu"es! or $y au"ty hardware% ;hate6er the cause! the crash dump itse" pro6ides in6a"ua$"e in ormation to your support engineer to aid in diagnosing the pro$"em% -o""owing an operating system crash! the sa6ecore("5%) uti"ity is e,ecuted automatica""y during a $oot up to retrie6e the crash dump rom! the dump de6ice% It then writes the crash dump to a pair o i"es in your i"e system named uni,%A and 6mcore%A! where A is an integer identi ying the dump% &he #erne" core in ormation p"aced in the i"e '6ar'crash' 'uname -nQ '6mcore%A is accessed rom the de6ice 'de6'mem% &he name "ist in ormation p"aced in the i"e '6ar'crash' 'uname -n' 'uni,%A is accessed rom the de6ice 'de6'#syms% &ogether! these data i"es orm the sa6ed crash dump% &he directory in which the crash dump occurred is sa6ed when you re$oot! and you can use the dumpadm command to con igure it% Ky de au"t! the dump de6ice is con igured to $e an appropriate swap partition% Swap partitions are dis# partitions reser6ed as 6irtua" memory $ac#ing stoic or the operating system! and thus no permanent in ormation resides there to $e o6erwritten $y the dump% &o 6iew the current dump con iguration! e,ecute dumpadm with no arguments% -or e,amp"e: + !umpa!m :ump content: #erne" pages :ump de6ice: 'de6'ds#'c0t0d0s" (swap)

Sa6ecore directory: '6ar'crash'host" Sa6ecore ena$"ed: yes ;hen no options are speci ied! dumpadm prints the current crash dump con iguration% &he pre6ious e,amp"e shows the set o de au"t 6a"ues: the dump content is set to #erne" memory pages on"y! the dump de6ice is a swap dis# partition! the directory or sa6ecore i"es is set to '6ar'crash'hostname! and sa6ecore is set to run automatica""y on re$oot% &he de au"t 6a"ues are set in the ' etc'dumpadm% con i"e% -or e,amp"e: F cat 'etc'dumpadm%con F F 9on iguration parameters or system crash dump% F :o 28& edit this i"e $y hand X use dumpadm(*5) instead% F :?5PA:5E:(3I9(N'de6'ds#'c0t0d0s" :?5PA:5ESA3:I4N'6ar'crash'host"
:?5PA:5E988&(2&N#erne" :?5PA:5E(2AKI(Nyes

2ote - A"" modi ications to the dumpadm con iguration shou"d $e done at the command "ine using the dumpadm uti"ity! rather than attempting to edit the 'etc'dumpadm%con i"e% &his cou"d resu"t in an inconsistent system dump con iguration% Command "ormat "usr"sbin"!umpa!m P(nuyD B-c content-typeD mingD B-s sa6ecore-dirD B-r root-dirD B-d dump-de6iceD B-m min # C min m C

(c content-type / Speci ies the contents o the crash dump! #erne" - Indicates #erne" memory pages on"y% all - Indicates a"" memory pages% -! !ump(!evice( 5odi ies the dump con iguration to use the speci ied dump de6ice% !ump-de6ice - Speci ies a speci ic dump de6ice speci ied as an a$so"ute path name! such as'de6'ds#'9FtFdFsF% swap - Speci ies the specia" to#en swap% I this swap is speci ied! as the dump de6ice! dumpadm e,amines the acti6e swap entries and se"ects the most appropriate entry to con igure as the dump de6ice% See swap("5)% -m min k E min m E min : -9reates a min ree i"e in the current sa6ecore directory indicating that sa6ecore shou"d maintain at "east the speci ied amount o ree space in the i"e system where the sa6ecore directory is "ocated% k / Indicates a positi6e integer su i,ed with the unit speci ying #i"o$ytes% m - Indicates a positi6e integer su i,ed with the unit m speci ying mega$ytes% T - Indicates a percent (g) sym$o"! indicating the min ree 6a"ue shou"d $e computed as the speci ied percentage o the tota" current si>e o the i"e system containing the sa6ecore directory%

!n - ?odifies the dump configuration so it does not run !r root-dir- Specifies an alternati4e root directory relati4e to which dumpadm should create files. &f no -r argument is specifies the default root directory J;J is used. !s sa4ecore-dir- ?odifies the dump configuration to use the specified directory to sa4e files written by sa4ecore. The default sa4ecore directory is ;4ar;crash;hostname where hostname is the output of the -n option to the uname8l: command. -#- &ndicates that sa4ecore is automatically run on reboot. This is the default for this dump setting.

sa4ecorc automatically, on reboot.

#he coreadm Command


?se the coreadm command to speci y the name or "ocation o core i"es produced $y a$norma""yterminating processes% &he coreadm command pro6ide "e,i$"e core i"e naming con6entions and $etter core i"e retention% -or e,amp"e! you can use the coreadm command to con igure a system so that process core i"es are p"aced in a sing"e system directory% &his means it is easier to trac# pro$"ems $y e,amining the core i"es in a speci ic directory whene6er a So"aris process or daemon terminates a$norma""y% &wo new con igura$"e core i"e paths! par-process and g"o$a"! can' $e ena$"ed or disa$"ed independent o each other% ;hen a process terminates a$norma""y! it produces a core i"e in the current directory! as in pre6ious So"aris 8perating (n6ironment re"eases% Kut i a g"o$a" core i"e path is ena$"ed and set to 'core "ies'core! or e,amp"e! then each process that terminates a$norma""y produces two core i"es: one in the current wor#ing directory are one in the 'core "ies directory%

2ote - I the core i"e path does not e,ist! you must create it%
$ommand 3ormat &he o""owing command can $e ran $y regu"ar users and is used to speci y the i"e name pattern to $e used $y the operating system when generating a per-process core i"e% corea!m P(p patternQ Ppi!Q . . . &he o""owing command is run $y root on"y and is used to con igure! system-wide core i"e options% corea!m P(g pattern Q P(i pattern Q P (i option Q P (e option ... Q

Default coreadm Command ;ithout Options ?sing the coreadm with no options disp"ays the typica" de au"t settings rom the 'etc'coreadm%con i"e% + corea!m g"o$a" core i"e pattern: init core i"e pattern: core g"o$a" core dumps: disa$"ed per-process core dumps: ena$"ed

g"o$a" setid core dumps: disa$"ed per-process setid core dumps: disa$"ed g"o$a" core dump "ogging: disa$"ed &he irst "ine o output identi ies the name to use or core i"es p"aced in F g"o$a" directory% ;hen generated! a g"o$a" core i"e is created with mode 600 and is owned $y the superuser% 2on-pri6i"eged users cannot e,amine such i"es% &he second "ine o output identi ies the name to $e used i the init process generates a core i"e% &he third "ine indicates that g"o$a" core i"es are disa$"ed% &he ourth "ine indicates that core i"es in the current directory are ena$"ed% 8rdinary per-process core i"es are created with mode 600 under the credentia"s o the process% &he owner o the process can e,amine such i"es% In the i th and si,th "ines! i setid core i"es are ena$"ed! they are created with mode 600 and are owned $y the superuser%&he se6enth "ine identi ies whether the g"o$a" core dump "ogging is ena$"ed% 9aution - A process that has a setuid mode presents security issues with respect to dumping core i"es! as it might contain sensiti6e in ormation in its address space to which the current non-pri6i"eged owner o the process shou"d not ha6e access% 2orma""y setuidcore i"es are not generated $ecause o this security issue% 2ote - 9omp"ete a"" modi ications to the coreadm con iguration at the command "ine using the coreadm uti"ity instead o editing the 'etc'coreadm%con i"e% I you manua""y edit the coreadm con iguration i"e! you must re$oot the system or run coreadm -u% 3iewing the 'etc'coreadm%con page /-*.: + cat "etc"corea!m.con, + corea!m.con, F F Parameters 9ore system core- i"e con iguration% ( Do 2T edit this file by hand -- use coreadm8l: instead. 984(A:5E@I8KEPA&&(42N 984(A:5EI2I&EPA&&(42Ncore 984(A:5E@I8KE(2AKI(:Nno 984(A:5EP489E(2AKI(:Nyes 984(A:5E@I8KES(&I:E(2AKI(:Nno 984(A:5EP489ES(&I:E(2AKI(:Nno i"e 6eri ies the same con iguration parameters that were descri$ed on

984(A:5E@I8KEI8@E(2AKI(:Nno
Patterns

0 core i"e name pattern is a norma" i"e system path name with em$edded 6aria$"es! speci ied with a "eading percent (g) character% &hese 6aria$"es are e,panded rom 6a"ues in e ect when a core i"e generated $y the operating system% &he possi$"e 6aria$"es are: Tp ( Process I6 Tu ( B,,ective user I6 Tg ( B,,ective group I6 T, ( B*ecutable ,ile name Tn ( S&stem no!e name =uname (n> Tm ( Aachine har!ware name =uname (m> Tt ( 6ecimal value o, time=5> TT - 9iteral T E-amples &he o""owing e,amp"es show 6arious ways to use the coreadm command% E-ample $ / Setting the Core "ile 1ame Pattern as a &egular .ser ;hen e,ecuted rom a user's \H85(' %pro i"e or \H85('% "ogin! the o""owing command sets the core i"e name pattern or a"" processes run during the "ogin session: ; corea!m (p core.T,.Tp ;; 2ote X \\ is the process I: o the current"y running she""% &he per-process core i"e name pattern is inherited $y a"" chi"d processes% &'ample . !Dumping a ;ser<s 3iles into a (u directory &he o""owing command dumps a"" o the user's core dumps into the core i"es su$directory o the home directory! discriminated $y the system node name% &his is use u" or users who use many di erent machines $ut ha6e a shared home directory% ; corea!m (p ; IOAB" core,iles"LTnT, :Tp ;; E-ample J - Ena,ling and Setting the Core "ile 7lo,al 1ame Pattern &he o""owing is an e,amp"e o setting system/wide parameters that add the e,ecuta$"e i"e name and PI: to the name o any potentia" core i"e that might $e created: + corea!m (g " var "core "core. T,.Tcp (e global -or e,amp"e! the core i"e name pattern: '6ar 'core'core % g % gp causes the oo program with process I: *+J0! to generate the core i"e '6ar'core'core % oo % *+J0 %&o 6eri y that this parameter is now part o the coreadm con iguration!run the coreadm command again: +corea!m g"o$a" core i"e pattern: '6ar'core'core%g %gp -init core i"e pattern: core

g"o$a" core dumps: ena$"ed per-process core dumps: ena$"ed g"o$a" setid core dumps: disa$"ed per-process setid core dumps: disa$"ed g"o$a" core dump "ogging-! disa$"ed E-ample G / Chec ing the Core "ile Configuration for Specific Process IDs &he coreadm command with on"y a "ist o process I:s reports each 'process's per-process core i"e name pattern! or e,amp"e: ; corea!m 53G 023G +1.: core%g %gp /61.: 'home'george'cores'g % gp%gt ;hen a core dump occurs! the operating system generates two possi$"e core i"es! the g"o$a" core i"e and the per-process core i"e% :epending on the system options in e ect! one i"e! $oth i"es! or no i"es can $e generated% ;hen generated! a g"o$a" core i"e is created in 5ode 600 and is owned $y the superuser% 2on-pri6i"eged users cannot e,amine such i"es% 8rdinary per-process core i"es are created in 5ode 600 under the credentia"s o the process% &he owner o the process can e,amine such i"es% 8n"y the owner o a process or the superuser can interrogate a process in this manner% Options Supported ,y coreadm &he o""owing are some use u" options to the coreadm command%

( i pattern Sets the per-process core i"e name pattern or init to pattern% &his is tine same as coreadm -p pattern * e,cept that the setting is persistent across re$oot% 8n"y a super user can use this option% (e option (na$"es the speci ied core i"e option% Speci ies the option as one o the o""owing:

global
A""ows core dumps using the g"o$a" core pattern%

process
A""ows core dumps using the per-process core pattern%

global(seti!
A""ows setidcore dumps using the g"o$a" core pattern%

proc(seti!

A""ows setid core dumps using the per-process core%pattern%

log% @enerates a sys"og (J) message when! a user attempts to generate a g"o$a" core
i"e% 8n"y superuser can use this option% (! option :isa$"es the speci ied core i"e option% See the -e option or descriptions o possi$"e options% 5u"tip"e -e and -d options can $e speci ied on the command "ine% 8n"y root can use this option%

(u
?pdates system-wide core i"e options rom the contents o the con iguration i"e 'etc'coreadm% con % I the con iguration i"e is missing or contains in6a"id 6a"ues! de au"t 6a"ues are su$stituted% -o""owing the update! the con iguration i"e is resynchroni>ed with the system core i"e con iguration% 8n"y superuser can use this option%

The 1"S Distri,uted "ile System


&he So"aris 8perating (n6ironment supports the sharing o remote i"e system resources and presents them to users as i they were "oca" i"es and directories% &he sharing o remote i"e system resources is administered through distri$uted i"e systems (:PS) i"e system types% &his i"e system type pro6ides the architectura" support re)uired or mounting resources o6er the networ#% &he 2-S en6ironment contains the o""owing components:

NDS ser er / A system that contains the i"e resources to $e shared with other systems on the networ#% NDS client / A system that mounts the i"e resources shared o6er the networ# and presents the i"e resources as i they were "oca"%

The %enefits of a 1etwor Pile System


&he $ene its o an 2-S inc"ude:

Centrali1e! ,ile access -i"es are "ocated in centra"i>ed "ocations% <ou can ma#e a copy o a i"e accessi$"e to many users or systems simu"taneous"y% &his is an especia""y use u" eature with home directories or common data i"es% Common so,tware access Systems can share one or more so tware pac#ages that are "ocated in a centra" "ocation% &his reduces the dis# space re)uirements or indi6idua" systems% Bas& to use 4emote i"e sharing is transparent to the user and to any app"ications! $ecause these resources appear as i they were resident on the "oca" system%&he 2-S en6ironment pro6ides i"e sharing in a heterogeneous en6ironment! potentia""y containing many di erent operating systems! inc"uding ?2IAh! 5S-:8S! and 3irtua" 5emory System (35S)%
2ote - 2-S uses remote procedure ca""s (4P9s) and e,terna" data representation (A:4)% A:4 "i$rary routines a""ow programmers to descri$e ar$itrary data structures in a machine-independent ashion%

The #ount Daemon ;hen an 2-S c"ient issues an 2-S mount re)uest! the mount process contacts the 2-S ser6er's mount daemon! 'usr'"i$'n s'mountd! to get F file handle (pointer) or the i"e resource to $e mounted% &he 2-S c"ient mount process then writes the i"e hand"e (a"ong with other in ormation a$out the mounted resource) to the 'etc'mntta$ i"e% NDS Ser er Daemons ;hen a process on a c"ient attempts to access a remote i"e resource the 2-S ser6er daemon! 'usr'"i$'n s'n sd! on the ser6er gets the re)uest (a"ong with the resource's i"e hand"e) and per orms the i"e operation% It then returns any data to the re)uesting process on the c"ient% &he ser6er daemons are started rom the 'etc'init%d'n s %ser6er script% &he n s%ser6er script a"so de ines the ma,imum num$er o n sd threads that can $e started% NDS Daemons on the Client and Ser er &wo other 2-S daemons! 'usr'"i$'n s'statd and 'usr'"i$'n s'"oc#d run on $oth the 2-S ser6ers and c"ients% &hese daemons are started automatica""y when a system enters run "e6e" +% &he two daemons wor# together to pro6ide "oc#ing ser6ices in 2-S% I the ser6er crashes! c"ients can )uic#"y re-esta$"ish the connections to i"es they were using% &he ser6er has a record o the c"ients that

were using 2-S% It contacts each c"ient to o$tain the in ormation a$out which i"es were in use to a""ow continued operation :oth daemons are started rom the 'etc'init%d'n s%c"ient script! and typica""y do not re)uire administrati6e inter6ention% NDS $ile :andles -i"e hand"es are c"ient re erences that identi y a uni)ue i"e or directory on the ser6er% -i"e hand"es encode the i"e's 'mode num$er! inode generation num$er! and dis# de6ice num$er% 8nce a c"ient success u""y comp"etes an 2-S mount re)uest! an entry is made in the 'etc'rmta$ i"e $y the mountd daemon on the ser6er% &he 'etc'rmta$ i"e contains a ta$"e o i"e systems that are remote"y mounted $y 2-S c"ients% It a"so contains a "ine entry or each remote"y mounted i"e system% -or e,amp"e: hostname',sname &hese "ine entries are remo6ed rom this i"e $y the mountd command when it is irst started% Sta"e entries can accumu"ate in this i"e or c"ients that ha6e crashed! and cou"d hot send an unmount re)uest% 4emo6ing these entries a""ows the c"ient to remount the resource% #he 2$S Ser er &he o""owing commands and i"es are used in conWunction with the 2-S ser6er% #he share Command ;hen the mountd daemon is running! use the 'usr's$in'share command to ma#e i"e resources a6ai"a$"e or mounting $y remote systems% Command "ormat share B -- "SType < ( -o options D ( -d description D pathname

Options &he o""owing options can $e used with the share command:

(D n,s Speci ies the i"e system type% &his option is not typica""y re)uired as n s is the de au"t remote i"e system type%
2ote - I you do not use the option -- stypes! the system ta#es the i"e system type rom the irst "ine o the 'etc'd s' stype i"e%-o options 9ontro"s a c"ient's access to an 2-S-shared resource%

(! !escription :escri$es the i"e resource $eing shared% &his in ormation is disp"ayed $y the share command when used with no argument pathname Speci ies the resource to $e shared%
-i"e 4esource Staring

&o share a i"e resource rom the command "ine! e,ecute the o""owing: + share (D n,s (o ro "usr" snare "man &he share command writes in ormation or a"" shared i"e resources to the 'etc 'd s' share ta$ i"e% &he i"e contains a ta$"e o the "oca" resources shared% I no argument is speci ied! the share command disp"ays a "ist o a"" i"e resources current"y shared% + share ' usr'share'man 'e,port' insta"" #he "etc"!,s"!,stab Dile &he 'etc'd s'd sta$ i"e gi6es the system administrator a method or the automatic sharing o "oca" i"e systems% (ach "ine o the d sta$ i"e consists o a share command% + cat "etc "!,s"!,stab F F F F F F 5 5 share B-- stype C -o optionsD B-d RGte,tHRD GpathnameH BresourceD issue the command ' 'etc' init%d'n s% ser6er start' to run the 2-S daemon processes and the share commands! a ter adding the 6ery irst entry to this i"e% P"ace share (*5) commands here or automatic e,ecution on entering init state J%

F e%g% + share (D n,s (o rwKengineering (! Ohome !irsO "e*port"home5 F &he contents o the 'etc'd s'd sta$ i"e are e,ecuted when:

&he system enters run "e6e" J% &he superuser runs the sharea"" command% &he 2-S daemons must $e running% &he superuser runs the 'etc'init%d'n s%ser6er script (which contains a sharea"" command) with the start argument% &his script starts the n s ser6er daemons%

2ote - I the n s%ser6er script does not ind 2-S entries in the 'etc'd s'd sta$ i"e! it e,its without running the 2-S daemons%

)3( Access #anagement Ky de au"t! 2-S-mounted resources are a6ai"a$"e with read and write pri6i"eges $ased on standard So"aris i"e permissions% Access decisions are $ased! on a comparison o the :I: o the c"ient and the owner% &he o""owing share command options restrict the read and write capa$i"ities or 2-S c"ients and ena$"e superuser access to a mounted resource%

ro In orms c"ients that the ser6er accepts on"y read re)uests% rw A""ows the ser6er to accept read and write re)uests rom the c"ient% root-client In orms c"ients that the root user on the speci ied c"ient system or systems can per orm superuser pri6i"eged re)uests on the shared resource% roKaccess(list A""ows read re)uests rom the speci ied access "ist% rwKaccess(list A""ows read and write re)uests rom the speci ied access "ist% access-"ist:c"ient*:c"ient+ A""ows access $ased on a co"on-separated "ist o one or more c"ients% access/*istNZnetwor# A""ows access $ased on a networ# num$er ( or e,amp"e! 0*O+%*6.%*00) or networ# name ( or e,amp"e! _mynet%com)% &he networ# name must $e de ined in 'etc'networ#s%

access-"ist N %domain A""ows access $ased on a :2S domainM the dot (%) identi ies it as a :2S domain%

access-*ist N netgroupEname A""ows access $ased on a con igured net group (2IS or 2IST on"y)%

anonNn Sets n to $e the e ecti6e user I: o un#nown users% Ky de au"t! un#nown users are-gi6en the e ecti6e user I: ?I:E28K8:<% I n is set to -*! access is denied%

<ou can com$ine these options $y separating each with commas! orming intricate access restrictions% Examples + share (D n,s (o ro !irector& &his command "ine restricts access to 2-S mounted resources to read-on"y access%

+ share (D n,s (o ro: rwKclientl !irector& &his command "ine restricts access to 2-S-mounted resources to read-on"y accessM howe6er! the 2-S ser6er accepts $oth read and write re)uests rom the c"ient named c"ient"% + share (D n,s (o rootKclient5 !irector& &his command "ine a""ows the root user on the c"ient named c"ient*:+ to ha6e superuser access to the 2-S mounted resources% + share (D n,s (o anonK0 !irector& Ky setting the option anonN0! the @%?*: or access "o shared resources is set to the ?*: o the user who is accessing the shared resource% #he unshare Command &he 'usr's$in'unshare command ma#es i"e resources una6ai"a$"e or mounting $y remote systems% It reads the 'etc'd s'shareta$ i"e% $ommand 3ormat unshare B -- n s D pathname Options &he o""owing options can $e used with the unshare command:

-- n s Speci ies n s as the i"e system type% &his option is not typica""y re)uired $ecause n s is the de au"t remote i"e system type pathname Speci ies the path name o the i"e resource to $e unshared%
&he o""owing e,amp"e ma#es the resource una6ai"a$"e or mounting: + unshare "usr"share"man The sharea"" and unsharea"" Commands ?se the 'usr's$in'sharea"" and 'usr's$in'unsharea"" commands to share and unshare a"t 2-S resources% #he shareall Command ;ithout any arguments! the sharea"" command shares a"" i"e resources "isted in the HetcHdIsHdfsta, file4 sharea"" B -- n s D The unsharea"" Command ;ithout any arguments! the unsharea"" command unshares current"y shared i"e resources% It does this $y reading the 'etc'd s'shareta$ i"e%

unshareall P (D n,s Q

Configuring the 1"S "ile Server &o set up an 2-S ser6er! comp"ete the o""owing steps: *% (dit the 'etc'd s'd sta$ i"e and add those i"e resources to $e automatica""y shared whene6er the system enters run "e6e" J% -or e,amp"e: share (D n,s "usr"share"man +% Start the 2-S ser6er daemons $y in6o#ing the o""owing:

+ "etc"init.!"n,s.server start &his shares the contentP o the 'etc'd s'd sta$ i"e% 2ote - <ou can use the d shares command to 6eri y that the resources are a6ai"a$"e% 1"S Informational Commands ?se the o""owing commands to get in ormation a$out 2-S resources% The d shares Command&he d shares command disp"ays the 2-S resources current"y $eing shared% d shares B -- n s D B host D ;ithout arguments! the d shares command disp"ays shared resources or the "oca" ser6er% + !,shares 4(S8?49( host":'usr'share'man host" S(43(4 A99(SS &4A2SP84& E

It is a"so used to disp"ay shared resources $y a speci ied ser6er name% + !,shares host5 4(S8?49( host+:'e,port The d mounts Command S(43(4 host+ A99(SS &4A2SP84& -

&his command disp"ays mounted resource in ormation%

d mounts B -- n s D ;ithout arguments! the d mounts command disp"ays the shared resource and c"ients mounting the resource or the "oca" ser6er% F demounts 4(S8?49( S(43(4 host" PA&H2A5( 'usr'share'man 9II(2&S host/!hoscO

&his command is a"so used to disp"ay mounted resource in ormation or a speci ied ser6er name% + !,mounts host5 4(S8?49( S(43(4 host+ PA&H2A5( 'e,port 9II(2&S host/! hostO

The 1"S Client&he o""owing commands and i"es are used with the 2-S c"ient% The mount Command &he 'usr's$in'mount command is used to attach either a "oca" or remote i"e resource to the i"e system hierarchy% mount P (D n,s Q P (o options Q server .(pathname mount1point

&he o""owing options can $e used with the mount command:

-- n s Specifies nfs as the file system type. This option is not re<uired because nfs is the default remote filesystem type.

-o options Speci ies a comma-separated "ist o i"e-system speci ic options! such as rw! to mount the i"e resource as read! write! and ro to mount the i"e resource read-on"y% (&he de au"t is rw%) server: pathname % Speci ics the name o the ser6er and the path name o the remote i"e resourceM these are separated $y a co"on (:)% mountEpoint Speci ies the path name o the mount point on the "oca" system (which must a"ready e,ist)%

Accessing a %emote $ile %esource ?se the mount command to access a remote i"e resource% -or e,amp"e: + mount hostl'"usr"share"man "usr"share"man &o mount a remote read-on"y i"e resource rom the irst-a6ai"a$"e host in a commaseparated "ist o hosts! e,ecute the o""owing: + mount (o ro hostl: host5:host3'"usr"share"man "usr"share"man -or i"e systems shared as read-on"y! i mu"tip"e hosts are named and the irst ser6er in the "ist is down! the ai"o6er uti"ity uses an a"ternati6e ser6er in the "ist to access i"es% #he "etc" v,stab $ile

&o ha6e remote i"e resources mounted at $oot time! enter the appropriate entries in (he c"ient's 'etc'6 sta$ i"e% -or e,amp"e: F de6ice F to mount F hostl'"usr"share"man 'usr'share'man ns yes so t%$g de6ice to sc# mount% point -S type sc# pass mount at $oot mount options

&he ie"ds in the 'etc'6 sta$ i"e inc"ude:

de6ice to mount &he name o the ser6er and the path name o the remote i"e resourceM these are separated $y a co"on (:)% de6ice to sc# 2-S resources are not chec#ed rom the c"ient! $ecause the i"e system is not owned $y the c"ient% &his ie"d is a"ways dash (-) or 2-S resources% mount point &he de au"t mount point or the i"e resource% -S type ?se n s or 2-S resources% sc# pass 2-S resources are not chec#ed rom the c"ient! $ecause the i"e system is not owned $y the c"ient% &his ie"d is a"ways dash (-) or 2-S resources% mount at $oot (ither yes or no! which indicates whether the i"e resource shou"d $e! mounted when the system enters run "e6e" + or when the mounta"" command is issued! respecti6e"y% mount options A comma-separated "ist o mount options% rw C ro Speci ies whether the resource is mounted as read write or read on"y% The de au"t is read write% $gC g I the irst mount attempt ai"s! retry in the $ac#ground or oreground% &he de au"t is to retry in the oreground% so t C hard :uring an 2-S mount re)uest! the so t option returns an error i the ser6er does not respond! then it continues $oot% &he hard option continues to retry the mount unti" the ser6er responds or the retry'timeout 6a"ues are e,ceeded% &he de au"t is a hard mount%

2ote - A"though so t or $g are not the de au"t settings! com$ining these two options usua""y resu"ts in the astest c"ient $oot up when 2-S mounting pro$"ems arise%

Intr3 nointr Indicates #ey$oard interrupts to #i"" a process that is hung waiting or a response on a hard-mounted i"e system% &he de au"t is intr% Sui!"nosui! Indicates whether to ena$"e setuid e,ecution% &he de au"t ena$"es setuid e,ecution% imeout K n Sets timeout to n tenths o a second% The de au"t timeout is **! measured in onetenth o a seconds (0%* second) or ?ser :atagram Protoco" (?:P) transports and 600 tenths o a second or &9P% retr&Kn Sets the num$er o times to retry the mount operation% &he de au"t is *0!000 times% re trans -n Sets the num$er o 2-S retransmissions to n4 &he de au"t is / or ?:P% -or connection-oriented transports (such as &9P)! this option has no e ect%

2ote - I the i"e resource is "isted in the 'etc'6 sta$ i"e! the superuser can speci y either server/4pathname or mountJpoint on the command "ine $ecause the mount command chec#s the 'etc'6 sta$ i"e or more in ormation% &ecommended 'ounting Options 5ounting a i"e system with the $g option indicates that i the ser6er's mountd does not respond! the system's attempt to remount the i"e system occurs in the $ac#ground% &his pre6ents the remount rom interruptions o other system ser6ices% ;hen the i"e system is mounted! an 2-S re)uest waits die amount o time indicated $y the timeo ie"d (tenths o a second) or a response% I no response is recei6ed! the 6a"ue in the timeo ie"d is dou$"ed and the re)uest is retried% ;hen the retransmission times reach the 6a"ue in the retrans ie"d! a i"e system mounted with the so t option returns an error% A i"e system mounted with the hard option prints a warning message and continues to retry% &a$"e 6-* "ists the recommended mounting options or some common"y shared i"e resources% &a$"e 6-* 5ount 8ptions 4ead-write' 4ead-on"y ro rw ro System Startup ]g $g $g Ser6er 9rash Interrupt hard hard so t nointr intr Security suid nosuid nosuid

2-S -i"e 4esource 'usr 'e,port 'home 'opt' home

A 4ead!Only Director

&he 'usr i"e system contains operating system $inaries% &his essentia" i"e system is mounted in the oreground! the $ooting process does not continue unti" the mount is comp"eted% &he 2-S c"ient hard mounts this directory% &his means the c"ient continues to retry the mount re)uest unti" the ser6er responds% A %ead-/rite Directory &he 'e,port'home directory is where the users' "ogin directories are common"y p"aced% A hard mount is recommended or a"" read-write (rw) i"e systems ( or e,amp"e! users' home directories)% &he nosuid option pro6ides additiona" networ# security $ecause the setuid permissions on 2-S resources are ignored% A 4ead!Only Application Directory 2onessentia" app"ications are common"y mounted as read on"y (ro) in the $ac#ground ($g) with a so"e mount% &he system continues to $oot i the ser6er does not respond during $oot% I the ser6er crashes! the mount times out% #he umount Command ?se the 'usr's$in'umount command to detach either a "oca" or remote i"e resource rom the i"e system hierarchy% umount ser6er : pathname C mountJpoint &he command "ine can speci y either server:pathname or mountJpoint4 + umount "usr" share "man

The mounta"" and umounta"" Commands ?se the 'usr's$in'mounta"" and 'usr's$in'umounta"" commands to mount and unmount a"" i"e resources% The mountall $ommand ;ithout any arguments! the 'usr's$in'mounta"" command mounts a"" i"e resources "isted in the 'etc'6 sta$ i"e with a mount-at-$oot 6a"ue o yes% &o "imit the action o this command to remote i"e resources! use the -r option% mounta"" -r B -- n s D &he -- n s option restricts the action o this command to 2-S resources on"y% + mountall (r
#he umountall Command

;ithout any arguments! the 'usr's$in'umounta"" command unmounts a"" current"y mounted i"e resources% &o "imit the action o this command to remote i"e resources! use the -r option%

2ote - root ( ' )! 'usr! '6ar! and a"" pseudo i"e systems are not unmounted% ?mounta"" -r B -- n s D

+ umountall (r &he o""owing option can $e used with the umounta"" command:

-- n s Speci ies n s as the i"e system type% &his option is not re)uired! $ecause n s is the de au"t remote i"e system type% &o set up an 2-S c"ient! comp"ete the o""owing steps: ?se the 'usr's$in'd shares command to disp"ay a ser6er's a6ai"a$"e resources%

The 1"S Client Setup *% + !,shares hostl 4(S8?49( host":'usr'share'man +%

S(43(4 host"

A99(S -

&4A2SP84& -

?se the 'usr's$in'mount command to access the remote i"e resource%

+ mount hostl'"usr"share"man "usr"share"man &he 'usr'share'man directory on the c"ient is the mount point in the "oca" system's i"e hierarchy% &his directory shou"d $e empty% J% 8nce it has $een determined that access to the manua" pages "ocated on the remote ser6er is no "onger needed! you can unmount the remote i"e resources rom the c"ient $y using the 'usr's$in'umount command%

+ umount "usr"share"manL 8ccasiona""y! an attempt to unmount an 2-S i"e system resu"ts in the o""owing error message: n,s mount' "usr"share"man' is bus& &his usua""y means that a user or program is accessing the resource% .ounting !sing the "etc"v, stab Dile B!it the "etc"v,stab i"e to add an entry or the remote resource that is automatica""y mounted whene6er the system enters run "e6e" J% host": 'usr'share'man - 'usr'share'man n s - yes ro!$g NDS Ser er &ogging A new eature in the So"aris 8perating (n6ironment is 2-S ser6er "ogging% &his eature records 2-S reads and writes on the i"e system% &he daemon! n s"ogd! pro6ides this operationa" "ogging%

;hen 2-S ser6er "ogging is ena$"ed! records o a"" 2-S operations on the i"e system are written into a $u er i"e $y the #erne"% &his data inc"udes a timestamp! the c"ient IP address! the :I: o the re)uestor! the i"e hand"e o the resource that is $eing accessed! and the type o operation that occurred% &he n s"ogd daemon con6erts this raw data into AS9II records- that are stored in AS9II "og i"es% :uring the con6ersion! the IP addresses arc modi ied to host names and the ?I:s are modi ied to "ogins% 5appings o i"e hand"es to path names is a"so hand"ed $y n s"ogd% It #eeps trac# o these mappings in a i"e-hand"e- to-path mapping %ta$"e% 8ne mapping ta$"e e,ists or each tag identi ied in the 'etc'n s'n s"og%con i"e% &he i"e hand"es are a"so con6erted into path names% &he daemon #eeps trac# o the i"e hand"es and stores in ormation in a separate i"e hand"e to path name ta$"e! this way the path does not ha6e to $e reidenti ied each time a i"e hand"e is accessed% 2ote - It is important to #eep the n s"ogd daemon running! $ecause there is no trac#ing o changes to the mappings in the i"eEhand"e-to-path ta$"e i n s"ogd is turned o % *nabling 2$S Ser er &ogging To enable nfs ser4er logging, complete the following steps+ ). +% @ecome superuser. 8ptiona": 9hange the i"e system con iguration settings% In "etc"n,s"n,slog.con,: either edit the de au"t settings or a"" i"e systems $y changing the data associated with the g"o$a" tag or add a new tag or the speci ic i"e system% I these changes are not needed! do not edit this i"e% J% Add entries or each i"e system to $e shared using 2-S ser6er (dit 'etc'd s'd sta$ and add one entry to the i"e or the i"e system that is to ha6e 2-S ser6er "ogging ena$"ed% <ou must enter the tag used with the "ogNtag option in "etc"n,s"n,slog.con, &he o""owing e,amp"e uses the de au"t settings in the g"o$a" tag: share (D n,s (o ro : iogKglobal "e*port",tp 0% 9hec# that the n s ser6ice is running on the ser6er% I the n s daemons are not running! issue the o""owing commands to #i"" and restart the n s daemons% # "etc"init .!"n,s . server stop + "etc"init .!"n,s. server start /% I the 2-S daemons are a"ready running! issue a command to share the i"e system%

8nce you add the entry to 'etc'd s'd sta$! the i"e!system can $e shared $y either re$ooting the system or $y using the sharea"" command% + shareall I the 2-S daemons were restarted ear"ier! you do not need to run this command $ecause the script runs the command% 6! 3eri y that the in ormation is correct% %

4un the share command to chec# that the correct options are "isted: + share 'e,port'share'man 'usr'src 'e,port' tp rwNeng ro [c RR [c

ro! "ogNg"o$a"

1%
+ "usr"lib"n,s"n,slog!

Start the 2-S "og daemon! n s"ogd! i it is not running a"ready%

&his step is not necessary i you restarted the n s daemons using the n s% ser6er script! $ecause this script a"so starts this dacrnon i the 'etc'n s'n s"og %con i"e e,ists% #he 3 etc"n,s"n,slog. con, $ile &his i"e de ines the path! i"e names! and type o "ogging to $e used $M n s"ogd (ach de inition is associated with a tag% Starting 2-S ser6er "ogging re)uires that you identi y the tag or each i"e system% &he g"o$a" tag de ines the de au"t 6a"ues% &he o""owing is an e,amp"e o an origina" n s"og %con i"e: + cat "etc"n,s"n,slog.con, F ident F
F F 2-S ser6er "og con iguration i"e% F GtagH B de au"tdirNGdirEpathH D f B "ogNG"og i"eEW:athH D B sta$"eNGta$"eEpathH D f

RZ(F)n s"og%con

*%/

OO'0+'+* S5IR

B $u erNG$u er i"eEpathH D B "og ormatN$asic" e,tended D F g"o$a" de au"tdirN'6ar'n s f

"ogNn s"og hta$"eN hta$"e $u erNn s"ogEwor#$u] er ?se the o""owing parameters with each tag! as needed:

de au"tdirNpath Speci ies the de au"t directory path or the "ogging i"es% "ogNpath' i"ename Sets the path and i"e name or the "og i"es% hta$"eNpath' i"ename Se"ects the path and i"e name or the i"eEhand"e-to-path data$ase i"es% $u erNpath' i"ename :etermines the path and i"e name or the $u er i"es% "og ormatN$asicC e,tended

Se"ects the ormat to $e used when creating user-reada$"e "og i"es% &he $asic ormat produces a "og i"e simi"ar to some ttpd daemons% &he e,tended ormat gi6es a more detai"ed 6iew% -or the parameters that can speci y $oth the path and the i"e name! i the path is not speci ied! the path de ined $y de au"tdir is used% A"so! you can o6erride de au"tdir $y using an a$so"ute path% &o ma#e identi ying the i"es easier! p"ace the i"es in separate directories% -or e,amp"e! # cat "etc"n,s"n,slog.con, F ident RZ (F) n s"og%con *%/ OO'0+'+* S5I

F 2-S ser6er "og con iguration i"e% F g"o$a" de au"tdirN'6ar'n s f "ogNn s"og hta$"eN hta$"e $u erNn s"ogEwor#$u er pu$"ic tp "ogN"ogs'n s"og hta$"eN h' hta$"es $u erN$u ers'wor#$u er <ou must create the directories or "ogs! h! and $u ers $e ore starting 2-S ser6er "ogging% In this e,amp"e! any i"e system shared with "ogNpu$"ic tp uses the o""owing 6a"ues:

&he de au"t directory is'6ar'n s% &he "og i"es are stored in '6ar'n s'"ogs'n s"ogS%

&he i"eEhand"e-to-path data$ase ta$"es are stored in '6ar'n sI h' hta$"es% &he $u er i"es are stored in '6ar'n s'$u ers'wor#$u er%

#he "etc"!e,ault"n,slog! Dile 2-S operations on an 2-S ser6er are "ogged $ased on the con iguration in ormation de ined in 'etc'de au"t'n s"ogd% &his i"e de ines some o the parameters used when using 2-S ser6er "ogging% &hese parameters inc"ude: 5AAEI8@SEP4(S(43( - :etermines the num$er o "og i"es to $e sa6ed% &he de au"t 6a"ue is *0% 5I2IEP489(SSI2@ESIV( - Sets the minimum num$er o $ytes that the $u er i"e must reach $e ore processing and writing to the "og i"e% &he de au"t 6a"ue or is /+0+.. $ytes% Increasing this num$er can impro6e per ormance $y reducing the num$er o times the $u er i"e is processed% &his parameter! a"ong with I:I(E&I5( determines how o ten the $u er i"e is processed%

I:I(7&I5( - Sets the num$er o seconds mat n s"ogd shou"d s"eep (wait) $e ore chec#ing or more in ormation in the $u er i"e% It a"so determines how o ten the con iguration i"e is chec#ed% &he de au"t 6a"ue is J00 seconds% Increasing this num$er can impro6e per ormance $y reducing the num$er o chec#s% 9<9I(E-4(a?(29< - :etermines the num$er o hours that must pass $e ore the "og i"es are cyc"ed% &he de au"t 6a"ue is +0 hours &his option is used to pre6ent the "og i"es rom growing too "arge ?5ASL - Speci ies the permissions or the "og i"es that are create $y n s"ogd% &he de au"t 6a"ue is 0*J1%

(ummary of )3( $ommands, 3iles, and Daemons &he main commands and i"es used on $oth the ser6er and c"ient systems are summari>ed in &a$"e 6-+% &a$"e 6-+ Summary o 2-S 9ommands! -i"es! and :aemons

2-S Ser6er

2-S 9"ient

9ommands

share resource unshare resource sharea"" unsharea""


d mounts 'etc'init%d'n s%ser6er

mount ser6er : directory mount-point umount mount-point mounta"" -r


umounta"" /r4 d shares ser6er

'etc'init%d'n s%c"ient

-i"es

'etc'd s' stypes 'etc'd s'd sta$ 'etc'd s'shareta$) 'etc'rmta$ 'etc'n s'n s"og%con 'etc'de au"t'n]s"ogd 'etc'n s'n s"ogta$

'etc'd s' stypes 'etc'6 sta$ 'etc'mntta$

:aemons

'usr'"i$'n s'n sd 3usr3lib3nfs3mountd 3usr3lib3nfs3statd 3usr3lib3nfs3lockd 3usr3lib3nfs3nfslogd

'usr'"i$'n s'statd 3usr3lib3nfs3lockd

Auto$S ) er iew
&he Auto-S i"e system ena$"es you to do the o""owing: 5ount i"e systems on demand ?nmount i"e systems automatica""y% 2ote - Automountd resources remain mounted or as "ong as they are $eing used% I no i"es or directories within the i"e system are accessed within a speci ied time-out period! a i"e system unmount automatica""y occurs% 9entra"i>e the administration o use o a name ser6ice% Ha6e mu"tip"e mount resources or 0uto"S Components Auto-S contains three components that wor# together automatic mounting% &hese components inc"ude an automount command! and the automountd daemon%

Auto-S mounts through the read-write i"e systems% on the c"ient to accomp"ish Auto-S i"e system! the

&he auto s i"e system's mount points are de ined in automount: maps "ocated in the 'etc directory on the c"ient system% 8nce the auto s mount points are set up! acti6ity under the mount points can trigger i"e systems to $e -mounted under them% I automount is con igured! the auto %s i"e system monitors mount re)uests made on the c"ient% I a mount re)uest is made or an auto s resource not current"y mounted! auto s ca""s the automountd daemon! which actua""y mounts the re)uested resource% &he automount command - &he automount command! ca""ed at system startup time! reads the master map i"e 'etc'autoEmaster to create the initia" set o auto s mounts &hese auto s mounts are not automatica""y mounted at startup time% &hey are points under which i"e systems are mounted on demand% &he automountd daemon - &he automountd daemon is! started at $oot time rom the 'etc'init%d'auto s script and mounts i"e systems on demand% 2ote - &he automountd daemon is comp"ete"y independent rom the automount command% Kecause o this separation! you can add! de"ete! or change map in ormation without ha6ing to stop and start the automountd daemon process% Howe6er! the process might ha6e to reread the maps% Automount .aps The auto s i"es! ca""ed maps! identi y the i"e system resources to $e automatica""y mounted% &hese map types inc"ude:

5aster map - 4ead $y the automount command during $oot up% &his map "ists the other maps used or esta$"ishing the auto s i"e system% :irect map - Iists the mount points as a$so"ute path names% &his map e,p"icit"y indicates the mount point on the c"ient% Indirect map - Iists the mount points as re"ati6e path names% &his map uses a re"ati6e path to esta$"ish the mount point on the c"ient Specia" - Pro6ides access to entries in 'etc'hosts or the -ederated 2aming Ser6ice (-2S)% automount maps contain AS9II data i"es or 2IS or 2IST data$ase i"es% &ogether! these maps descri$e in ormation simi"ar to the in ormation speci ied in the 'etc'6 sta$ i"e or remote i"e resources .aster .aps &he autoEmaster i"e associates a mount point with a map% It is a master "ist speci ying a"" o the maps that auto s shou"d chec#% 2ames o direct and indirect maps "isted here re er to i"es in 'etc% &he o""owing e,amp"e shows what an autoEmaster i"e can contain:

F cat 'etc'autoEmaster F 5aster map or automount F TautoEmaster 'net ''home ' ', n -hosts autoEdirect autoEhome -, n -no$rowse -nosuid!no$rowse

&he o""owing descri$es the ie"ds in this e,amp"e o a master map i"e: mountJpoint one i possi$"e% 5ap-name &he u"" path name o a directory% I the directory does not e,ist! auto s creates

&he name o a direct or indirect map% &hese maps are directions to mounting in ormation%

mount/options &he genera" options or the map% &he mount options are the same as those or standard 2-S mounts% 2ote - &he p"us (T) sym$o" at the $eginning o the TautoEmaster "ine in this i"e directs the automounter program to "oo# at the 2IS or 2IST data$ases% I this "ine is commented out! on"y the "oca" i"es are used% Special 'aps &here are two mount points or specia" maps "isted in this 'etc'autoEmaster i"e% &hey identi y the o""owing: &he -hosts map &his specia" map pro6ides access to a"" resources shared $y each 2-S ser6er "isted in the hosts data$ase% <ou can o$tain this in ormation rom 'etc'met'hosts! 2IS! 2IST! or :2S% &his is a de au"t entry% Shared resources associated with this map are mounted $e"ow 'net'hostname% &he -, n map &his specia" map pro6ides access to resources a6ai"a$"e through the A'8pen -ederated 2aming Ser6ice% 4esources associated with this ser6ice mount $e"ow ', n%
Direct Map Entries

&he '- entry in the e,amp"e master map de ines a mount point or direct maps% &his mount point is a pointer that in orms the automount program that the u"" path names are de ined in the i"e speci ied $y map name ('etc'autoEdirect in this e,amp"e)% 2ote - &his is not an entry in the de au"t master map% It has $een added here as an e,amp"e% &he other entries in this e,amp"e a"ready e,ist in the auto master i"e% 2ote - A 2IS or 2IST autoEmaster map can ha6e on"y one direct map entry% An autoEmaster map that is a "oca" i"e can ha6e any num$er o entries%

!ndirect Map Entries &he 'net! 'home! and ', n entries de ine mount points or indirect maps% &he maps -hosts! autoEhome! and -, n "ist re"ati6e path names on"y% Indirect maps get the initia" path o the mount point rom the master map% &he So"aris +%6 8perating (n6ironment through So"aris 8perating (n6ironment re"eases support $rowsing o indirect maps (and specia" maps) with the -$rowse option% &his a""ows a"" o the potentia" mount points to $e 6isi$"e! regard"ess o whether they are mounted% &he -no$rowse option disa$"es the $rowsing o indirect maps% &here ore! in this e,amp"e! the 'home automount point pro6ides no $rowser unctions or any directory other than those that are current"y mounted% &he de au"t or this option is -$rowse% Direct .aps :irect maps speci y the a$so"ute path name o the mount point! the speci ic options or this mount! and the shared resource to mount% -or e,amp"e: + cat "etc"auto#!irect F Superuser-created direct map or automount F 'apps' rame 'opt'"oca" 'usr'share'man -ro%so t -ro%so t -ro%so t ser6er": 'e,port' ramema#er! 60 %0 ser6er+:'e,port'un$und"ed ser6ers!ser6er0!ser6er/: 'usr'share'man

&he o""owing descri$es the synta, or direct maps: ey > mount/options< location

ey - &he u"" path name o the mount point or direct maps% options - &he speci ic options or a gi6en entry% location / &he "ocation o the i"e resource speci ied in ser6er /4pathname notation% &he o""owing direct map entry speci ies that the c"ient mounts the 'usr'share'man directory as read on"y rom tine ser6ers ser6ers! ser6er0! or ser6ers! as a6ai"a$"e: 'usr'share'man -ro ser6erJ! ser6er0! ser6ers: 'usr'share'man

&his entry uses a specia" notation! a comma-separated "ist o ser6ers! to speci y a power u" automounter eatureXmu"tip"e "ocations or a i"e resource% 2ote - &he comma-separated "ist o ser6ers automount eature wor#s only with ser6ers that are sharing i"es as read-on"y% &he automountd command automatica""y mounts 'usr'share'man as needed! rom ser6erJ! ser6er0! or ser6ers! with ser6er pro,imity $eing the actor on ser6er se"ection% I the nearest ser6er ai"s to respond within the prescri$ed time-out period! the ser6er with the ne,t nearest pro,imity is se"ected% Indirect 'aps

Indirect maps ha6e re"ati6e paths in the #ey ie"d% &he irst part o the path name is speci ied in the master map% Indirect maps are use u" when you want to mount many remote i"e resources $e"ow a common directory% The autoEhome Indirect 'ap : &he autoEhome indirect map pro6ides a consistent 6iew o home directories across the networ#! regard"ess o which system a user is current"y "ogged in to% -or e,amp"e! F cat 'etc'autoEhome F Home directory map or automounter TautoEhome ste6enu Wohnnyd w#d host/ : 'e,port' home 'ste6enu host6 : 'e,port'home' Wohnnyd ser6er" : 'e,port'home'w#d

2ote - &he p"us (T) sym$o" at the $eginning o the TautoEhome "ine in the i"e directs the automounter to "oo# at the 2IS or 2IST data$ases% I this "ine is commented out! on"y the "oca" i"es arc used% &he o""owing descri$es the synta, or indirect maps: ey > mount/options< location

ey / &he path name o the mount point re"ati6e to the $eginning o the path name speci ied in the 'etc'autoEmaster i"e% options -&he speci ic options or a gi6en entry% "ocation -&he "ocation o the i"e resource speci ied in ser6er: pathname notation%

#he Substitution String for an Indirect .ap &he o""owing entry reduces die autoEhome i"e to a sing"e "ine% &he use o su$stitution characters speci ies that or e6ery "ogin I:! the c"ient remote"y mounts the 'e,port'home'"ogin I: directory rom the 2-S ser6er ser6er" onto the "oca" mount point 'home'"ogin":% serverl (. "e*port"home"k &his entry uses the wi"dcard character (S) to match any #eyM the su$stitution character (_) at the end o the "ocation speci ication is rep"aced with the matched #ey ie"d% &his wor#s on"y when a"" home directories are on a sing"e ser6er (in this e,amp"e! ser6er")% The automount Command ;hen ma#ing changes to the master map or creating a direct map! ma#e the change e ecti6e $y running the automount command% Command Format automount B/t duration < >-6 D &he o""owing descri$es the automount command options%

-t duration Speci ies a time! in seconds! that the i"e system remains mounted when not in use% &he de au"t is 600 seconds (*0 minutes)%

-6 :isp"ays output as the automount command e,ecutes

<ou do not ha6e to stop and restart the automountd daemon a ter ma#ing changes to e,isting entries in either a direct or indirect map $ecause it is state"ess% <ou can modi y e,isting entries in $oth direct and indirect maps at any time &he new in ormation is used when the automountd daemon ne,t uses the map entry to per orm a mount% <ou can modi y the master map entries or add entries or new maps% Howe6er! you must run the automount command to ma#e these changes ta#e e ect% A modi ication is a change to options or resources% A change to the #ey (the mount point) or a comp"ete"y new "ine is considered to $e an added or de"eted entry or $oth% ?se &a$"e 1-* to determine whether you shou"d run (cr re-run) the automount command% &a$"e 1-* ?sing Automount 5aps Automount 4un i (ntry is Added or 4un i (ntry 5odi ied :e"eted is <es <es 2o <es 2o 2o

autoEEmaster direct map indirect map

2ote - &here is no harm in running the automount command to rescan the maps! e6en i it is not re)uired% #he Client auto,s $ile System &he auto s i"e system is a #erne" i"e system that supports automatic mounting and unmounting% ;hen you ma#e a re)uest to access a i"e system at an auto s mount point! the o""owing occurs:
*% +% &he auto s i"e system intercepts the re)uest% &he auto s i"e system sends a message to the automountd daemon or the re)uested i"e system to $e mounted% &he automountd daemon "ocates the i"e system in ormation in a map and per orms the mount% &he auto s i"e system a""ows the Intercepted re)uest to proceed% &he automountd daemon wi"" unmount the i"e system a ter a period o inacti6ity%

J%

0% /%

2ote - 5ounts managed through the auto s ser6ice shou"d not $e manua""y mounted or unmounted% (6en i the operation is success u"! the auto s i"e system does not chec# that the o$Wect has $een unmounted' resu"ting in possi$"e inconsistency% A re$oot c"ears a"" o the auto s mount points%

Multi"threaded autofs &he new auto s automount daemon is now u""y mu"ti-threaded% &his ena$"es concurrent ser6icing o mu"tip"e%mount re)uests and increases re"ia$i"ity% Automount Administration

&he o""owing procedure descri$es how to set up remote access to a resource in the So"aris 8perating (n6ironment that is "ocated on an 2-S ser6er! using the automountd daemon Setting up a Direct Map &his e,amp"e demonstrates how to set up remote access to the man pages "ocated on an 2-S ser6er% *% (dit the 'etc'autoEmaster i"e to add a direct map entry% or automounter

F 5aster map F% TautoEmaster 'net 'home '', n

-hosts autoEhome autoEdirect -, n

-nosuid%no$rowse -no$rowse

+ 9reate a new i"e ca""ed 'etc'autoEdirect and add the o""owing entry or the directory you want to automount% 4ep"ace ser6er with the host name o your ser6er% 'usr'share'man J% -ro ser6er%'usr'share'man

5a#e the changes e ecti6e%

F automount -6 automount: 'usr'share'man mounted automount: no unmounts Setting up an Indirect 'ap 9omp"ete the o""owing steps to set up an indirect map: *% (dit the 'etc'autoEmaster i"e% Add the patch directory and map%

F 5aster map or automounter

F T autoEmaster 'net 'home 'ser6ices ', n -hosts autoEhome autoEpatch% -, n -nosuid! no$rowse -no$rowse

+% 9reate an 'etc'autoEpatch map% (nter the patch directory name on the c"ient and the ser6er pathname% &he o""owing e,amp"e i""ustrates the indirect map content% F Patch directory map or automounter F patch J% ser6er":'e,port'patch 5a#e the changes e ecti6e%

F automount -6

Cache$S $ile System <ou can use the 9ache-S i"e system to impro6e the per ormance o remote i"e systems (such as 2-S)! or s"ow de6ices! such as 9:-485 dri6es% ;hen you ena$"e the 9ache-S i"e system! the data read rom the remote i"e system or 9:-485 is stored in a dis#-$ased cache on the "oca" system% Su$se)uent read re)uests to the same data are u" i""ed $y the "oca" cache! which impro6es read per ormance% 2ote - &his has no e ect on the 2-S ser6erM it a ects on"y the c"ient%

J%

5ount the remote i"e system and imp"ement a 9ache-S i"e %system%

F mount (D cache,s (o back,st&peKn,s: cache!irK"cache"cache0: W cachei!K!ata#cache hostl' "e*port"!ata "!ata

&he remote resource is mounted as a 9ache-S i"e system% &he source i"e system type ($ac# stype) is n s% <ou must speci y the cachedir% &he cacheid is optiona"! $ut it can pro6ide a con6enient user-de ined "a$e" "o identi y this 9ache-S mount or su$se)uent administration commands% &he remote resource is host": 'e,port'data and "oca" users ' " access it through the 'data mount point%

0%

?se the mount: command (o 6eri y the mount%

F mount ' on 'de6'ds#'c0t0d0s0 read'write'setuid'"arcie i"es on &hu 5ay ** */://:J0 +000 'proc on 'proc read'write'setuid on &hu 5ay ** */://:J0 +000 'de6' d on d read'write'setuid on &hu 5ay ** */://:J0 +000 'tmp on swap read'write on &hu Hay ** */://:J/ +000 'data on 'cache'cache0' %c sEmntEpoints'host" :Ee,portEdata $ac# stypeNn s'cachedir-''cache'cache8'cacheid-dataEcache on &hu "-"ay ** 06:J.:0J +000 <ou cou"d automate (his mount $y adding a "ine simi"ar "o the o""owing to the 'etc'6 sta$ i"e: host":'e,port'data - 'data cache s - yes $ac# stypeNn s! cachedirN'cache'cache8!cacheidNdataEcache host":'e,port'data - 'data cache s - yes $ac# stypeNn s! cachedirN'cache'cache8!cacheidNdataEcache &he cache is now used when "oca" users access the resource through the "oca" 'data mount point% Cache $S Cache Directory Details -igure .-J i""ustrates areas o the under"ying cache directory hierarchy:

cache

cache0

(Iin#) 000000000000O01* (9ached data) dataEcache %c sEmnt points

host": Ee,portEdata &he cache is now used when "oca" users access the resource through the "oca" 'data mount point% &he o""owing descri$es the cache directory hierarchy: -or each 9ache-S i"e system $eing cached in the cache directory! an entry is made in the %c sEmntEpoints directory% I you speci y a cache I: string when the 9ache-S i"e system is mounted! this string $ecomes a sym$o"ic "in# to the cache data or that i"e system% Ioca" users access the cached data through the "oca" 'data mount point% #sing Cache FS Terminology &he o""owing terms are used when discussing the 9ache-S i"e system:

Kac# i"e system - &he origina" dis#-$ased! networ#-$ased! or 9:- 485-$ased i"e system that is mounted as a 9ache-S i"e system and cached% -ront i"e system - &he mounted i"e system that is cached and accessed $y the user through the "oca" mount point% 9onsistency -4e ers to the state o synchroni>ation $etween the $ac# and ront i"e systems!

#sing CacheFS File System Commands <ou ha6e the o""owing commands a6ai"a$"e or administering a 9ache-S i"e system: c,sa!min - &his command administers the dis# space or the cached i"e system% &his inc"udes creating! de"eting! and "isting the contents o the cache% cache,sstat - &his command pro6ides statistics on cache usage% cache slog - &his command esta$"ishes a "ogin procedure or the cache% cache,swssi1e - &his command he"ps determine the wor#ing set si>es or 9ache-S i"e systems so that the cache area can $e proper"y si>ed% &his unctions on"y i 9ache-S "ogging is ena$"ed Creating a Cache$S $ile System

Setting up a 9ache-S i"e system is $asica""y a three-step procedure! i""ustrated in -igure .-+%

9reate cache (c sadmin)

9reate mountEpoin" (m#dir)

5ount cachc-S (mount -- cache s) Setting up a 9ache-S -i"e System &his e,amp"e procedure assumes that F i"e system ('e,port'data) on a remote system (host") IS a6ai"a$"e to the "oca" system% &ine "oca" system mounts the resource and caches it% 2ote - A"" commands are e,ecuted on the "oca" system% &o set up a 9ache-S i"e system! per orm the o""owing steps: *% 9reate a cache using the o""owing command:

+ c,sa!min (c "cache"cache0 +% I one does not a"ready e,ist! create a "oca" mount point in preparation or mounting the remote i"e system%

+ mk!ir "!ata
Cache FS Statistics and Consistency Chec$ing

&o 6iew 9ache-S i"e system statistics you can use the cache sstat: command% &o chec# consistency! use the c sadmin command% #he cache,sstat Command

<ou use cache sstat command to disp"ay cache statistics% It disp"ays in ormation that descri$es the e ecti6eness o your cache% &he o""owing output shows statistics or a new"y created cache: + cache,sstat "!ata 'data cache hit rate: consistency chec#s: modi ies: gar$age co""ection: *00g ( . hits! 0 misses) +0 (+0 pass! 0 0 0 ai")

Ky de au"t! automatic cache consistency is ena$"ed% &he i"es in the cache are chec#ed against the origina"s in the $ac# i"e system (on the ser6er) and updates are per ormed on the c"ient's ront i"e system% &he pass 6a"ue (+0 in this e,amp"e) indicates the num$er o consistency chec#s per ormed% &he ai" 6a"ue (0 here) indicates the num$er o updates that ha6e $een per ormed% &he 6a"ue in the hit rate indicates the e iciency o the cache% &he hits indicate the instances when the cached i"e was used and access to the origina" i"e a6oided% &he miss 6a"ue indicates when there was not a cached copy o the i"e and the $ac# i"e system copy was accessed% &o co""ect status o6er a speci ic period o time! you can irst >ero the cache s counters% &o >ero a"" cache s counters! use the o""owing command: &he o""owing output shows statistics or a new"y created cache:

+ cache,sstat "!ata 'data cache hit rate:


consistency chec#s: modi ies:

*00g ( . hits! 0 misses)


+0 (+0 pass! 0 0 ai")

gar$age co""ection:

Ky de au"t! automatic cache consistency is ena$"ed% &he i"es in the cache are chec#ed against the origina"s in the $ac# i"e system (on the ser6er) and updates are per ormed on the c"ient's ront i"e system% &he pass 6a"ue (+0 in this e,amp"e) indicates the num$er o consistency chec#s per ormed% &he ai" 6a"ue (0 here) indicates the num$er o updates that ha6e $een per ormed% &he 6a"ue in the hit rate indicates the e iciency o the cache% &he hits indicate the instances when the cached i"e was used and access to the origina" i"e a6oided% &he miss 6a"ue indicates when there was not a cached copy o the i"e and the $ac# i"e system copy was accessed%

&o co""ect status o6er a speci ic period o time! you can irst >ero the cache s counters% &o >ero a"" cache s counters! use the o""owing command: F cache sstat -> #he !ernan!const )ption <ou can disa$"e the automatic consistency chec#s $y using the demandconst option or the mount command (see the mountEcache s(") man page or more in ormation)% &his shou"d $e done on"y when the $ac# i"e system is static or the $ac# and ront i"e systems do not need to $e synchroni>ed% -or e,amp"e! i the $ac# i"e system is a read-on"y i"e system on a 9:-485! there is no need to ena$"e consistency chec#ing% The c sadmin Command I automatic consistency chec#ing is disa$"ed $y using the demandconst option! the o""owing c sadmin command manua""y in6o#es a consistency chec# and per orms any necessary updates: + c,sa!min (s "!ata Enhancing Cache"S "ile System Caching <ou can ha6e additiona" contro" o the caching mechanism or 9ache-S i"e systems $y doing the o""owing:

Set the num$er o data $"oc#s used $y the cache as a percentage o the ront i"e system% 4e er to the c sadmin("5) man page or detai"s% 2ote - these percentages can $e en orced on"y i the 9ache-S i"e su$system is gi6en e,c"usi6e access to the ront i"e system%

Set the minimum and ma,imum num$er o i"es that the 9ache-S i"e system can use as a percentage o the i"es in the ront i"e system% &he o""owing disp"ay o cache statistics shows the de au"t 6a"ues:

+ c,sa!min($ "cache"cache0
c sadmin: "ist cache -S in ormation

ma,$"oc#s min$"oc#s thresh$"oc#s ma, i"es min i"es thresh i"es ./g O0g

O0g 0g

0g ./g

ma, i"esi>e

J5K

dataEcache where: ma*blocks - 5a,imum amount o storage space that 9ache-S can use! e,pressed as a percentage o the tota" num$er o $"oc#s in the ront i"e system% minblocks - 5inimum amount o storage space (e,pressed as a percentage o the tota" num$er o $"oc#s in the ront i"e system) that 9ache-S is a"ways a""owed to use without "imitation $y its interna" contro" mechanisms% threshblocks - A percentage o the tota" $"oc#s in the ront i"e system $eyond which 9ache--S cannot c"aim resources once its $"oc# usage has reached the "e6e" speci ied $y min$"oc#s% ma*,iles - 5a,imum num$er o i"es that 9ache-S can use! e,pressed as a percentage o the tota" num$er o inodes in the ront i"e system% min,iles - 5inimum num$er o i"es (e,pressed as a percentage o the tota" num$er o inodes in the ront i"e system) that 9ache-S is a"ways a""owed to use without "imitation $y its interna" contro" mechanisms% thresh,iles - A percentage o the tota" inodes in the ront i"e system $eyond which 9ache-S cannot c"aim inodes once its usage has reached the "e6e" speci ied $y mint "ies% ma*,ilesi1e - Iargest i"e si>e (e,pressed in 5$ytes) that 9ache-S is a""owed to cache% &hese parameters are speci ied with the -o option! with mu"tip"e parameters separated $y commas% 4e er to the c sadmin(*5) man page or more detai"s% <ou can change these parameters on"y when you create 'the cache% Si;ing the Cache <ou use the cache swssi>e command to determine the current si9e o the data in the cache% &his inc"udes the amount o cache space needed or each i"e system that was mounted under the cache! as we"" as a tota"% Ke ore using the cache swssi>e command! you must ena$"e cache s "ogging% Ke ore you ena$"e the cache s "ogging! you must create the directory or the "og i"es% + mk!ir "var"cachelogs &he o""owing command creates and $egins a cachets "og: + cache, slog (, "var"cachelogs "!ata: log "!ata '6ar'cache"ogs'data%"og: 'data In the pre6ious command! a cache "og ca""ed '6ar'cache"ogs'date% "og was created or the 9ache-S i"e system mounted "oca""y as 'data% <ou can change the cache "og at any time% &he o""owing command is an e,amp"e o changing the "og i"e to: '6ar'cache"ogs'dateEnew%"og:

+ cache,slog (, "va*"cachelogs"!sta#new#025$00.$og "!ata '6ar'cache"ogs'dataEnewE06+*00%*og: 'data At any time! you can determine the current "og i"e% &he o""owing is a samp"e command that descri$es how to do this: + cache,slog "!ata '6ar'cache"ogs'dataEnewE06+*00%*og: 'data <ou can stop and 6eri y "ogging using the o""owing commands: + cache,slog (h "!ata not "ogged: 'data F cache s"og 'data not "egged: 'data 8nce you ena$"e "ogging! you can chec# the si>e o the cache + cache,swssi1e "va*"cachelogs"!ata: log tota" or cache 0+/6# /**#

initia" si>e: end si>e: high water si>e: /**#

Cache $S $ile System Integrity <ou use the sc#("5) command to chec# and repair the integrity o i"e systems% &o chec# the integrity o the 9ache-S i"e system! per orm the o""owing steps: *% ?nmount the 9ache-S i"e system $e ore in6o#ing the sc# command%

+ mount "!ata +% ?se the o""owing command to chec# and repair the 9ache-S i"e system:

+ ,sck (D cachets (o noclcan "cache"cache! &he -- option in orms the sc# command that the type o i"e system to chec# is the 9ache-S i"e system type% &he -o nod can option is used to orce sc# to per orm a chec# e6en i it determines that a chec# is not necessary% J% ?se the mount command to ena$"e access to the repaired 9ache-S i"e! system%

+ mount (D cache,s (o back,st&peKn,s:cache!irK"cache"cache0: W

cacheidNdataEcache host*:'e,port'data 'data Dismantling a Cache $S $ile System Imp"ementing a 9ache-S i"e system can $e an interim measure or enhancing per ormance% <ou can de"ete a 9ache-S i"e system and recreate it at a "ater time% 2ote - :e"eting a 9ache-S i"e system (that is! de"eting its cached copy) has no e ect on the origina" $ac# i"e system% <ou can mount more than one $ac# i"e system as a 9ache-S i"e system and cache it in the same caching directory% <ou can dismant"e one 9ache-S i"e system! "ea6ing others intact% <ou can a"so dismant"e a"" the 9ache-S i"e systems in the caching directory% &o dismant"e a 9ache-S i"e system! per orm the o""owing steps: *% I necessary! warn users that their access to the 9ache-S i"e system wi"" $e interrupted%

+% :etermine the cache I: or the 9ache-S i"e system you intend to de"ete% &he I: string is "ocated in the "ast "ine o the output o the o""owing command% &he remainder o the output is co6ered "ater in this modu"e% + c,sa!min ($ "cache"cache0 c sadmin: "ist cache -S in ormation ma,$"oc#s min$"oc#s thresh$"oc#s ma,ti"es min i"es thresh i"e ma, i"esi>e data cache ./g O0g 0g ./g J5K % O0g 0g

J% ?nmount a"" 9ache-S i"e systems that share the same cache directory with the one you intend to delete4 The e-amples in this module use on"y one cache directory! so the command is + umount' "!ata

0%

:e"ete the 9ache-S i"e system%

+ c,sa!min (! !ata#cache "cache"cache0 2ote -&o de"ete a"" 9ache-S i"e systems in the cache directory! use the c sadmin -d a"" command%

/% I some 9ache-S i"e systems remain a ter others are de"eted! use the sc# command to correct the resource counts in the cache directory% + ,sck (D cache,s (o noclean "cache"cache! 6% 4emount the remaining 9ache-S i"e systems

1ame Services Overview


&he name ser6ice concept centra"i>es the shared in ormation in your networ#% A sing"e machine! the name ser6er! maintains the in ormation pre6ious"y maintained on each indi6idua" host% &he name ser6ers pro6ide in ormation! such as host names and IP addresses user names! passwords! and automount maps% 8ther hosts in your networ#! clients+ re)uest the in ormation rom the name ser6er% &his name ser6er system responds to c"ients! and trans"ates or reso"6es their re)uests rom its memory-$ased (cached) or dis# data$ase(s)%

&he name ser6ice concept pro6ides: (ase o management: Sing"e point o administration 9onsistent in ormation ?ni orm 6iew o networ# Immediate re "ection o changes to a"" c"ients Assurance that c"ients do not miss updates In a i"e-$ased scheme! updates recei6ed using tp or copied in some way to c"ient machines cou"d $e missed i a host were dof6i or o the networ# when the changes were propagated%

Secondary ser6ers pre6ent a sing"e point o ai"ure ;hi"e a sing"e master ser6er is a"" that is re)uired! the name ser6ice scheme a""ows or the creation o secondary ser6ers (sometimes re erred to as slaves or replicas)4 &hese secondary ser6ers maintain a copy o the master's data$ase! recei6e changes and updates to the data$ase rom the master! and participate in

c"ient reso"ution% As such! they not on"y o6ercome a sing"e point o ai"ure! $ut a"so p"ay a ro"e in increased networ# per ormance% %vaila&le 'ame Services Some common name ser6ice so"utions address speci ic needs or architectures! as o""ows:

:omain 2ame Ser6ice (:2S) - &his name ser6ice is used within n &9P'IP networ# to trans"ate host names to their associated IP addresses% 2etwor# In ormation Ser6ice (2IS) - &his name ser6ice pro6ides a centra"i>ed "oo#up or IA2 resources! such as user accounts! host names and addresses! ser6ices! automount maps! and other #ey i"es that wou"d otherwise $e needed on each host o the IA2% 2etwor# In ormation Ser6ice P"us (2IST) - &his name ser6ice pro6ides a centra"i>ed "oo#up "ocation or IA2 resources% Howe6er! 2IST is great"y e,panded to support today's intranet with the eatures o a hierarchica" naming structure! distri$uted administration! $ui"t-in security authentication! and cross-domain "oo#ups% Iightweight :irectory Access Protoco" (I:AP) - &his name ser6ice e,tends the naming ser6ices with a directory ser6ice% ;hi"e a naming ser6ice a""ows you to "oo# up an o$Wect gi6en its name! a directory ser6ice a"so a""ows these o$Wects to ha6e attri$utes% &here ore! in addition to "oo#up! you can a"so get the attri$utes or these o$Wects or search or o$Wects gi6en their attri$utes% I:AP is on"y one imp"ementation o a directory ser6ice%

6NS ) er iew
&he :2S is app"ication so tware that pr--imari"y pro6ides or the distri$uted administration o IP addresses throughout the Internet% It a"so does the o""owing:

It ena$"es "oca" administrators to maintain in ormation a$out their own "oca" hosts and ena$"es them to share this in ormation with others throughout the Internet! It is common"y imp"emented $y the Ker#e"ey Internet 2ame :omain (KI2:)) so tware de6e"oped at the ?ni6ersity o 9a"i ornia at Ker#e"ey% Sun uses aport o the KI2: so tware%

<ou can use :2S to reso"6e host name and IP address re)uests on the intranet% I you connect your networ# to the Internet! you must use :2S $ecause it is the name ser6ice used to reso"6e host name and IP address re)uests! and organi>e the mi""ions o hosts and domains! on the Internet% A domain is a co""ection o networ# hosts that share some common in ormation% :2S domain names are dot-notated! and the names o hosts within the domain inc"ude the host name p"us the domain name% -or e,amp"e! the host merton in the domain sun % com wou"d $e #nown to other systems! outside o the domain! as merton% sun% com% A"" hosts #nown to :2S are inc"uded within the :2S :2S namespace is di6ided into hierarchica" domains% $egins with the root (%) domain and inc"udes a"" -igure **-+ on page **-6 shows se6era" top-"e6e" namespace% &he &he namespace su$domains% domains%

Top3Level &omains The D1S nsswitch Template &he nsswitch temp"ate i"e or :2S %is in 'etc'nsswitch%dns! and the #eyword is dns% Top"(evel Domains &he top-"e6e" domains are administered $y 2etwor# So"utions! the 2S* registry% Administration o the "ower-"e6e" domains is de"egated to the 6arious organi>ations that are a part o the Internet% &he top-"e6e" domain you choose can depend on which one $est suits the needs o your organi>ation% Iarge organi>ations tend to use the organi>ationa" domains whi"e sma"" organi>ations or indi6idua"s o ten ! choose to use a country code% 2etwork Information Ser ice ) er iew 2IS ocuses on ma#ing networ# administration more managea$"e $y pro6iding centra"i>ed contro" o6er a 6ariety o networ# in ormation% 2IS stores in ormation a$out wor#station names and addresses! users! the networ# itse" ! and networ# ser6ices% &his co""ection o networ# in ormation is re erred to as the 2IS namespace4 NIS Domains 2IS uses domains to arrange the machines! users! and networ#s in its namespace% Howe6er! it does not use a domain hierarchy! there ore! an 2IS namespace is "at% 9ou cannot directly connect a &S domain to the &nternet using Lust &S. >owe4er, organiBations that want to use &S and also be connected to the &nternet can combine &S with D S. 9ou can use &S to manage all local information and use D S for &nternet host lookup. &S pro4ides a forwarding ser4ice that forwards host lookups to D S if the Jinformation cannot be found in a &S map. The Solaris 2perating 3n4ironment also allows you to set up the nsswitch, conf file so that lookup re<uests from hosts go only to D S, or to D S and then &S if the re<uests are not found by D S, or to &S and then D S if the re<uests are not found by &S.

Client"Server %rrangement Ky running the 2IS ser6ice! you can distri$ute administrati6e data$ase maps among a 6ariety o ser6ers (master and s"a6es) and update those data$ases rom a centra"i>ed "ocation in an automatic and re"ia$"e ashion to ensure that a"" c"ients share the same name ser6ice in ormation in a consistent manner throughout the networ#% NIS .aps 2IS namespace in ormation is stored in 2IS maps4 2IS maps were designed to rep"ace ?2IA 'etc i"es! as we"" as other con iguration i"es! so they store more than names and addresses% As a resu"t! the namespace has a "arge set o maps% 2IS maps are data$ase i"es created rom source i"es in the 'etc directory (or a specia" directory you speci y)% &he 2IS domain maps typica""y inc"ude the o""owing i"es: = autoEhome = autoEmaster = $ootparams = ethers = group = hosts = netgroup = netmas#s = networ#s = protoco"s = passwd = rpc = ser6ices = a"iases = time>one = IP nodes

2ote - 2IS administrators can a"so create custom maps or their Speci ic networ#! en6ironment needs% &he 2IS nsswitch &emp"ate &he nsswitch temp"ate or 2IS is 'etc'nsswitch%nis and the #eyword is nis% The 1ISK Environment: 2IST ena$"es you to store in ormation a$out wor#station addresses! security in ormation! mai" in ormation! (thernet inter aces! printers! and networ# ser6ices in "ocations where a"" wor#stations on a networ# can ha6e access to it% '!S)'amespace &he 2IST namespace is dynamic $ecause updates can occur and $e put into e ect at any time $y any authori>ed user% &he 2IST namespace is hierarchica"! and simi"ar in structure to the :2S name ser6ice% &he hierarchica" structure a""ows you to con igure a 2IST namespace to con orm to the "ogica" hierarchy o an organi>ation% &he namespace's "ayout o in ormation is unre"ated to its physica" arrangement% &hus! you can di6ide a 2IST namespace into mu"tip"e domains that can $e administered autonomous"y% 9"ients can ha6e access to in ormation in other domains! in addition to their own i they ha6e the appropriate permissions%

0n E-ample of the 1ISK Lierarchical 1amespace A so tware company named So"ar! Inc% (so"ar%com)! with three di6isions: (ngineering (eng)! Sa"es (sa"es) and -inance ( in)% Set up the 2IS- namespace hierarchy i""ustrated in -igure **-J% (ach $ranch represents a domain% &he (ngineering $ranch has su$domains or de6e"opment and so tware%
so"ar%com%

eng%so"ar%cam

sa"es%so"ar%com

in%so"ar%com

de6%eng%so"ar%com

so t%eng%so"ar%com

NISE #ables &he o$Wects contro""ed in 2*S are maps! and the o$Wects contro""ed in 2IST are ta$"es% (ach 2IST domain can contain the o""owing ta$"e o$Wects: = autoEhome = autoEmaster
= $ootpararas = c"ientEin o = cred = ethers

= netgroup = netmas#s
= networ#s = passwd = protoco"s = rpc

= group = hosts

= sendmai" = ser6ices

= mai" a"iases The 1ISK nsswitch Template

= time>one

&he nsswitch temp"ate or 2IST is 'etc'nsswitch%nispus and #eyword is nisp"us%

&ightweight Directory Access Protocol ,&DAP- ) er iew 4


&he imp"ementation o 2IS within the So"aris 8perating (n6ironment pro6ided a mechanism or ad6ertising (identi ying and "ocating) networ# o$Wects and resources% &wo maWor draw$ac#s are its "at structure (a sing"e domain) and the proprietary nature o the naming ser6ices% 2IST is an impro6ement to the 2IS structure% 2IST is $ui"t in a hierarchica" structure so that it more c"ose"y resem$"es the interna" structure o an organi>ation and! there ore! it can access mu"tip"e domains (pro6ided the authori>ation and authentication eatures are proper"y ena$"ed)% Howe6er! "i#e 2IS! 2IST is somewhat proprietary ((6ery organi>ation cannot access the in ormation)% &hese proprietary naming ser6ices are o ten deciphera$"e on"y rom within an organi>ation or group o organi>ations (and sometimes rom within a particu"ar app"ication)! and they create is"ands o in ormation that must trans"ate re)uests or in ormation rom the ;or"d ;ide ;e$% ;ith the imp"ementation o standardi>ed directory ser6ices! an organi>ation can con igure one or more ser6ers to direct re)uests or in ormation through the organi>ation to the appropriate ser6ers%A standardi>ed directory ser6ice imp"ies that a"" participating organi>ations adhere to a common ru"e set or hierarchica" naming structures! authori>ation and authentication practices! and con iguration o 6arious other attri$utes% &he A%/00 :irectory Access Protoco" (:AP) is one such standardM howe6er! when organi>ations attempt to imp"ement it! many ind it di icu"t! to administer! and this $ecomes a $arrier to the success o the directory ser6er concept as a who"e% Additiona""y! imp"ementation o the A%/00 structure o ten re)uires the power and resources o a ?2IA system! thus putting up a $arrier to the wor"d o persona" computer users% It is readi"y apparent that an easier: to administer! "ighter weight protoco" is needed! so more than 00 companies ha6e Woined with 2etscape and the ?ni6ersity o 5ichigan to support a Iightweight :irectory Access Protoco" (I:AP) as a proposed standard or Internet directories% Common !ses of &DAP I:AP is use u" when you need a resource "ocatorM howe6er! it is practica" on"y in read-intensi6e en6ironments where you do not need re)uent updates% <ou can use I:AP as a repository or the same in ormation stored in 2IS and 2IST% &he o""owing "ists some common uses:

A resource "ocator or an on"ine phone directory% Authori>ed users can update it as necessary to maintain its accuracy% &his e"iminates the need or a printed phone directory (which is outdated as soon as a change is made o""owing the printing)%

2ote - I:AP is use u" or phone directories that are updated re"ati6e"y in re)uent"y! $ut wou"d $e ine ecti6e or sa"es transaction data$ases that center around constant"y updating data% &he address $oo# in most e-mai" c"ients A repository o in ormation or ;e$-$ased app"ications that support sa"es and in6entory-contro" processes% Howe6er! you must #eep in mind that hea6y-transaction oriented sites are $etter suited to other re"ationa" data$ases'! which are suited to those app"ications% -or automatica""y "ocating networ# resources% It pro6ides a mechanism to "ocate printers! i"e ser6ers! and networ# ser6ices% &o centra"i>e networ# management% Instead o maintaining dup"icate in ormation across many ser6ers! the I:AP ser6er is con igured so that a sing"e director)' can $e accessed $y a"" app"ications% &o tighten security% Authori>ation and authentication attri$utes can $e con igured to contro" access to app"ications! resources! and modi ications% &hese are Wust a- ew o the possi$i"ities% &he "ist is "imited on"y $y the creati6ity o the administrators that imp"ement I:AP% I:AP app"ications are grouped three ways: I:AP used to "ocate networ# users and resourceP! those used to manage these resources! and those that pro6ide authentication and authori>ation security eatures% #he &DAP nsswitch #emplate &he nsswitch temp"ate or I:AP is 'etc'nsswitch% "dap and the #eyword is "dap% Conclusion Imp"ementing I:AP as a So"aris naming ser6ice is not an easy tas#% Since I:AP pro6ides a genera" purpose directory! it is 6ery "e,i$"e% Howe6er! with "e,i$i"ity comes comp"e,ity% ;hi"e it does not ma#e sense transitioning rom 2IS'2IST Wust or the sa#e o doing it! the uture $ene its o a conso"idated data store! ma#es it worth e,p"oring% #he 2ame Ser ice Switch A"" So"aris 8perating (n6ironment wor#stations use 'etc'nsswitch%con as the name ser6ice switch% &he 'etc'nsswitch%con i"e is used $y the operating system or any networ# in ormation "oo#ups% It is common"y re erred to as the name+ service switch file4 &he 'etc'nsswitch %con i"e determines which sources o in ormation your system uses and the order in which those sources are used%
The nsswitch.conf $onfiguration 3iles

&he So"aris%. 8perating (n6ironment inc"udes the o""owing i6e temp"ates or the name ser6ice switch con iguration i"e:

'etc'nsswitch% i"es - &he temp"ate name ser6ice switch i"e that! when copied to the 'etc'nsswitch%con i"e! permits on"y searches o the "oca" 'etc i"es% 'etc'nsswitch %dns -&he temp"ate name ser6ice switch i"e that! when copied to the 'etc'nsswitch%con i"e! searches on"y the "oca" 'etc i"es or a"" entries with the e,ception o the hosts entry% &he hosts entry can $e directed to use :2S or "oo#up%

'etc'nsswitch%nis -&he temp"ate i"e that uses the 2IS data$ase as the primary source o a"" in ormation e,cept the passwd! group! automount! and a"iases maps! which are directed to use the "oca" 'etc i"es irst and thenthe 2IS data$ases% ;ith the name ser6ice search order or the passwd and group i"es esta$"ished as the "oca" i"es irst o""owed $y the 2IS data$ase! there is no need or a p"us (T) in the passwd i"e% "etc"nsswitch .nisplus - &he temp"ate i"e that uses 2IST as the primary source or a"" in ormation e,cept the passwd! group! automount! and a"iases ta$"es! which use the "oca" 'etc i"es irst and! then the 2IST data$ases% "etc"nsswitch . l!ap - &he temp"ate i"e that uses I:AP as the primary source or a"" in ormation e,cept the passwd! group! automount! and a"iases ta$"es! which use the "oca" 'etc i"es irst and (hen the I:AP data$ases% A ter determining which naming -ser6ice to use! you se"ect the appropriate temp"ate i"eM 'etc'nsswitch% i"es! "etc"nsswitch.!ns: "etc"nsswitch.nis: "etc"nsswitch.nisplus: or "etc"nsswitch. l!ap an! copies it to "etc"nsswitch.con,. The 'etc'nsswitch%nis Template &he o""owing e,amp"e is the de au"t 'etc'nsswitch%nis i"e (which re erences name ser6ice reso"ution pro6ided $y 2IS) that is pro6ided with the insta""ation o the So"aris 8perating (n6ironment so tware: F F 'etc'nsswitch%nis: F F An e,amp"e i"e that cou"d $e copied o6er to 'etc'nsswitch%con M it F uses 2IS (<P) in conWunction with i"es% F F Rhosts:R and Rser6ices:R in this i"e are used on"y i the F 'etc'netcon ig i"e has a [-R or nametoaddrE"i$s o RinetR transports! Wade^1 F the o""owing two "ines o$6iate the [TR entry in 'etc'passwd and 'etc'group% passwd: group: i"es nis i"es nis

F consu"t 'etc R i"esR on"y i nis is down% hosts: ip nodes: nis B28&-8?2:NreturnD i"es i"es

F ?ncomment the o""owing "ine and conn6ent out the a$o6e to reso"6e F $oth IP60 end IP66 addresses rom the ipnodes data$ases% 2ote that

F IP60 addresses are searched in a"" o the ipnodes data$ases $e ore F searching the hosts data$ases% Ke ore turning this option on! consu"t Fthe 2etwor# Administration @uide or more detai"s on using IP66% networ#s: protoco"s: rpc: ethers: netmas#s: $ootparams: pu$"ic#ey: netgroup: automount: a"iases: nis B28&-8?2:NreturnD i"es nis B28&-8?2:NreturnD i"es nis (28&-8?2:NreturnD i"es nis B28&-8?2:NreturnD i"es nis B28&-8?2:NreturnD i"es nis (28&-8?2:Nreturn) i"es nis B28&-8?2:NreturnD i"es nis i"es nis i"es nis

F or e icient getser6$yname() a6oid nis ser6ices: sendmai"ars: printers: authEattr: pro Eattr: i"es nis i"es user i"es nis i"es nis i"es nis

&his e,amp"e 'etc'nsswitch%nis i"e identi ies 2IS as the only source o data or hosts! netgroup! and netmas#s entries% A"ternati6e"y! the "ines or passwd! group! and automount ha6e i"es o""owed $y nis% &his indicates that the system uses the "oca" i"es irst and the 2IS data$ase second or "oo#ups% I you are using-2IS as the naming ser6ice! copy the 'etc'nsswitch%nis i"e to the 'etc'nsswitch%con i"e% .odification of the "etc"nsswitch.con, $ile A ter copying the appropriate temp"ate i"e to 'etc'nsswitch%con ! you might ha6e to modi y the i"e to ena$"e the operating system to access networ# in ormation% -or e,amp"e! to ena$"e hosts to $e reso"6ed using "oca" i"es irst! :2S second! and 2IS third! the "ine or hosts wou"d appear as o""ows: hosts: i"es dns nis

9on6erse"y! to restrict "ogin access to on"y those users with "oca" accounts! you can remo6e nis rom the "ine or passed as in this e,amp"e: passwd: i"es

&he name ser6ice switch i"e contains a "ist o o6er *O data$ases! their name ser6ice sources or reso"ution! and the order in which these sources are searched% As shown in &a$"e **-*! one or more sources rom this "ist can $e speci ied or each data$ase% &a$"e **-* :ata$ase Sources

Source

:escription

i"es nisp"us nis user dns "dap compat

4e ers to the c"ient's "oca" 'etc i"es 4e ers to an 2ISTta$"e 4e ers to an 2IS map App"ies to the printers entry! App"ies only to the hosts entry 4e ers to a :irectory In ormation &ree (:*&)

Supports an o"d-sty"e RTR synta, or passwd and group in ormation

1ame Service Switch Status and 0ction 2alues Suppose the de au"t 'etc'nsswitch%nis i"e shown on page **-*6 was copied to the 'etc'nsswitch%con i"e% &he name ser6ice switch now presents some action 6a"ues or se6era" o the entries% &he naming ser6ice search or reso"ution rom the source speci ied returns a status code that presents an appropriate 6a"ue in response to the user re)uesting 2IS in ormation% &a$"e **-+ descri$es these status codes% &a$"e **-+ 2ame Ser6ice Search 4eturn Status 9odes

Status 9ode

:escription

S?99(SS ?2 A3AII 28&-8?2: &4<A@AI2

4e)uested entry was ound Source was una6ai"a$"e Source contains no such entry Source resumed RI am $usy! try "aterR message

%ctions -or each status code! two actions are possi$"e% &a$"e **-J descri$es these actions% &a$"e **-J Status 9ode Actions

Action

:escription

continue

&ry the ne,t source

return

S"op "oo#ing or the entry

&he de au"t actions are

S?99(SS N return ?2A3AII N continue 28&-8?2: N continue &4<A@AI2 N continue

&he o""owing entry assumes that the 2IS name ser6ice is running! the synta, or this entry means that on"y the 2IS hosts ta$"e is searched% I a 2IS ser6er has no map entry or a host "oo#up! the system wou"d not re erence the "oca" i"es% 4emo6e the B28&-8?2:NreturnD entry i you want to search the 2IS hosts ta$"e and the "oca" hosts i"e% hosts: nis B28&-8?2:NreturnD i"es

&a$"e **-0 shows the naming ser6ice eatures%


-i"es Intended Scope Sma"" "oca" (Kest it) networ# IA2 2IS IA2 2IST 5u"tip"e IA2s :2S IA2 ;A2 I:AP IA2 ;A2

2ame space

-"at

-"at

Hierarchica"

Hierarchica"

Hierarchica"

&emp"ate or nsswitch% con 8$Wect that stores in ormation

nsswitch % i"es

nsswitch %nis

nsswitch % nisp"us

nsswitch % dns

nsswitch % "dap

-i"e

5ap

&a$"e

Vone i"es

:irectory ' in ormation tree (:I&)

Introduction to 2IS Concepts


2IS ena$"es the creation o ser6er systems that act as centra" repositories or se6era" o the administrati6e i"es ound on ?2IA systems% &he $ene its o 2IS inc"ude: 9entra"i>ed administration o i"es Ketter sca"ing o i"e administration as networ#s grow As -igure *+-* i""ustrates! 2IS is organi>ed into named administrati6e domains% ;ithin each domain e,ists one 2IS master ser6er! >ero or more s"a6e ser6ers! and one or more c"ients%

NIS .aster Ser er ;ithin each domain! the 2IS master ser6er%


N S Sla e Ser ers

9ontains the origina" 'etc AS9II i"es used to $ui"d the 2IS maps 9ontains the 2IS maps generated rom the AS9II i"es Pro6ides a sing"e point o contro" "o: the entire 2IS domain Is easy to set up

;ithin each domain! the 2IS s"a6e ser6ers:

:o not contain the origina" 'etc AS9II i"es (which are used to $ui"d the 2IS maps) 9ontain copies o the 2IS maps copied rom the 2IS master ser6er Pro6ide a $ac#up repository or 2IS map in ormation Pro6ide redundancy in case o ser6er ai"ures Pro6ide "oad sharing on "arge networ#s

NIS Clients Within each !omain: = NIS clients'

:o not contain the origina" 'etc AS9II i"es (which are used to $ui"d the 2IS maps) :o not contain any 2IS maps

Kind to the master ser6er or a s"a6e ser6er to o$tain access to the administrati6e i"e in ormation contained in that ser6er's 2IS maps :ynamica""y re$ind to another ser6er in case o ser6er ai"ure 5a#e a"" appropriate system ca""s aware o 2IS 2ote - A"" hosts in the 2IS en6ironment are c"ients! inc"uding the 2IS master and s"a6es% 2IS Processes &he two main processes in6o"6ed in the running o an 2IS domain are: ypser6 - 4ims on master and s"a6e ser6ers yp$ind - 4uns on master and s"a6e ser6ers! as we"" as c"ient systems &here are three daemons that used in an 2IS domain on the master ser6er:

rpc%yppasswdd yp, rd rpc%ypupdated

Trou,leshooting 1"S Errors <ou can disco6er most 2-S pro$"ems through conso"e messages or symptoms on a c"ient! rpc$ind -ai"ure Error Error 'essage n s mount: ser6er:: 4P9: 4pc$ind ai"ure 4-9: &imed 8ut n s mount: retrying: Hmntpoint

&his message is disp"ayed on the c"ient during the $oot process or in response to an e,p"icit mount re)uest% It indicates a pro$"em accessing the ser6er% &his error can occur due to the com$ination o an incorrect Internet address and a correct host or node name in the hosts data$ase i"e supporting the c"ient node% &his error can a"so occur whene6er the hosts data$ase i"e supporting the c"ient is correct"y speci ying the ser6er node! $ut the ser6er node is e,treme"y o6er"oaded! temporari"y stopped! or crashed% Solution

9omp"ete the o""owing step: *% I the ser6er node is operationa"! determine i the ser6er is out o critica" resources ( or e,amp"e! memory! swap! or dis# space)% 2ote - &his e,amp"e was caused $y temporari"y shutting down the ser6er node and then attempting (through the command "ine) to ha6e it ser6ice an 2-S mount re)uest rom a c"ient node% Server 1ot &esponding Error &rror #essage 2-S ser6er ser6er+ not responding! sti"" trying &his message is disp"ayed during the $oot process or in response to an e,p"icit mount re)uest and indicates a #nown ser6er that is unreacha$"e% Solution 9omp"ete die o""owing steps: *% 9hec# to see i the networ# $etween the "oca" system and the ser6er is down $y using the ping command (ping ser6er+)% 9hec# to see i the ser6er (ser6er+) is down%

+%

'FS Client Fails a Re&oot Error &rror $ondition An 2-S c"ient ai"s a re$oot without producing an error message% &his error condition is encountered whene6er an administrator attempts to restart an 2-S c"ient node using an init 6 or re$oot command% The c"ient node correct"y re$oots up to the point where the system echoes: Setting de au"t inter ace clientJnodeJname4 &he c"ient node does not inish the proper $oot se)uence and does not generate any error messages% or mu"ticast: add net ++0%0%0%0: gateway:

&hese symptoms arc consistent with a c"ient re)uesting an 2-S mount using an entry in the 'etc'6 sta$ i"e! which speci ies a hard mount in the oreground (the de au"t option)! to an 2-S ser6er that is not operationa"% Solution 9omp"ete the o""owing step: *% a% $% c% I the 2-S is a6ai"a$"e and ai"ing: 4eset the ai"ed c"ient node and $oot it in sing"e-user mode% 8nce in sing"e-user mode! edit the 'etc'6 sta$ i"e so that you comment out the 2-S mounts% 9ontinue with the $oot cyc"e up to the de au"t run "e6e" (norma""y J) $y pressing 9ontro"-d

d% ?sing the in ormation in the 'etc'6 sta$ i"e! determine i a"" the 2-S ser6ers are operationa" and unctioning proper"y% e% A ter you ha6e determined which 2-S ser6er(s) ha6e ai"ed! and you ha6e reso"6ed any outstanding pro$"ems with them! remo6e the comments p"aced in the 'etc'6 sta$ i"e% 2ote - An a"ternati6e to adding the comments to the 'etc'6 sta$ i"e entries can $e a"tering those entries to use the so t mount and $ac#ground acti6ation options% Stopped Server Error &rror #essage n s mount: d$ser6er: 2-S: Ser6ice not responding n s mount: retrying: 'mntpoint &his message is disp"ayed during the $oot process or in response to an e,p"icit mount re)uest and indicates a ser6er that is reacha$"e is not running the n sd ser6er daemons% Solution 9omp"ete the o""owing steps: *% ?se the who -r command on the ser6er to see i it is at run "e6e" J% I it is not! change to run "e6e" J using the init J command% +% ?se the ps -e command on ("ie ser6er to chec# whether the n sd daemon and 2-S ser6er daemons are running% I they are not! start them with the 'etc'init%d'n s%ser6er script and the start #eyword% Program 'ot Registered Error 3rror ?essage n s mount: d$ser6er: 4P9: Program not registered n s mount: retrying: Hmntpoint

&his message is disp"ayed during the $oot process or in response to an e,p"icit mount re)uest and indicates a ser6er that is reacha$"e is not running the 'usr'"i$'n s'mountd ser6er daemon% Solution 9omp"ete the o""owing steps: *% ?se the who -r command on the ser6er to see i it is at run "e6e" J% I it is not! change to run "e6e" J using the init J command%

2ote - I you used the shutdown command to $ring the system down to the sing"e-user mode rom run "e6e" J! the who -r command might $e disa$"ed% 4e$ooting the system re-ena$"es the command% +% ?se the ps -e command on the ser6er to see i the mount daemon is running% I it is not! start it $y in6o#ing the 'etc'init %d'n s ser6er script irst with a stop "ag and then with a start "ag% J% 9hoc# or 6eri y your 'etc'd sta$ entries%

Stale "ile Landle Error Error 'essage sta"e 2-S i"e hand"e &his message is disp"ayed when a process attempts to access a remote i"e resource and the i"e hand"e is out o date% Solution &he i"e resource might ha6e $een mo6ed on the ser6er 9omp"ete the o""owing step: *% ?nmount and mount the resource again on the c"ient%

;nknown Host &rror Error 'essage n s mount: ser6er:: 4P9: ?n#nown host &his message indicates that the host name o the ser6er on the c"ient is missing! or not in the hosts ta$"e! Solution 9omp"ete the o""owing step: *% :etermine i the host name in the hosts data$ase supporting the c"ient node is correct"y speci ied%

2ote - &his e,amp"e has the node name ser6er * misspe""ed% 'ount Point Error Error Message

mount: mount-point ':SO does not e,ist%

&his message is disp"ayed during the $oot process or in response to an e,p"icit mount re)uest and indicates a none,istent mount point% Solution 9omp"ete the o""owing step: *% 9hec# that the mount point e,ists on the c"ient and is spe""ed correct"y on the command "ine or in the 'etc'6 sta$ i"eM or comment out the entry and re$oot%

2o Such "ile Error Error Message 2o such! i"e or directory &his message is disp"ayed during the $oot process or in response to an e,p"icit mount re)uest and indicates an un#nown i"e resource name on the ser6er% Solution 9omp"ete the o""owing step: *% 9hec# that the directory e,ists on the ser6er and is spe""ed correct"y on the command "ine or in the 'etc'6 sta$ i"e%

The ypser6 :aemon &he ypser6 daemon is a uti"ity that

4uns on master and s"a6e ser6ers Answers yp$ind re)uests rom c"ients 4esponds to c"ient in ormation re)uests

The yp$ind Daemon &he yp$inc" daemon is a process that:

4uns on a"" 2IS systems! ser6ers as we"" as c"ients 5a#es initia" c"ient-to-ser6er $inding re)uests Stores $inding in ormation in the '6aWr'yr37Jind%ing'domainriarne directory 4e$inds to another ser6er i the connection is "ost with the initia" ser6er 4e)uests 2IS map in ormation at the "i$rary-ca"" "e6e"

The rpc %yppasswd Daemon &he rpc%yppasswdMdaemon is a process that:

A""ows users to change their passwords ?pdates the 'etc'passwd and 'etc'shadow i"es on the master ser6er


&he yp, rd :aemon

?pdates the 2IS password map Pro6ides or RpushesR the 2IS password map to a"" s"a6e ser6ers

The yp, rd daemon is a process that:

4uns on the 2IS master ser6er on"y 4esponds to s"a6e re)uests (using yp, r) to pu"" the maps rom the master &rans ers 2IS maps at high speed

The rpc *ypupdated Daemon &he rpc%ypupdated daemon is a process that: 4uns on the 2IS master ser6er on"y ?pdates the pu$"ic#ey map i secure 4P9 is ena$"ed The Structure of 1IS 'aps 2IS maps are "ocated in the 6ar'yp'domainname directory (where domainname is the name of the 2&S domain)% &here are two i"es (%pag and % dir i"e) or each map in this directory% '!S Maps Filenames &he synta, or the 2IS maps is: map% 'cey%pag or map4 ey4 dir where:

map / &he $ase name o the map (hosts! passwd! and so on) ey M &he map's sort #ey ($yname! $yaddr! and so on) pag - &he map's data dir - An inde, to the %pag i"e i the % pag i"e is "arge &he %dir i"e can $e empty i the %pag i"e is sma""% 'ap Contents and Sort Neys The contents o each map is a #ey and 6a"ue pair% &he ey represents the data used to per orm the "oo#up in the map whi"e the 6a"ue represents the data returned upon a success u" "oo#up% 5aps can $e dup"icated in the '6ar'yp'domainname directoryM they represent the resu"ts o the sorting o the map's data $ased on di erent #eys% -or e,amp"e! the map '6ar'yp'domainname 'hosts% Kyaddr% Pag contains the data or the hosts map inde,ed $y host IP address% Simi"ar"y! the '6ar'yp'domainname'hosts %$yname pag map contains the same host data using the host name as the "oo#up #ey% -or the domain name training! the o""owing wou"d $e a "ist o the 2IS map i"es or the hosts map:

'6ar'yp'training'hosts% $yname%pag '6eor'yp'training'hosts%$yname%dir '6ar'yp'training'hosts %$yaddr %peg '6ar'yp'training'hosts! $yaddr%dir

Commands to Read Maps <ou can use two commands to read maps: ypcat B -# b map / &his command is simi"ar to the cat i"e command ypmatch B -# D 6a"ue map- &his command is simi"ar to the grep 6a"ue command 7enerating 1IS 'aps

i"e

&o generate 2IS maps! you need the source i"es! which are "ocated in either the 'etc directory on the master ser6er or copied to an a"ternati6e directory% <ou shou"d not #eep the source i"es in 'etc $ecause the contents o the maps are then the same as the contents o the "oca" i"es on the master ser6er% &his is a specia" pro$"em or passwd and shadow i"es! $ecause ai" users wou"d ha6e access to the master ser6er maps and the root password wou"d $e passed to a"" <P c"ients through the passwd map% I you choose to "ocate the source i"es in another directory! you must modi y the '6ar'yp'5a#e i"e $y changing the :I4N'etc "ine and the P;:I4N'etc "ine to :I4N'your-choice and P;:I4N'your-choice! where your/choice is the name o the directory you are using to store the source i"es% &his ena$"es you to treat the "oca" i"es on the ser6er as i they were those o a c"ient% (<ou shou"d irst sa6e a copy o the origina" 5a#e i"e%) &he o""owing is an e,cerpt rom the de au"t 5a#e i"e showing the 6aria$"e :I4 and P;:I4 sot' "o their de au"t 6a"ues: F 9opyright (c) *OO.! $y Sun 5icrosystems% Inc% F A"" rights reser6ed% F F ident F F ----F It is somewhat con using to note that So"aris +%, uses 'etc'autoEmaster F instead o the 0%, 'etc'auto% master i"e name $ecause o 2IST treating a F [%c in a specia" way% F F Set the o""owing %6aria$"e to -R-$R to ha6e 2IS ser6ers use the domain name F reso"6er or hosts not in theM current domain% F KN-$ KN RZ(F)5a#e i"e *-+J O.'0/'0* S5IR

DI4 c=*etc F F I the passwd! shadow and'or adWunct i"es used $y rpc%yppasswad F "i6e in 'directory other than 'etc then you'"" need to change the F o""owing "ine%

F :8 28& indent the "ine! howe6er! since 'etc'init%d'yp attempts F to ind' it with grep RRP;:I4R %%% F P;:I4 N'etc :85 N ddomainnameQ 28P?SH N RR AIIAS(S N 'etc'mai" 'a"iases <P:I4N'usr'"i$'nets6c'yp The ypinit Command and the 1IS 5a#e i"e &he 2IS maps are generated $y the 2IS con iguration $inary! 'usr's$in'ypinit! and the ma#e command% &he ypinit command reads the '6ar'yp'5a#e i"e or source i"e "ocations and con6erts AS9II source i"es into 2IS maps%

Pass+ord Pile -or security reasons! and to pre6ent unauthori>ed root access! the i"es used to $ui"d the 2IS password maps shou"d not contain an entry or root% &o do this! copy the i"es to an a"ternati6e directory and modi ying the P;:I4 entry in the 5a#e i"e% Configuring the N S .aster Ser er To set up the 2IS name ser6ice master ser6er! per orm the o""owing steps:

*% :etermine which machines within your networ# domain wi"" $e 2IS ser6ersM there wi"" $e one 2IS master and as many 2IS s"a6e as needed% &ypica""y! all systems within (he domain wi"" $e 2IS c"ients% 2ote - &he 2IS #it that was supp"ied with re"eases $e ore the So"aris +%6 8perating (n6ironment is no "onger pro6ided% 2IS is now part o the re"ease rather than a separate i"e% +% 9opy the 'etc'nsswitch%nis i"e to 'euc'nsswitch%con and modi y it! i necessary%

J% 9hoose an 2IS domain name% &his is usua""y "ess than J+ characters in "ength% (&he ma,imum "ength is +/6 characters%) 0% /% (,ecute the domainname command to set the "oca" 2IS domain% 9reate an 'etc'de au"tdomain i"e with the domain name%

6% 5a#e sure to maintain the ormat esta$"ished $y the origina" i"es! and update the te,t i"es in the 'etc directory (a"" o the i"es that are used or 2IS maps) on the master ser6er with in ormation a$out the domain% 2ote - <ou can a"so copy the networ# in ormation i"es to some other "ocation on the system and modi y them there rather than modi ying them in the 'etc directory% 1% ?se the touch command to create >ero-"ength i"es with the o""owing names: 'etc'ethers! 'etc'$ootparams! 'etc'"oca"e! 'etc'time>one!'etc'netgroup and 'etc'netmas#s% &hese i"es are necessary or the creation o the comp"ete "ist o 2IS maps as directed in the 5a#e i"e% ;hen you initia"i>e 2IS! you wi"" recei6e error messages or each o these i"es i they do not e,ist% .% Insta"" an updated 5a#e i"e in '6ar'yp i you intend to use L5S on the system that unctions as your 7umpStart&5 ser6er% &his pro6ides entries that create a map or the 'etc'"oca"e i"e% &o create a 5a#e i"e that supports unassisted WumpStart insta""ation capa$i"ity! ma#e the o""owing changes: a% Add the o""owing te,t a ter the e,isting time entriesM a"" $eginning white space must $e ta$s: \(:I4)'"oca"e B - \(:I4)'"oca"e DM then f sed -e ['`F'dR -e s' t%S\\'' \(:I4)'"oca"e f C aw# 'e or (*N+M iGN2-M iKK) print \\i! \\0)' f I \(LAL(:K5) - \(<P:K:I4)'\ (:85)'"oca"e%$ynameM f touch "oca"e%timeM f echo Rupdated "oca"eRM f i B ^ \(28P?SH) DM then f \%(<PP?SH) "oca"e%$ynameM f echo [pushed "oca"eRM f

"oca"e%time: -Zi

e"se f :Mf if e"se f echo Rcou"dn't ind \(:I4)'"oca"eRM f i $% c% Append the word "oca"e to the "ine $eginning with the word a""% Add the o""owing "ine a ter the auto%home! time entry:

auto%home: "oca"e:

"oca"e%time

O% 9reate or popu"ate the i"e'etc'"oca"e and ma#e an entry or each domain on your networ# using the o""owing ormat domainname -or e,amp"e: c"assroom%9entra" %Sun%985 enE?S "oca"e

*0%(dit the 5a#e i"e! and change e6ery re erence to the S %attr to add the security su$directory to the pathname! as o""ows: \(:I4)'authEattr \(:I4)'e,ecEattr \(:I4)'pro Eattr \(:I4)'auditEuser $ecomes: \ (:I4)'security'authEattr \ (:I4)'security'e,ecEattr \ (:I4)'security'pro Eattr \ (:I4)'security'auditEuser 2ote - Step *0 is necessary% **% Initia"i>e the master ser6er using the "oca" 'etc i"es $y e,ecuting the ypinit-m command%

F ypinit -m

a%

&he program prompts you or a "ist o s"a6e ser6ers% ;hen you comp"ete your "ist! press 9ontro"-:% <ou can ma#e entries or a"" s"a6es now or rerun the command a ter you determine that you need more or ewer s"a6e ser6ers% &he program as#s i you want to terminate on the irst ata" error% I you answer n! the procedure comp"etes the creation o the 2IS data$ase i"es% I you answer y! the process a$orts with the irst error% <ou can i, it and restart the ypinit program%

$%

&he o""owing dia"og pro6ides the te,t eed$ac# disp"ayed as the program $egins: F ypinit -m In order or 2IS to operate success u""y! we ha6e to construct a "ist o the 2IS ser6ers% P"ease continue to add the names or <P ser6ers in order o pre erence! one per "ine% ;hen you are done with the "ist! type a Gcontro" :H or a return on a "ine $y itse" % ne,t host to add: ser6er* ne,t host to add: `: &he current "ist o yp ser6ers "oo#s "i#e this: ser6er" Is this correctP By'n: yD y ew )uestions%

Insta""ing the <P data$ase wi"" re)uire that you answer a

auestions wi"" a"" $e as#ed at the $eginning o the procedure% :o you want this procedure to )uit on non- ata" errorsP By'n: nD n 8L! p"ease remem$er to go $ac# and redo manua""y whate6er 9ei"s% system (perhaps the yp itse" ) won't wor#% It you don't! some part o the

2ote - I you ha6e to restart the ypinit program! you are prompted to destroy-the '6ar'yp'domainname directory% Answer y% *+% Start the 2IS daemons on the master ser6er with the o""owing command:

"usr"lib"netsv*'"&p"&pstart *J% 8nce yp$ind is running you need to comp"ete the o""owing steps to $ui"d the mai"% a"iases map%

# c! "var"&p + "usr"ccs"bin"make I you want to s"op the 2IS ser6ice running on the 2IS master! issue the o""owing command:

+ "usr"lib"netsvc"&p"&pstop 9aution - Insta""ations that se"ect 9ore! (nd ?ser! or :e6e"oper so tware con iguration c"usters do not ha6e a"" o the necessary i"es in the 'usr'"i$'nets6c'yp to a""ow a host to unction as an 2IS ser6er% Accessing and #esting the 2IS Ser ice &he initia" way that users access 2IS in ormation is during "ogin% ;hen the user types in a user name and password! the 2IS data$ase 6eri ies this in ormation $e ore it ena$"es a "ogin she""% I the user's home directory is on a remote system in the 2IS domain! the 2IS autoEhome map wi"" re erence the ser6er in ormation and automatica""y mount the appropriate directory% &here are some in ormati6e commands that disp"ay in ormation in the 2IS data$ase% <ou can use these commands to test 2IS ser6ice% &he most common"y used 2IS commands are: 2ote - <ou do not ha6e to $e the superuser to use these commands% ypcat - Prints 6a"ues rom the 2IS data$ase% (,amp"e: Print the in ormation rom the hosts data$ase
; &pcat hosts *+O%0%0%* *O+%O%+00%* *O+%O%+00%+ *O+%O%+00%6 *O+%O%+00%. *O+%O%+00%*0* *O+%O%+00%*0+ ser6er" ser6er+ "oca"host host" "oghost host+ host6 hosts

ypmatch - Prints the 6a"ue o one or more #eys rom the 2IS data$ase% (,amp"e: 5atch indi6idua" host entries

; ]pmatch hostl se*(verl hosts *O+%O%+00%* host"

*O+%O%+00%*0* ser6er (,amp"e: 5atch a speci ic user in the password data$ase ; &pmatch userl passe! user": a1ic"624P(ma#: **00*: *0 : ?ser": e,port'home'user* : '$in'#sh

ypwhich - 4eturns the name o the 2-S ser6er that superuser the 2IS map ser6ices to an 2-S

c"ient% (,amp"e: 4eturn the name o the 2IS master ser6er ; &pwhich. ser6er" ;hen used with the -n6 option! the ypwhich command pro6ides a "ist o a"" data$ases and the name o the master ser6er% (,amp"e: Iist a"" data$ases on masterser6er ; &pwhich auto%home auto%master time >one%$yname (m ser6er" ser6er" ser6er"

netmas#s%$yaddr pu$"ic#ey%$yname

ser6er" ser6er"

G4emaining output omitted@ Configuring the 1IS Client &ypica""y! you con igure a"" systems within a 2IS domain as c"ients: *% 9opy the 'etc'nsswitch%nis i"e to 'etc%nsswitch%con and modi y it i necessary%

+% (dit the 'etc'hosts i"e to ensure that the 2IS master ser6er and a"" s"a6e ser6ers ha6e $een de ined% G. 3xecute the domainname command to set the local &S domain. ,or example,

F domainname c"assroom%9entra"%Sun%985 2ote <ou can use this command to set the name o a domain within a c"assroom in the centra" region training center% % 9reate or popu"ate the 'etc'de au"tdomain i"e with the domain name% Initia"i>e the system as an 2IS c"ient with the o""owing command: ;hen prompted or a "ist o 2IS ser6ers! enter the names o the 2IS master and a"" s"a6e ser6ers% Start the 2IS so tware with the o""owing command:

/%
+ &pinit (c 6%

1%

+ "usr"lib"netsvc"&p"&pstart

.%

8n the new"y con igured 2IS c"ient! test the 2IS unctiona"ity $y entering the o""owing command:

+ &pwhich (m &he output shou"d inc"ude the name o the 2IS master ser6er a"ong with the data$ase maps it is ser6ing% Configuring the 2IS Sla e Ser er <ou must ha6e at "east one 2IS s"a6e ser6er pro6ide $ac#up shou"d the 2IS master ser6er $ecome una6ai"a$"e% <ou can do this $y using the o""owing steps on the system that is designated to $ecome the s"a6e ser6er: *% +% J% 9opy the 'etc'nsswitch%nis i"e to 'etc'nsswitch%con and modi y it i necessary% (dit the 'etc'hosts i"e to ensure that the 2IS master and a"" 2IS s"a6e ser6ers ha6e $een de ined% (,ecute the domainname command to set the "oca" 2IS domain%

F domainname domainname -or e,amp"e! F domainname c"assroom%9entra"!Sun%985 0% 9reate or popu"ate the 'etc'de au"tdomain i"e with the domain name% Add a one-"ine entry to represent the se"ected domain name ( or e,amp"e! domainname in step J)% /% Initia"i>e the system as an 2IS c"ient with the o""owing command:

+ &pinit (c 6% ;hen prompted or a "ist o 2IS ser6ers! enter the 2IS master host! o""owed $y the name o the "oca" host and a"" other 2IS s"a6e ser6ers on the "oca" networ#% 1% 8n the 2IS master! ensure that the ypser6 process is running $y running this command:

+ ps (e, R grep &pserv I it is not running! re er to the pre6ious section on how to start 2IS daemons on the master% .% 4eturn to the proposed 2IS s"a6e system and run ypstart%

+ "usr"lib"netsvc"&p"&pstart O% Initia"i>e the system as an 2IS s"a6e with the o""owing command:

+ &pinit -s master where master is the name o the 2IS master% 2ote - I you did not add the name o the 2IS s"a6e ser6er when you initia""y con igured the 2IS master ser6er using the ypinit command! run the ypinit -m command once more on the 2IS master ser6er% In the

process o updating the 2IS master! the script prompts you or con irmation when it is a$out to destroy the e,isting domain data$ase 9on irm $y entering y% *0% Stop the 2IS daemons on the s"a6e ser6er with the o""owing command:

# "usr"lib"netsvc"&p"&pstop **% 4estart the 2IS daemons on the s"a6e ser6er with the o""owing command:

+ "usr"lib"netsvc"&p"&pstart *+% 8n the new"y con igured 2IS s"a6e ser6er! test the 2IS unctiona"ity with the o""owing command:

+ &pwhich (m &he output shou"d inc"ude the name o the 2IS master ser6er a"ong with a "ist o data$ase maps it is ser6ing to the 2IS domain% .pdating the 2&S 5ap

:ata$ase i"es change as time goes on and your 2&S maps must $e updated% &o update the 2IS maps (on the master ser6er)! per orm the o""owing steps: *% ?pdate the te,t i"es in your source directory (typica""y 'etc un"ess it was changed in the 5a#e i"e) with the new or modi ied in ormation!

+%
F cd '6ar'yp J% F 'usr'ccs'$in'ma#e

9hange to the '6ar'yp directory% 4e resh the 2IS data$ase maps $y e,ecuting the ma#e command!

;pdating the Hosts #ap and Propagating to (la%e (er%ers &he o""owing steps manua""y update the 2IS hosts map on the master ser6er and propagate a"" maps to the s"a6e ser6ers: *% (dit a map source i"e on the 2IS master%

+ vi "etc"hosts +% 4ema#e and push the 2IS maps to the s"a6e %ser6ers%

+ c! "var"&pX make &he o""owing commands manua""y Rpu""R on"y the host maps horn the master ser6er% + "usr"lib"netsvc"&p"&p*,r hosts.b&a!!r + "usr"lib"netsvc"&p"&p*,r host.b&name <ou can a"so pu"" a"" o the maps rom the master ser6er at once using the o""owing command: + &pinit (s nis#master

.pdating the 1IS Password 'ap I the 2IS master is running the rpc%yppasswd daemon! you can update any c"ient system to the 2IS password map $y using the

-igure *+-0

?pdating the 2IS Password 5ap

&he o""owing descri$es what you need to do to $e success u" at updating o the password map:

4unning the rpc%yppasswd daemon on the 2IS master ser6er F 'usr'"i$'nets6c'yp'rpc%yppasswd% 'etc'passwd -m passwd
&he rpc %yppasswd daemon updates the 2IS master's 'etc'passwd i"e and passwd map whene6er users

change their 2IS password (with the passwd or yppasswd commands)% &he passwd map is then pushed to a"" s"a6e ser6ers%

F passwd

4un the passwd command on any 2IS c"ient%

9hanging 2IS password or user* on ser6er*% 8"d password: 2ew password: 4etype new password: 2IS entry changed on ser6er* !pdating the 2IS Sla e Ser er .ap Sometimes maps ai" to propagate and you must use yp, r manua""y "o retrie6e new map in ormation% &o automate the updating and propagating o 2IS maps on s"a6e ser6ers! you can insta"" she"" scripts to run as cron Wo$s% Kecause maps ha6e di erent rates o change! schedu"ing a map trans er using the cronta$ command ena$"es you to set speci ic propagation times or indi6idua" maps% Sun pro6ides se6era" temp"ate scripts in the 'usr'"i$'nets6c'yp directory that you can use and modi y to meet "oca" site re)uirements% &hese scripts are use u" when s"a6e ser6ers are down during 2IS map

propagations% In such cases! the s"a6e ser6er might not recei6e the update un"ess you run a Rsa ety 6a"6eR script (-igure *+-/)%

-igure *+-/

?pdating passwd 5aps on S"a6e Ser6ers with Scripts

&he o""owing te,t is the contents o the yp, rE"perhour script that! i run hour"y using cron! ensures that the 2IS s"a6e ser6erQs passwd map is ne6er more than one hour out o date% F ^ '$in'sh 5 5 Z(F)yp, rE"perhour%sh *%O O+'*+'*. 9opyright *OOO Sun 5icrosystems! F inc% F F yp, rE"perhour%sh - :o hour"y 2IS map chec#'updates F PA&HN'$in: 'usr'$in: 'usr'"i$'nets6c'yp: \PA&H Fe,port PA&H + set (*v yp, r passwd% $yname yp, r passwd%$yuid !pdating )ther Scripts &here are %scripts ca""ed yp, rEE"perday and yp, rE+perday% &he yp, rEE"perday script chec#s or updates the o""owing maps dai"y:

group%$yname group%$ygid protoco"s%$yname protoco"s%$ynum$er networ#s%$yname net6Wor#s%$yaddr ser6ices%$yname % :

ypser6ers

&he yp, rE+perday script chec#s and updates the o""owing 2IS maps twice per day:

hosts%$yname hosts%$yaddr ethers%$yaddr ethers%$yname netgroup netgroup%$yuser netgroup%$yhost mai"!a"iases

5a#e i"e Synta- and 1ew 'aps <ou can $ui"d custom 2IS maps or use with "oca" uti"ities or with Sun uti"ities! such as the automounter% Ky generating an 2IS automounter map and setting up% a"" 2-S c"ients appropriate"y! 2-S-mounta$"e resources $ecome a6ai"a$"e o6er the networ# with minimum administration% 9hanges need to $e made on"y to the 2IS master ser6er! and the 2-S ser6er grants 2-S access to c"ients within the entire 2IS domain% #he make !tility Kui"ding customi>ed 2IS maps is essentia""y a "esson in the ma#e uti"ity% &he ma#e uti"ity:

Is used $y programmers to $ui"d programs Is used $y administrators to $ui"d 2IS maps 9an $e genera"i>ed to $ui"d customi>ed 2IS maps &he ma#e uti"ity recei6es its instructions rom the 5a#e i"e i"e% &he 5a#e i"e uses%6aria$"e de initions (ca""ed macros)+ targets! and dependencies% <ou can use macros as 6aria$"es! simi"ar to those that are used in a she"" script% A macro is de ined at the $eginning o the 5a#e i "e and is used throughout the 5a#e i"e $y pre i,ing the macro name with a do""ar sign (\)%&he ma#e uti"ity $ui"ds targets4 &argets need dependencies% Dependencies can represent other targets that must $e $ui"t $e ore the origina" target is considered Rmade%R &his structure ena$"es you to nest the target and dependency pairs to an ar$itrary depth! a""owing or hierarchica" $ui"ding o comp"e, code structures% ;hen ma#ing 2IS maps! you shou"d #eep the target and dependency re"ationship is air"y simp"e%% "irst Section of 5a#e i"e

&he 2IS 5a#e i"e is "ocated in the '6ar'yp directory and is composed o section contains the o""owing macro de initions: FKN-$ KN :I4 N'etc P;:I4 N'etc :85 N ddomainnameQ 28P?SH N RR AIIAS(S N 'etc'mai"'a"iases <P:i4N'usr'"i$'nets6c'yp SKI2:I4N'usr ' s$in <P:K:I4N'6ar'3p <PP?SHN\ (<P:I4) 'yppush 5AL(:K5N\ (<P:I4) 'ne#edtcn 5?I&IN\ (<P:I4) 'mu"ti 4(32(&@48?PN\ (SKI2:I4) 're6netgroup S&:(&H(4SN\ (<P:I4) 'stdethers S&:H8S&SN\ (<P:I4) 'stdhosts 5L2(&I:N\'(SKI2:I4) 'm#netid 5LAIIASN\ (<P:I4) 'm#a"ias Second Section of Aake,ile &he second section contains the irst target! a""% a"": passwd group hosts ethers networ#s rpc ser6ices protoco"s netgroup $ootparams a"iases pu$"ic#ey netid netmas#s to secure f time>one auto%master auto%home auth%attr e,ec%ettr pro %attr f user%attr audit%user

our main sections% &he irst

&he a"" target has se6era" dependencies! each o which represents one o the 2IS maps to $e $ui"t% &his ena$"es the entire set o 2IS maps to $e $ui"t $y typing:

F cd '6ar'ypM ma#e &he a"" target is not considered to $e $ui"t unti" each o its targets is irst $ui"t in turn% (ach o the targets or a"" depends on another target% ;hen adding custom maps to 2IS! the name o the new map to $e $ui"t shou"d $e added to the end o the e"" target "ist (auto %direct in the o""owing e,amp"e)% a"": passwd group hosts ethers networ#s rpc ser6ices protoco"s f netgroup $ootparams a"iases pu$"ic#ey netid netmas#s c+secure f time>one auto%master auto%home auth%attr e,ec%attr pro %attr f user%attr audit%user auto%direct "ourth Section of 5a#e i"e &he entry in the ourth section o the 5a#e i"e or each o the dependencies speci ied in the a"" target is: passwd: passwd%time group: group%time hosts: hosts% time ethers: ethers%time networ#s: networ#s%time rpc: rpc%time ser6ices: ser6ices%time protoco"s: protoco"s%time netgroup: netgroup%time $ootparams% $ootparams% time a"iases: a"iases%time pu$"ic#ey: pu$"ic#ey% time netid: netid%time passwd%adWunct: passwd%adWunct%time group%adWunct: group%adWunct%time netmas#s: netmas#s% time time>one: time>one%time

auto%master: auto%master!time auto%home: auto%home%time \(:I4)'netid: \(:I4)'time>one: \(:I4)'autoEmaster: \(:I4)'autoEhome: \(P;:I4)'shadow: ?sing the pre6ious e,amp"e o an auto %direct map! add a new map to the 2IS domain $y appending the appropriate entries to the end o thus second "e6e"R target'dependency pair% U% auto%direct: auto %direct% tune U% \ (:I4) 'autoEdirect: &here ore! the ina" "ines rom the ourth section wou"d "oo# "i#e this a ter the auto%direct map was modi ied% auto%master: auto%master%time auto%home: auto%home%time auto! direct: auto %direct% tin \(:I4)'netid: \(:I4)'time>one: \ (:I4) 'autoEmaster: \(:I4)'autoEhome: \ (:I4) 'autoEdirect: \(P;:I4)'shadow: &he target in this %case! auto%direct! depends on another target auto! direct! time% Third Section of 5a#e i"e In the third section o the 5a#e i"e! the ina" target and dependencies are de ined! a"ong with instructions on how to $ui"d each map in the domain% <ou must add the o""owing "ines to the 5a#e i"e to $ui"d a new autoEdirect map:

auto%direct%time:

\(:I4)'autoEdirect

-Zi %B - \(:I4)'autoEdirect DM then f sed -e R'R- "'dR -e s'F%S\\'' \ (:I4)'autoEdirect f C \(5AL(:K5) - \ (<P:K:I4)'\ (:85)'auto%directM f touch auto%direct%timeM f echo Rupdated auto%directR!- f i B ^ \(28P?SH) !DM then f \(<PP?SH) auto%directM f echo Rpushed auto%directRM f e"se f :Mf if e"se f echo Rcou"dn't ind \ (:I4)'autoEdirectRM f ! i <ou shou"d $e aware o the o""owing:

auto %home% time depends on \ (:I4) 'autoEhome% In this case! the dependency is a i"e% &he ma#e uti"ity chec#s the timestamp o the target (assumed to $e a i"e! and in the current directory) against the timestamp o the dependency (usua""y in the 'etc directory)% I the target has a newer modi ication time than the dependency! the target is not $ui"t! and this section is s#ipped% I ! on the other hand! the dependency has a more recent modi ication timestamp! the target is $ui"t according to the instructions in (the section that immediate"y o""ows%
%uilding 5S 'aps 5ost map $ui"ds consist o the o""owing se)uence o actions! which are speci ied in the third section o the 5a#e i"e: *% (,tract the source i"e #ey and 6a"ue pairs o in ormation using the aw# or sed commands% Su$se)uent "ines o ma#e instruction are indented $y ta$s% (&his is re)uired%) <ou can use ma#e macros in the instructions% Instructions that $egin with the at (Z) sign are not echoed to the screen% 4emo6ing the Z sign is use u" or de$ugging new instructions% Instructions that $egin with a "eading dash (-)! occurring $e ore the "eading Z sign! do not ha6e error messages echoed to the termina"%

+%

Send these #ey and 6a"ue pairs to the ma#ed$m program to generate the 2IS map% ?se touch on the times"amp i"e so that this map is not remade un"ess and unti" the source i"e is updated% (cho the message stating the map has $een updated% Push the map to the s"a6e ser6ers% (cho a message stating the push is done%

J%

0% /% 6%

9aution - &he irst time you $ui"d a new map! the s"a6e ser6ers do not #now o its e,istence and so the push process attempt ai"s% Send an interrupt (9ontro"-9) to the $ui"d process when the push process hangs! and e,ecute the yp, r command on the map rom the s"a6e ser6er(s) to comp"ete the $ui"d process% (&his is necessary on"y during the irst $ui"d o a new 2IS map%) 2ote - :etai"s o the aw#! sed! and ma#ed$m programs are $eyond the scope o this c"ass% E-ercise: Configuring 1IS (,ercise o$Wecti6e - In this "a$! you con igure a 2IS master ser6er and one 2IS c"ient% Preparation 9hoose two partners or this "a$ and determine which systems wi"" $e con igured as the 2IS master ser6er and which wi"" ser6e aM! the 2IS s"a6e and 2IS c"ient% <ou use the 2IS master as the Wumpstart ser6er "ater in the course% 3eri y that entries or a"^ systems e,ist in the 'etc'hosts i"e% 4e er to your "ecture notes as necessary to per orm the steps "isted% Tas$ Overvie+ In this e,ercise! you accomp"ish the o""owing:

8n the system that wi"" $ecome the 2IS master ser6er! rep"ace the '6ar'yp'5a#e i"e i"e with an updated copy that re erences 'etc'"oca"e% <our instructor wi"" pro6ide the 5a#e i"e% ?se the o""owing commands and i"es to create and con igure an 2IS master ser6er% 9on igme on"y a master ser6er% 3eri y that the con iguration wor#s using the ypwhich -m command% 'etc'nsswi tch%nis
'etc'nsswitch%con 'etc'de au"tdomain 'etc'ethers 'etc'$ootparams 'etc'"oca"e 'etc'netmas#s 'etc'time>one 'etc'security'auditEuser

'etc'security'authEattr 'etc'security'e,ecEattr 'etc'security'pro Eattr domainname ypinit ypstart

?se the o""owing commands and i"es to create and con igure an 2IS c"ient% 3eri y that the con iguration wor#s using the ypwhich -m command%

'etc'nsswitch%nis 'etc'nsswitch%con domainname 'etc'de au"tdomain ypinit ypstart'etc'nsswitch%nis 'etc'nsswitch%con 'etc'de au"tdomain 'etc'ethers ' etc'$ootparams 'etc'"oca"e 'etc'netmas#s 'etc'time>one 'etc'security'auditEuser 'etc'security'authEattr 'etc'security'e,ecEattr 'etc'security'pro Eattr domainname ypinit ypstart

?se the o""owing commands and i"es to create and con igure an 2&S s"a6e ser6er% 3eri y that the con iguration wor#s using the ypwhich -m command%

'etc'nsswitch%nis 'etc'nsswitch%con

domainname 'etc'de au"tdomain ypinit ypstart ypcat

?se the o""owing commands and i"es to create and update a new 2IS map! auto%home% 3eri y that the new map wor#s using the ypcat command%

'etc'nsswitch%nis 'etc'ns switch!! con domainname 'etc'de au"tdomain ypinit ypstart

Introduction to <umpStart
7umpStart is an automatic insta""ation (auto-insta"") process a6ai"a$"e in the So"aris 8perating (n6ironment% 7umpStart a""ows you to insta"" So"aris automatica""y and con igure it di erent"y depending on characteristics o c"ient systems% 7umpStart imp"ementations use these identi ying characteristics to se"ect the correct con iguration or each c"ient system%
,ho Should #se -umpStart and ,hy.

System administrators who need to insta"" mu"tip"e systems with simi"ar con igurations can use 7umpStart to automate the insta""ation process% 7umpStart e"iminates the need or operator inter6ention during the insta""ation process% Ad6antages o using 7umpStart inc"ude the o""owing: It rees system administrators rom the "engthy )uestion and answer session that is part o the interacti6e insta""ation process It ena$"es system administrators to insta"" di erent types o systems simu"taneous"y It insta""s the So"aris 8perating (n6ironment and un$und"ed so tware automatica""y It simp"i ies administration tas#s when wide"y-used app"ications must $e updated re)uent"y 7umpStart pro6ides networ#ed computing en6ironments with considera$"e time sa6ings when mu"tip"e or ongoing insta""ations are re)uired% Oumpstart 9omponents &here are three main components to WumpStart:

Koot and client identification services/ &hese are pro6ided $y a networ#ed! $oot ser6er%

$oot-ser6er pro6ides the in ormation that a 7umpStart c"ient needs to $oot using the networ#% &his inc"udes 4A4P! &-&P! and $ootparams in ormation! and the identity o sewers that wi"" pro6ide insta""ation and con iguration ser6ices% &he $oot ser6er must reside on the same su$net as the c"ient! $ut the insta"" and con iguration ser6ers may reside on other networ# segments% &he $oot ser6er can a"so pro6ide c"ient identi ication in ormation% &his in ormation answers the system identi ication )uestions norma""y as#ed $ythe interacti6e insta""ation routine% It is possi$"e or one ser6er to pro6ide $oot! insta""ation! and con iguration ser6ices%

Installation services -&hese are pro6ided $y a networ#ed insta"" ser6er% An insta"" ser6er pro6ides an image o the So"aris 8perating (n6ironment that the 7umpStart c"ient uses as its source o data to insta""% &he insta"" ser6er shares a So"aris image either rom a de"i6ery 9:-485! or rom an area on a "oca" dis#% Kecause the So"aris 8perating (n6ironment is de"i6ered on two 9:485s! on"y the 9ore and (nd ?ser con iguration c"usters can insta"" without spoo"ing the 8S onto a "oca" dis#% WumpStart c"ients use 2-S to mount the 8S image during the insta""ation process% Configuration services -&hese are pro6ided $y a networ#ed con iguration ser6er% A con iguration ser6er pro6ides in ormation that a 7umpStart c"ient uses to partition dis#s and create i"esystems! add or remo6e So"aris pac#ages! and per orm other con iguration tas#s 9"ients se"ect a con iguration $ased on identi ying in ormation #nown as a Rc"assR% A con iguration ser6er shares a directory that contains a Rru"esR i"e and Rc"assR i"es that a""ow c"ients to o$tain appropriate con iguration in ormation%
I any one o (he three main components is improper"y con igured! the 7umpStart c"ients can:


.sing addEinsta"" c"ient

-ai" to $oot -ai" to ind a So"aris 8perating (n6ironment image to "oad As# )uestions interacti6e"y or con iguration -ai" to partition dis#s! create i"e systems! and "oad the operating en6ironment% &he script addEinsta""Ec"ient a""ows you to esta$"ish support or c"ients on 7umpStart ser6ers% Kecause 7umpStart components maye,ist on more than one ser6er! you must se"ect options to addEinsta""Ec"ient and speci y arguments that re "ect the o6era"" 7umpStart con iguration in p"ace% &he genera" synta, o addEinsta""% c"ient is descri$ed here! $ut its use or speci ic con igurations is descri$ed throughout the modu"e% &he addEinsta""Ec"ient script adds support or 7umpStart c"ients $y updating in ormation as re)uired on the insta"" ser6er% &he i"es that these updates a ect can inc"ude 't tp$oot! 'etc'd s'd sta$! etc'%$ootparams! 'etc'inetd%con ! and 'etc'nsswitch%con % &he addEinsta""Ec"ient script must run rom the insta"" ser6er's insta""ation image! either on 9:-485 or spoo"ed to dis#! or the $oot ser6er's $oot directory% 8n the So"aris!* o + 9:-485! this directory is 'cdrom'cdrom0s0So"arisE*0'&oo"s% In an 8S image spoo"ed to dis# $e"ow 'e,port'insta""! this directory is ' e,port ' ins ta""'So"ar isE.'&oo"s% Command Synta-

8ptions and arguments or addEinsta""Ec"ient inc"ude the o""owing: addEinsta""Ec"ient -i 7PEaddress -e (thernetEaddress f /s ser6er %-path -c ser6er%-path -p ser6er %-path c"ientEname platformJJgroup "!tions -i Speci ies the IP address o the c"ient% &his option is not re)uired i an entry or the c"ient e,ists in a naming ser6ice in use on the $oot ser6er or in the 'etc'inet'hosts i"e% Speci ies the (thernet (5A9) address o the c"ient% &his option is not re)uired i an entry or the c"ient e,ists in a naming ser6ice in use on the $oot ser6er or in the 'etc'ethers i"e% serverr:path speci ies the ser6er and a$so"ute path o the So"aris insta""ation image used or this insta""ation% &his option is not re)uired i the $oot ser6er a"so acts as the insta"" ser6er% &his option is on"y re)uired when running addEinsta""Ec"ient rom a $oot ser6er% serverpath speci ies Rthe ser6er and a$so"ute path o the directory that ho"ds con iguration in ormation (ru"es and c"ass i"es)% serverpath speci ies the ser6er and a$so"ute path o the directory that ho"ds the sysidc g i"e%

-e

-s

c-

-p

'&he clientJname argument speci ies the name o the c"ient%as recorded in 'etc'inet'hosts and 'etc'ethers% &he p"at ormEgroup argument speci ies the hardware p"at orm type as reported $y uname ( or e,amp"e%! sun0u! sun0m! sun0c)% Setting .p %oot Services ' boot ser4er allows MurnpStart clients to boot 4ia the network, and pro4ides installation and configuration ser4er information. &his section descri$es 7umpStart $oot ser6ices inc"uding: -m

&he 7umpStart c"ient $oot se)uence Koot operation support i"es Adding a $oota$"e So"aris 8perating (n6ironment image ?sing the addE%insta""Ec"ient script to speci y a $oot ser6er that is separate rom an insta"" ser6er &he o""owing steps descri$e how the 7umpstart process wor#s: *% ;hen a networ# wor#station $oots! the $oot P485(programma$"e read-on"y memory) issues a 4e6erse Address 4eso"ution Protoco" (4A4P) $roadcast to the networ#% 8n recei6ing the 4A4P re)uest! the $oot ser6er trans"ates the (thernet address to an Internet address%&he $oot ser6er running the 4A4P daemon! 'usr's$in'in% rarp! "oo#s up the (thernet address in the 'etc'ethers i"e! chec#s or a corresponding name in the'etc'hosts i"e! and passes the Internet address $ac# to (he-c"ient%

+% &he c"ient's $oot P485 sends a &ri6ia" -i"e &rans er Protoco" (&I-&P) re)uest or its $oot

program%

J% &he ser6er searches or a sym$o"ic "in# named or the c"ient's Internet Protoco" (IP) address
e,pressed in he,adecima" ormat %&his "in# points to a $oot program to a particu"ar So"aris re"eases and c"ient architecture! -or SPA49 &5 systems! the i"e name is he-/IP/ address4archticecture% 900O9.60%S?20? -H'inet$oot%sun0u%So"aris-*

0% &he ser6er uses the in% t tpd daemon to trans er the $oot program to the c"ient% &he c"ient
then%runs the $oot program% /% &he $oot program tries to mount the root i"e system% &o do so! it issues a whoami re)uest to disco6er the c"ient's host name% A ser6er running the $oot parameter daemon! rpc%$ootpararrd! "oo#s up the host name! and responds to the c"ient% &hen! the $oot program issues a get i"e re)uest to o$tain the "ocation o the c"ient's root and swap space% 6% &he ser6er responds with the in ormation o$tained rom the 'etc'$ootparams i"e% 1% 8nce the c"ient has its $oot parameters! the $oot program on (ho c"ient mounts the ' (root) i"e system rom the $oot ser6er% &he c"ient "oads its #erne" and starts (he init program% ;hen (he $oot ser6er is inished $ootstrapping the c"ient! it redirects the c"ient to the con iguration ser6er% .% &he c"ient searches or the con iguration ser6er using $ootparams in ormation% &he c"ient mounts the con iguration directory and runs sysidtoo" the c"ient then uses $ootparams in ormation to "ocate and mount the insta""ation directory where the So"aris image resides% &he c"ient then runs the Sun"nsta"" program and insta""s the operating en6ironment%

%oot Operation Support "iles -or $oot operations to proceed! the o""owing i"es and directories must $e proper"y con igured on the $oot ser6er: 'etc'ethers! 'etc'hosts! 'etc'$ootparams! 'etc'd s'd sta$! and 't tp$oot% 8n a networ# running the 2IS or 2IS-i- name ser6ices! the identi ication in ormation rom the 7umpStart ser6er i"es must a"so $e incorporated in the domain data$ase maps% The 'etc'ethers "ile ;hen the 7umpStart c"ient $oots! it has no IP address so it $roadcasts to the networ# using 4A-P and its (thernet address% &he 7umpStart ser6er recei6es the re)uest and attempts to match the c"ient's (thernet address with entry in the "oca" 'etc'ethers i"e% I a match or the (thernet num$er is ound! the c"ient name is matched to an entry in the 'etc'hosts i"e% In response to the 4A4P re)uest rom the c"ient! the 7umpS"art ser6er sends the IP address rom the 'etc'hosts i"e $ac# to the c"ient% &he c"ient then continues the $oot process using the IP address% I a match is riot ound! the c"ient cannot ac)uire its IP address and cannot continue the% $oot process% &he usua" (repeating) message disp"ayed on the screen o a 7umpStart c"ient when this occurs is the o""owing:% &imeout waiting or A4P'4A4P pac#et An entry or the 7umpStart c"ient can $e created $y editing the 'etc'ethers i"e or as one o the arguments to the addEinsta""Ec"ient script% &he o""owing e,amp"e is an entry in the 'etc'ethers i"e or a 7umpStart c"ient:

.:0:+0:+ :O0:Jd c"ient" The 'etc'hosts "ile &he 'etc'hosts i"e is the "oca" data$ase that associates the names 0* hosts with their IP addresses% &he 7umpStart ser6er re erences this i"e when trying to match an entry rom the "oca" 'etc'ethers i"e in response-to a 4A4P re)uest rom a c"ient% I a match is not ound! the c"ient cannot ac)uire its IP address and cannot continue! the $oot process% &he usua" (repeating) message disp"ayed on the screen o a 7umpStart c"ient when this occurs is the o""owing: &imeout %waiting or A4P'4A4P pac#et An entry or the 7umpStart c"ient can $e created $y editing the 'etc'hosts i"e or as one o the arguments to the addEinsta""Ec"ient script% &he o""owing e,amp"e is an entry in the 'etc'hosts i"e or a 7umpStart c"ient: *O+%O%+00%*00 c"ient" Tlie 't tp$oot Directory &he 't tp$oot directory contains the inet$oot%S?20,%So"ar isE.-* i"e that is created or each 7umpStart c"ient when the addEinsta""Ec"ient script is run% ;hen $ooting o6er the networ#! the c"ient's $oot P485 ma#es a 4A4P re)uest and when it recei6es a rep"y! the P485 $roadcasts a &-&P re)uest to etch the inet$oot% i"e rom any ser6er that responds and e,ecutes it% -or e,amp"e! the inet$oot i"e created or a 7umpStart c"ient with a sun0u architecture' is named inet$ootM%S?;0?%@o"arisEE.-"% &wo additiona" sym$o"ic "in#s to this i"e are a"so created at the same time containing the IP address and the architecture o the c"ient system% &he "ong "isting output o a 't tp$oot directory that supports one sun0u c"ient with an IP address o *O+% O%+00 %*00 appears as o""ows: F "s -* 't tp$oot tota" J00 "rw,rw,rw, * root other +6 Apr */ +*:+0 900O9.60 -H

inet$oot%S?20?%So"arisE*0-"S "rw,rw,rw, * root other +6 Apr */ +*:+0 900O9.60-S?20? /@

inet$oot%S?20?%So"arisE*0-"S -rw,r-,r-, * root other */O16. Apr */ +*:+0

inet$oot%S?20?%So"arisE*0-"S -rw-rXrX * root -other J*/ Apr */ +*:+0 rm%*O+%O %+00 %*00

&he inet$oot program ma#es another 4A4P re)uest! then uses the $ootparams protoco" to "ocate its root i"e system% It then-mounts the root i"e system across the networ# using the 2-S protoco" and runs the #erne"%

I the i"es in the 't tp$oot directory are una6ai"a$"e to the 7umpStart c"ient when the $oot process is initiated! the c"ient cannot retrie6e $ootparams in ormation or the root i"e system and stops the $oot process without disp"aying an error message% The 'etc'$ootparams -i"e &he 'etc'$ootparains i"e contains entries that networ# c"ients use or $ooting% 7umpStart c"ients retrie6e the in ormation rom this i"e $y issuing re)uests to a ser6er running the rpc%$ootpararad program% &he 'etc'$ootparams i"e can $e used in conWunction with! or in p"ace o ! other sources or the $ootparams in ormation% ;hen the 7umpStart c"ient ma#es die re)uest! the ser6er re erences the 'etc'$ootparams i"e and responds with the i"e system in ormation re)uired or 2-S mount to ena$"e networ# insta""ation% I the re)uired entries are not in the 'etc'$ootparams i"e! the 7umpStart c"ient cannot determine the appropriate ser6er and i"e system to mount! and stops at the $eginning o the $oot process without disp"aying an error message% (ntries in this i"e are created $y the options and arguments entered as part o the addEinsta""Ec"ient script% &he o""owing e,amp"e is an entry in the 'etc'$ootparams i"e or a 7umpStart c"ient named c"ient": c"ient" tootNser6er":'e,port'insta""'So"arisE*0'&oo"s'Koot% insta""Nser6er":'e,port'insta"" $oottypeN:in sysidEcon igNser6er":'e,port'con ig insta""Econ igNser6er":'e,port'con ig rootoptsN:rsi>eNJ+16. &he o""owing "ists descri$es the entries:

c"ient" - &he 7umpStart c"ient name rootNser6er":'e,port'iris ta""'So"arisE*0'&oo"s'Koot-&he $oot ser6er name and directory or the root i"e system insta""Nser6er": 'e,port'insta"" - &he ser6er name and directory or the So"aris so tware image $oottypeN: in - Indicates a networ# $oot and insta""ation sysidEcon ig-ser6er": 'e,port'contig - &he ser6er name and directory or the 7umpStart con iguration i"e system insta""Econ igNser6er"M 'e,port'con ig - &he ser6er name and directory or the operating en6ironment insta""ation i"es rootoptsN:rsi>eNJ+16.- 5ount options or the root i"e system and 2-S read si>e &he 'etc'd s'd sta$ -i"e &he 'etc'd s'd sta$ i"e "ists "oca" i"e systems to $e shared to the networ#% &ypica""y! when you initia""y set up the 7umpStart ser6er! you must manua""y update this i"e with an entry or the con iguration directory you want to share to the networ# to support remote

insta""ation% &his i"e is again popu"ated with the insta""ation directory "ocation as a resu"t o the addEinsta""Eser6er script% I the re)uired entries are not in the 'etc'd s'd sta$ i"e! the 7umpStart c"ient cannot mount the i"e systems speci ied in the 'etc'$ootparams and disp"ays the o""owing error message: panic - $oot: 9ou"d not mount i"esystem Program terminated o# Adding a +ootable Image &o ena$"e the c"ient or 7umpStart networ# insta""ation! you must set up an insta"" ser6er! $oot ser6er! and% a con iguration ser6er (see the R7umpStart 9omponentsR on page *J-0)% <ou can set up a ,oot ser6er that uses the So"aris so tware image "ocated on the 9:-485 $y using the o""owing steps: *% (nsure that the system has an empty directory ('e,port' insta""! or e,amp"e) with appro,imate"y */6 5$ytes o a6ai"a$"e dis# space% Insert the So"aris So tware 9:-485 * o + in the 9:-485 dri6e! a""owing 6oid to automatica""y mount the 9:-485% 9hange the directory to the "ocation o the setupEinsta""Eser6er script%

+%

J%

F cd 'cdrom'cdrom0's0'So"arisE*0'&oo"s

+% 4un the setupEinsta""Eser6er script: F %'setupEinsta""Eser6er -$ 'e,port'insta""


Note - &he addEinsta""Ec"ient to create 7umpStar" c"ients and the rmEnsta""Ec"ient to remo6e an e,isting 7umpStart c"ient are a"so in this directory% 0dding Install Clients <ou can create a 7umpstart c"ient using a ser6er named ser6er" to pro6ide on"y the $oot unction 7umpStart component% <ou use another system as the insta"" ser6er (named ser6er+) or the So"aris so tware image insta""ation and con iguration components $y running the addEinsta""Ec"ient command to create a c"ient named c"ient" with a sun0u architecture! as o""ows: F 'addEinsta""Ec"ient -s ser6er+: 'e,port'insta"" -c ser6ers %-'e,port'con ig f -p ser6er+:'e,port'con ig c"ient" sun0u 4un this command rom the 'e,port'insta""'So"arisE*0'&oo"s directory on the $oot ser6er (ser6er")% &he arguments to options -s! -c! and -p! redirect the 7umpStart c"ients to ser6er+ or the con iguration in ormation and the So"aris so tware image% Setting .p Client Identification 4

;hen a 7umpStart c"ient $oots or the irst time! the $ooting so tware irst tries to o$tain system identi ication in ormation (such as the system's host name! IP address! "oca"e! time>one! and root! password) rom a sysidc g i"e and then rom the name ser6ice data$ase% &here ore! you can use a sysidc g i"e to answer system identi ication )uestions during the initia" part o the insta""ation regard"ess o whether or not a name ser6ice (2IS or 2IST) is used% I the 7umpStart ser6er pro6ides this in ormation! the c"ient $ypasses the initia" system identi ication portion o the So"aris 8perating (n6ironment insta""ation process without administrator inter6ention ;ithout the sysidc g i"e or a name ser6ice data$ase! the c"ient disp"ays the appropriate interacti6e dia"og $o,es to re)uest needed identi ication in ormation%' .sing the sysidc g "ile to Identify a Client In the a$sence o a name ser6ice on the! networ#! the sysidc g i"e must $e present to automate system identi ication% &a$"e *J-* "ists the #eywords and arguments used in the construction o the sysidc g i"e% &a$"e *J-* Leywords and Arguments o the sysidc g -i"e

Leyword

Argument

nameEser6ice edomainE%nameb

nameEser6iceN2IS! 2IST! 8&H(4! 282(

2ptions for &S and &S-N OdomainnamePdomain/name name//ser4erPhostname 8ip/address:: 8ptions or :2S: (domainnameNdomainEname nameEser6er ipEEaddress! ipEaddress+ ipEaddress (three ma,imum) searchNdomainEname! donainEname! domainEname! domainEname! domainEname! domainEname (si, ma,imum! the tota" "ength is "ess than or e)ua" to +/0 characters)) networ#Einter ace! hostname! Internet Protoco" (IP) address! netmas#! :H9P! IP66 networ#Einter ace-282(! P4I5A4<! or 6a"ue ehostnameNhostna%&ie ipEaddress N ip address netmas#Nnetmas# protoco"Eip66Nyes'no)

I :H9P is used! speci y: edhcp protoco"Eip66TyesEorEno) I :H9P is not used! speci y: (hostnameNhostEname ipEaddressNip address netmas#-netmas protoco"Eip66NyesEorEno) rootEpassword rootEpasswordNrootEpassword ((ncrypted password rom 'etc'shadow)

Leyword

Argument

securityEpo"icy

seeurityEpo"icy-#er$eros! 282(

8ptions or #er$eros: ede au"tErea"mN-a:2 adminEser6erN"PD1 where -a:2 is a u""y )ua"i ied domain name%

2ote: <ou can "ist a ma,imum o three #ey distri$ution centers (L:9s)! $ut at "east one is re)uired%

systemE"oca"e

systemE"oca"eN"oca"e ((ntry rom 'usr'"i$'"oca"e)

termina"

termina"s termina"% type ((ntry rom 'usr'share'"i$'tenrdn o data$ase)

time>one

time>oneNtime>one ((ntry rom 'usr'share'"i$'>onein o'b

timeser6er

timeser6erN"oca"host! hostname! or ipEaddr

Sample sysidc g "ile &he o""owing ru"es app"y to die sysidc g i"e:

Leywords can $e in any order% Leywords are not case sensiti6e% Leyword 6a"ues can $e optiona""y enc"osed in sing"e (') or dou$"e (R) )uotes%

8n"y the irst instance o a #eyword is 6a"idM i a #eyword is speci ied more than once! the irst #eyword speci ied is used% &he o""owing is an e,amp"e o a sysidc g i"e: F Samp"e sysidc g i"e or SPA4%9 systems systemE"oca"eNenEE?S time>oneN?S'5ountain timeser6erN"oca"host terrruna"N6t"00 nameEser6iceN282( securityEpo"icyN282( rootEEpasswordNH,+ J01/ 6AK::5 networ#Einter aceNP4I5A4< eprotoco"%% ip66Nyes netmas#N+S/ %+//%+//%0b Iocating the sysidc g -i"e &he "ocation o the sysidcfg i"e (host and a$so"ute directory path) is speci ied $y the -p argument to the addEinsta""Ec"ient she"" script used to create 7umpStart c"ient in ormation i"es% (See R?sing addEinsta""Ec"ientR on page *J-/ and RAdding Insta"" 9"ientsR on page *J-*1)% As pre6ious"y mentioned! you can use the sysidc g i"e to answer system identi ication )uestions during the initia" part o insta""ation regard"ess o whether a name ser6ice (2IS or 2IST) is used% ;hen this i"e is used with the 2IS naming ser6ice! identi ication parameters! such as "oca"e and time>one can $e pro6ided rom the name ser6ice% &he sysidc g i"e necessary or insta""ing a 7umpStart c"ient on a networ# running the 2IS name ser6ice is typica""y shorter and a separate sysidc g i"e or each c"ient is unnecessary% <ou can use the 'etc'"oca"e! 'etc'time>one! 'etc'hosts! 'etc'ethers and 'etc'netmas#s i"es as the source or creating 2IS data$ases to support c"ient 7umpStart insta""ations% &he o""owing paragraphs pro6ide a $rie e,p"anation o how each i"e! when created or modi ied and then con6erted to its respecti6e data$ase map! determines a speci ic identi ication parameter or the c"ient insta""ation process% The 'etc'"oca"e "ile %

&o ena$"e 5S support or a networ# insta""ation o a 7umpStart c"ient! you must create the 'etc'"oca"e i"e i it does not e,ist (this assumes that the systemE"oca"e #eyword is not pro6ided in a sysidc g i"e)% ;hen con6erted to its respecti6e 2IS map! "oca"e%$yname! it pro6ides the insta""ation program running on the 7umpStart c"ient with the de au"t "anguage in ormation% I this in ormation is not a6ai"a$"e! the c"ient insta""ation disp"ays a dia"og $o, and prompt or it% &he o""owing is an e,amp"e o the content ound in the 'etc'"oca"e i"e on an 2IS master or the 9entra"%Sun%985 domain that sets the de au"t "anguage to (ng"ish% 9entra"%Sun%985 en ?S

2ote - <ou can a"so speci y separate entries $ased on a host name rather than a domain% -or a "ist o possi$"e "oca"e entries or this i"e! run the ' "oca"e -c' command% Setting .p #ocale I the insta""ation! media contains mu"tip"e "anguages! you are prompted or the "anguage to use during insta""ation un"ess the insta""ation process car% determine the de au"t "oca"i>ation% 8n the 2IS ser6er! comp"ete the o""owing steps: *% a% 5a#e the o""owing changes to the '6ar'yp'5a#e i"e i"e Add the o""owing te,t a ter the e,isting audit %user % time entry (appro,imate"y "ine 0+0): \(:I4)'"oca"e ( - \(:I4)'"oca"e DM then f sed -e R'`F'dR -e s'F%S\\'' \ (:I4)'"oca"e f C aw# 'e or (i N +!- iGN2-M ITT) print \\i! \\0b' f C \(5AL(:K5) -\ (<P:K:I4) '\ (:85) '"oca"e%$ynameM f touch "oca"e%timeM f echo Rupdated "oca"eRM f i B ^ \(28P?SH) DM then f \(<PP?SH) "oca"e%$ynameM f echo Rpushed "oca"eRM f e"se f :Mf if e"se f echo Rcou"dn't ind \(:I4)'"oca"eRM f i #he 3etc"time1one $ile

"oca"e%time: -Zi

&o ena$"e 2IS support or a networ# insta""ation o a 7umpStart c"ient! you must create the'etc'time>one i"e% I it does not e,ist (this assumes that the time>one #eyword is not pro6ided in a sysidc g i"e)% ;hen con6erted to its respecti6e 2IS map! time>one% $yname! it pro6ides the insta""ation program running on the 7umpStart c"ient with the de au"t "ime >one in ormation% I this in ormation is not a6ai"a$"e! the c"ient insta""ation disp"ays a dia"og $o, and prompts or it% &he o""owing is an e,amp"e o the content ound in the 'etc'time>one% i"e on an 2IS master or the 9entra"% Sun%985 domain that sets the de au"t time>one to ?%S% 5ountain Standard &ime: ?S'5ountain 9entra"%Sun%985

2ote - <ou can a"so speci y separate entries $ased on a host name rather than a domain% A "ist o possi$"e "oca"e entries or this i"e e,ists in the 'usr'share'"i$'>onein o directory% The/etc/hosts File &o ena$"e 2IS support or a networ# insta""ation o a 7umpStart c"ient%! you must update the 'etc'hosts i"e to inc"ude the c"ient (P address and host name% ;hen con6erted to its respecti6e 2IS map! hosts! it pro6ides the insta""ation program running on the 7umpStart c"ient with its IP address% Additiona""y! this i"e must ha6e a timehost a"ias speci ied so the c"ient can o$tain the time o day in ormation re)uired or insta""ation% &ypica""y! this a"ias is assigned to the 7umpStart ser6er or the 2IS master% I the c"ient IP address in ormation is not a6ai"a$"e! the c"ient insta""ation disp"ays a dia"og $o, and prompts or it% &he o""owing is an e,amp"e o the content ound in the 'etc'hosts i"e on a 7umpStart ser6er named ser6er * or a c"ient named c"ient^ with an IP address o *O+%O%+00%*00 (inc"udes the timehost a"ias assigned to the ser6er): *O+%O%+00%* *O+%O%+00%*00 ser6er" c"ient" timehost

The 'etc'netmas#s -i"e &o ena$"e 2IS support or a networ# insta""ation o a 7umpStart c"ient! you must update the 'etc'netmas#s i"e to inc"ude the "oca" networ# netmas# 6a"ue% ;hen con6erted to its respecti6e 2IS map! netmas#s $yaddr! it supp"ies the insta""ation program running on the 7umpStart c"ient with the "oca" netmas# 6a"ue% I the c"ient netmas# in ormation is not a6ai"a$"e! the c"ient insta""ation disp"ays a dia"og $o, and prompts or it% &he 'etc'netmas#s i"e contains networ# mas#s used to imp"ement IP su$nets% It supports $oth standard su$netting as speci ied in 4e)uest or 9hange (4-a-O/0 and 6aria$"e "ength su$nets as speci ied in 4P9-*/*O% ;hen using standard su$nets! there shou"d $e a sing"e "ine or each networ# that is su$mitted in this i"e with the networ# num$er! any num$er o SPA9( or &A: characters! and the networ# mas# to use on that networ#% <ou can speci y networ# num$ers and mas#s in the con6entiona" IP '%' (dot) notation (such as IP host addresses! $ut with >eroes or the host part)% -or e,amp"e! you can use: *O+%O%+00%0 +//%+//%+//%0

to speci y that the 9"ass 9 networ#! *O+ %O%+00%0! shou"d ha6e eight $its o host ie"d and twenty- our $its in the networ# ie"d% 2ote - See the man page or netmas#s or more e,amp"es o su$nets% Setting .p an Install Server &o ena$"e a networ#ed c"ient to insta"" the So"aris 8perating (n6ironment! the 7urnpStart insta"" ser6er must ha6e the So"aris 8perating (n6ironment re"ease so tware image a6ai"a$"e either on the "oca" dis# or rom a 9:-485 shared to the networ#% &he most common con iguration or the 7umpStart insta"" ser6er is to ha6e this so tware a6ai"a$"e rom the "oca" dis#% <ou use the setupEEinsta""Eser6er script to accomp"ish this tas#% &his script was pre6ious"y descri$ed in RAdding a Koota$"e ImageR on page *J-*6%

&he So"aris 8perating (n6ironment re"eases $e ore re"ease . (So"aris Q+ +%6! +%/! and so on)! had on"y one 9:-485 that contained the entire operating en6ironment &he So"aris 8perating (n6ironment has threeM an insta""ation 9:485! * o +! and + o +% &o esta$"ish an insta""ation ser6er that c6ntains the capa$i"ity pro6ided $y the three 9:-485 set! you must ma#e use o three di erent insta""ation scripts: &o set up a insta"" ser6er that uses the So"aris so tware Image "ocated on the "oca" dis#! per orm o""owing steps: *% (nsure that the system has an empty directory ('e,port'insta""! or e,amp"e) with appro,imate"y 100 5$ytes o a6ai"a$"e dis# space% +% Insert-the So"aris So tware 9:-485 * o + in the 9:-485 dri6e a""owing 6oid to automatica""y mount the 9:-485% J% 9hange the directory to the "ocation o the setupEinsta""Eser6er script%

F cd 'cdrom'cdrom0's0'So"arisE*0 '&oo"s 0% 4un the setupEinsta""Eser6er script to copy the re"ease so tware rom the 9:-485 to the "oca" dis# (this process ta#es a$out one hour): F 'setupEinsta""Eser6er 'e,port'insta"" &here are two additiona" scripts that add unctiona"ity to the 7umpStart $oot or insta""ation ser6erM addEtoEinsta""Eser6er and modi yEinsta""Eser6er% -or more in ormation! sec RAdding a Koota$"e ImageR on page *J*6% he a!!#to#install#server Script &he addEt%oEinsta""Eser6er script "ocated on the So"aris So tware 9:-485 + o + ena$"es the insta""ation o supp"ementa" 9:-485 products directories to an e,isting insta"" ser6er% I you do not use this script to insta"" the additiona" So"aris 8perating (n6ironment re"ease so tware "ocated on 9:-485% + o +! you wi"" $e "imited to 9ore and (nd?ser so tware c"usters% &o add the So"aris 8perating (n6ironment supp"ementa" so tware products to an e,isting insta"" ser6er! per orm the o""owing steps (this process ta#es a$out */ minutes): *% 485% +% Insert the So"aris So tware 9:-485 + o + in the dri6e% &he 6oid daemon automatica""y mounts the 9:-

9hange the directory to the "ocation o the addEtoEinsta""Eser6er script%

F cd 'cdrom'cdrom0'So"ari.E.'&oo"s J% 4un the addEtoEinsta""Eser6er script to insta"" the additiona" so tware into the insta""ation directory on the 7umpStart ser6er (assuming the "ocation to $e'e,port'insta"")% F %addEtoEinsta""Eser6er 'e,port'insta"" &he modi yEinsta""Eser6er Script &he modi yEinsta""Eser6er script "ocated on the So"aris So tware Insta""ation 9:-485 ena$"es an interacti6e ;e$Start sty"e o insta""ation on the c"ient% ;arning - 4unning the modi yEinsta""Eser6er script actua""y de eats the purpose o the 7umpStart program% It disa$"es the non-interacti6e $ene it o the 7umpStart program% &he resu"ting insta""ation process wi"" $e interactive4 Setting up the Configuration Server

&his section e"a$orates on the 7umpStart con iguration ser6er setup% &his system pro6ides the con iguration i"es or the 7umpStart c"ients as pre6ious"y discussed (see R7umpstart 9omponents: section)% &he con iguration directory minima""y contains the o""owing i"es:

&he ru"es i"e &he ru"es i"e c"assi ies the machines on your networ# using a set o prede ined #eywords (inc"uded in Appendi, A! R&he 7umpStart ru"es and 9"ass -i"esR)% It a"so speci ies the class i"e to $e used $y each c"ass o machines% A class i"e or each category o machines you ha6e determined on your networ# &he c"ass i"es speci y how the insta""ation is to $e done and what so tware is to $e insta""ed% &he name o a c"ass i"e is chosen $y the system administrator and shou"d o""ow ?2IA i"e name con6entions% &he chec# script <ou must run the chec# script a ter the ru"es and c"ass i"es are created% It chec#s the synta, in the ru"es and c"ass i"es% I there are no synta, errors! the chec# script creates the ru"es %o# i"e%
&he ru"es%o# i"e is created rom the ru"es i"e $y the chec# script% It is read during the automatic insta""ation process (the ru"es i"e is not "oo#ed at)% 8ptiona" $egin and inish scripts% &he $egin and inish scripts are used to per orm pre-insta""ation and post-insta""ation tas#s% &hese scripts are a6ai"a$"e to per orm more ad6anced customi>ation o the insta""ation process! such as answering the power management )uestion that is as#ed when the new"yinsta""ed system irst $oots%

Setting !p a Configuration Ser er Directory &o set up a con iguration directory! per orm the o""owing steps: *% Se"ect the system that wi"" $e the 7umpStart con iguration ser6er and create the directory where you want to store the con iguration in ormation i"es% -or the purpose o this discussion! use the ''e,port'con ig directory as the name% 5ount the 9:-485 and copy the contents o the 'cdrom'So"E*0Esparc's8'So"arisE*0'5isc'WurnpstartEsanip"e directory "ocated on the So"aris So t-ware 9: * o 3 to your "oca" 'e,port'con ig directory% &he Wumpstart%Esamp"e directory rom the 9:-485 contains temp"ate con iguration i"es that you can customi>eM the ru"es i"e! se6era" c"ass i"es! a inish script! and the chec# script% Share the con iguration directory% Add an entry to share the con iguration directory to the networ# in the 'etc'd s'd sta$ i"e% -or e,amp"e: share -d [con iguration directoryR 'e,port'con ig (,ecute the'etc'n s%ser6er start command% 2ote - I the system is a"ready an 2-S ser6er! you need to run on"y the sharea"" command%

+%

J%

0%

:etermine the di erent c"asses o machines that are or wi"" $e on your networ# and create the 'e,port'con ig'ru"es ti"e%

:uring the auto-insta"" process! the insta"" c"ient is matched to a c"ass in the ru"es i"e% (ach c"ass de ined in the ru"es i"e has a speci ied i"e! ca""ed a class i"e! associated with it that is used to insta"" the so tware% /% :etermine what insta""ation parameters to me or each c"ass (category) o machines you "isted in step 0 and create 'e,port'con igHclass i"e or each (see the R9reating the 9"ass -i"esR section on page *J-J/)% &he c"ass i"e speci ies how to partition the dis#! what so tware c"usters and pac#ages to insta""! and what i"e systems to mount% (See the hostEc"ass temp"ate i"e in the con iguration directory%) 9reate $egin and inish scripts% (&his is optiona"%) A ,egin script is run $e ore the c"ass i"eM that is! $e ore the actua" insta""ation! o so tware speci ied in the c"ass i"e% A finish script is rim a ter the c"ass i"e $ut $e ore the system is re$ooted% <ou can use it to modi y the i"es or i"e systems o the new"y insta""ed system% 1% A ter con iguration o the ru"es i"e! the c"ass i"es! and the $egin and inish scripts! run the chec# script% &his script chec#s the ru"es and c"ass i"es or correctness and $asic synta,% I no ata" errors are ound! the ru"es o# i"e is created rom the ru"es i"e% It is the ru"es %o# i"e that is used $y the c"ient during the insta""ation process% a% I the con iguration ser6er is running the So"aris 8perating (n6ironment! run the o""owing commands:

6%

F cd HconfigurationJdirectory4 F %'chec# I the con iguration ser6er is not running the So"aris 8perating (n6ironment! use the -p option to speci y the path to the So"aris distri$ution% $% 5ount the So"aris distri$ution 9:-485 on the con iguration ser6er (un"ess the con iguration ser6er is a"so the insta"" ser6er and you copied the distri$ution to the insta"" ser6er)% 4un the o""owing commands:

c% F cd 'con igurationEdirectory

F %'chec# -p 'pathEtoEESo"aris distri$ution Creating the rules $ile &he ru"es i"e c"assi ies the machines on your networ#! <ou shou"d ha6e a temp"ate o a ru"es i"e (an actua" i"e ca""ed ru"es) in youM con iguration directory a ter you copy the WumstartEsamp"e directory to your con iguration directory%

&he ru"es i"e is read se)uentia""y% Ac soon as the system inds a match in the ru"es i"e! it s"ops reading the i"e and continues with the 7umpStart process% &he ie"ds are de ined in &a$"e *J-+ on page *J-J+% SyntaB^D matchJ ey matchJvalue B__% B^b machJ ey matchJvalue< = B ,egin class finish &a$"e *J-+ descri$es the ie"ds in the ru"es i"e% &a$"e *J-+ -ie"ds in the ru"es -i"e

-ie"d

:e inition

matchEE#ey

A prede ined #eyword that descri$es an attri$ute o the system $eing insta""ed% (,amp"es o system attri$utes inc"ude physica" memory si>e! dis# si>es! #erne" architecture! and so on% Leywords are used to he"p match a machine to a particu"ar c"ass or insta""ation and are interpreted with respect to the insta"" c"ient%

matchE6a"ue

&he 6a"ue (or range o 6a"ues) se"ected $y the system administrator or the matchE#ey% &he name o the $egin script% A - is used in the $egin ie"d i no $egin script is to $e run during the automatic insta""ation process%

,egin

class

&he name o the c"ass i"e% &he names or the c"ass i"es are chosen $y the system administrator and must o""ow ?2IA i"e name con6entions%

finish .sing the __ Sym,ols

&he name o the inish script (or a dash! -)%

<ou can use se6era" #eywords in a ru"e% &hey are Woined together $y the "ogica" A2: sym$o"! __ % .sing the ^ Sym,ol &he "ogica" 28& ^ sym$o"! i ! used in ront o a #eyword to e,press negation% &hat is! to e,press that the insta"" c"ient's 6a"ue or matchJ ey does not e)ua" the match%6a"ue speci ied in the ru"e%

Comments <ou can use comments in the ru"es i"e% A comment $egins a ter a hash(F) sign% I a "ine starts with a F that the entire "ine is a comment "ine% I a F is ound in the midd"e o^ a "ine! e6erything a ter the R is considered a comment% 2ote - K"an# "ines are a"so a""owed in the ru"es i"e% 0vaila,le Neywords ?se the o""owing #eywords to c"assi y the machines on your networ#% See Appendi, A! R&he 7umpStart ru"es and 9"ass -i"es!R or a detai"ed description o each #eyword% &a$"e *J-J Leywords

Leywords

any arch domainname dis#si>e

hostname insta""ed #arci memsi>e

mode" networ# tota"dis#

*6amples of rules $ile *ntries &he o""owing is an e,amp"e o the ru"es i"e entries% F F &he irst i6e ru"es "isted here demonstrate speci ics: F hostname c"ient" hostEEc"ass setErootEpw

hostname c"ient+ - c"ass%!$asicE%user networ# *O+%0J%J0%0 __ ^ mode" 'S?2;! ?"tra-/E*0' - c"assEnetJ mode" 'S?2;!?"tra-/E*0' - c"assEu"tra comp"eteEu"tra memsi>e 60-O6 __ arch spare - c"assEprogEuser

F F &he o""owing ru"e matches any system% any c"assEgeneric -

In this ru"es i"e e,amp"e: &he irst ru"e matches a machine on a networ# ca""ed c"ient"% &he c"ass i"e is hostEc"ass and the inish script is setErootEpw &he second ru"e matches a machine with host name c"ient+ % &he c"ass i"e is c"assE$asicEuser% &he third ru"e matches a machine on networ# *O+%0J%J0 that is not an ?"tra / or *0% &he c"ass i"e is c"assEnetJM there is no $ag in or inish script% &he ourth ru"e matches a machine that is an ?"tra / or *0% &he c"ass i"e is c"assEu"tra! and there is a inish script ca"ico comp"eteEu"tra% &he i th ru"e matches a machine with memory $etween 6-* and O6 5$ytes and a SPA49 architecture% &he c"ass i"e is c"ass%EprogEuser% &he si,th ru"e matches any machine% &he c"ass i"e is c"assEgeneric and there is no $egin or inish script Creating the Class "iles A c"ass i"e! which is speci ied in a ru"e! determines how the insta""ation is per ormed on the c"ient and what so tware is insta""ed% ?n"i#e the ru"es i"e! c"ass i"es do not ha6e re)uired names Howe6er! Wust as or the ru"es i"e! there are prede ined #eywords that re)uire certain parameters% >eywords and Arguments &he o""owing #eywords and argument parameters arc used in a c"ass i"e to speci y how the insta""ation is to $e done and what so tware to insta""% 4e er to Appendi,% A! R&he 7umpStart ru"es and 9"ass -i"es! or a detai"ed description o each o the #eywords and parameters "isted in &a$"e *J-0% &a$"e *J-0 Leywords and Argument Parameters or c"ass Pi"es

Parameters $e(words insta""Etype systemEtype partitioning c"uster clusterJname initia"Einsta"" C upgrade standa"one C data"ess C ser6er de au"t C e,isting C e,p"icit add C de"ete

pac#age pac ageJname usedis# dontuse "oca"e numEc"ients c"ientEswap c"ientEarch i"esys

add C de"ete

dis#Ename dis#Ename "oca"eEname num$er si>e #erne"Earchitecture de6ice si>e i"eEsystem optiona"Eparameters

E0amples of Class Files &his section contains e,amp"es o c"ass i"es% (,amp"e * F Se"ect so tware or programmers insta""Etype systemEtype partitioning i"esys i"esys c"uster pac#age pac#age pac#age initia"Einsta"" standa"one de au"t any *00 swap . speci y si>e o swap

ser6er":'usr'share'man - 'usr'share'man ro! so t S?2;9prog S?2;man de"ete

S?2;ypr % add S?2;ypu add

&his c"ass i"e insta""s a system or programmers% &he partitioning is determined $y the so tware to $e insta""ed and the swap si>e is set to *00 5$ytes% &he con iguration c"uster S?2;9prog contains

pac#ages or de6e"oping so tware in the So"aris 8perating (n6ironment% &he man pages rom this c"uster are de"eted $ecause they are mounted rom ser6er"! a ser6er on the networ#% &he 2IS ser6er pac#ages! S?2;ypr and S?2;ypu are added% &he "ist o possi$"e entries or the c"uster #eyword as it re"ates to the interacti6e insta""ation names are shown in &a$"e *J-/% &a$"e *J-/ Possi$"e (ntries or the c"uster Leyword Interacti6e Insta""ation 2ame 9ore ?ser :e6e"oper (ntire :istri$ution (ntire :istri$ution p"us 8(5 (,amp"e + insta""Etype systemEtype partitioning i"esys i"esys i"esys i"esys i"esys c"uster
pac#age

9"uster -i"e 2ame S72;9rec S?2;9user S?2;9prcg S?2;9a"" S?2;9A a""

init%ia"%Einsta"" standa"one e,p"icit c0tJd0s0 c0tJd0s" c:0tJd0s6 c0tJd0s1 c0t"d0s1 S?2;9a""


S?2;man de"ete

*/0 *+. .00 ree a""

' swap 'usr '6ar 'opt

2ote -&his c"ass i"e is intended or an end-user with a sma"" dis# who does not need the manua" pages pac#age! S?2;man Appendi, A o the Solaris System Installation and Configuration 7uide contains a description o the c"usters and pac#ages a6ai"a$"e on the So"aris so tware distri$ution 9:-485% Testing the Configuration with the p insta"" Command &he p insta"" command chec#s the semantics o your c"ass i"es% it tests what happens during the automatic insta""ation process! without actua""y per orming an insta""ation%

&his command is success u" on"y i the con iguration and insta"" ser6er are the same system or the two systems are $oth running the same 6ersion o the So"aris 8perating (n6ironment% &unning the p insta"" Command4 &o run the p ins ta"" command! per orm the o""owing steps: *% I you ha6e copied the entire 9:-485 So"aris 8perating (n6ironment distri$ution to the "oca" dis#! run the p insta"" command (optiona")% Syntax F 'usr's$in'insta""%d'p insta"" -: C -d dis Jfile B B-c pathEtoEdistrD c"assE i"eEname Options -: Per orms a dry run insta""ation on the system dis#s using the c"ass i"e c"assE i"eEname% H disp"ays the resu"ting dis# con iguration and so tware se"ected! $ut no in ormation is written to the dis#s% -d &ests the c"assE i"eEname against the dis# con iguration descri$ed in the i"e dis Jfile4 &he dis#E i"e i"e contains output rom the running o the prt6toc(*5) command on 6arious dis#s% &his gi6es you the a$i"ity to test your c"ass i"e on 6arious dis# con igurations -c Speci ies the path to the So"aris 8perating (n6ironment distri$ution

p insta"" E-amples &his section presents three e,amp"es o the p insta"" command to test the de au"t c"ass i"e hostEc"ass and inc"udes some o the system output% (,amp"e * &esting the c"ass i"e! hostEc"ass! against the So"aris 8perating (n6ironment insta""ation image "ocated on the 9:485: F cd 'e,port'con ig

F 'usr's$in'insta""%d'p insta"" -: -c 'cdrom'cdrom0's0 progEc"ass Parsing pro i"e 0: *: +: J: 0: /: 6: 1: .: O: insta""Etype "oca"e systemEtype partitioning c"uster c"uster c"uster c"uster c"uster i"esys initia"Einsta"" enE?S standa"one de au"t S?2;9user S?2;9own de"ete de"ete de"ete de"ete 'usr'openwin ro!intr

S?2;9t"t# S?2;9,g" S?2;9,i"

sr6r: 'usr'openwin

Processing de au"t "oca"es Processing pro i"e - Se"ecting c"uster (S?2;9user) - :ese"ecting c"uster (S?29own) - :ese"ecting c"uster (S?2;9t"t#) !output truncated@ B*ample 5 &esting a dis# i"e! 0@Kdis# i"e and the hostEc"ass i"e! against the So"aris insta""ation image "ocated on the 9:485:2ote -&he 0@Kdis# i"e is created rom the output o the prt6toc command run on a 0-@$yte dis#% &his dis# i"e can $e used to create standard dis# partitioning on 7umpStart c"ients with 0-@$y"e dis#s% F cd 'e,port'con ig F'usr's$in'insta""%d'p insta"" -d 0@Kdis# -c 'cdrcm'cdrcrn0's0 progEc"ass S4!Some output delded@ %%%%%%% 3eri ying dis# con iguration 3eri ying space a""ocation - &ota" so tware si>e: JOO%6+ 5$ytes

Preparing system or So"aris insta"" 9on iguring dis# (c0t0d0) - 9reating So"aris dis# "a$e" (3&89) s"ice: s"ice: 0'' ( * ( + J 0 / 6 1 ( ( ( ( ( ( ') swap) tag: tag: o6er"ap) ) ) ) ) 'e,port'home) 0,+ 0,J tag: tag: tag: tag-% tag: tag: "ag: "ag: 0,/ 0,0 0,0 0,0 0,0 0,. 0,0 0," "ag: "ag: "ag: 0,0 0,0 0,0

s"ice: s"ice: s"ice: s"ice: s"ice: s"ice:

"ag: 0,0 "ag: 0,0

"ag: 0,0

9reating and chec#ing ?-S i"e systems - 9reating ' (c0t0d0s0) - 9reating 'e,port'home (c0t0d0s1) !autpul truncated@

(,amp"e J &esting an insta"" image that has $een copied rom the 9:-485 So"aris so tware distri$ution "o the "oca" 'e,port'insta"" directory against the hostEc"ass i"e: F cd 'e,port'con ig F 'usr's$in'insta""%d'p insta"" -: -c 'e,port'insta"" hostEc"ass SS!some output deleted@ SS S?2;t"eu% % % %done% *%.* 5$ytes remaining% S?2;namdt % % % done % *%.0 L$ytes regaining% S?2;namos % % % done % *%60 5$ytes remaining% S?2;namow % % % done % *%/+ 5$ytes remaining% 9omp"eted so tware insta""ation So"aris so tware insta""ation succeeded So"aris pac#age u""y insta""ed S?2;,wrt, S?2;,wrt" S?2;wsr S?2;w$api Gsome output omittedH 9ustomi>ing system de6ices - Physica" de6ices ('de6ices) - Iogica" de6ices ('de6) Insta""ing $oot in ormation - Insta""ing $oot $"oc#s fc0t0d0s0) Insta""ation "og "ocation - 'a'6ar'sadm'system'"ogs'insta""E"og ($e ore re$oot) - '6ar'sadm'system'"ogs'insta""E"og (a ter re$oot)

5ounting remaining -i"e systems - 5ounting 'a'e,port'home ('de6'ds#'c0t0d0s1 ) Insta""ation comp"ete

&est run comp"ete% (,it status 0% .sing insta""Escripts ?se addEinsta""Ec"ient and iroEinsta""Ec"ient to add or remo6e c"ients to the insta"" ser6er or $oot ser6ers that you must set up to support the 7umpStart insta""ation! $ecause these commands update the 'etc'$ootparams i"e% &unning the add insta"" c"ient 'Script &he addEinsta""Ec"ient command must $e run rom the insta"" ser6er's So"aris insta""ation image (a mounted So"aris 8perating (n6ironment 9:-485 or a So"aris 8perating (n6ironment 9:-485 copied to dis#) or the $oot ser6er's $oot directory (i a $oot ser6er is con igured)% &he So"aris insta""ation image or the $oot directory must $e the same So"aris 8perating (n6ironment re"ease that you want insta""ed on the c"ient% SyntaF %'addEinsta""Ec"ient --e ethernetEaddr -i ipEEaddr f -s installJsvr %-'distr -c con igEs6r: 'con igEdir f -p sysidJconfigJsvr:Hsysid4JconfigJdir clientJname clientJJarch -e Speci ies the (thernet address o the insta"" c"ient and is necessary i the c"ient is not de ined in the name ser6ice% -i -s Speci ies the IP address o the insta"" c"ient and is necessary i the c"ient is not de ined in the name ser6ice% Speci ies the name o the insta"" ser6er and the path to the

So"aris 8perating (n6ironment distri$ution% &his option is necessary i the c"ient is $eing added to a $oot ser6er%' -c -p Speci ies the con iguration ser6er and (he path to the con iguration directory% Speci ies the con iguration ser6er and the path to the sysidc g

i"e% &his option is a6ai"a$"e on So"aris 8perating (n6ironment and "ater distri$utions% <ou can app"y the o""owing associations to the e,amp"es o theaddEinsta""Ec"ient command arguments: Insta"" ser6er :istri$ution 9on iguration ser6er 9on iguration directory Koot ser6er Insta"" c"ient 9"ient architecture installJsvr copied to 'e,port'insta"" configJsvr 'e,port'con ig ,ootJsvr c"ientEname clientJarch

'dding a *lient Using a Solaris *D-72?. &mage on the 5ocal Disk

&o create a 7umpStart c"ient rom a ser6er that has the So"aris so tware copied to the "oca" dis# (see RSetting ?p an Insta"" Ser6erR on page *J-+6)! per orm the o""owing steps: *% 9hange the directory to the "ocation o the insta""ed So"aris 8perating (n6ironment image:

F cd 'e,port'insta""'So"arisE0'&oo"s% +% 9reate the 7umpStart c"ient using the addEinsta""EEc"ient script ound in the "oca" directory% &he o""owing command creates a sun0u architecture c"ient named c"ient" using ser6er" as its insta"" and con iguration ser6er: F 'addEEinsta""Ec"ient -s ser6er":'e,port'insta"" f /c eer6cr": 'e,port'con ig f -p ser6er^:'e,port'con ig c"ient" sun0u 2ote - &he "ocation o the So"aris so tware insta""ation i"es (-s option) in the command indicate the 'e,port'insta"" directory% &he "ocation o the 7umpStart con iguration i"es (!-c option) on ser6er" in the pre6ious command indicate the 'e,port'com it directory% :iscussion o the 7umpstart con iguration i"es is su$se)uent to this section% 0dding a Client .sing a Solaris CD/&O' Image from the 9:-485 &o create a 7umpstart c"ient rom a ser6er that does not ha6e the So"aris so tware 9:-485 Image copied "o the dis#! per orm the o""owing steps: *% Insert the So"aris So tware Insta""ation 9:-485 in the dri6e% &he 6oid daemon automatica""y mounts the 9:-485% +% 9hange the directory to the "ocation o the addEinsta""Ec"ient% script on the So"aris 9:-485 * o +:

F cd 'cdrocti'cdrcm8's8'So"arisE*0'&oo"@ G. *reate the MumpStart client using the add/install/client. script. found in the director:K. The following command created a sunQu architecture client named client using the Solaris software *D-72? for its installation and a local directory 8;export;config: on ser4er for the sysidcfg and other configuration files+ F % 'addEinsta""Ec"ient -c ser6er" :'e,port'con ig f -p ser6er":'e,port'con ig c"ient" sun0u 2ote - Additiona""y! running the pre6ious addEinsta""Ec"ient command creates an entry in the 'etc'd s'd sta$ i"e to share the 'cdrom directory to the networ# or mount $y the 7umpStart c"ient% Insta""ation so tware is o$tained rom the media% The H etc '$ootparams "ile Content &he 'etc'$ootparams i"e is updated each time the addEinsta""Ec"ient script is run% &he resu"ting content pro6ides the ser6er name(s) and the directory "ocations or the insta""ation and con iguration i"es% $ontent "ith 5ocally A%aila le Installation Piles A ser6er named ser6er* with So"aris so tware i"es copied to the "oca" dis# (sec RAdding a 9"ient ?sing a So"aris 9:485 Image on the Ioca" :is#R on page *J-0J) and shared to the networ# has a c"ient^ 'etc'$ootparams entry as o""ows: c"ient^ rootNser6er":'e,port'insta""'So"aris%E.'&oo"s'Koot insta""Nser6er":'e,port'insta"" $oot type N: in

sysidEcon igNser6er": 'e,port'cpri ig insta""Econ igNser6er": 'e,port'con ig rootoptsN:rsi>eNJ+16. Content from the CDJ&O' Installation "iles ser6er named ser6er" with So"aris so tware i"es shared to the networ# rom the 'cdrom directory (see RAdding a 9"ient ?sing a So"aris 9:-485 Image -rom the 9:-485R on page *J-00) has a c"ient" 'etc'$ootparams entry as o""ows: c"ient" rootNser6er":'cdrom'So"E*0Esparc's0'So"arisE*0'&oo"s'KootM insta""Nser6er": 'cdrom'So"E*0Esparc's8 $oottypeN : in sysidEcon igNser6er": 'e,port'con ig insta""Econ igNser6er": 'e,port'con ig rootoptsN:rsi>eNJ+16. The 'etc'd s'd sta$ "ile Content &he 'etc'd s'd sta$ i"e is popu"ated with the appropriate entry or either the "oca" i"e system or the 9:-485! depending on the directory "ocation rom which the acJdEinsta""E%c"ient command is run% I the "ocation o (he she"" was 'cdrom'cdrom8's8'So"aarisE.'&oo"s! the entry in the 'etc'd s'd sta$ wou"d $e updated with a share command or the 9:-485% 9on6erse"y! i the "ocation o the she"" was 'e,port'insta""'So"arisE*0'&oo"s (or some other ar$itrary insta""ation directory "ocation)! the 'etc'd s'd sta$ wou"d $e updated with a share command or that "oca" directory% &eferencing the Solaris Software from Ioca""y 0vaila,le Installation "iles &he o""owing 'etc'd s'd sta$ i"e entry re "ects the shared directory ('e,port'insta"") o insta""ation i"es rom a "oca" dis#: share -- n s -o ro! anonN0 'e,port'insta""

&eferencing the Solaris Software from CD/&O' Installation "iles &he o""owing 'etc'd s'd sta$ i"e entry re "ects the shared directory o insta""ation i"es rom the 9:-485: share -- n s -o ro!anon-0 'cdrom'So"E*0Esparc's0 2ote - A"" directory entries "isted in the 'etc'$ootparams must $e shared i"e systems%

&a$"e *J-6 7umpStart 9apa$i"ities and Iimitations (9ontinued)

9apa$i"ities Patches 9an $e app"ied automatica""y%

Iimitations 2one%

9on igurations supported

Insta""s: Ser6ers Standa"one systems :ata"ess systems

:oes not insta"" dis#"ess c"ients

8perations hand"ed $y de au"t

Partitions dis#s and si>es o i"e systems%

4e)uires more administrati6e stepsM or e,amp"e! the script setErootEpw! which is "ocated in the WumpstartEsamp"e directory is the script needed to assign root password%

Assigns host name and 'name ser6ice domain (2IST!2IS! or "oca" i"es)%

4e)uires IP addresses to $e manua""y a""ocated $y the administrator%

2one

8peration hand"ed $y additiona" scripts

(na$"es ar$itrary sitespeci ic customi>ation! such as: setting up a second (thernet port on a machine and ma#ing it a routerM adding additiona" non-root users to a "oca" system! setting up print ser6ersM adding #nown print ser6ers to a print c"ientM and adding entries to the automount map%

4e)uires a $oot ser6er on the "oca" networ# or su$net%

2etwor# con iguration' routers

A""ows insta"" ser6ers to $e p"aced on the opposite side o router%

&a$"e *J-6 WumpStart 9apa$i"ities and Iimitations (9ontinued)

9apa$i"ities 9oncurrent use'$atch mode Has no so tware "imitation on the num$er o c"ients that can $e insta""ed concurrent"y%

Iimitations Has physica" "imitations that inc"ude:

&he insta"" ser6er is more responsi6e i its copy o the So"aris 8perating (n6ironment distri$ution is on dis#! rather than on the 9:-485 de6ice! which is s"ow or random accesses%

&he num$er o c"ients concurrent"y doing an insta""ation a"so negati6e"y a ects per ormance%

tion%

Low Latenc( Transport 8LLT9


39S uses pri6ate networ# communications $etween c"uster nodes or c"uster maintenance%

-igh3Availabilit( &aemon 8-A&9


[HA:c is the main 39S daemon running on each system% It is responsi$"e or $ui"ding the running c"uster con iguration rom the con iguration i"es! distri$uting the in ormation when new nodes Woin the c"uster! responding to operator input and ta#ing correcti6e action when something ai"s%

Chec'ing LLT
's$in'""tcon ig 's$in'""tcon ig -a "ist 's$in'""tstat -n66 ;i"" return [II& 4unningc i 8L :isp"ays networ# "in#s 3er$ose disp"ay o current status o peer systems% ?se u" in determining a"" systems in c"uster are communicating%

%tarting LLT
's$in'""tcon ig -c

%topping LLT
's$in'""tcon ig -?

LLT Configuration Files


'etc'""tta$ 'etc'""thosts 'etc'34&S6cs'con 'sysname

(this is an optiona" i"e

-ow to Chec' :had; and :hashadow; processes


ps -ef | egrep "had | hashadow" | grep -v grep

-ow to start the :had; process

*%

/opt/VRTSvcs/bin/hastart [-force] [-stale] (/stale forces the node to read the main4cf from a node already running in the cluster)

To start VC% when all s(stems are in A&M !<"A T


*% /opt/VRTSvcs/bin/hasys -force <System> ('ust ,e done on each node in cluster)

-ow to stop the :had; process


*% +% J%
/opt/VRTSvcs/bin/hastop -local [-force | -evacuate]

/opt/VRTSvcs/bin/hastop -sys <System> [-force | -evacuate]

/opt/VRTSvcs/bin/hastop -all [-force]

$. Check ,or online resources an! take o,,line 'opt'34&S6cs'$in'hagrp -resources GSer6ice @roupH 'opt'34&S6cs'$in'hares -o "ine G&esourceH -sys GSystemH

5. Clear ,aulte! resources 'opt'34&S6cs'$in'hares -c"ear G&esourceH -sys GSystemH

o clear resources on all no!es in cluster'

'opt'34&S6cs'$in'hares -c"ear G4esourceH 3. Clear resources in /6AIN#W/I state 'opt'34&S6cs'$in'hagrp -c"earadminwait GService 7roupH -sys GSystemH

<. Dailover Service @roup

'opt'34&S6cs'$in'hagrp -switch GService 7roupH -to GSystemH

0. Check status o, cluster to see i, problem is resolve! 'opt'34&S6cs'$in'hastatus -sum Ceri,& that the Service @roup or 8esource is Bnable!'

Service Group

/opt/VRTSvcs/bin/hagrp -display <Service Group> Enabled

-attribute

Resource

/opt/VRTSvcs/bin/hares -display <Resource> -attribute Enabled

(,amp"e: I (na$"ed! the 3a"ue co"umn wi"" $e set to [*c:

hagrp -display orseblt3-sg -attribute Enabled #Group orseblt3-sg orseblt3-sg ttribute Enabled Enabled Syste! bos"3"#$ bos"3"#& Value % %

hares -display 'avigator -attribute Enabled #Resource 'avigator ttribute Enabled Syste! global Value %

Check the status o, the Service @roup'

/opt/VRTSvcs/bin/hagrp -state <Service Group>

I, Service @roup is not ON9INB: then go to CCS($0500 Service @roup or 8esource has Daulte! an! troubleshoot.

I, Service @roup is Not Bnable!: then enable it'

/opt/VRTSvcs/bin/hagrp -enable <Service Group> -sys <System> *% I, 8esource is Not Bnable!: then Bnable it /opt/VRTSvcs/bin/hacon( )!a*er+ /opt/VRTSvcs/bin/hares -!odi(y <Resource> Enabled %

/opt/VRTSvcs/bin/hacon( -du!p -!a*ero

+% Ceri,& the Service @roup is ON9INB /opt/VRTSvcs/bin/hastatus )su!

39S-*0+0/ (2ode dFQ) changed state rom 4?22I2@ to -A?I&(: $. Check the state o, the Cluster: No!es an! Service @roups on each no!e in the cluster. I, &ou receive an! error that &ou cannot run comman!s on a no!e: go to step 5. &o identi y the cross re erence rom the [2ode (F)c to the hostname: cat /etc/llthosts /opt/VRTSvcs/bin/haclus -state /opt/VRTSvcs/bin/haclus -status

/opt/VRTSvcs/bin/hastatus -su! , !ore 5. Ceri,& CCS is running ps -ef | egrep "had|hashadow" | grep -v grep I [hadc and [hashado+c processes are not ound! then proceed to step J% I [hadc restarted! then 6eri y the time stamp o the [hadc process to con irm it restarted% 3. Start CCS =Consult CS3 be,ore !oing this> /opt/VRTSvcs/bin/hastart -(orce <System> <. Ceri,& that the cluster is now running. /opt/VRTSvcs/bin/hastatus -su! , !ore /opt/VRTSvcs/bin/haclus -state 9hec# or -48V(2 ser6ice groups (hastatus -sum) to see i a support person is doing maintenance wor# on the ser6ice group%

/opt/VRTSvcs/bin/hastatus -su!

E-a!ple output belo+.

-- GR/01S 2R/3E' -- Group

testrp#%

-- RES/0R4ES 56S 78E5 ,all the resources for the "roup will be Disabled-- Group Type Resource

testrp#%

pplication

testrp#%:7;4:<; grep =>-(ree?e=

9 testrp#% 4rontab testrp#%:crontab /var/VRTSvcs/log/engine: @log , grep =AAAA/;;/55=

B##C/#D/%D %".3&.%B V4S 6'2/ V-%"-%-C#%3C 0ser root (ired co!!and. hagrp -(ree?e testrp#% (ro! localhost

I, a @roup is D8O^BN: then imme!iatel& call the CS/"/pplication Support"6F/ ,or this @roup to ,in! out WI] it is D8O^BN $. I, the Service @roup is NO ON9INB an&where: per,orm the ,ollowing: otherwise skip to step <. a% Check the status o, the 8esources in the D/)9 B6 Service @roup
(or res in E/opt/VRTSvcs/bin/hagrp -resources <service group>Edo /opt/VRTSvcs/bin/hares -state Fres done

$% Clear an& ,aulte! 8esources in the D/)9 B6 Service @roup 'opt'34&S6cs'$in'hares -c"ear G&esourceH c% Clear the D/)9 B6 Service @roup 'opt'34&S6cs'$in'hagrp -c"ear GService 7roupH d% Fring the Service @roup ON9INB 'opt'34&S6cs'$in'hagrp -on"ine GService 7roupH -sys GSystemH I, Service @roup will not ON9INB: check the ,ollowing' a% Check /utoStart M /utoStart9ist attributes 'opt'34&S6cs'$in'hagrp -disp"ay GService 7roupH C grep -i auto Check /uto6isable! attribute&rue N *! -a"se N 0 I [&ruec! 39S does not #now the status o the Ser6ice @roup o 39S engine is not running on a node! 6eri y [hadc is running o &he Ser6ice @roup is not pro$ed in the SystemIist attri$ute! run the o""owing command to ena$"e:
/opt/VRTSvcs/bin/hagrp -autoenable <Service Group> -sys <System>

c% 8eprobe an& unprobe! 8esources 'opt'34&S6cs'$in'hares -pro$e !&esource@ -sys !System@ d% I, Service @roup Dro1en: then )n,ree1e =Nee! to veri,& with the P/C owner an!"or CS/ be,ore !oing this. Aa& be ,ro1en on purpose> 'opt'34&S6cs'$in'hagrp -un ree>e GService 7roupH B-persistentD

5. I, the Service @roup is ON9INB: but ,aulte! someone in the cluster: clear it. 'opt'34&S6cs'$in'hagrp -c"ear GService 7roupH 3. Contact the /pplication Support @roup an!"or 6F/ to in,orm them o, the ,ault. his is important i, &ou ha! to bring the @roup or 8esource back ON9INB.

&o ind a"" nodes in the c"uster:


/opt/VRTSvcs/bin/hasys -list

9hec# status o nets6cE00 ser6ice group:


/opt/VRTSvcs/bin/hagrp -state netsvc_00

A"" resources shou"d $e 82II2( on a"" nodes in the c"uster:


/opt/VRTSvcs/bin/hagrp -state netsvc_00 #Group netsvc_00 netsvc_00 netsvc_00 Attribute State State State System jrspa0 t jrspa* t jrspa+ t Value !"##$%&'!#A($T')! !"&$%&'! !"&$%&'!

9"ear -A?I&(: state:


/opt/VRTSvcs/bin/hagrp -clear netsvc_00

*% Check to see i, the Service @roup is online on an& other s&stem. 'opt'34&S6cs'$in'hagrp -state GService 7roupH A"so chec# or other 39S a"arms%

+% I, the Service @roup is NO ON9INB an&where: then !etermine 8oot Cause o, Service @roup ,ailure. J% /,ter ,in!ing the source o, the ,ailure: check the status o, the 8esources.
(or res in E/opt/VRTSvcs/bin/hagrp -resources <service group>E do /opt/VRTSvcs/bin/hares -state Fres

done

/ttempt to bring the Service @roup online. 'opt'34&S6cs'$in'hagrp -on"ine GService 7roupH -sys GSystemH

Probe an& resources not coming online in a timel& manner. 'opt'34&S6cs'$in'hares -pro$e G&esource@ /sys !System@

Check status o, Service @roup. 'opt'34&S6cs'$in'hagrp -state GSer6ice @roupH

0% I, the Service @roup will not come online: then &ou will nee! to troubleshoot the resources within the group. It is impossible to !ocument ever& case that coul! possibl& occur. $. 9hec# 4esource :ependencies to 6eri y they are "ogica"% -or e,amp"e! a 5ount resource must depend on a 3o"ume @roup resource% 'opt'34&S6cs'$in'hares -dep G&esource@ *% 6etermine the ,ile s&stem that ,aile! to unmount b& looking at the error string in the case: or b& viewing the "var"C8 Svcs"log"engine#/.log
grep error message from alarm /var/VRTSvcs/log/engine_A.log

+% 6etermine process that is preventing ,ile s&stem ,rom unmounting


fuser -cku <file system>

J% I, the Service @roup or 8esource is ,aulte! or o,,line: kill the process ,rom previous step
fuser -ck <mount point>

0% 6etermine the 8esource ,or ,ile s&stem that ,aile! to unmount


/opt/VRTSvcs/bin/hares -display -type Mount|grep MountPoint|grep <file system>

/% Clear ,aulte! 8esource


/opt/VRTSvcs/bin/hares -clear <Resource>

6%

ake 8esource O,,line

/opt/VRTSvcs/bin/hares -offline <Resource> -sys <System>

1% Bnable the 8esource


/opt/VRTSvcs/bin/hares -modify <Resource> Enabled 1

.% Start the Service @roup


/opt/VRTS/bin/hagrp -online <Service Group> -sys <System>

*% Service @roup is ,ro1en 'opt'34&S6cs'$in'hagrp -disp"ay GService 7roupH C grep -i ro>en * means the resource is ro>en! 0 means it is not ro>en%
hagrp -,isplay cicm-p0*!grep -i .ro/en cicm-p0* cicm-p0* #ro/en T#ro/en global global 0 - 0ersistent 0 - &on0ersist

'opt'34&S6cs'$in'hagrp -un ree>e GService 7roupH

+% Service @roup is not o,,line elsewhere 'opt'34&S6cs'$in'hagrp -disp"ay GService 7roupH 'opt'34&S6cs'$in'hagrp -o "ine GSer6ice @roupH -sys GSystemH J% / resource is ,aulte! 'opt'34&S6cs'$in'hagrp -disp"ay GService 7roupH 'opt'34&S6cs'$in'hares -c"ear G&esourceH -sys GSystemH

VC%3=>??= @ Cannot bring group


/uto8estart attribute is not seCheck the /uto8estart attribute: !e,ault is K $ =enable!> 'opt'34&S6cs'$in'hagrp -disp"ay GService 7roupH C grep Auto4estart $% I, /uto8estart attribute is 0: veri,& the Service @roup is not ON9INB or P/8 I/9RON9INB on an& s&stem where CCS has set /uto6isable! attribute to $. O,,line an& Online 8esources in the Service @roup 'opt'34&S6cs'$in'hagrp -disp"ay GService 7roupH C grep Auto:isa$"ed 'opt'34&S6cs'$in'hares -o "ine G&esourceH -sys GSystemH

a%

Clear the /uto6isable! attribute ,or each s&stem 'opt'34&S6cs'$in'hagrp -autoena$"e !Service 7roup@ -sys GSystem@

S /9B#/6AIN#W/I

*% Cali!ate the con,iguration ,ile "etc"C8 Svcs"con,"con,ig"main.c,: on all s&stems in the cluster that are in S /9B#/6AIN#W/I state. cd /etc/VRTSvcs/conf/config /opt/VRTSvcs/bin/hac. -veri.y 1 23-&otice the 3space4 an, 15 9orrect any errors disp"ayed rom 6eri y 4e6iew main%c or proper 4esource and Ser6ice @roup de initions +% Bnter the ,ollowing comman! on the s&stem with the correct con,iguration to ,orce start CCS. /opt/VRTSvcs/bin/hasys -force <System> i(con(ig -a

&o identi y the primary'secondary inter aces! issue this 39S command e,act"y: su hares -display -type ;ulti'647 -attribute 5evice E-a!ple /utput.
#Resource bosg:nic:## bosg:nic:## bosg:nic:## bosg:nic:## bosg:nic:## ttribute 5evice 5evice 5evice 5evice 5evice Syste! Grspa#3t Grspa%3t GrspaB3t Grspa33t GrspaH3t Value en# D#@%"&@BH"@$H en" D#@%"&@BH"@$3 en# D#@%"&@BH"@$" en" D#@%"&@BH"@$C en# D#@%"&@BH"@$& en" D#@%"&@BH"@$$ enB D#@%"&@BH"@&# en" D#@%"&@BH"@$D enB D#@%"&@BH"@&B en" D#@%"&@BH"@&%

A&M ! %TRAT .!

/ction
Administering @roup

Comman! 9ine hagrp -clear|-flush|-switch group_name -sys

Ser6ices (na$"e a Ser6ice @roup (na$"e a"" 4esources in a Ser6ice @roup :isa$"e a Ser6ice @roup :isa$"e a"" 4esources in a Ser6ice @roup 9"ear au"ted! nonpersistent resources in a Ser6ice @roup 9"ear resources in A:5I2E;AI& state in a Ser6ice @roup Switch Ser6ice @roup rom one System to another Administering 4esources Prompt a 4esourceQs agent to immediate"y monitor the 4esource on a System 9"ear a 4esource Administering Agents

system_name hagrp -enable <Service Group> -sys <System> hagrp -enableresources <Service Group>

hagrp -disable <Service Group> -sys <System> hagrp -disableresources <Service Group>

hagrp -clear <Service Group> -sys <System>

hagrp -clearadminwait <Service Group> -sys <System>

hagrp -switch <Service Group> -to <System>

hares -clear|-probe res_name -sys system_name hares -probe <Resource> -sys <System>

hares -clear <Resource> -sys <System> haagent -list haagent -display agent_name -sys system_name

3eri y 9on iguration

hacf -verify

Pra hakara70:62:?1 A#8:


# v6,mpa,m listenclosure all '&7$R_&A8' '&7$R_T90' '&7$R_S&" STAT(S ARRA9_T90' $(&_7"(&T ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::: ,is; )is; )%S<S 7"&&'7T') )is; = hitachi_vsp0 >itachi_VS0 ??@*A 7"&&'7T') A/A @? #

Pra hakara70:60:2. A#8: # vxdmpadm getdmpnode enclosure=hitachi_vsp0 NAME STATE ENCL !T"#E #AT$S EN%L &S%L ENCL !NAME =============================================== =============================== c't(00)0E*0+)0(),0)d0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0

c't(00)0E*0+)0(),0)d/s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d(s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d)s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d's, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d*s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d++s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+,s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+.s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+/s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+(s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+)s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+'s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+*s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d+0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,+s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,,s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,.s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,/s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,(s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,)s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,'s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,*s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d,0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.+s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.,s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d..s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d./s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.(s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.)s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.'s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.*s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d.0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d/0s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d/+s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d/,s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d/.s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d//s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d/(s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d/)s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0 c't(00)0E*0+)0(),0)d/'s, ENA%LE& $itachi_-S# , , 0 hitachi_vsp0

c't(00)0E*0+)0(),0)d/*s, c't(00)0E*0+)0(),0)d/0s, c't(00)0E*0+)0(),0)d(0s, c't(00)0E*0+)0(),0)d(+s, c't(00)0E*0+)0(),0)d(,s, c't(00)0E*0+)0(),0)d(.s, c't(00)0E*0+)0(),0)d(/s, c't(00)0E*0+)0(),0)d((s, c't(00)0E*0+)0(),0)d()s, c't(00)0E*0+)0(),0)d('s, c't(00)0E*0+)0(),0)d(*s, c't(00)0E*0+)0(),0)d(0s, c't(00)0E*0+)0(),0)d)0s, c't(00)0E*0+)0(),0)d)+s, c't(00)0E*0+)0(),0)d),s, c't(00)0E*0+)0(),0)d).s, c't(00)0E*0+)0(),0)d)/s, c't(00)0E*0+)0(),0)d)(s, c't(00)0E*0+)0(),0)d))s, c't(00)0E*0+)0(),0)d)'s, c't(00)0E*0+)0(),0)d)*s, c't(00)0E*0+)0(),0)d)0s, c't(00)0E*0+)0(),0)d'0s, c't(00)0E*0+)0(),0)d'+s, c't(00)0E*0+)0(),0)d',s, c't(00)0E*0+)0(),0)d'.s, c't(00)0E*0+)0(),0)d'/s, c't(00)0E*0+)0(),0)d'(s, c't(00)0E*0+)0(),0)d')s, c't(00)0E*0+)0(),0)d''s, c't(00)0E*0+)0(),0)d'*s, c't(00)0E*0+)0(),0)d'0s, c't(00)0E*0+)0(),0)d*0s, c't(00)0E*0+)0(),0)d*+s, c't(00)0E*0+)0(),0)d*,s, c't(00)0E*0+)0(),0)d*.s, c't(00)0E*0+)0(),0)d*/s, c't(00)0E*0+)0(),0)d*(s, c't(00)0E*0+)0(),0)d*)s, c't(00)0E*0+)0(),0)d*'s, c't(00)0E*0+)0(),0)d**s, c't(00)0E*0+)0(),0)d*0s, c't(00)0E*0+)0(),0)d00s, c't(00)0E*0+)0(),0)d0+s,

ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE& ENA%LE&

$itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S#

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0

c't(00)0E*0+)0(),0)d0,s, c't(00)0E*0+)0(),0)d0.s, c't(00)0E*0+)0(),0)d0/s, c't(00)0E*0+)0(),0)d0(s, # Pra hakara70:60:0? A#8:

ENA%LE& ENA%LE& ENA%LE& ENA%LE&

$itachi_-S# $itachi_-S# $itachi_-S# $itachi_-S#

, , , ,

, , , ,

0 0 0 0

hitachi_vsp0 hitachi_vsp0 hitachi_vsp0 hitachi_vsp0

# v6,mpa,m get,mpno,e enclosure:hitachi_vsp0 &A8' STAT' '&7$R-T90' 0AT>S '&B$ )SB$ '&7$R-&A8' :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: cCt 00?0'=0*?0 ?+0?,0s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,+s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,Ds+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,As+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?, s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,?s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,Cs+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,=s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,@s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*0s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,**s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*+s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*Ds+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*As+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,* s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*?s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*Cs+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*=s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,*@s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,+0s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,+*s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0 cCt 00?0'=0*?0 ?+0?,++s+ '&AB$') >itachi_VS0 + + 0 hitachi_vsp0

cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0

?+0?,+Ds+ '&AB$') ?+0?,+As+ '&AB$') ?+0?,+ s+ '&AB$') ?+0?,+?s+ '&AB$') ?+0?,+Cs+ '&AB$') ?+0?,+=s+ '&AB$') ?+0?,+@s+ '&AB$') ?+0?,D0s+ '&AB$') ?+0?,D*s+ '&AB$') ?+0?,D+s+ '&AB$') ?+0?,DDs+ '&AB$') ?+0?,DAs+ '&AB$') ?+0?,D s+ '&AB$') ?+0?,D?s+ '&AB$') ?+0?,DCs+ '&AB$') ?+0?,D=s+ '&AB$') ?+0?,D@s+ '&AB$') ?+0?,A0s+ '&AB$') ?+0?,A*s+ '&AB$') ?+0?,A+s+ '&AB$') ?+0?,ADs+ '&AB$') ?+0?,AAs+ '&AB$') ?+0?,A s+ '&AB$') ?+0?,A?s+ '&AB$') ?+0?,ACs+ '&AB$') ?+0?,A=s+ '&AB$') ?+0?,A@s+ '&AB$') ?+0?, 0s+ '&AB$')

>itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0

?+0?, *s+ '&AB$') ?+0?, +s+ '&AB$') ?+0?, Ds+ '&AB$') ?+0?, As+ '&AB$') ?+0?, s+ '&AB$')

>itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

?+0?, ?s+ '&AB$') ?+0?, Cs+ '&AB$') ?+0?, =s+ '&AB$') ?+0?, @s+ '&AB$') ?+0?,?0s+ '&AB$') ?+0?,?*s+ '&AB$') ?+0?,?+s+ '&AB$') ?+0?,?Ds+ '&AB$') ?+0?,?As+ '&AB$') ?+0?,? s+ '&AB$') ?+0?,??s+ '&AB$') ?+0?,?Cs+ '&AB$') ?+0?,?=s+ '&AB$') ?+0?,?@s+ '&AB$') ?+0?,C0s+ '&AB$') ?+0?,C*s+ '&AB$') ?+0?,C+s+ '&AB$') ?+0?,CDs+ '&AB$') ?+0?,CAs+ '&AB$') ?+0?,C s+ '&AB$') ?+0?,C?s+ '&AB$') ?+0?,CCs+ '&AB$') ?+0?,C=s+ '&AB$')

cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 cCt 00?0'=0*?0 hitachi_vsp0 #

?+0?,C@s+ '&AB$') ?+0?,=0s+ '&AB$') ?+0?,=*s+ '&AB$') ?+0?,=+s+ '&AB$') ?+0?,=Ds+ '&AB$') ?+0?,=As+ '&AB$') ?+0?,= s+ '&AB$') ?+0?,=?s+ '&AB$') ?+0?,=Cs+ '&AB$') ?+0?,==s+ '&AB$') ?+0?,=@s+ '&AB$') ?+0?,@0s+ '&AB$') ?+0?,@*s+ '&AB$') ?+0?,@+s+ '&AB$') ?+0?,@Ds+ '&AB$') ?+0?,@As+ '&AB$') ?+0?,@ s+ '&AB$')

>itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0 >itachi_VS0

+ + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + + + + + +

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

v6,is; list $ist all ,is;s use, by Veritas 2VE51 v6,is; list 3,is;name4 )isplay ,etaile, in.ormation about a single ,is;F inclu,ing mutlipathing in.ormationF si/eF typeF V6 versionF an, more1 v6print )isplay report style in.ormation about the current status o. all V6 componantsF inclu,ing ,is;sF sub,is;sF ple6esF an, volumes1 v6print 3componant4 )isplay report style in.ormation about the current status o. "&$9 the componant you re-uest1 So .or instanceF Gv6print vol0*G shoHs in.ormation about all subcomponants o. vol0*1 This Hor;s .or ple6esF ,is; groupsF etc1 v6print -hrt )isplay ,etaile, in.ormation about all V6 componanatsF inclu,ing stH,ithF ncolumnsF o..setsF layout typeF rea,policyF an, more1 This is best .or a true picture o. your con.iguration1 v6,g list )isplay listing an, state in.ormation o. all )is; Groups1 v6,g list 3,is;group name4 )isplay ,etaile, in.ormation about a ,is;groupF inclu,ing .lagsF versionF logs statusF etc1 v6in.o )isplay volume status an, volume type1 By ,e.aultF only ,isplays Groot,gGF to ,isplay a ,i..rent )is; GroupF use Gv6in.o -g 3,gname4G1 v6assist ma6groH 3volume4 This comman, Hill output the ma6imum si/e the volume speci.ie, can increase, byF speci.ie, in sectors1