You are on page 1of 197

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

System Administration for the Oracle Solaris 10 OS Part 1


Activity Guide

D61 !"#C!0 $dition !%0 &epte'ber 2011 D ""0(

Copyright 2011, Oracle and or its affiliates! All rights reserved! "isclaimer )his docu'ent contains proprietary infor'ation and is protected by copyright and other intellectual property la*s% +ou 'ay copy and print this docu'ent solely for your o*n use in an Oracle training course% )he docu'ent 'ay not be 'odified or altered in any *ay% $,cept *here your use constitutes -fair use- under copyright la*, you 'ay not use, share, do*nload, upload, copy, print, display, perfor', reproduce, publish, license, post, trans'it, or distribute this docu'ent in *hole or in part *ithout the e,press authorization of Oracle% )he infor'ation contained in this docu'ent is sub.ect to change *ithout notice% /f you find any proble's in the docu'ent, please report the' in *riting to0 Oracle Uni1ersity, (00 Oracle 2ar3*ay, 4ed*ood &hores, California 5"06( U&6% )his docu'ent is not *arranted to be error7free% #estricted #ights $otice /f this docu'entation is deli1ered to the United &tates #o1ern'ent or anyone using the docu'entation on behalf of the United &tates #o1ern'ent, the follo*ing notice is applicable0 U%&% #O8$49:$9) 4/#;)& )he U%&% #o1ern'ent<s rights to use, 'odify, reproduce, release, perfor', display, or disclose these training 'aterials are restricted by the ter's of the applicable Oracle license agree'ent and/or the applicable U%&% #o1ern'ent contract% %rademar& $otice Oracle and =a1a are registered trade'ar3s of Oracle and/or its affiliates% Other na'es 'ay be trade'ar3s of their respecti1e o*ners%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Authors 8i.etha : :al3ai, 8enu 2oddar %echnical Contri'utor and #evie(er &hya' >rishna %his 'oo& (as pu'lished using)

Oracle %utor

%a'le of Contents
Practices for *esson 1) +ntroduction !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! 1,1 2ractices for ?esson 1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% 172 Practices for *esson 2) +ntroducing the Oracle Solaris 10 OS "irectory -ierarchy !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2,1 2ractices for ?esson 2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% 272 2ractice 2710 /dentifying @ile )ypes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 27! Practices for *esson .) /anaging *ocal "is& "evices !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .,1 2ractices for ?esson !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% !72 2ractice !710 :anaging ?ocal Dis3 De1ices%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !7! Practices for *esson 0) /anaging 12S 2ile Systems !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 0,1 2ractices for ?esson "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% "72 2ractice "710 Creating and :aintaining ufs @ile &yste's%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "7! Practices for *esson 3) Performing /ounts and 1nmounts!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3,1 2ractices for ?esson (%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% (72 2ractice (710 :ounting @ile &yste's %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (7! Practices for *esson 4) 52S 2ile System !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4,1 2ractices for ?esson 6%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% 672 2ractice 6710 Creating and Destroying A@& &torage 2ools %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 67! 2ractice 6720 Creating, 4ena'ing, and Destroying A@& @ile &yste's %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 67B 2ractice 67!0 Cor3ing *ith A@& 2roperties %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 6711 Practices for *esson 6) "escri'ing +nterface Configurations !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 6,1 2ractices for ?esson %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% 72 2ractice 710 :onitoring 9et*or3 /nterfaces %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7! Practices for *esson 7) Performing Pac&age Administration !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 7,1 2ractices for ?esson B%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% B72 2ractice B710 6dding a &oft*are 2ac3age %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% B7! 2ractice B720 :anipulating &oft*are 2ac3ages%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% B7" Practices for *esson 8) /anaging Soft(are Patches!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8,1 2ractices for ?esson 5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%% 572 2ractice 5710 :aintaining 2atches%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 57! Practices for *esson 10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! 10,1 2ractices for ?esson 10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% 1072 2ractice 10710 Using Doot 24O: Co''ands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 107! Practices for *esson 11) 1sing the G#and 1nified 9ootloader :G#19;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 11,1 2ractices for ?esson 11%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% 1172 2ractice 11710 Using #4UD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 117! Practices for *esson 12) Performing *egacy 9oot and Shutdo(n Procedures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 12,1 2ractices for ?esson 12%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% 1272 Practices for *esson 1.) Service /anagement 2acility :S/2; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1.,1 2ractices for ?esson 1!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% 1!72 2ractice 1!710 :anaging &er1ices *ith &:@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1!7! Practices for *esson 10) Performing 1ser Administration !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 10,1 2ractices for ?esson 1"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% 1"72 2ractice 1"710 6dding User and #roup 6ccounts%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1"7! Practices for *esson 13) Controlling System Processes!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 13,1
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

&yste' 6d'inistration for the Oracle &olaris 10 O& 2art 1 )able of Contents i

2ractices for ?esson 1(%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% 1(72 2ractice 1(710 Using 2rocess Control%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1(7! Practices for *esson 14 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! 14,1 2ractices for ?esson 16%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% 1672 2ractice 16710 Oracle &olaris 10 Operating &yste' /nstallation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 167! Practices for Appendi< A) Performing 2ile System 9ac&ups !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 16,1 2ractices for 6ppendi, 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%% 1 72 2ractice 6710 Dac3ing Up a @ile &yste' to )ape Dri1e%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1 7! 2ractice 6720 Dac3ing Up a @ile &yste' to an $,tra Dis3 Dri1e %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1 7(

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for Appendi< 9) 9ac&ing 1p a /ounted 2ile System (ith a 12S Snapshot !!!!!!!!!!!!!!!!!!!!!!!!!!!! 17,1 2ractices for 6ppendi, D %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%% 1B72 2ractice D710 Cor3ing *ith U@& &napshots%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1B7! Practices for Appendi< C) Performing 2ile System #estores !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 18,1 2ractices for 6ppendi, C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 1572 2ractice C710 4estoring @iles and @ile &yste's %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 157!

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

&yste' 6d'inistration for the Oracle &olaris 10 O& 2art 1 )able of Contents ii

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 1) +ntroduction


Chapter 1

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 /ntroduction Chapter 1 7 2age 1

Practices for *esson 1


Practices Overvie(
)here is no practice for this lesson%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 /ntroduction Chapter 1 7 2age 2

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 2) +ntroducing the Oracle Solaris 10 OS "irectory -ierarchy


Chapter 2

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 20 /ntroducing the Oracle &olaris 10 O& Directory ;ierarchy Chapter 2 7 2age 1

Practices for *esson 2


Practice Overvie(
/n this practice, you use basic Oracle &olaris co''ands to identify and *or3 *ith the four 'a.or file types in the Oracle &olaris O&%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 20 /ntroducing the Oracle &olaris 10 O& Directory ;ierarchy Chapter 2 7 2age 2

Practice 2,1) +dentifying 2ile %ypes


Assumptions
4efer to the lecture notes as necessary to perfor' the follo*ing tas3s and ans*er the Euestions% Chen you initiate a session in an ?8C en1iron'ent, you are logged on to a re'ote syste' as root user%

%as&s

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

1%

?og in as the root user, and open a ter'inal *indo*% /n the / (root) directory, perfor' a long listing, and record the na'e of the first sy'bolic lin3 listed% # cd / # ls -l total 952 lrwxrwxrwx ./usr/bin drwxr-xr-x drwx-----drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x dr-xr-xr-x drwxr-xr-x '''

1 root 9 2 20 2 $9 3 1 19 root root root root root root root root

root sys other sys sys sys other root sys

9 Jul 11 23:09 bin -> 512 512 144 512 4 0$ 512 1 512 Jul Jul Jul Jul Jul De# Jul Jul 11 11 11 11 11 3 11 11 23:24 23:31 23:29 23:2 23:32 2010 23:29 23:22 boot Desktop de! de!"#es et# export ho%e ker&el

2%

!%

The bin symbolic link should be the first link listed in the / (root) directory. Chat is the size, in bytes, of the lin3 that you found in step 1F ;o* 'any characters are there in the na'e of the file to *hich this lin3 pointsF The bin symbolic link contains 9 bytes of data and points to ./usr/bin. Change to the /de!/dsk directory% 4ecord the file types that you find in this directory% # cd /dev/dsk # ls -l total 32 lrwxrwxrwx 1 root * ''/''/de!"#es/p#"+1e, lrwxrwxrwx 1 root * ''/''/de!"#es/p#"+1e, lrwxrwxrwx 1 root * ''/''/de!"#es/p#"+1e, lrwxrwxrwx 1 root * ''/''/de!"#es/p#"+1e, '''

root 43 (u) 00000/"de+d/dad+0,0:a root 43 (u) 00000/"de+d/dad+0,0:b root 43 (u) 00000/"de+d/dad+0,0:# root 43 (u) 00000/"de+d/dad+0,0:d

19:22 #0t0d0s0 19:22 #0t0d0s1 19:22 #0t0d0s2 19:22 #0t0d0s3 -

The /dev/dsk directory contains symbolic links.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 20 /ntroducing the Oracle &olaris 10 O& Directory ;ierarchy Chapter 2 7 2age !

"%

Use the appropriate options of the ls co''and to display infor'ation for the files referenced by the files in the /de!/dsk directory% 4ecord the file types reported% # ls -lL total 0 brw-r----brw-r----brw-r----'''

1 root 1 root 1 root

sys sys sys

13 , $ (u) 13 , 9 (u) 13 , 10 (u)

19:25 #0t0d0s0 20:01 #0t0d0s1 20:01 #0t0d0s2

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(%

The symbolic links in the /dev/dsk directory point to block-special device files. Change to the /de!/pts directory, and use the sa'e co''ands you used in steps ! and " for the /de!/dsk directory% 4ecord the file types you find% # cd /dev/pts # ls l total lrwxrwxrwx 1 root root ''/''/de!"#es/pseudo/pts+0:0 lrwxrwxrwx 1 root root ''/''/de!"#es/pseudo/pts+0:1 lrwxrwxrwx 1 root root ''/''/de!"#es/pseudo/pts+0:10 ''' # ls -lL total 0 #rw--w---1 root tty #rw--w---1 root tty #rw-r--r-1 root sys ''' The /dev/pts directory contains symbolic links.

2$ (u) 2$ (u) 29 (u)

19:22 0 -* 19:22 1 -* 19:25 10 -*

24, 0 (u) 24, 1 (u) 24, 10 (u)

19:32 0 19:2- 1 20:02 10

The symbolic links in the /dev/pts directory point to character-special device files. 6% Change to the /et#/"&"t'd directory, and identify the type of file in t his directory% # cd /etc/init.d # ls -l total 12$ -rwxr--r-1 root sys 25 Ju& 2$ 0$:5$ a##t -rwxr--r-1 root sys 39- Ju& 2$ 0$:5$ a##tad% -rwxr--r-root sys 2452 Ju& 23 2010 apa#he -rwxr--r-5 root sys $24 .ar 2 2004 appser! ''' The /etc/init.d directory contains regular files.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 20 /ntroducing the Oracle &olaris 10 O& Directory ;ierarchy

Chapter 2 7 2age "

;o* 'any hard lin3s are associated *ith the /et#/"&"t'd/apa#he fileF Chat is the inode nu'ber associated *ith this fileF # ls -li !p!c"e 22$09 -rwxr--r-root sys 2452 Ju& 23 13:50 apa#he

B%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

The /etc/init.d/apache file has six hard links associated with it. The inode number is 22809, which varies among different systems. @ind the nu'ber of files in the /et# directory or belo* that ha1e the sa'e inode nu'ber as that used by the /et#/"&"t'd/apa#he file% /n this e,a'ple, the inode nu'ber is 22$09% # ls -i /etc/init.d/!p!c"e 22$09 /et#/"&"t'd/apa#he # #ind /etc -inu$ 22%09 -exec ls -i &' () 22$09 /et#/"&"t'd/apa#he 22$09 /et#/r#0'd//1 apa#he 22$09 /et#/r#1'd//1 apa#he 22$09 /et#/r#2'd//1 apa#he 22$09 /et#/r#3'd/050apa#he 22$09 /et#/r#0'd//1 apa#he Six files, including /etc/init.d/apache, use the same inode number.

5%

Create a ne* directory called /testd"r% Create a file in this directory called 1"le1% Create a sy'bolic lin3 called l"&k1 that points to 1"le1% # # # # $kdir /testdir cd /testdir touc" #ile1 ln -s #ile1 link1

10% ?ist 1"le1 and the l"&k1 sy'bolic lin3% Do these files use the sa'e or different inode nu'bersF # ls total 2 2 li 2 14 -rw-r--r-14- lrwxrwxrwx

1 root 1 root

root root

0 (u) 5 (u)

20:0 20:0

1"le1 l"&k1 -* 1"le1

These two files use two different inode numbers. 11% /n the /testd"r directory, create a ne* directory called &ewd"r% Chat is the nu'ber of hard lin3s associated *ith the &ewd"r directoryF Chat is the inode nu'ber associated *ith the &ewd"r directoryF # $kdir newdir # ls -ldi newdir 2 149 drwxr-xr-x

2 root

root

512 (u)

20:1- &ewd"r

The link count for the newdir directory is two. The inode number varies among different systems.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 20 /ntroducing the Oracle &olaris 10 O& Directory ;ierarchy Chapter 2 7 2age (

12% ?ist all files, including hidden files that e,ist in the &ewd"r directory% Chich of these files uses the sa'e inode nu'ber as the &ewd"r directoryF # ls -li! newdir total 4 2 149 drwxr-xr-x 2 145 drwxr-xr-x

2 root 3 root

root root

512 (u) 512 (u)

20:1- ' 20:1- ''

The file called dot (. uses the same inode number as the newdir directory.

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

1!% Create a ne* directory called d"r2 under the &ewd"r directory% Chat happens to the lin3 count for the &ewd"r directoryF # $kdir newdir/dir2 # ls -ldi newdir 2 149 drwxr-xr-x

3 root

root

512 (u)

20:1$ &ewd"r

The link count increases from two to three. 1"% Use the ls co''and *ith appropriate options to find the ne* file na'e that uses the sa'e inode nu'ber as the &ewd"r directory% 4ecord the na'e of the ne* file% # ls -l!*i newdir &ewd"r: total 2 149 drwxr-xr-x 2 145 drwxr-xr-x 2 150 drwxr-xr-x &ewd"r/d"r2: total 4 2 150 drwxr-xr-x 2 149 drwxr-xr-x

3 root 3 root 2 root

root root root

512 (u) 512 (u) 512 (u)

20:1$ ' 20:1- '' 20:1$ d"r2

2 root 3 root

root root

512 (u) 512 (u)

20:1$ ' 20:1$ ''

=<ercise Summary
"iscussion) )a3e a fe* 'inutes to discuss the e,periences, issues, or disco1eries that you had during the practice e,ercises% $,periences /nterpretations Conclusions 6pplications

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 20 /ntroducing the Oracle &olaris 10 O& Directory ;ierarchy Chapter 2 7 2age 6

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson .) /anaging *ocal "is& "evices


Chapter .

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 1

Practices for *esson .


Practices Overvie(
/n this practice, you0 /dentify logical, physical, and instance na'es for dis3 de1ices 6dd a ne* dis3 or tape dri1e to a syste' Create and 'anage dis3 slices on &264C syste's running the Oracle &olaris 10 O& Create and 'anage 1d"sk partitions and dis3 slices on ,B6/,6" syste's running the Oracle &olaris 10 O&

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 2

Practice .,1) /anaging *ocal "is& "evices


Assumptions
)his practice reEuires one unused spare dis3 and applies to both &264C and ,B6/,6" syste's% 4e'e'ber that these different syste's typically use different dis3 de1ice na'es% @or e,a'ple0 )he boot dis3 of a &un Dlade 1(00 G&264CH is typically #0t0d0% )hroughout this practice, be certain to use the correct de1ice na'es for your particular syste'% )as3 2 in this practice is optional and reEuires a syste' that is configured *ith an e,ternal dis3 or tape dri1e% /n order to perfor' this practice, one of these t*o conditions 'ust be 'et0 )he e,ternal de1ice *as turned off during syste' installation, so no de1ice files for the de1ice *ill e,ist in the /de! structure% De1ice files for the e,ternal de1ice are re'o1ed before starting )as3 2% )o re'o1e de1ice files0 a% &hut do*n the syste' to run state 0 or (, and po*er7off the e,ternal de1ice% b% Doot the syste' to the default run state% c% ?og in as root and run de!1sad% -2 to clear any de1ice files related to the e,ternal de1ice%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices

Chapter ! 7 2age !

%as& 1) +dentifying "evice 2iles


/n this tas3, you de'onstrate the relationships a'ong logical and physical de1ice files and de1ice instance na'es% 1% ?og in as the root user and co'plete the follo*ing steps0 a% Open a ter'inal *indo*% b% $,pand the *indo* so that it occupies the entire screen area% c% Change to the /de!/dsk directory%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

# cd /dev/dsk 2% ?ist the files in this directory and co'plete the follo*ing steps0 a% /dentify the files related to the boot dis3 of your syste'% # d# -" b% &yste's typically use #0t0d0 or #1d0, but this 'ay 1ary% ?ocate the file that represents slice 0 on this dis3 and display a long listing of it% # ls &un Dlade 1(00 e,a'ple0 # ls -l c0t0d0s0 &un Ultra 20 e,a'ple0 # ls -l c1d0s0 Chich type of file did you .ust locateF )he file type indicator is the first character on the left side of the long listing% !iles in this directory are symbolic links. The letter l in the left-most column identifies a symbolic link. 4ecord the full path na'e to *hich this file points% &yste's that use 2C/ bus architectures list path na'es si'ilar to the follo*ing0 &un Dlade 1(00 e,a'ple0 ''/''/de!"#es/p#"+1e, 00000/"de+d/dad+0,0:a &un Ultra 20 e,a'ple0 ''/''/de!"#es/p#"+0,0/p#"-"de+-/"de+0/#%dk+0,0:a !% /ssue a long listing co''and of the path na'e you recorded% Chich type of file is thisF &un Dlade 1(00 e,a'ple0 # ls l ../../devices/pci+1e,-00000/ide+d/d!d+0,0:! &un Ultra 20 e,a'ple0 # ls -l ../../devices/pci+0,0/pci-ide+./ide+0/c$dk+0,0:! Chich type of file is thisF !iles in this directory are device files. The b character in the left-most column identifies a block-special device file. )he ls -l3 co''and displays the sa'e infor'ation, but sho*s only the lin3 file na'e, not the real de1ice file na'e%
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

c%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age "

"%

Change to the /de!/rdsk directory and co'plete the follo*ing steps0 # cd /dev/rdsk a% Display a long listing of the sa'e file na'e that you selected in step 2% # ls &un Dlade 1(00 e,a'ple0 # ls -l c0t0d0s0 &un Ultra 20 e,a'ple0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

# ls -l c1d0s0 Chich type of file is thisF !iles in this directory are symbolic links. The letter l in the left-most column identifies a symbolic link. 4ecord the full path na'e to *hich this file points% &un Dlade 1(00 e,a'ple0 ''/''/de!"#es/p#"+1e, 00000/"de+d/dad+0,0:a,raw &un Ultra 20 e,a'ple0 ''/''/de!"#es/p#"+0,0/p#"-"de+-/"de+0/#%dk+0,0:a,raw (% /ssue a long listing co''and of the path na'e you recorded% &un Dlade 1(00 e,a'ple0 # ls l ../../devices/pci+1e,-00000/ide+d/d!d+0,0:!,r!w &un Ultra 20 e,a'ple0 # ls -l ../../devices/pci+0,0/pci-ide+./ide+0/c$dk+0,0:!,r!w Chich type of file is thisF !iles in this directory are device files. The c character in the left-most column identifies a character-special device file. )he ls -l3 co''and displays the sa'e infor'ation, but sho*s only the lin3 file na'e, not the real de1ice file na'e% Change to the /et# directory and display the contents of the path4to4"&st file% # cd /etc # $ore p!t"/to/inst

b%

6%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age (

Use the infor'ation fro' the pre1ious steps to locate and record the entry for your boot dis3% 6 &un Dlade 1(00 *or3station, for e,a'ple, *ould typically use #0t0d0 as its boot dis3% )his relates to the de1ice file called dad+0,0 and is listed in the /et#/path4to4"&st file% Systems that use "#$ bus architectures may have entries in /etc/path_to_inst similar to the following example from a Sun %lade &'(() 5/p#"+1e, 00000/"de+d/dad+0,05 1 5dad5 /nstance na'es are co'posed of the last t*o fields of each line in /et#/path4to4"&st% $,a'ples include the dad, #%dk, or sd tags, and the nu'ber that precedes the' in /et#/path4to4"&st% Chat is the instance na'e for the de1ice listed in this stepF The instance name for the device could be dad1, dad0, cmdk0, sd3, or sd0, depending on the system architecture.

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as& 2) Adding a $e( "is& or %ape "evice


/n this tas3, you build de1ice files for ne* de1ices added to your syste'% )his tas3 is optional% 2erfor' the steps in this tas3 if an e,ternal dis3 or tape de1ice is a1ailable on your syste'% 1% /n the /de!/dsk or /de!/r%t directories, confir' that no files e,ist for your e,ternal dis3 or tape de1iceI for e,a'ple, /de!/dsk/#1t0d0s0 or /de!/r%t/0% /f files for the e,ternal de1ice do e,ist, as3 your instructor for guidance% Do not si'ply re'o1e de1ice files that e,ist% 4efer to the 6ssu'ptions section for ad1ice about re'o1ing de1ice files% 2% /f you are using a &264C syste', shut it do*n to run state 0% # init 0 /f you are using an ,B6/,6" syste', shut it do*n to run state (% )his shuts do*n the syste' and turns off the po*er% # init 0 !% "% 2o*er7on the e,ternal dis3 or tape dri1e attached to your syste'% /f you are using a &264C syste', boot the syste' to its default run state% # boot /f you are using an ,B6/,6" syste', po*er7on your syste' and allo* it to boot to its default run state% ?og in as the root user and co'plete the follo*ing steps0 a% Open a ter'inal *indo*% b% 4un the de!1sad% co''and *ith the -! option to create ne* lin3s and de1ice files for the ne* dis3 or tape dri1e% # dev#s!d$ -v c% 6% Obser1e the 'essages that the de!1sad% co''and displays% Confir' that ne* lin3s and de1ice files e,ist in the /de!/dsk and /de!/rdsk directories for dis3s or /de!/r%t for tape dri1es% Use the de!1sad% -! output to deter'ine *hat files to loo3 for%
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

(%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices

Chapter ! 7 2age 6

%as& .) >or&ing (ith "is&s and Partitions on SPA#C Systems


)his tas3 is specific to &264C syste's only% /n this tas3, you use the 1or%at utility, and the prt!to# and 1%thard co''ands, to create and 'anage dis3 slices on dis3s attached to a &264C syste' running Oracle &olaris 10 O&% 1% ?og in as the root user and co'plete the follo*ing steps0 a% Open a ter'inal *indo*% b% 4un the 1or%at utility% # #or$!t 0ear#h"&) 1or d"sks'''do&e

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(6(73(839 D70/ 09392:7;<0: 0' #0t0d0 =>D0-2251263(:$0 #yl 5-459 alt 2 hd 1 se# 255* /p#"+1e, 00000/"de+d/dad+0,0 1' #0t1d0 =D9?(@3: #yl 5-459 alt 2 hd 1 se# 255* /p#"+1e, 00000/"de+d/dad+1,0 0pe#"1y d"sk (e&ter "ts &u%ber): 2% Co'plete the follo*ing steps0 a% 4ecord the list of dis3s presented by the for'at utility% @or e,a'ple, #0t0d0 and #0t1d0% b% 2ress Ctrl J D to e,it the 1or%at utility% 0pe#"1y d"sk (e&ter "ts &u%ber): 12 A

!%

Use the prt!to# co''and to list the 8)OC for each of the dis3s that you found in the pre1ious step and co'plete the follo*ing steps0 a% $,a'ine the .ou&t D"re#tory field in the infor'ation that the prt!to# co''and displays% Chen loo3ing for a dis3 ha1ing no 'ount points, the .ou&t D"re#tory colu'n of the prt!to# co''and output *ill ha1e no 1alues% b% 4ecord the na'e of a dis3 that has no 'ount directory listed% @or your classroo' en1iron'ent, this is an unused dis3% $ote) &yste's in production can use un'ounted slices to store production data% Do not assu'e that un'ounted slices are unused on syste's in production% &yste's *ill display 1arious list of partitions, so the list that you see 'ay differ fro' the listed e,a'ples% # prtvtoc /dev/rdsk/c0t1d0s2 B /de!/rdsk/#0t1d0s2 part"t"o& %ap B B D"%e&s"o&s: B 512 bytes/se#tor B 255 se#tors/tra#k B 1 tra#ks/#yl"&der B 40$0 se#tors/#yl"&der B 5-4 1 #yl"&ders
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

B 5-459 a##ess"ble #yl"&ders B B ?la)s: B 1: u&%ou&table B 10: read-o&ly B B ?"rst 0e#tor 3ast B Cart"t"o& :a) ?la)s 0e#tor 2ou&t 0e#tor D"re#tory 0 2 00 0 2 5200 2 5199 1 3 01 2 5200 2 5200 530399 2 5 01 0 234432-20 234432-19 4 00 530400 233902320 234432-19 A Unused dis30 The disk you identify will depend on your specific system. "% 4un the 1or%at utility again and select the unused dis3 fro' the list of dis3s presented%
# #or$!t 0ear#h"&) 1or d"sks'''do&e (6(73(839 D70/ 09392:7;<0: 0' #0t0d0 =>D0-2251263(:$0 #yl 5-459 alt 2 hd 1 se# 255* /p#"+1e, 00000/"de+d/dad+0,0 1' #0t1d0 =D9?(@3: #yl 5-459 alt 2 hd 1 se# 255* /p#"+1e, 00000/"de+d/dad+1,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1 sele#t"&) #0t1d0 Dd"sk 1or%atted, &o de1e#t l"st 1ou&dE

.ou&t

?;F.(: .9<@: d"sk type part"t"o& #urre&t 1or%at repa"r label a&alyGe de1e#t ba#kup !er"1y sa!e !ol&a%e H=#%d* Iu"t 1or%at*

sele#t a d"sk sele#t (de1"&e) a d"sk type sele#t (de1"&e) a part"t"o& table des#r"be the #urre&t d"sk 1or%at a&d a&alyGe the d"sk repa"r a de1e#t"!e se#tor wr"te label to the d"sk sur1a#e a&alys"s de1e#t l"st %a&a)e%e&t sear#h 1or ba#kup labels read a&d d"splay labels sa!e &ew d"sk/part"t"o& de1"&"t"o&s set $-#hara#ter !olu%e &a%e exe#ute =#%d*, the& retur&

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age B

(%

Display the partition 'enu and co'plete the follo*ing steps0 a% 2rint the current partition table% b% 4ecord the nu'ber of gigabytes G#DH assigned to slice 2%
1or%at* p!rt

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

C(F:7:7;< .9<@: 0 - #ha&)e J0K part"t"o& 1 - #ha&)e J1K part"t"o& 2 - #ha&)e J2K part"t"o& 3 - #ha&)e J3K part"t"o& 4 - #ha&)e J4K part"t"o& 5 - #ha&)e J5K part"t"o& - #ha&)e J K part"t"o& - #ha&)e J-K part"t"o& sele#t - sele#t a prede1"&ed table %od"1y - %od"1y a prede1"&ed part"t"o& table &a%e - &a%e the #urre&t table pr"&t - d"splay the #urre&t table label - wr"te part"t"o& %ap a&d label to the d"sk H=#%d* - exe#ute =#%d*, the& retur& Iu"t part"t"o&* print 2urre&t part"t"o& table (or")"&al): :otal d"sk #yl"&ders a!a"lable: 5-459 L 2 (reser!ed #yl"&ders) Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed usr - u&ass")&ed part"t"o&* ?la) w% wu wu w% w% w% w% w% 2yl"&ders 0 4 4 2- 129 0 - 5-45$ 0 0 0 130 - 5-45$ 0 0"Ge 129'49.8 129'49.8 111'-9M8 0 0 0 111'53M8 0 8lo#ks ( 5/0/0) 2 5200 ( 5/0/0) 2 5200 (5-459/0/0) 234432-20 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (5-329/0/0) 233902320 (0/0/0) 0

6%

$ote) )he list of defined partitions *ill 1ary, depending on ho* the spare dis3 *as last used% #D0 *our entry will depend on the disks present in your system. Di1ide the nu'ber of #D by " and co'plete the follo*ing steps0 a% Use the result as the nu'ber of #D to assign as dis3 space to four slices% b% 4ound do*n to the ne,t *hole #D if the result includes a fraction% @or e,a'ple, if slice 2 is 111% 5 #D, 111% 5 / " K 2 %5" #D% /n this case use 2 #D as the size for the four slices% #D/"0 *our entry will depend on your system.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 5

Display the 2artition 'enu again and co'plete the follo*ing steps0 a% &elect slice 0% b% 6ccept the defaults for tags and flags% c% &tart this first slice on Cylinder 0% d% $nter the resulting nu'ber of #D fro' the pre1ious step for the slice size% e% 2rint the partition table again to 1erify the change%
part"t"o&* 0 Cart :a) 0 root ?la) w% 2yl"&ders 0 - 4 0"Ge 129'49.8 8lo#ks ( 5/0/0)

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2 5200

9&ter part"t"o& "d ta)DrootE: 3*eturn> 9&ter part"t"o& per%"ss"o& 1la)sDw%E: 3*eturn> 9&ter &ew start"&) #ylD0E: 0 9&ter part"t"o& s"GeD2 5200b, 5#, 4e, 129'49%b, 0'13)bE: 27gb part"t"o&* print 2urre&t part"t"o& table (u&&a%ed): :otal d"sk #yl"&ders a!a"lable: 5-459 L 2 (reser!ed #yl"&ders) Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed usr - u&ass")&ed part"t"o&* ?la) w% wu wu wu w% w% w% w% w% 2yl"&ders 0 - 13$-$ 5 129 0 - 5-45$ 0 0 0 0 130 - 5-45$ 0 0"Ge 2-'00M8 129'49.8 111'-9M8 0 0 0 0 111'53M8 0 8lo#ks (13$-9/0/0) 5 2 320 ( 5/0/0) 2 5200 (5-459/0/0) 234432-20 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 232902320 (0/0/0) 0

B%

&et the sizes of slices 1, !, and " so that they are the sa'e as slice 0% +ou should begin each successi1e slice on the cylinder that follo*s the ending cylinder of the pre1ious slice%
part"t"o&* 1 Cart :a) 1 swap 9&ter 9&ter 9&ter 9&ter ?la) wu 2yl"&ders 5 129 0"Ge 129'49.8 8lo#ks ( 5/0/0)

2 5200

part"t"o& "d ta)DswapE: =*eturn* part"t"o& per%"ss"o& 1la)sDwuE: =*eturn* &ew start"&) #ylD0E: 13$-9 part"t"o& s"GeD2 5200b, 5#, 13943e, 129'49%b, 0'13)bE: 27gb

part"t"o&* print 2urre&t part"t"o& table (u&&a%ed): :otal d"sk #yl"&ders a!a"lable: 5-459 L 2 (reser!ed #yl"&ders)Cart :a) ?la) 2yl"&ders 0"Ge 8lo#ks 0 root w% 0 - 13$-$ 2-'00M8 (13$-9/0/0) 5 2 320 1 swap wu 13$-9 - 2--52-'00M8 (13$-9/0/0) 5 2 320 2 ba#kup wu 0 - 5-45$ 111'-9M8 (5-459/0/0) 234432-20
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 10

3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed usr - u&ass")&ed part"t"o&*

w% w% w% w% w%

0 0 0 130 - 5-45$ 0

0 0 0 111'53M8 0

(0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (5-329/0/0) 233902320 (0/0/0) 0

5%

&et slices (, 6, and

to start at Cylinder 0, and then assign the' 0 :D%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

part"t"o&* 6 Cart :a) ?la) 2yl"&ders 0"Ge 8lo#ks usr w% 130 - 5-45$ 111'53M8 (5-329/0/0) 233902320 9&ter part"t"o& "d ta)DusrE: 3*eturn> 9&ter part"t"o& per%"ss"o& 1la)sDw%E: 3*eturn> 9&ter &ew start"&) #ylD130E: 0 9&ter part"t"o& s"GeD233902320b, 5-329#, 5-32$e, 114210'12%b, 111'53)bE: 0 part"t"o&*

10% Co'plete the follo*ing steps0 a% 2rint the partition table%


part"t"o&* print 2urre&t part"t"o& table (u&&a%ed): :otal d"sk #yl"&ders a!a"lable: 5-459 L 2 (reser!ed #yl"&ders) Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed part"t"o&* ?la) w% wu wu w% w% w% w% w% 2yl"&ders 0 - 13$-$ 13$-9 - 2--50 - 5-45$ 2--5$ - 41 3 41 3- - 55515 0 0 0 0"Ge 2-'00M8 2-'00M8 111'-9M8 2-'00M8 2-'00M8 0 0 0 8lo#ks (13$-9/0/0) 5 2 320 (13$-9/0/0) 5 2 320 (5-459/0/0) 234432-20 (13$-9/0/0) 5 2 320 (13$-9/0/0) 5 2 320 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0

$,cept for slice 2, is there any o1erlap of ending and beginning cylinders for any of the slices listedF +o. b% 2roceed to the follo*ing steps to introduce this proble'% 11% Co'plete the follo*ing steps0 a% 6dd 1 to the nu'ber #D/" 1alue listed in step 6% G#D/"H J 10 *our entry will depend on your system. slice 0 so that it uses the ne* size% b% Change
part"t"o&* 0 Cart :a) ?la) 2yl"&ders 0"Ge 0 root w% 0 - 13$-$ 2-'00M8 9&ter part"t"o& "d ta)DrootE: 3*eturn> 9&ter part"t"o& per%"ss"o& 1la)sDw%E: 3*eturn> 9&ter &ew start"&) #ylD0E: 0 8lo#ks (13$-9/0/0) 5

2 320

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 11

9&ter part"t"o& s"GeD5 2 320b, 13$-9#, 13$-$e, 2- 49'5-%b, 2-'00)bE: 28gb part"t"o&* print 2urre&t part"t"o& table (u&&a%ed): :otal d"sk #yl"&ders a!a"lable: 5-459 L 2 (reser!ed #yl"&ders) Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed part"t"o&* ?la) w% wu wu w% w% w% w% w% 2yl"&ders 0 - 14392 13$-9 - 2--50 - 5-45$ 2--5$ - 41 3 41 3- - 55515 0 0 0 0"Ge 2$'00M8 2-'00M8 111'-9M8 2-'00M8 2-'00M8 0 0 0 8lo#ks (14393/0/0) 5$-23440 (13$-9/0/0) 5 2 320 (5-459/0/0) 234432-20 (13$-9/0/0) 5 2 320 (13$-9/0/0) 5 2 320 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

)he 2yl"&ders colu'n in the partition table should no* indicate that slice 0 ends after slice 1 begins% 12% Co'plete the follo*ing steps0 a% Use the %od"1y co''and fro' the part"t"o& 'enu to atte'pt to fi, this proble'% b% &elect /te' 0 to 'odify the current partition table%
part"t"o&* 4 9xpe#t"&) o&e o1 the 1ollow"&): (abbre!"at"o&s ok): 0 - #ha&)e J0K part"t"o& 1 - #ha&)e J1K part"t"o& 2 - #ha&)e J2K part"t"o& 3 - #ha&)e J3K part"t"o& 4 - #ha&)e J4K part"t"o& 5 - #ha&)e J5K part"t"o& - #ha&)e J K part"t"o& - #ha&)e J-K part"t"o& sele#t - sele#t a prede1"&ed table %od"1y - %od"1y a prede1"&ed part"t"o& table &a%e - &a%e the #urre&t table pr"&t - d"splay the #urre&t table label - wr"te part"t"o& %ap a&d label to the d"sk H=#%d* - exe#ute =#%d*, the& retur& Iu"t part"t"o&* $odi#5 0ele#t part"t"o&"&) base: 0' 2urre&t part"t"o& table (u&&a%ed) 1' (ll ?ree >o) 2hoose base (e&ter &u%ber) D0EN 0 Oar&"&): ;!erlapp"&) part"t"o& (1) "& table' Oar&"&): ?"x, or sele#t a d"11ere&t part"t"o& table' part"t"o&*

Chich *arnings appearF


Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 12

Oar&"&): ;!erlapp"&) part"t"o& (1) "& table' Oar&"&): ?"x, or sele#t a d"11ere&t part"t"o& table'

1!% :odify the partition table and select /te' 1 to use the (ll ?ree >o) option%
part"t"o&* $odi#5 0ele#t part"t"o&"&) base: 0' 2urre&t part"t"o& table (u&&a%ed) 1' (ll ?ree >o) 2hoose base (e&ter &u%ber) D0EN 1 Cart :a) ?la) 2yl"&ders 0"Ge 0 root w% 0 0 1 swap wu 0 0 2 ba#kup wu 0 - 5-45$ 111'-9M8 3 u&ass")&ed w% 0 0 4 u&ass")&ed w% 0 0 5 u&ass")&ed w% 0 0 usr w% 0 0 - u&ass")&ed w% 0 0 Do you w"sh to #o&t"&ue #reat"&) a &ew part"t"o& table based o& abo!e tableDyesEN

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

8lo#ks (0/0/0) 0 (0/0/0) 0 (5-459/0/0) 234432-20 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0

)he partition table appears% 1"% Obser1e the 2yl"&ders and 0"Ge colu'ns, and then 1erify that they are all zero e,cept for slice 2% 1(% 4espond to the pro'pts to continue the process and co'plete the follo*ing steps0 a% &elect slice " as the (ll ?ree >o) partition% b% Use the size listed in step 6 for slices 0, 1, and !% c% $nter 4eturn to set the other slices to size 0%
Do you w"sh to #o&t"&ue #reat"&) a &ew part"t"o& table based o& abo!e tableDyesEN 5 ?ree >o) part"t"o&D EN 6 9&ter s"Ge o1 part"t"o& P0P D0b, 0#, 0'00%b, 0'00)bE: 27gb 9&ter s"Ge o1 part"t"o& P1P D0b, 0#, 0'00%b, 0'00)bE: 27gb 9&ter s"Ge o1 part"t"o& P3P D0b, 0#, 0'00%b, 0'00)bE: 27gb 9&ter s"Ge o1 part"t"o& P5P D0b, 0#, 0'00%b, 0'00)bE: 3*eturn> 9&ter s"Ge o1 part"t"o& P P D0b, 0#, 0'00%b, 0'00)bE: 3*eturn> 9&ter s"Ge o1 part"t"o& P-P D0b, 0#, 0'00%b, 0'00)bE: 3*eturn> Cart :a) ?la) 2yl"&ders 0"Ge 8lo#ks 0 root w% 0 - 13$-$ 2-'00M8 (13$-9/0/0) 5 2 320 1 swap wu 13$-9 - 2--52-'00M8 (13$-9/0/0) 5 2 320 2 ba#kup wu 0 - 5-45$ 111'-9M8 (5-459/0/0) 234432-20 3 u&ass")&ed w% 2--5$ - 41 3 2-'00M8 (13$-9/0/0) 5 2 320 4 u&ass")&ed w% 41 3- - 5-54$ 30'-$M8 (15$22/0/0) 4553- 0 5 u&ass")&ed w% 0 0 (0/0/0) 0 u&ass")&ed w% 0 0 (0/0/0) 0 - u&ass")&ed w% 0 0 (0/0/0) 0 ;kay to %ake th"s the #urre&t part"t"o& tableDyesEN

6t the end of this process, you should ha1e three slices of eEual size, *here slice " ta3es up any e,tra roo' if it e,ists%
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 1!

16% 9a'e the partition table -.QD70/part"t"o&-, and then label the dis3%
;kay to %ake th"s the #urre&t part"t"o& tableDyesEN 5 9&ter table &a%e (re%e%ber Iuotes): 57829:;p!rtition5 Feady to label d"sk, #o&t"&ueN 5 part"t"o&* < ?;F.(: .9<@: d"sk type part"t"o& #urre&t 1or%at repa"r label a&alyGe de1e#t ba#kup !er"1y sa!e "&Iu"ry !ol&a%e H=#%d* Iu"t 1or%at*

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

sele#t a d"sk sele#t (de1"&e) a d"sk type sele#t (de1"&e) a part"t"o& table des#r"be the #urre&t d"sk 1or%at a&d a&alyGe the d"sk repa"r a de1e#t"!e se#tor wr"te label to the d"sk sur1a#e a&alys"s de1e#t l"st %a&a)e%e&t sear#h 1or ba#kup labels read a&d d"splay labels sa!e &ew d"sk/part"t"o& de1"&"t"o&s show !e&dor, produ#t a&d re!"s"o& set $-#hara#ter !olu%e &a%e exe#ute =#%d*, the& retur&

1 % &a1e your ne* partition table to the /et#/1or%at'dat file and co'plete the follo*ing steps0 a% Carefully read the 'essage that the 1or%at utility displays, and then enter the correct file na'e% b% Luit the 1or%at utility *hen you ha1e finished% c% Use the ta"l co''and to 1ie* the contents of the /et#/1or%at'dat file% d% 9ote that your ne* partition infor'ation is appended to the file%
1or%at* s!ve 0a!"&) &ew d"sk a&d part"t"o& de1"&"t"o&s 9&ter 1"le &a%eD5'/1or%at'dat5E: 5/etc/#or$!t.d!t5 1or%at* <uit A t!il /etc/#or$!t.d!t A part"t"o& R 5.QD70/part"t"o&5 S : d"sk R 5D9?(@3:5 : #tlr R ata S : 0 R 0, 5 2 320 : 1 R 13$-9, 5 2 320 : 2 R 0, 234432-20 S : 3 R 2--5$, 5 2 320 : 4 R 41 3-, 4553- 0 A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 1"

1B% 8erify your ne* partition table *ith the prt!to# co''and%
A B B B B B B B B B B B B B B B B prtvtoc /dev/rdsk/c0t1d0s2 /de!/rdsk/#0t1d0s2 part"t"o& %ap D"%e&s"o&s: 512 bytes/se#tor 255 se#tors/tra#k 1 tra#ks/#yl"&der 40$0 se#tors/#yl"&der 5-4 1 #yl"&ders 5-459 a##ess"ble #yl"&ders ?la)s: 1: u&%ou&table 10: read-o&ly ?"rst 0e#tor 0 5 5 0e#tor 2ou&t 2 320 5 3ast 0e#tor 2 319

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Cart"t"o& 0 1 2 3 4

:a) 2 3 5 0 0

?la)s 00 01 01 00 00

.ou&t D"re#tory

2 320 5 2 320 113252 39 0 234432-20 234432-19 113252 40 5 2 320 1 9$-$959 1 9$-$9 0 4553- 0 234432-19

15% Create a directory called /!to#% # $kdir /vtoc 20% Use the prt!to# co''and to print the partition table that you .ust created and co'plete the follo*ing steps0 a% &a1e its output to a file in the /!to# directory% b% 9a'e the file so that it corresponds *ith the dis3 you are e,a'ining% c% Use the #at co''and to 1erify that 1alid infor'ation e,ists in the file that you created%
# # B B B B B B B B B B B B B B
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

prtvtoc /dev/rdsk/c0t1d0s2 > /vtoc/c0t1d0 c!t /vtoc/c0t1d0 /de!/rdsk/#0t1d0s2 part"t"o& %ap D"%e&s"o&s: 512 bytes/se#tor 255 se#tors/tra#k 1 tra#ks/#yl"&der 40$0 se#tors/#yl"&der 5-4 1 #yl"&ders 5-459 a##ess"ble #yl"&ders ?la)s: 1: u&%ou&table 10: read-o&ly

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 1(

B B Cart"t"o& 0 1 2 3 4 A

:a) 2 3 5 0 0

?"rst 0e#tor 3ast ?la)s 0e#tor 2ou&t 0e#tor 00 0 5 2 320 5 2 319 01 5 2 320 5 2 320 113252 39 01 0 234432-20 234432-19 00 113252 40 5 2 320 1 9$-$959 00 1 9$-$9 0 4553- 0 234432-19

.ou&t D"re#tory

21% Use the follo*ing dd co''and to destroy the dis3 label and co'plete the follo*ing steps0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

a% De certain to specify the correct dis3 de1ice na'e for the o1R argu'ent% b% $nter all other argu'ents e,actly as listed% # dd i#=/dev/>ero o#=/dev/rdsk/c0t1d0s2 bs=012 count=1 1L0 re#ords "& 1L0 re#ords out A 22% 6tte'pt to read the label fro' the sa'e dis3 by using the prt!to# co''and% # prtvtoc /dev/rdsk/c0t1d0s2 Chat happensF ,ifferent disk types present different results. S#S$ disks might report messages that indicate that the disk label is unreadable. !or example) prt!to#: /de!/rdsk/#1t3d0s2: @&able to read D"sk )eo%etry err&o R 0x1 /D$ dis3s 'ight report a partition table *here only slice 2, or slices 0 and 2 re'ain defined% @or e,a'ple0
B B Cart"t"o& 2 :a) 5 ?la)s 01 ?"rst 0e#tor 3ast 0e#tor 2ou&t 0e#tor 0 1-$012$0 1-$012-9 .ou&t D"re#tory

$,a'ple fro' a &un Dlade 1(000


B B Cart"t"o& 0 2 :a) 0 5 ?la)s 00 01 ?"rst 0e#tor 3ast 0e#tor 2ou&t 0e#tor 0 234432-20 234432-19 0 234432-20 234432-19 .ou&t D"re#tory

2!% Co'plete one of the follo*ing steps0 a% /f the prt!to# co''and reported an M@&able to read D"sk )eo%etryN 'essage, use the 1or%at utility to place a default label on the dis3 for *hich you destroyed the label earlier% @or e,a'ple0 $ote) )he de1ice in this e,a'ple, #1t3d0, is a dis3 of the type that *ould 'atch the condition described abo1e%
A #or$!t 0ear#h"&) 1or d"sks'''do&e #1t3d0: #o&1")ured w"th #apa#"ty o1 $'43M8
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 16

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(6(73(839 D70/ 09392:7;<0: 0' #0t0d0 =0:3$410( #yl 1 -0 alt 2 hd 1 se# 3* /p#"+11,0/p#"+1,1/"de+3/dad+0,0 1' #1t3d0 =0@<9'0M #yl 4924 alt 2 hd 2- se# 133* /p#"+11,0/p#"+1/s#s"+1/sd+3,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1 sele#t"&) #1t3d0 Dd"sk 1or%attedE D"sk &ot labeled' 3abel "t &owN 5 (1or%at %e&u output o%"tted) 1or%at* < A

b%

6tte'pt to read the label fro' the sa'e dis3%


# B B B B B B B B B B B B B B B B prtvtoc /dev/rdsk/c0t1d0s2 /de!/rdsk/#0t1d0s2 part"t"o& %ap D"%e&s"o&s: 512 bytes/se#tor 255 se#tors/tra#k 1 tra#ks/#yl"&der 40$0 se#tors/#yl"&der 5-4 1 #yl"&ders 5-459 a##ess"ble #yl"&ders ?la)s: 1: u&%ou&table 10: read-o&ly ?"rst 0e#tor 3ast ?la)s 0e#tor 2ou&t 0e#tor 00 0 5 2 320 5 2 319 01 5 2 320 5 2 320 113252 39 01 0 234432-20 234432-19 00 113252 40 5 2 320 1 9$-$959 00 1 9$-$9 0 4553- 0 234432-19

Cart"t"o& 0 1 2 3 4

:a) 2 3 5 0 0

.ou&t D"re#tory

Cas this successfulF This command should successfully read the disk label. c% /f the prt!to# co''and reports that only slice 2 e,ists, or slice 0 and 2 e,ist on the dis3, use the 1%thard co''and to *rite to the dis3 the label infor'ation you sa1ed earlier% # #$t"!rd -s /vtoc/c0t1d0 /dev/rdsk/c0t1d0s2 1%thard: <ew !olu%e table o1 #o&te&ts &ow "& pla#e' A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 1

%as& 0) >or&ing (ith "is&s and Partitions on <74 <40 Systems


/n this tas3, you use the 1or%at utility and the 1d"sk, prt!to#, and 1%thard co''ands to create and 'anage 1d"sk partitions and dis3 slices on dis3s attached to an ,B6/,6" syste' running Oracle &olaris 10 O&% 1% ?og in as the root user and co'plete the follo*ing steps0 a% Open a ter'inal *indo*% b% 4un the 1or%at utility%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

# #or$!t 0ear#h"&) 1or d"sks'''do&e

(6(73(839 D70/ 09392:7;<0: 0' #1d0 =D9?(@3: #yl 39$$- alt 2 hd 4 se# 3* /p#"+0,0/p#"-"de+-/"de+0/#%dk+0,0 1' #2d0 =D9?(@3: #yl 1000$ alt 2 hd 255 se# 3* /p#"+0,0/p#"-"de+-/"de+1/#%dk+0,0 0pe#"1y d"sk (e&ter "ts &u%ber): A

2%

Co'plete the follo*ing steps0 a% 4ecord the list of dis3s presented by the 1or%at utility% @or e,a'ple, #1d0 and #2d0% b% 2ress Ctrl J D to e,it the for'at utility% 0pe#"1y d"sk (e&ter "ts &u%ber): 12 A

!%

Use the prt!to# co''and to list the 8)OC for each of the dis3s you found in the pre1ious step, and co'plete the follo*ing steps0 a% /f the prt!to# co''and displays an error si'ilar to this e,a'ple, you ha1e identified the unused dis30 # prtvtoc /dev/rdsk/c2d0s2 prt!to#: /de!/rdsk/#2d0s2: @&able to read D"sk )eo%etry err&o R 0x5 A b% c% /f this error appears, record the na'e of this dis3 and s3ip steps b and c% /f the prt!to# co''and displays a partition table for both dis3s, e,a'ine the .ou&t D"re#tory field in the co''and output% 4ecord the na'e of a dis3 that has no 'ount directory listed% @or your classroo' en1iron'ent, this is an unused dis3% $ote) &yste's in production can use un'ounted slices to store production data% Do not assu'e that un'ounted slices are unused on syste's in production%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 1B

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

# B B B B B B B B B B B B B B B B

prtvtoc /dev/rdsk/c2d0s2 /de!/rdsk/#2d0s2 part"t"o& %ap D"%e&s"o&s: 512 bytes/se#tor 3 se#tors/tra#k 255 tra#ks/#yl"&der 1 0 5 se#tors/#yl"&der 10010 #yl"&ders 1000$ a##ess"ble #yl"&ders ?la)s: 1: u&%ou&table 10: read-o&ly ?"rst 0e#tor 3ast 0e#tor 2ou&t 0e#tor 4$195 $19315 $ -509 $ -510 10 0290 192--99 0 1 0--$520 1 0--$519 192-$00 15$$50-20 1 0--$519 0 1 0 5 1 0 4 1 0 5 32130 4$194

Cart"t"o& 0 1 2 $ 9

:a) 11 3 5 $ 1 9

?la)s 00 01 01 00 01 00

.ou&t D"re#tory

"%

Unused dis30 The disk you identify will depend on your specific system. 4un the 1or%at utility again, and select the unused dis3 fro' the list of dis3s presented% a% /f the dis3 has no 1d"sk partition table defined, for'at as3s you to select a dri1e type% &elect the D9?(@3: entry% )he ?;F.(: 'enu appears%
# #or$!t 0ear#h"&) 1or d"sks'''do&e

(6(73(839 D70/ 09392:7;<0: 0' #1d0 =D9?(@3: #yl 39$$- alt 2 hd 4 se# 3* /p#"+0,0/p#"-"de+-/"de+0/#%dk+0,0 1' #2d0 =D9?(@3: #yl 1000$ alt 2 hd 255 se# 3* /p#"+0,0/p#"-"de+-/"de+1/#%dk+0,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1

(6(73(839 DF769 :QC90: 0' D9?(@3: 1' other 0pe#"1y d"sk type (e&ter "ts &u%ber): 0 sele#t"&) #2d0 <o #urre&t part"t"o& l"st <o de1e#t l"st 1ou&d Dd"sk 1or%atted, &o de1e#t l"st 1ou&dE
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 15

?;F.(: .9<@: d"sk type (output o%"tted) 1or%at*

- sele#t a d"sk - sele#t (de1"&e) a d"sk type

b%

/f the dis3 has a defined 1d"sk partition table, the ?;F.(: 'enu appears0
# #or$!t 0ear#h"&) 1or d"sks'''do&e

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(6(73(839 D70/ 09392:7;<0: 0' #1d0 =D9?(@3: #yl 39$$- alt 2 hd 4 se# 3* /p#"+0,0/p#"-"de+-/"de+0/#%dk+0,0 1' #2d0 =D9?(@3: #yl 1000$ alt 2 hd 255 se# 3* /p#"+0,0/p#"-"de+-/"de+1/#%dk+0,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1 sele#t"&) #2d0 2o&troller work"&) l"st 1ou&d Dd"sk 1or%atted, de1e#t l"st 1ou&dE ?;F.(: .9<@: d"sk type part"t"o& #urre&t 1or%at 1d"sk repa"r label a&alyGe de1e#t ba#kup !er"1y sa!e "&Iu"ry !ol&a%e H=#%d* Iu"t 1or%at*

sele#t a d"sk sele#t (de1"&e) a d"sk type sele#t (de1"&e) a part"t"o& table des#r"be the #urre&t d"sk 1or%at a&d a&alyGe the d"sk ru& the 1d"sk pro)ra% repa"r a de1e#t"!e se#tor wr"te label to the d"sk sur1a#e a&alys"s de1e#t l"st %a&a)e%e&t sear#h 1or ba#kup labels read a&d d"splay labels sa!e &ew d"sk/part"t"o& de1"&"t"o&s show !e&dor, produ#t a&d re!"s"o& set $-#hara#ter !olu%e &a%e exe#ute =#%d*, the& retur&

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 20

(%

Display the 1d"sk 'enu and co'plete the follo*ing steps to create one Oracle &olaris 1d"sk partition that uses the *hole dis30

a. /f the dis3 has no defined 1d"sk partition table, the 1d"sk 'enu as3s if you *ant to accept the default Oracle &olaris partition% $nter & to decline, and then edit the partition table% )he first sector of dis3 on ,/B6 and ,/B" contains fi,ed dis3 partitions%
1or%at* #disk <o 1d"sk table ex"sts' :he de1ault part"t"o& 1or the d"sk "s:

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

a 100T 50;3(F70 0yste%5 part"t"o& :ype 5y5 to a##ept the de1ault part"t"o&, part"t"o& table' n otherw"se type 5&5 to ed"t the

:otal d"sk s"Ge "s 10011 #yl"&ders 2yl"&der s"Ge "s 1 0 5 (512 byte) blo#ks 2yl"&ders 0tart 9&d 3e&)th RRRRR RRR RRRRRR

Cart"t"o& RRRRRRRRR

0tatus RRRRRR

:ype RRRRRRRRRRRR

T RRR

O(F<7<M: &o part"t"o&s are de1"&edH 09392: ;<9 ;? :>9 ?;33;O7<M: 1' 2reate a part"t"o& 2' 0pe#"1y the a#t"!e part"t"o& 3' Delete a part"t"o& 4' 2ha&)e betwee& 0olar"s a&d 0olar"s2 Cart"t"o& 7Ds 5' 9x"t (update d"sk #o&1")urat"o& a&d ex"t) ' 2a&#el (ex"t w"thout updat"&) d"sk #o&1")urat"o&) 9&ter 0ele#t"o&:

b%

/f the dis3 has a defined 1d"sk partition table, the table appears *hen you enter the 1d"sk 'enu%
:otal d"sk s"Ge "s 10011 #yl"&ders 2yl"&der s"Ge "s 1 0 5 (512 byte) blo#ks 2yl"&ders 0tart 9&d 3e&)th RRRRR RRR RRRRRR 1 10010 10010

Cart"t"o& RRRRRRRRR 1

0tatus RRRRRR

:ype RRRRRRRRRRRR 0olar"s2

T RRR 100

09392: ;<9 ;? :>9 ?;33;O7<M: 1' 2reate a part"t"o& 2' 0pe#"1y the a#t"!e part"t"o& 3' Delete a part"t"o& 4' 2ha&)e betwee& 0olar"s a&d 0olar"s2 Cart"t"o& 7Ds 5' 9x"t (update d"sk #o&1")urat"o& a&d ex"t) ' 2a&#el (ex"t w"thout updat"&) d"sk #o&1")urat"o&) 9&ter 0ele#t"o&:

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 21

c%

Delete all 1d"sk partitions that e,ist%


9&ter 0ele#t"o&: 3 0pe#"1y the part"t"o& &u%ber to delete (or e&ter 0 to ex"t): 1 (re you sure you wa&t to delete part"t"o& 1N :h"s w"ll %ake all 1"les a&d pro)ra%s "& th"s part"t"o& "&a##ess"ble (type 5y5 or 5&5)' 5 :otal d"sk s"Ge "s 10011 #yl"&ders 2yl"&der s"Ge "s 1 0 5 (512 byte) blo#ks 2yl"&ders 9&d 3e&)th RRR RRRRRR

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Cart"t"o& RRRRRRRRR

0tatus RRRRRR

:ype RRRRRRRRRRRR

0tart RRRRR

T RRR

O(F<7<M: &o part"t"o&s are de1"&edH 09392: ;<9 ;? :>9 ?;33;O7<M: 1' 2reate a part"t"o& 2' 0pe#"1y the a#t"!e part"t"o& 3' Delete a part"t"o& 4' 2ha&)e betwee& 0olar"s a&d 0olar"s2 Cart"t"o& 7Ds 5' 9x"t (update d"sk #o&1")urat"o& a&d ex"t) ' 2a&#el (ex"t w"thout updat"&) d"sk #o&1")urat"o&) 9&ter 0ele#t"o&:

Cart"t"o& 1 has bee& deleted'

6%

Use the 1d"sk 'enu to create one &olaris 1d"sk partition that uses the *hole dis3% 9&ter 0ele#t"o&: 1 a% &elect the 0;3(F702 partition type%
0ele#t the part"t"o& type to 1=:?L@*9:2 2R@<7U 5RD;012 RD;01 9RD;01 38( (Rx$ 8oot DR?(:3238( 9RD;09U:38( #reate: 3RC27U;0 -RD;09U: 8RD"a)&ost"# ?R9?7 4R;ther $RD;087M 2R?(:32 0R9x"tN 1

b%

$nter 100 to specify using 100O of the dis3% 0pe#"1y the per#e&ta)e o1 d"sk to use 1or th"s part"t"o& (or type 5#5 to spe#"1y the s"Ge "& #yl"&ders)' 100 c% $nter & to pre1ent this partition fro' being the acti1e partition%

0hould th"s be#o%e the a#t"!e part"t"o&N 71 yes, "t w"ll be a#t"!ated ea#h t"%e the #o%puter "s reset or tur&ed o&' Clease type 5y5 or 5&5' n :otal d"sk s"Ge "s 10011 #yl"&ders
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices

Chapter ! 7 2age 22

2yl"&der s"Ge "s 1 0 5 (512 byte) blo#ks 2yl"&ders 0tart 9&d 3e&)th RRRRR RRR RRRRRR 1 10011 10010

Cart"t"o& RRRRRRRRR 1

0tatus RRRRRR

:ype RRRRRRRRRRRR 0olar"s2

T RRR 100

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

09392: ;<9 ;? :>9 ?;33;O7<M: 1' 2reate a part"t"o& 2' 0pe#"1y the a#t"!e part"t"o& 3' Delete a part"t"o& 4' 2ha&)e betwee& 0olar"s a&d 0olar"s2 Cart"t"o& 7Ds 5' 9x"t (update d"sk #o&1")urat"o& a&d ex"t) ' 2a&#el (ex"t w"thout updat"&) d"sk #o&1")urat"o&) 9&ter 0ele#t"o&:

d%

&elect ite' ( fro' the 1d"sk 'enu to update the dis3 configuration, and e,it the 1d"sk 'enu%
9&ter 0ele#t"o&: 0 1or%at*

Display the part"t"o& 'enu and co'plete the follo*ing steps0 a% 2rint the current partition table% b% 4ecord the nu'ber of gigabytes G#DH assigned to slice 2%
1or%at* p!rt

C(F:7:7;< .9<@: 0 - #ha&)e J0K part"t"o& 1 - #ha&)e J1K part"t"o& 2 - #ha&)e J2K part"t"o& 3 - #ha&)e J3K part"t"o& 4 - #ha&)e J4K part"t"o& 5 - #ha&)e J5K part"t"o& - #ha&)e J K part"t"o& - #ha&)e J-K part"t"o& sele#t - sele#t a prede1"&ed table %od"1y - %od"1y a prede1"&ed part"t"o& table &a%e - &a%e the #urre&t table pr"&t - d"splay the #urre&t table label - wr"te part"t"o& %ap a&d label to the d"sk H=#%d* - exe#ute =#%d*, the& retur& Iu"t part"t"o&* print 2urre&t part"t"o& table (or")"&al): :otal d"sk #yl"&ders a!a"lable: 1000$ L 2 (reser!ed #yl"&ders) Cart :a) ?la) 2yl"&ders 0"Ge 8lo#ks

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 2!

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

0 reser!ed 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed ho%e $ boot 9 alter&ates part"t"o&*

w% wu wu wu wu wu wu w% wu w%

3 54 0 0 0 0 0 120 0 1

53 119 V 1000-

- 10000 2

400'0 .8 51-'-2.8 - ' -M8 0 0 0 0 -5'-5M8 -'$4.8 15' 9.8

(51/0/0) $19315 (0/0/0) 10 0290 (1000$/0/0) 1 0--$520 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (9$$$/0/0) 15$$50-20 (1/0/0) 1 0 5 (2/0/0) 32130

B%

5%

$ote) 8arious slices 'ight already be defined% )his tas3 replaces all slices that already e,ist% #D0 *our entry will depend on the disks present in your system. Di1ide the nu'ber of #D by " and co'plete the follo*ing steps0 a% Use the result as the nu'ber of #D to assign as dis3 space to four slices% b% 4ound do*n to the ne,t *hole #D if the result includes a fraction% @or e,a'ple, if slice 2 is 6%6 #D, 6%6 / " K 15%16 #D% /n this case, use 15 #D as the size for the four slices% #D/"0 *our entry will depend on your system. Display the C(F:7:7;< 'enu again and co'plete the follo*ing steps0 a% &elect slice 0% b% c% d% e% 6ccept the defaults for tags and flags% Use the default starting cylinder% )ypically, this is cylinder !% $nter the resulting nu'ber of #D fro' the pre1ious step for the slice size% 2rint the partition table again to 1erify the change%
part"t"o&* 0 Cart :a) 0 reser!ed ?la) w% 2yl"&ders 3 - 53 0"Ge 400'0 .8 8lo#ks (51/0/0)

9&ter part"t"o& "d ta)Dreser!edE: =*eturn* 9&ter part"t"o& per%"ss"o& 1la)sDw%E: =*eturn* 9&ter &ew start"&) #ylD3E: 3 9&ter part"t"o& s"GeD$19315b, 51#, 53e, 400'0 %b, 0'39)bE: 19gb part"t"o&* print 2urre&t part"t"o& table (u&&a%ed): :otal d"sk #yl"&ders a!a"lable: 1000$ L 2 (reser!ed #yl"&ders) Cart :a) 0 reser!ed 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed ?la) w% wu wu wu wu wu wu 2yl"&ders 3 - 24$3 54 119 0 V 10000 0 0 0 0"Ge 19'01M8 51-'-2.8 - ' -M8 0 0 0 0 8lo#ks (24$1/0/0) 39$5-2 5 (0/0/0) 10 0290 (1000$/0/0) 1 0--$520 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 2"

ho%e $ boot 9 alter&ates part"t"o&*

w% wu w%

120 - 10000 0 1 2

-5'-5M8 -'$4.8 15' 9.8

(9$$$/0/0) (1/0/0) (2/0/0)

15$$50-20 1 0 5 32130

10% 6tte'pt to select slices B and 5 for 'odification% Chat happensF part"t"o&* W$P "s &ot part"t"o&* W9P "s &ot part"t"o&* % expe#ted' 9 expe#ted'

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

The ormat utility prevents you from modifying these two predefined slices. 11% &et the sizes of slices 1, !, and " so that they are the sa'e as slice 0% +ou should begin each successi1e slice on the cylinder that follo*s the ending cylinder of the pre1ious slice% @or e,a'ple0
part"t"o&* 1 Cart :a) 1 swap ?la) wu 2yl"&ders 54 - 119 0"Ge 51-'-2.8 8lo#ks /0/0)

10 0290

9&ter part"t"o& "d ta)DswapE: =*eturn* 9&ter part"t"o& per%"ss"o& 1la)sDw%E: =*eturn* 9&ter &ew start"&) #ylD54E: 2484 9&ter part"t"o& s"GeD10 0290b, #, 2549e, 51-'-2%b, 0'51)bE: 19gb part"t"o&* print 2urre&t part"t"o& table (u&&a%ed): :otal d"sk #yl"&ders a!a"lable: 1000$ L 2 (reser!ed #yl"&ders) Cart :a) 0 reser!ed 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed ho%e $ boot 9 alter&ates part"t"o&* ?la) w% wu wu wu wu wu wu w% wu w% 2yl"&ders 3 - 24$3 24$4 - 49 4 0 V 10000 0 0 0 120 - 10000 0 1 2 0"Ge 19'01M8 19'01M8 - ' -M8 0 0 0 0 -5'-5M8 -'$4.8 15' 9.8 8lo#ks (24$1/0/0) 39$5-2 5 (24$1/0/0) 39$5-2 5 (1000$/0/0) 1 0--$520 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (9$$$/0/0) 15$$50-20 (1/0/0) 1 0 5 (2/0/0) 32130

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 2(

12% &et slices (, 6, and


part"t"o&* . Cart :a) ho%e 9&ter 9&ter 9&ter 9&ter

to start at cylinder 0, and then assign the' 0 :D%


?la) w% 2yl"&ders 120 - 10000"Ge -5'-5M8 8lo#ks (9$$$/0/0) 15$$50-20

part"t"o& "d ta)Dho%eE: =*eturn* part"t"o& per%"ss"o& 1la)sDw%E: =*eturn* &ew start"&) #ylD120E: 0 part"t"o& s"GeD15$$50-20b, 9$$$#, 9$$-e, --5 3'$3%b, -5'-5)bE: 0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

part"t"o&*

1!% 2rint the partition table%


part"t"o&* print 2urre&t part"t"o& table (u&&a%ed): :otal d"sk #yl"&ders a!a"lable: 1000$ L 2 (reser!ed #yl"&ders) Cart :a) 0 reser!ed 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed $ boot 9 alter&ates part"t"o&* ?la) w% wu wu wu wu wu wu w% wu w% 2yl"&ders 3 - 24$3 24$4 - 49 4 0 V 100049 5 - -445 -44 - 992 0 0 0 0 0 1 2 0"Ge 19'01M8 19'01M8 - ' -M8 19'01M8 19'01M8 0 0 0 -'$4.8 15' 9.8 8lo#ks (24$1/0/0) 39$5-2 5 (24$1/0/0) 39$5-2 5 (1000$/0/0) 1 0--$520 (24$1/0/0) 39$5-2 5 (24$1/0/0) 39$5-2 5 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (1/0/0) 1 0 5 (2/0/0) 32130

$,cept for slice 2, is there any o1erlap of ending and beginning cylinders for any of the slices listedF +o. 1"% Co'plete the follo*ing steps to introduce the o1erlapping proble'0 a% 6dd 1 to the nu'ber #D/" 1alue listed in step 6% G#D/"H J 10 *our entry will depend on your system. b% Change slice 0 so that it uses the ne* size%
part"t"o&* 0 Cart :a) reser!ed ?la) w% 2yl"&ders 3 - 24$3 0"Ge 19'01M8 8lo#ks (24$1/0/0) 39$5-2 5

9&ter part"t"o& "d ta)Dreser!edE: =*eturn* 9&ter part"t"o& per%"ss"o& 1la)sDw%E: =*eturn* 9&ter &ew start"&) #ylD3E: 3 9&ter part"t"o& s"GeD39$5-2 5b, 24$1#, 24$3e, 194 1'55%b, 19'01)bE: 20gb part"t"o&* print 2urre&t part"t"o& table (u&&a%ed): :otal d"sk #yl"&ders a!a"lable: 1000$ L 2 (reser!ed #yl"&ders)

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 26

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Cart :a) 0 reser!ed 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed $ boot 9 alter&ates part"t"o&*

?la) w% wu wu wu wu wu wu w% wu w%

2yl"&ders 3 - 2 13 24$4 - 49 4 0 V 100049 5 - -445 -44 - 992 0 0 0 0 0 1 2

0"Ge 20'00M8 19'01M8 - ' -M8 19'01M8 19'01M8 0 0 0 -'$4.8 15' 9.8

8lo#ks (2 11/0/0) 41945-15 (24$1/0/0) 39$5-2 5 (1000$/0/0) 1 0--$520 (24$1/0/0) 39$5-2 5 (24$1/0/0) 39$5-2 5 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (1/0/0) 1 0 5 (2/0/0) 32130

)he 2yl"&ders colu'n in the partition table should no* indicate that slice 0 ends after slice 1 begins% 1(% Co'plete the follo*ing steps0 a% Use the %od"1y co''and fro' the partition 'enu to atte'pt to fi, this proble'% b% &elect /te' 0 to 'odify the current partition table%
part"t"o&* 4 9xpe#t"&) o&e o1 the 1ollow"&): (abbre!"at"o&s ok): 0 - #ha&)e J0K part"t"o& 1 - #ha&)e J1K part"t"o& 2 - #ha&)e J2K part"t"o& 3 - #ha&)e J3K part"t"o& 4 - #ha&)e J4K part"t"o& 5 - #ha&)e J5K part"t"o& - #ha&)e J K part"t"o& - #ha&)e J-K part"t"o& sele#t - sele#t a prede1"&ed table %od"1y - %od"1y a prede1"&ed part"t"o& table &a%e - &a%e the #urre&t table pr"&t - d"splay the #urre&t table label - wr"te part"t"o& %ap a&d label to the d"sk H=#%d* - exe#ute =#%d*, the& retur& Iu"t part"t"o&* $odi#5 0ele#t part"t"o&"&) base: 0' 2urre&t part"t"o& table (u&&a%ed) 1' (ll ?ree >o) 2hoose base (e&ter &u%ber) D0EN 0 Oar&"&): ;!erlapp"&) part"t"o& (1) "& table' Oar&"&): ?"x, or sele#t a d"11ere&t part"t"o& table' part"t"o&*

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 2

Chich *arnings appearF


Oar&"&): ;!erlapp"&) part"t"o& (1) "& table' Oar&"&): ?"x, or sele#t a d"11ere&t part"t"o& table'

16% :odify the partition table and select /te' 1 to use the (ll ?ree >o) option%
part"t"o&* $odi#5 0ele#t part"t"o&"&) base: 0' 2urre&t part"t"o& table (u&&a%ed) 1' (ll ?ree >o) 2hoose base (e&ter &u%ber) D0EN 1 Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed usr - u&ass")&ed $ boot 9 alter&ates ?la) w% wu wu w% w% w% w% w% wu w% 2yl"&ders 0 0 0 - 10000 0 0 0 0 0 0 0 2 0"Ge 0 0 - ' -M8 0 0 0 0 0 -'$4.8 15' 9.8 8lo#ks (0/0/0) 0 (0/0/0) 0 (1000$/0/0) 1 0--$520 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (1/0/0) 1 0 5 (2/0/0) 32130

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Do you w"sh to #o&t"&ue #reat"&) a &ew part"t"o& table based o& abo!e tableDyesEN

)he partition table appears% 1 % Obser1e the 2yl"&ders and 0"Ge colu'ns, and then 1erify that they are all zero e,cept for slices 2, B, and possibly 5% 1B% 4espond to the pro'pts to continue the process and co'plete the follo*ing steps0 a% &elect slice " as the (ll ?ree >o) partition% b% Use the size listed in step B for slices 0, 1, and !% c% $nter Fetur& to set the other slices to size 0%
Do you w"sh to #o&t"&ue #reat"&) table based o& abo!e tableDyesEN ?ree >o) part"t"o&D EN 6 9&ter s"Ge o1 part"t"o& K0K D0b, 9&ter s"Ge o1 part"t"o& K1K D0b, 9&ter s"Ge o1 part"t"o& K3K D0b, 9&ter s"Ge o1 part"t"o& K5K D0b, 9&ter s"Ge o1 part"t"o& K K D0b, 9&ter s"Ge o1 part"t"o& K-K D0b, Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed ?la) w% wu wu w% w% a &ew part"t"o& 5 0#, 0#, 0#, 0#, 0#, 0#, 0'00%b, 0'00%b, 0'00%b, 0'00%b, 0'00%b, 0'00%b, 0'00)bE: 0'00)bE: 0'00)bE: 0'00)bE: 0'00)bE: 0'00)bE: 19Ab 19Ab 19Ab =*eturn* =*eturn* =*eturn*

2yl"&ders 3 - 24$3 24$4 - 49 4 0 V 100049 5 - -445 -44 - 1000-

0"Ge 19'01M8 19'01M8 - ' -M8 19'01M8 19' 3M8

8lo#ks (24$1/0/0) 39$5-2 5 (24$1/0/0) 39$5-2 5 (1000$/0/0) 1 0--$520 (24$1/0/0) 39$5-2 5 (25 2/0/0) 4115$530

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 2B

5 u&ass")&ed usr - u&ass")&ed $ boot 9 alter&ates

w% w% w% wu w%

0 0 0 0 1 -

0 2

0 0 0 -'$4.8 15' 9.8

(0/0/0) (0/0/0) (0/0/0) (1/0/0) (2/0/0)

0 0 0 1 0 5 32130

part"t"o&* ;kay to %ake th"s the #urre&t part"t"o& table DyesEN

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

6t the end of this process, you should ha1e three slices of eEual size, *here slice " ta3es up any e,tra roo' if it e,ists% 15% 9a'e the partition table -.QD70/part"t"o&-, and then label the dis3%
;kay to %ake th"s the #urre&t part"t"o& tableDyesEN 5 9&ter table &a%e (re%e%ber Iuotes): 57829:;p!rtition5 Feady to label d"sk, #o&t"&ueN 5 part"t"o&* <

?;F.(: .9<@: d"sk type part"t"o& #urre&t 1or%at 1d"sk repa"r label a&alyGe de1e#t ba#kup !er"1y sa!e "&Iu"ry !ol&a%e H=#%d* Iu"t 1or%at*

sele#t a d"sk sele#t (de1"&e) a d"sk type sele#t (de1"&e) a part"t"o& table des#r"be the #urre&t d"sk 1or%at a&d a&alyGe the d"sk ru& the 1d"sk pro)ra% repa"r a de1e#t"!e se#tor wr"te label to the d"sk sur1a#e a&alys"s de1e#t l"st %a&a)e%e&t sear#h 1or ba#kup labels read a&d d"splay labels sa!e &ew d"sk/part"t"o& de1"&"t"o&s show !e&dor, produ#t a&d re!"s"o& set $-#hara#ter !olu%e &a%e exe#ute =#%d*, the& retur&

20% &a1e your ne* partition table to the /et#/1or%at'dat file and co'plete the follo*ing steps0 a% Carefully read the 'essage that the 1or%at utility displays, and then enter the correct file na'e% b% Luit the 1or%at utility *hen you ha1e finished% c% Use the ta"l co''and to 1ie* the contents of the /et#/1or%at'dat file% d% 9ote that your ne* partition infor'ation is appended to the file%
1or%at* s!ve 0a!"&) &ew d"sk a&d part"t"o& de1"&"t"o&s 9&ter 1"le &a%eD5'/1or%at'dat5E: 5/etc/#or$!t.d!t5
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age 25

1or%at* <uit A t!il /etc/#or$!t.d!t part"t"o& R 5.QD70/part"t"o&5 S : d"sk R 5D9?(@3:5 : #tlr R ata S : 0 R reser!ed, w%, 3, 39$5-2 5 : 1 R 24$4, 39$5-2 5 S : 2 R 0, 1 0--$520 : 3 R u&ass")&ed, wu, 49 5, 39$5-2 5 S : 4 R u&ass")&ed, wu, -44 , 4115$530 : $ R 0, 1 0 5 S : 9 R 1, 32130 A

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

21% 8erify your ne* partition table *ith the prt!to# co''and%
# B B B B B B B B B B B B B B B B prtvtoc /dev/rdsk/c2d0s2 /de!/rdsk/#2d0s2 part"t"o& %ap D"%e&s"o&s: 512 bytes/se#tor 3 se#tors/tra#k 255 tra#ks/#yl"&der 1 0 5 se#tors/#yl"&der 10010 #yl"&ders 1000$ a##ess"ble #yl"&ders ?la)s: 1: u&%ou&table 10: read-o&ly ?"rst 0e#tor 0e#tor 2ou&t 3ast 0e#tor

Cart"t"o&

:a)

?la)s

.ou&t D"re#tory

22% Create t*o directories, one called /!to# and another called /1d"sk% # $kdir /vtoc # $kdir /#disk

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age !0

2!% Use the prt!to# co''and to print the partition table that you .ust created and co'plete the follo*ing steps0 a% &a1e its output to a file in the /!to# directory% b% 9a'e the file so that it corresponds *ith the dis3 you are e,a'ining% c% Use the #at co''and to 1erify that 1alid infor'ation e,ists in the file that you created%
# # B B B B B B B B B B B B B B B B prtvtoc /dev/rdsk/c2d0s2 > /vtoc/c2d0 c!t /vtoc/c2d0 /de!/rdsk/#2d0s2 part"t"o& %ap D"%e&s"o&s: 512 bytes/se#tor 3 se#tors/tra#k 255 tra#ks/#yl"&der 1 0 5 se#tors/#yl"&der 10010 #yl"&ders 1000$ a##ess"ble #yl"&ders ?la)s: 1: u&%ou&table 10: read-o&ly ?"rst 0e#tor 3ast ?la)s 0e#tor 2ou&t 0e#tor 00 4$195 39$5-2 5 39905459 01 399054 0 39$5-2 5 -9- 2-24 01 0 1 0--$520 1 0--$519 01 -9- 2-25 39$5-2 5 119 199$9 01 119 19990 4115$530 1 0--$519 01 0 1 0 5 1 0 4 00 1 0 5 32130 4$194

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Cart"t"o& 0 1 2 3 4 $ 9

:a) 11 3 5 0 0 1 9

.ou&t D"re#tory

2"% 8erify the 1d"sk partition table for your spare dis3 *ith the 1d"sk co''and%
# #disk -B - /dev/rdsk/c2d0p0 B /de!/rdsk/#2d0p0 de1ault 1d"sk table B D"%e&s"o&s: B 512 bytes/se#tor B 3 se#tors/tra#k B 255 tra#ks/#yl"&der B 10011 #yl"&ders B B syst"d: B 1: D;0;012 B 2: C27U;0 B 4: D;0;01 B 5: 9U:D;0 B : D;087M B -: ?D70/47?0
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age !1

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B

$: 9: 10: 11: 12: 14: 15: 1$: 5: $2: $ : 9$: 99: 101: 119: 120: 121: 130: 131: 134: 135: 1 5: 1 -: 1$3: 1$4: 190: 191: 23$: 239:

?D70/4(7U8;;: ?D70/4(7UD(:( ?D70/40028;;: ?D70/4O7<D;O0 ?D70/49U:4O7< ?D70/4?(:95 ?D70/49U:38( D7(MC(F: ?D70/437<@U ?D70/42C. D;0D(:( ;:>9F;0 @<7U;0 ?D70/4<;69333 ?D70/4X<U4 ?D70/4X<U42 ?D70/4X<U43 0@<7U;0 ?D70/437<@U<(: ?D70/4<:?06;31 ?D70/4<:?06;32 ?D70/480D ?D70/4<9U:0:9C ?D70/480D7?0 ?D70/480D70O(C U$ 8;;: 0@<7U;02 9?74C.8F 9?74?0

B 7d 191 A

(#t 0

8head 0

8se#t 1

8#yl 1

9head 254

9se#t 3

9#yl 1023

Fse#t 1 0 5

<u%se#t 1 0$10 50

2(% Use the 1d"sk co''and to print the 1d"sk partition table and co'plete the follo*ing steps0 a% &a1e its output to a file in the /1d"sk directory% b% 9a'e the file so that it corresponds *ith the dis3 you are e,a'ining% c% Use the #at co''and to 1erify that 1alid infor'ation e,ists in the file that you created%
# # B B B B B B B #disk -B /#disk/c2d0p0 /dev/rdsk/c2d0p0 c!t /#disk/c2d0p0 /de!/rdsk/#2d0p0 de1ault 1d"sk table D"%e&s"o&s: 512 bytes/se#tor 3 se#tors/tra#k 255 tra#ks/#yl"&der 10011 #yl"&ders

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age !2

B syst"d: B 1: D;0;012 B 2: C27U;0 B 4: D;0;01 (output o%"tted)

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

26% Use the follo*ing dd co''and to destroy the ,B6/,6" 8)OC and co'plete the follo*ing steps0 a% De certain to specify the correct dis3 de1ice na'e for the o1R argu'ent% b% $nter all other argu'ents e,actly as listed% # dd i#=/dev/>ero o#=/dev/rdsk/c2d0s2 bs=012 count=2 2L0 re#ords "& 2L0 re#ords out A 2 % 6tte'pt to read the label fro' the sa'e dis3 by using the prt!to# co''and% Chat happensF
# B B B B B B B B B B B B B B B B B B B B B prtvtoc /dev/rdsk/c2d0s2 /de!/rdsk/#2d0s2 part"t"o& %ap D"%e&s"o&s: 512 bytes/se#tor 3 se#tors/tra#k 255 tra#ks/#yl"&der 1 0 5 se#tors/#yl"&der 10010 #yl"&ders 1000$ a##ess"ble #yl"&ders ?la)s: 1: u&%ou&table 10: read-o&ly @&allo#ated spa#e: ?"rst 0e#tor 3ast 0e#tor 2ou&t 0e#tor 4$195 143299$00 1 0-30325 ?"rst 0e#tor 3ast 0e#tor 2ou&t 0e#tor 0 1 0--$520 1 0--$519 0 1 0 5 1 0 4 1 0 5 32130 4$194

Cart"t"o& 2 $ 9

:a) 5 1 9

?la)s 01 01 00

.ou&t D"re#tory

Typically on x-./x.0 systems, a default partition table appears. $n this example from an 1ltra 2(, only slices 2, -, and 9 remain defined. 3ll other partitions have been destroyed.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age !!

2B% 4un the 1or%at utility, and perfor' the follo*ing steps0 a% &elect your spare dis3%
# #or$!t 0ear#h"&) 1or d"sks'''do&e

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(6(73(839 D70/ 09392:7;<0: 0' #1d0 =D9?(@3: #yl 39$$- alt 2 hd 4 se# 3* /p#"+0,0/p#"-"de+-/"de+0/#%dk+0,0 1' #2d0 ==D9?(@3: #yl 1000$ alt 2 hd 255 se# 3* /p#"+0,0/p#"-"de+-/"de+1/#%dk+0,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1 sele#t"&) #2d0 2o&troller work"&) l"st 1ou&d Dd"sk 1or%atted, de1e#t l"st 1ou&dE

?;F.(: .9<@: d"sk type (output o%"tted) 1or%at*

- sele#t a d"sk - sele#t (de1"&e) a d"sk type

b%

Display the 1d"sk 'enu%


1or%at* #disk :otal d"sk s"Ge "s 10011 #yl"&ders 2yl"&der s"Ge "s 1 0 5 (512 byte) blo#ks 2yl"&ders 0tart 9&d 3e&)th RRRRR RRR RRRRRR 1 10010 10010

Cart"t"o& RRRRRRRRR 1

0tatus RRRRRR

:ype RRRRRRRRRRRR 0olar"s2

T RRR 100

09392: ;<9 ;? :>9 ?;33;O7<M: 1' 2reate a part"t"o& 2' 0pe#"1y the a#t"!e part"t"o& 3' Delete a part"t"o& 4' 2ha&)e betwee& 0olar"s a&d 0olar"s2 Cart"t"o& 7Ds 5' 9x"t (update d"sk #o&1")urat"o& a&d ex"t) ' 2a&#el (ex"t w"thout updat"&) d"sk #o&1")urat"o&) 9&ter 0ele#t"o&:

c%

Delete the defined Oracle &olaris 1d"sk partition%


9&ter 0ele#t"o&: 3 0pe#"1y the part"t"o& &u%ber to delete (or e&ter 0 to ex"t): 1 (re you sure you wa&t to delete part"t"o& 1N :h"s w"ll %ake all 1"les a&d pro)ra%s "& th"s part"t"o& "&a##ess"ble (type 5y5 or &5)' 5

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age !"

d%

&a1e the 1d"sk partition table, e,it the 1d"sk 'enu, and Euit the 1or%at utility%
:otal d"sk s"Ge "s 10011 #yl"&ders 2yl"&der s"Ge "s 1 0 5 (512 byte) blo#ks 2yl"&ders 0tart 9&d 3e&)th RRRRR RRR RRRRRR

Cart"t"o& RRRRRRRRR

0tatus RRRRRR

:ype RRRRRRRRRRRR

T RRR

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

O(F<7<M: &o part"t"o&s are de1"&edH 09392: ;<9 ;? :>9 ?;33;O7<M: 1' 2reate a part"t"o& 2' 0pe#"1y the a#t"!e part"t"o& 3' Delete a part"t"o& 4' 2ha&)e betwee& 0olar"s a&d 0olar"s2 Cart"t"o& 7Ds 5' 9x"t (update d"sk #o&1")urat"o& a&d ex"t) ' 2a&#el (ex"t w"thout updat"&) d"sk #o&1")urat"o&) 9&ter 0ele#t"o&: 0 0olar"s 1d"sk part"t"o& &ot 1ou&d <o 1d"sk solar"s part"t"o& 1ou&d 1or%at* < A

25% 6tte'pt to use the 1%thard co''and to *rite to the dis3 the ,B6/,6" 8)OC infor'ation you sa1ed earlier% Chat happensF # #$t"!rd -s /vtoc/c2d0 /dev/rdsk/c2d0s2 /de!/rdsk/#2d0s2: 2a&&ot )et d"sk )eo%etry A The attempt fails because the mthard command could not find slice 2 defined on the disk. !0% Use the 1d"sk co''and to replace the 1d"sk partition table *ith the 1d"sk infor'ation you sa1ed earlier% # #disk -C /#disk/c2d0p0 /dev/rdsk/c2d0p0 # !1% Use the 1%thard co''and to *rite to the dis3 the label infor'ation you sa1ed earlier% # #$t"!rd -s /vtoc/c2d0 /dev/rdsk/c2d0s2 1%thard: <ew !olu%e table o1 #o&te&ts &ow "& pla#e' A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age !(

!2% 6tte'pt to read the label fro' the sa'e dis3%


# B B B B B B B B B B B B B B B B prtvtoc /dev/rdsk/c2d0s2 /de!/rdsk/#2d0s2 part"t"o& %ap D"%e&s"o&s: 512 bytes/se#tor 3 se#tors/tra#k 255 tra#ks/#yl"&der 1 0 5 se#tors/#yl"&der 10010 #yl"&ders 1000$ a##ess"ble #yl"&ders ?la)s: 1: u&%ou&table 10: read-o&ly ?"rst 0e#tor 0e#tor 2ou&t 3ast 0e#tor

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Cart"t"o&

:a)

?la)s

.ou&t D"re#tory

Cas this successfulF This command should successfully read the disk label.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson !0 :anaging ?ocal Dis3 De1ices Chapter ! 7 2age !6

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 0) /anaging 12S 2ile Systems


Chapter 0

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson "0 :anaging U@& @ile &yste's Chapter " 7 2age 1

Practices for *esson 0


Practices Overvie(
/n these practices, you co'plete the follo*ing tas3s0 Create u1s file syste's% Calculate and ad.ust %"&1ree 1alues% Destroy the superbloc3 on an unused file syste' and repair it by using an alternati1e superbloc3%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson "0 :anaging U@& @ile &yste's Chapter " 7 2age 2

Practice 0,1) Creating and /aintaining u#s 2ile Systems


Assumptions
)his e,ercise reEuires an unused dis3, di1ided into four slices% &lices 0, 1, and ! 'ust be eEual in size, roughly one Euarter of the entire dis3 each, and slice " ta3es up the re'aining space on the dis3% /f it is necessary to partition this dis3, this e,ercise reEuires an understanding of ho* to use the 1or%at utility% )his e,ercise applies to both &264C and ,B6/,6" syste's% >eep in 'ind that these different syste's typically use different dis3 de1ice na'es% @or e,a'ple0 )he spare dis3 of a &un Dlade 1(00 G&264CH is typically #0t1d0% )he spare dis3 of a &un Ultra 20 G,B6/,6"H is typically #2d0% )hroughout this e,ercise, be certain to use the correct de1ice na'es for your particular syste'%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% ?og in as root user and co'plete the follo*ing steps0 a% Open a ter'inal *indo*% b% Change the directory to /de!/rdsk% # cd /dev/rdsk 2% Co'plete the follo*ing steps to identify a spare dis30 a% )o find a spare dis3, use the ls co''and to display a list of possible dis3s and the prt!to# co''and to display the 8)OC for each dis3 you find% # ls Ds2 # prtvtoc /dev/rdsk/c0t1d0s2 b% $,a'ine the Cart"t"o& list, as *ell as the .ou&t D"re#tory field that the prt!to# co''and displays% On syste's in the classroo', dis3s that are not in use ha1e no 'ount directory listed% 4ecord the na'e of the unused dis3% Unused dis30 $ote) )his procedure *or3s for the classroo' en1iron'ent% 6 dis3 that does not sho* 'ounted slices in the .ou&t D"re#tory field of the prt!to# output is not necessarily unused%

c%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson "0 :anaging U@& @ile &yste's Chapter " 7 2age !

!%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

/f the spare dis3 is not di1ided into four slices as described in the 6ssu'ptions section of this e,ercise, co'plete the follo*ing steps0 On ,B6/,6" syste's0 a% Use the 1d"sk 'enu in the 1or%at utility to create a single &olaris 1d"sk partition that uses the entire dis3% :a3e sure the partition is not 'ar3ed as active% b% Use the part"t"o& 'enu in the 1or%at utility to create the reEuired slices% c% :a3e slices 0, 1, and ! e,actly the sa'e size Gappro,i'ately 2( percent of the total dis3 space eachH, and use slice " for the re'ainder of the a1ailable space% Using the (ll ?ree >o) option in the %od"1y 'ethod of the part"t"o& 'enu and choosing slice " as the free hog slice 'a3es this easy% d% &a1e your changes and Euit the 1or%at utility *hen you are finished% On &264C syste's, you can also use the &olaris :anage'ent Console to partition the dis3% $,a'ple of a correct &264C partition table0
Cart :a) 0 u&ass")&ed 1 u&ass")&ed 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed Cart :a) 0 u&ass")&ed 1 u&ass")&ed 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed $ u&ass")&ed 9 u&ass")&ed ?la) w% w% wu w% w% w% w% w% ?la) w% w% wu w% w% w% w% w% wu w% 2yl"&ders 0 - 13$-$ 13$-9 - 2--50 - 5-45$ 2--5$ - 41 3 41 3- - 5-45$ 0 0 0 2yl"&ders 3 - 24$3 24$4 - 49 4 0 - 100049 5 - -445 -44 - 10000 0 0 0 0 1 2 0"Ge 2-'00M8 2-'00M8 111'-9M8 2-'00M8 30'-$M8 0 0 0 0"Ge 19'01M8 19'01M8 - ' -M8 19'01M8 19' 3M8 0 0 0 -'$4.8 15' 9.8 8lo#ks (13$ 9/0/0) 5 2 320 (13$-9/0/0) 5 2 320 (5-459/0/0) 234432-20 (13$-9/0/0) 1$$-$1 0 (15$22/0/0) 21522000 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 8lo#ks (24$1/0/0) 39$5-2 5 (24$1/0/0) 39$5-2 5 (1000$/0/0) 1 0--$520 (24$1/0/0) 39$5-2 5 (25 2/0/0) 4115$530 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 1 0 5 (0/0/0) 32130

$,a'ple of a correct ,B6/,6" partition table0

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson "0 :anaging U@& @ile &yste's Chapter " 7 2age "

"%

Use the &ew1s co''and *ithout options to create a ne* file syste' on slice 0 on the spare dis3 and co'plete the follo*ing steps0 a% Obser1e ho* Euic3ly the &ew1s co''and creates cylinder groups on this slice% b% 4ecord the nu'ber of cylinder groups, the nu'ber of cylinders per group, and the nu'ber of inodes per group% # new#s /dev/rdsk/c0t1d0s0 &ew1s: /de!/rdsk/#1t1d0s0 last %ou&ted as /extra &ew1s: #o&stru#t a &ew 1"le syste% /de!/rdsk/c0t1d0s0: (y/&)N 5

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(%

Cylinder groups0 Cylinders per group0 /nodes per group0 Use the &ew1s co''and to create a ne* file syste' on slice 1 on the spare dis3, and co'plete the follo*ing steps0 a% Use the -" option to create one inode per 16,!B" bytes of data space% b% Obser1e ho* Euic3ly the &ew1s co''and creates cylinder groups on this slice% c% 4ecord the nu'ber of cylinder groups, the nu'ber of cylinders per group, and the nu'ber of inodes per group% # new#s -i 1-3%6 /dev/rdsk/c0t1d0s1 &ew1s: /de!/rdsk/#0t1d0s1 last %ou&ted as /d"r0/d"r1 &ew1s: #o&stru#t a &ew 1"le syste% /de!/rdsk/#1t1d0s1: (y/&)N 5 Cylinder groups0 Cylinders per group0 /nodes per group0 6ccording to the statistics you ha1e gathered, ho* do the file syste's on slices 0 and 1 differF The number of inodes per group is less on file system & than on file system (. The number of cylinder groups and cylinders per group has not changed. Co'plete the follo*ing steps0 a% Use the d1 co''and to display statistics for the file syste's on slices 0 and 1 that you used in the pre1ious steps, for e,a'ple0 # d# -k /dev/dsk/c0t1d0s0 ?"lesyste% kbytes /de!/dsk/#0t1d0s0 2-$$3$4 # d# -k /dev/dsk/c0t1d0s1 ?"lesyste% kbytes /de!/dsk/#0t1d0s1 2$0915 b% used a!a"l #apa#"ty 9 2- 04953 0T used a!a"l 9 2-$105#apa#"ty 0T .ou&ted o&

6%

.ou&ted o&

4ecord the 1alues listed in the kbytes, used, and a!a"l colu'ns% Chich file syste' has the larger a'ount of a1ailable data space and *hyF !ile system & has the larger amount of available data space because it holds fewer inode records.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson "0 :anaging U@& @ile &yste's Chapter " 7 2age (

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Co'plete the follo*ing steps0 a% @or each file syste', add the used and a1ail 1alues, and co'pare the su' to the kbytes 1alue% $,pressed as a percentage, ho* 'uch larger is the kbytes 1alue than the su' of used and a!a"lF )his percentage should appro,i'ately 'atch the %"&1ree 1alue% b% Use the 1styp -! /de!/rdsk/c!t!d!s! Y )rep %"&1ree co''and to 1erify your result% To calculate the percentage difference between the sum of used and avail and the kb"tes value, complete the following steps) a% 6dd the 1alues listed as used and a!a"l, for e,a'ple0 9 L 2- 04953 R 2- 049 2 b. c. d. e. ,ivide the sum of used and avail by the kb"tes value, for example) 2- 049 2 / 2-$$3$4 R 0'9$999$ 4ultiply the result of step b by &((, for example) 0'9$999$ B 100 R 9$'999$ Subtract the result of step c from &((, for example) 100 - 9$'999$ R 1'0002 5ound the result of step d to the nearest whole number, for example) 1'0002 R 1 per#e&t

B%

Use the 1styp -! /de!/rdsk/c!t!d!s! Y )rep %"&1ree co''and to 1erify your result% # #st5p -v /dev/rdsk/c0t1d0s0 E Arep $in#ree %"&1ree 1T %axbp) 204$ opt"% t"%e 5% Use the tune#s -$ F /dev/rdsk/c#t#d#s0 co''and, *here U is the %"&1ree 1alue, to change the %"&1ree 1alue for the file syste' on slice 0 of the spare dis3% /f the current %"&1ree 1alue is greater than ( percent, reduce it by ! percent% /f it is less than or eEual to ( percent, add ! percent, for e,a'ple0 # tune#s -$ 6 /dev/rdsk/c0t1d0s0 Chat 'essage does the tu&e1s co''and displayF %"&"%u% per#e&ta)e o1 1ree spa#e #ha&)es 1ro% 1T to 4T

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson "0 :anaging U@& @ile &yste's

Chapter " 7 2age 6

10% Co'plete the follo*ing steps0 a% Use the d1 -k co''and to display the space utilization for the file syste' on slice 0 of your spare dis3% Obser1e that the %"&1ree 1alue has changed in the output% # d# -k /dev/dsk/c0t1d0s0 ?"lesyste% kbytes /de!/dsk/#0t1d0s0 2-$$3$4 b% used a!a"l #apa#"ty 9 2 - $439 0T .ou&ted o&

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

4ecord the 1alues listed in the kbytes, used, and a!a"l colu'ns% Chich 1alue has changed fro' the infor'ation you gathered in step 6F The avail column changes, but not the kb"tes or used columns. 11% Create ne* file syste's on slices ! and " of your spare dis3, for e,a'ple0 # new#s /dev/rdsk/c0t1d0s3 # new#s /dev/rdsk/c0t1d0s6 12% 4un the 1s#k co''and interacti1ely to chec3 the ne* file syste' that you created on slice ! of the spare dis3% # #sck /dev/rdsk/c0t1d0s3 Did the 1s#k co''and report errorsF +o. 1!% Use the dd co''and to destroy the 'ain superbloc3 of the file syste' on slice !% # dd i#=/dev/>ero o#=/dev/rdsk/c0t1d0s3 count=32 bs=012 1"% 4un the 1s#k co''and interacti1ely to chec3 the ne* file syste'% 4espond & to the pro'pts presented by 1s#k% # #sck /dev/rdsk/c0t1d0s3 Did the 1s#k co''and report errorsF /f so, *hat correcti1e action does the 1s#k co''and suggestF The sck command indicates that the magic number in the superblock is wrong and suggests looking for alternate superblocks in different ways, and repairing it by using one of them, for example) # #sck /dev/rdsk/c0t1d0s3 BB /de!/rdsk/#0t1d0s3 8(D 0@C9F83;2/ (: 83;2/ 1 : .(M72 <@.89F OF;<M 3;;/ ?;F (3:9F<(:9 0@C9F83;2/0 O7:> ./?0N & 3;;/ ?;F (3:9F<(:9 0@C9F83;2/0 O7:> <9O?0N & 09(F2> ?;F (3:9F<(:9 0@C9F83;2/0 ?(739D' @09 M9<9F72 0@C9F83;2/ ?F;. ./?0N & @09 M9<9F72 0@C9F83;2/ ?F;. <9O?0N &

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson "0 :anaging U@& @ile &yste's Chapter " 7 2age

09(F2> ?;F (3:9F<(:9 0@C9F83;2/0 ?(739D' Q;@ .@0: @09 :>9 -o b ;C:7;< :; ?02/ :; 0C927?Q :>9 3;2(:7;< ;? ( 6(37D (3:9F<(:9 0@C9F83;2/ :; 0@CC3Q <99D9D 7<?;F.(:7;<Z 099 1s#k(1.)' 1(% 4un the 1s#k co''and, and specify an alternati1e superbloc3 to use on slice !% Dloc3 !2 is al*ays one of the alternati1es a1ailable% # #sck -o b=32 /dev/rdsk/c0t1d0s3 (lter&ate super blo#k lo#at"o&: 32' BB /de!/rdsk/#0t1d0s3 BB 3ast .ou&ted o& BB Chase 1 - 2he#k 8lo#ks a&d 0"Ges BB Chase 2 - 2he#k Cath&a%es BB Chase 3a - 2he#k 2o&&e#t"!"ty BB Chase 3b - 6er"1y 0hadows/(23s BB Chase 4 - 2he#k Fe1ere&#e 2ou&ts BB Chase 5 - 2he#k 2yl"&der Mroups @CD(:9 0:(<D(FD 0@C9F83;2/N y 2 1"les, 9 used, 9295459 1ree (11 1ra)s, 11 1931 blo#ks, 0'0T 1ra)%e&tat"o&) BBBBB ?739 0Q0:9. O(0 .;D7?79D BBBBB 16% 4un the 1s#k co''and again to 1erify that the file syste' *as repaired% # #sck /dev/rdsk/c0t1d0s3 This time the sck command output does not report that the file system was modified.

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson "0 :anaging U@& @ile &yste's Chapter " 7 2age B

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 3) Performing /ounts and 1nmounts


Chapter 3

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson (0 2erfor'ing :ounts and Un'ounts Chapter ( 7 2age 1

Practices for *esson 3


Practices Overvie(
/n this practice, you co'plete the follo*ing tas3s0 Create 'ount points% :ount file syste's% &pecify 'ount options%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson (0 2erfor'ing :ounts and Un'ounts Chapter ( 7 2age 2

Practice 3,1) /ounting 2ile Systems


Assumptions
)his e,ercise reEuires a spare dis3 that contains four un'ounted u1s file syste's on slices 0, 1, !, and " of the spare dis3 on your syste'% /f you ha1e to partition this dis3 for this e,ercise, you 'ust understand ho* to use the 1or%at utility% /f you need to 'a3e file syste's on the slices for this e,ercise, you 'ust understand ho* to use the &ew1s co''and% $ote) /f necessary, use the #or$!t e co''and to reset the label of the spare dis3% )his e,ercise applies to both &264C and ,B6/,6" syste's% )hese syste's typically ha1e different dis3 de1ice na'es% @or e,a'ple0 )he spare dis3 of a &un Dlade 1(00 G&264CH is typically #0t1d0% )he spare dis3 of a &un Ultra 20 G,B6/,6"H is typically #2d0% )hroughout this e,ercise, use the correct de1ice na'es for your syste'%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% 2% ?og in as the root user and open a ter'inal *indo*% Use the prt!to# co''and to deter'ine *hether the reEuired slices e,ist on your spare dis3% # prtvtoc /dev/rdsk/c2d0s2 !% Use the 1styp co''and to deter'ine *hether a u1s file syste' e,ists on the reEuired slices on your spare dis3% @or e,a'ple0 # #st5p /dev/dsk/c2d0s0 u1s A "% /f the spare dis3 is not di1ided into four slices as described in the 6ssu'ptions section of this e,ercise, co'plete the follo*ing steps0 a% On ,B6/,6" syste's, use the 1d"sk 'enu in the 1or%at utility to define a single &olaris 1d"sk partition that uses the entire dis3% :a3e sure the partition is not 'ar3ed as active% b% Use the part"t"o& 'enu in the 1or%at utility to create the reEuired slices% c% :a3e slices 0, 1, and ! e,actly the sa'e size Gappro,i'ately 2( percent of the total dis3 space eachH, and use slice " for the re'ainder of the a1ailable space% Using the (ll ?ree >o) 'ethod and choosing slice " as the free hog slice 'a3es this easy% d% &a1e your changes and Euit the 1or%at utility *hen you are finished% On &264C syste's, you can also use the &olaris :anage'ent Console to partition the dis3%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson (0 2erfor'ing :ounts and Un'ounts Chapter ( 7 2age !

$,a'ple of a correct &264C partition table0


Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed usr - u&ass")&ed ?la) w% wu wu w% w% w% w% w% 2yl"&ders 0 - 13$-$ 13$-9 - 2--50 - 5-45$ 2--5$ - 41 3 41 3- - 5-45$ 0 0 0 0"Ge 2-'00M8 2-'00M8 111'-9M8 2-'00M8 30'-$M8 0 0 0 8lo#ks (13$-9/0/0) 5 2 320 (13$-9/0/0) 5 2 320 (5-459/0/0) 234432-20 (13$-9/0/0) 5 2 320 (15$22/0/0) 4553- 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

$,a'ple of a correct ,B6/,6" partition table0


Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed usr - u&ass")&ed $ boot 9 alter&ates ?la) w% wu wu w% w% w% w% w% wu w% 2yl"&ders 3 - 24$3 2221 - 49 4 0 - 10004441 - -445 1 - 10000 0 0 0 0 0 2 0"Ge 19'01M8 19'01M8 - ' -M8 19'01M8 19' 3M8 0 0 0 -'$4.8 15' 9.8 8lo#ks (24$1/0/0) 39$5-2 5 (24$1/0/0) 39$5-2 5 (1000$/0/0) 1 0--$520 (24$1/0/0) 39$5-2 5 (25 2/0/0) 4115$530 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (1/0/0) 1 0 5 (2/0/0) 32130

(%

/f the four slices on the spare dis3 do not ha1e u1s file syste's on the' as described in the 6ssu'ptions section of this e,ercise, create the reEuired file syste's% @or e,a'ple0 # new#s /dev/rdsk/c2d0s0 Use the %ou&t co''and to list the file syste's that are currently 'ounted on your syste'% Chat are the default 'ount options applied to the / GrootH file syste'F # $ount / o& /de!/dsk/#1d0s0 read/wr"te/setu"d/de!"#es/"&tr/lar)e1"les/lo))"&)/xattr/o&error R pa&"#/de!R19$0000 o& :hu 0ep 2 01:4-:3 2010 Goutput o'ittedH The mount options should match those in this example, and your dev#number depends on the devices in use on your system. Create a directory na'ed /%orespa#e to use as a 'ount point% # $kdir /$oresp!ce

6%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson (0 2erfor'ing :ounts and Un'ounts Chapter ( 7 2age "

B%

Co'plete the follo*ing steps0 a% :ount the file syste' on slice " of your spare dis3 to the /%orespa#e directory% b% 4ecord the default 'ount options that *ere applied to this 'ount% # $ount /dev/dsk/c2d0s6 /$oresp!ce # $ount Goutput o'ittedH /%orespa#e o& /de!/dsk/#2d0s4 read/wr"te/setu"d/de!"#es/"&tr/lar)e1"les/lo))"&)/xattr/o&error R pa&"#/de!R19$0044 o& :hu 0ep 2 04:2 :54 2010

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

5%

Change to the /%orespa#e directory, and then create a ne* file that has one line of content% # cd /$oresp!ce # ec"o G:o$e HextG > test#ile #

10% Display a long listing for this file, and then record the ti'e 1alue it reports% )his ti'e 1alue represents *hen the file *as last 'odified% # ls -l total 1$ drwx------rw-r--r-A

2 root 1 root

root root

$192 0ep 10 0ep

2 04:2 lostL1ou&d 2 04:2$ test1"le

11% 6dd the -u option to the ls co''and to sho* *hen the file *as last accessed, and then record the ti'e 1alue it reports% )his ti'e 1alue is updated *hene1er you read the file% # ls -lu test#ile -rw-r--r-1 root A root 10 0ep 2 04:2$ test1"le

12% Cait one 'inute or 'ore and co'plete the follo*ing steps0 a% Use the #at co''and to display the file% b% 6gain, chec3 and record the access ti'e% )he access ti'e should differ fro' the access ti'e indicated in the pre1ious step% # c!t test#ile 0o%e :ext # ls -lu test#ile -rw-r--r-1 root A

root

10 0ep

2 04:31 test1"le

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson (0 2erfor'ing :ounts and Un'ounts Chapter ( 7 2age (

1!% Change to the / GrootH directory and co'plete the follo*ing steps0 a% b% c% Un'ount the /%orespa#e file syste'% :ount the sa'e file syste' to the /%orespa#e directory, but add the option that pre1ents update of access ti'e 1alues% 8erify that the &oat"%e option is no* set for the /%orespa#e 'ount% # cd / # u$ount /$oresp!ce # $ount -o no!ti$e /dev/dsk/c2d0s6 /$oresp!ce # $ount (output o%"tted) /%orespa#e o& /de!/dsk/#2d0s4 read/wr"te/setu"d/de!"#es/"&tr/lar)e1"les/lo))"&)/xattr/&oat"%e / o&errorRpa&"#/de!R19$0044 o& :hu 0ep 2 04:32:5- 2010 A 1"% 4eturn to the /%orespa#e file syste' and co'plete the follo*ing steps0 a% Use the #at co''and to display your test file% b% 6gain, chec3 and record the access ti'e% )he access ti'e should 'atch the access ti'e that e,isted before you 'ounted the /%orespa#e file syste' *ith the &oat"%e option% # cd /$oresp!ce # c!t test#ile 0o%e :ext # ls -lu test#ile -rw-r--r-- 1 root root 10 ?eb 11 1-:23 test1"le A 1(% Use the !" editor to add a line to the /et#/!1stab file to 'a3e the 'ount for the /%orespa#e file syste' happen *hen you boot the syste'% /dev/dsk/c2d0s6 /dev/rdsk/c2d0s6 /$oresp!ce u#s 1 5es no!ti$e 16% 4eboot your syste', and co'plete the follo*ing steps0 a% ?og in as the root user% b% Open a ter'inal *indo*% c% Use the %ou&t co''and to 1erify that the /%orespa#e file syste' is 'ounted, and the &oat"%e option is set%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson (0 2erfor'ing :ounts and Un'ounts Chapter ( 7 2age 6

$ote) Chile running "&"t co''and in an ?8C en1iron'ent, you 'ight lose connection to your re'ote lab syste'% +ou need to ha1e console access to bring up the re'ote lab syste'% # init (reboot %essa)es [ lo)"& pro%pts d"splay) # $ount Goutput o'ittedH /%orespa#e o& /de!/dsk/#2d0s4 read/wr"te/setu"d/de!"#es/"&tr/lar)e1"les/lo))"&)/xattr/&oat"%e / o&errorRpa&"#/de!R19$0044 o& :hu 0ep 2 04:3 :5- 2010 1 % Create a directory called /d"r0 and 'ount the file syste' that resides on slice 0 of your spare dis3 as /d"r0% # $kdir /dir0 # $ount /dev/dsk/c2d0s0 /dir0 # 1B% Create a directory called /d"r0/d"r1 and 'ount the file syste' that resides on slice 1 of your spare dis3 as /d"r0/d"r1% # $kdir /dir0/dir1 # $ount /dev/dsk/c2d0s1 /dir0/dir1 15% Open a second ter'inal *indo* and change the directory in this second *indo* to /d"r0/d"r1% # cd /dir0/dir1 20% /n your original ter'inal *indo*, atte'pt to un'ount the file syste' 'ounted belo* the /d"r0/d"r1 directory% Chat 'essage is displayedF Does the file syste' un'ountF # u$ount /dev/dsk/c2d0s1 u%ou&t: /d"r0/d"r1 busy # $ount (output o%"tted) /d"r0/d"r1 o& /de!/dsk/#2d0s1 read/wr"te/setu"d/de!"#es/"&tr/lar)e1"les/lo))"&)/xattr/o&error R pa&"#/de!R19$0041 o& :hu 0ep 2 04:40:5- 2010 The file system does not unmount. $ote) )o disco1er *hy you could not un'ount the file syste', use the 1user -#u /d"r0/d"r1 co''and% )he 1user co''and should sho* the process /D of the shell currently using the file syste'%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson (0 2erfor'ing :ounts and Un'ounts Chapter ( 7 2age

21% /n your original ter'inal *indo*, add the -1 option to the u%ou&t co''and, and atte'pt to un'ount the file syste' 'ounted belo* the /d"r0/d"r1 directory% Chich 'essage appearsF Does the file syste' un'ountF # u$ount -# /dir0/dir1 +o message appears. The file system unmounts. 22% /n the second ter'inal *indo*, co'plete the follo*ing steps0 a% 6tte'pt to deter'ine your current *or3ing directory% Chich 'essage appearsF # pwd #a&&ot deter%"&e #urre&t d"re#tory A $ote) Different shells display different 'essages% Users of the 8(0> shell see the correct directory% b% Change the directory to / GrootH, and then 1erify that the pwd co''and *or3s% # cd / # pwd / 2!% Un'ount the file syste's 'ounted belo* /d"r0 and /%orespa#e% # u$ount /dir0 # u$ount /$oresp!ce 2"% Use the !" editor to re'o1e the line fro' /et#/!1stab that 'ounts a file syste' belo* /%orespa#e%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson (0 2erfor'ing :ounts and Un'ounts Chapter ( 7 2age B

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 4) 52S 2ile System


Chapter 4

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 1

Practices for *esson 4


Practices Overvie(
/n these practices, you co'plete the follo*ing tas3s0 Create and destroy A@& storage pools% Create, rena'e, and destroy A@& file syste's% Cor3 *ith A@& properties%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 2

Practice 4,1) Creating and "estroying 52S Storage Pools


%as&s
1% Use the Gpool co''and to display the list of A@& pools% 8erify that no A@& pool currently e,ists% # >pool list &o pools a!a"lable A Use the G1s co''and to display the list of A@& file syste's% 8erify that no A@& e,ists% # >#s list &o datasets a!a"lable A !% Use the d1 co''and to display the list of U@& file syste's currently in use on your syste'% Use this list to deter'ine *hich dis3 or dis3s on your syste' are currently in use% $ote) )he d1 co''and *ith the -? option allo*s you to list file syste's of a specific type% # d# -C u#s -" ?"lesyste% s"Ge used /de!/dsk/#1t0d0s0 9'9M 3'$M /de!/dsk/#1t0d0s- 9'9M 1'9M A "% a!a"l #apa#"ty '0M 39T -'9M 20T .ou&ted o& / /export/ho%e

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2%

Use the 1or%at co''and to list *hat dis3s are attached to your syste'% Co'pare this list *ith the output of step ! to deter'ine *hat dis3s are currently not in use on your syste'% Use PCtrl J DQ to e,it your 1or%at session% A #or$!t 0ear#h"&) 1or d"sks'''do&e (6(73(839 D70/ 09392:7;<0: 0' #1t0d0 =0@<3 M #yl 24 20 alt 2 hd 2- se# 10-* /p#"+11,0/p#"+1/s#s"+$/sd+0,0 1' #1t1d0 =?@J7:0@-.(C33 -< 0@<3 M-0401-33'92M8* /p#"+11,0/p#"+1/s#s"+$/sd+1,0 2' #2t0d0 =09(M(:9-0:3-330-30@<-2M-050-- $'3-M8* /p#"+11,0/p#"+1/s#s"+$,1/sd+0,0 3' #2t1d0 =09(M(:9-0:3-330-30@<-2M-050-- $'3-M8* /p#"+11,0/p#"+1/s#s"+$,1/sd+1,0 4' #2t2d0 =09(M(:9-0:3-330-30@<-2M-050-- $'3-M8* /p#"+11,0/p#"+1/s#s"+$,1/sd+2,0 0pe#"1y d"sk (e&ter "ts &u%ber): 12 A $ote) +our syste' 'ay use different7sized dis3s% @or this e,ercise, it is not the best practice% Use the Gpool co''and *ith the -1 option to o1erride errors that this proble' causes%
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age !

$ote) Chen you try to create a pool, your syste' *ill probably display errors that indicate that U@& file syste's e,ist on your spare dis3% /f this happens, 1erify that the spare dis3 is not in use, then use the Gpool co''and *ith the -1 option to o1erride the errors and create the pool% # >pool cre!te # 3poolname> 3disk1, disk2, I> (% /f you ha1e three unused dis3s a1ailable, use the Gpool co''and to create a storage pool called 1"rstpool that consists of one, three7dis3 46/D7A 1irtual de1ice% # >pool cre!te #irstpool r!id> c2t0d0 c2t1d0 c2t2d0 /f you ha1e only t*o unused dis3s a1ailable, use the Gpool co''and to create a storage pool called 1"rstpool that consists of one 'irror 1irtual de1ice% # >pool cre!te #irstpool $irror c2t0d0 c2t1d0 /f you ha1e only one unused dis3 a1ailable, use the Gpool co''and to create a storage pool called 1"rstpool that uses the single dis3 as a nonredundant, top7le1el 1irtual de1ice% # >pool cre!te #irstpool c2t0d0 6% Use the Gpool co''and to display the list of A@& pools% 46/D7A pool result0 # >pool list <(.9 07\9 1"rstpool 204M A :irrored pool result0 # >pool list <(.9 07\9 1"rstpool $M A 9onredundant pool result0 # >pool list <(.9 07\9 1"rstpool $M A % (33;2 -9/ ?F99 $'0M 2(C 0T >9(3:> ;<37<9 (3:F;;: (33;2 $0/ ?F99 $'0M 2(C 0T >9(3:> ;<37<9 (3:F;;: (33;2 141/ ?F99 204M 2(C 0T >9(3:> ;<37<9 (3:F;;: -

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Use the Gpool co''and to display the basic health status of your pool% # >pool st!tus -x all pools are healthy A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age "

B%

Use the Gpool co''and to display the detailed health status of your pool% Chat 3ind of top7le1el 1irtual de1ice does the Gpool co''and report, and *hat de1ices does it consist ofF Chat is the state of the top7le1el 1irtual de1ice, and of the pool itselfF 46/D7A pool result0 # >pool st!tus -v pool: 1"rstpool state: ;<37<9 s#a&: &o&e reIuested #o&1"): <(.9 0:(:9 F9(D 1"rstpool ;<37<9 0 ra"dG1 ;<37<9 0 #2t0d0 ;<37<9 0 #2t1d0 ;<37<9 0 #2t2d0 ;<37<9 0 errors: <o k&ow& data errors A :irrored pool result0 # >pool pool: state: s#rub: #o&1"): st!tus -v 1"rstpool ;<37<9 &o&e reIuested OF7:9 0 0 0 0 0 2/0@. 0 0 0 0 0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

<(.9 1"rstpool %"rror #2t0d0 #2t1d0

0:(:9 ;<37<9 ;<37<9 ;<37<9 ;<37<9

F9(D 0 0 0 0

OF7:9 0 0 0 0

2/0@. 0 0 0 0

errors: <o k&ow& data errors A 9onredundant pool result0 A Gpool status -! pool: 1"rstpool state: ;<37<9 s#rub: &o&e reIuested #o&1"): <(.9 0:(:9 1"rstpool ;<37<9 #2t0d0 ;<37<9
2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age (

F9(D 0 0

OF7:9 0 0

2/0@. 0 0

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

errors: <o k&ow& data errors A The pool irstpool should contain one top-level virtual device that matches the type you specified when you created the pool6 a raid$1, a mirror, or in the nonredundant case, the single disk you specify serves as the only top-level device. The raid$1 device should consist of three disks. The mirror device should consist of two disks. %oth the toplevel virtual device and the pool should be in the %&'(&) state. Use the G1s co''and to list A@& files, and display the space utilization for 1"rstpool% Does the space a1ailable 'atch *hat you *ould e,pect for a pool of the type you createdF 46/D7A pool result0 # >#s list <(.9 @09D (6(73 F9?9F .;@<:C;7<: 1"rstpool $9'9/ 134M 32' / /1"rstpool A :irrored pool result0 # >#s list <(.9 1"rstpool A 9onredundant pool result0 # >#s list <(.9 @09D 1"rstpool - / A The space available should be roughly e7ual to twice the si8e of the smallest disk, if you created a pool that consists of one, three-disk *+(,-. device. This accounts for the space re7uired to store parity data in this particular pool. The space available should roughly match the si8e of the smallest disk, if you created a pool with a single, two-disk mirror. The space available should roughly match the si8e of the disk you specified, if you created a nonredundant pool% 10% Use the Gpool co''and to display the na'e of your pool, and only its space used and space a1ailable statistics% 46/D7A pool result0 # >pool list -o n!$e,!lloc!ted,#ree <(.9 (33;2 ?F99 1"rstpool 141/ 204M A @09D --/ (6(73 '9M F9?9F 24'5/ .;@<:C;7<: /1"rstpool

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

5%

(6(73 '9M

F9?9F 24'5/

.;@<:C;7<: /1"rstpool

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 6

:irrored pool result0 # >pool list -o n!$e,!lloc!ted,#ree <(.9 (33;2 ?F99 1"rstpool $0/ $'0M A 9onredundant pool result0 # >pool list -o n!$e,!lloc!ted,#ree <(.9 (33;2 ?F99 1"rstpool -9/ $'0M A $ote) @or a 46/D7A pool, the Gpool l"st co''and reports the su' of all dis3 space in the (6(73 colu'n% )his differs fro' the 1alue reported by G1s l"st% @or a F(7D-\ pool, the G1s l"st co''and reduces the 1alue reported in the (6(73 colu'n by the a'ount of parity data that the pool reEuires% 11% Use the G1s co''and to display the list of currently 'ounted A@& file syste's% Display a long listing for the /1"rstpool directory% # >#s $ount 1"rstpool # ls -ld /#irstpool drwxr-xr-x 2 root A /1"rstpool root 2 De# 12 19:1 /1"rstpool

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

12% Use the Gpool co''and to destroy 1"rstpool% 8erify that 1"rstpool no longer e,ists% # >pool destro5 #irstpool # >pool list &o pools a!a"lable A 1!% 8erify that the 1"rstpool file syste' and the /1"rstpool 'ount point no longer e,ist% # >#s list &o datasets a!a"lable # ls -ld /#irstpool /1"rstpool: <o su#h 1"le or d"re#tory A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age

Practice 4,2) Creating, #enaming, and "estroying 52S 2ile Systems


Overvie(
/n this practice, you create a basic storage pool and 'anipulate a A@& file *ithin that pool%

Assumptions
)his practice reEuires a 'ini'u' of one unused spare dis3% /t pro1ides steps to create storage pools that consist of 1, 2, or ! dis3s, if they are a1ailable% +ou 'ust e1aluate the list of dis3 de1ices on your syste' to deter'ine the correct choices to 'a3e for this practice% )he path na'es of your dis3 de1ices 'ight differ fro' those described in these e,ercises% Use the de1ice path na'es appropriate to your syste'%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% Use the Gpool co''and to display the list of A@& pools% 8erify that no A@& pool currently e,ists% # >pool list &o pools a!a"lable A 2% /f you ha1e three unused dis3s a1ailable, use the Gpool co''and to create a storage pool called %ypool that consists of one, three7dis3 46/D7A 1irtual de1ice% # >pool cre!te $5pool r!id> c2t0d0 c2t1d0 c2t2d0 /f you ha1e only t*o unused dis3s a1ailable, use the Gpool co''and to create a storage pool called %ypool that consists of one 'irror 1irtual de1ice% # >pool cre!te $5pool $irror c2t0d0 c2t1d0 /f you ha1e only one unused dis3 a1ailable, use the Gpool co''and to create a storage pool called %ypool that uses the single dis3 as a nonredundant, top7le1el 1irtual de1ice% # >pool cre!te $5pool c2t0d0 $ote) $,a'ple co''and output throughout the re'ainder of this practice assu'es that a nonredundant pool is in use% )his is not a reco''ended pool configuration% Use the G1s co''and to list A@& file syste's and display /%ypool space use% # >#s list <(.9 %ypool A "% @09D - / (6(73 '9M F9?9F 24'5/ .;@<:C;7<: /%ypool

!%

6tte'pt to create a file syste' na'ed %ypool/1s1/1s2% Chat happens and *hyF # >#s cre!te $5pool/#s1/#s2 #a&&ot #reate K%ypool/1s1/1s2K: pare&t does &ot ex"st A The attempt fails because the intermediate file system s1 does not exist.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age B

(%

Create a directory called /%ypool/1s1% 6gain atte'pt to create a file syste' na'ed %ypool/1s1/1s2% Chat happens and *hyF # $kdir /$5pool/#s1 # >#s cre!te $5pool/#s1/#s2 #a&&ot #reate K%ypool/1s1/1s2K: pare&t does &ot ex"st A The attempt fails because the intermediate file system s1 does not exist. The 9!S only creates new file systems immediately below a parent file system. Create a ne* e'pty file na'ed /%ypool/1s1/1"le1% # touc" /$5pool/#s1/#ile1 A

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

6%

6tte'pt to create a ne* file syste' na'ed %ypool/1s1% Use the G1s l"st and G1s %ou&t co''ands to list the A@& file syste's that currently e,ist and that are currently 'ounted% Chat happens and *hyF # >#s cre!te $5pool/#s1 #a&&ot %ou&t K/%ypool/1s1K: d"re#tory "s &ot e%pty 1"lesyste% su##ess1ully #reated, but &ot %ou&ted # >#s list <(.9 @09D (6(73 F9?9F .;@<:C;7<: %ypool 10$/ '9M 2-'5/ /%ypool %ypool/1s1 24'5/ '9M 24'5/ /%ypool/1s1 # >#s $ount %ypool /%ypool A The new file system exists, but is not mounted. The empty file prevented the /m"pool/ s1 file system from mounting. Destroy the %ypool/1s1 file syste'% # >#s destro5 $5pool/#s1 A

B%

5%

4e'o1e 1"le1 fro' the /%ypool/1s1 directory% # r$ /$5pool/#s1/#ile1 A

10% 6gain atte'pt to create a ne* file syste' na'ed %ypool/1s1% Chat happensF # >#s cre!te $5pool/#s1 # The m"pool/ s1 file system is created successfully.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 5

11% 8erify that the ne* file syste' e,ists and that it is 'ounted% # >#s list <(.9 %ypool %ypool/1s1 # >#s $ount %ypool %ypool/1s1 A @09D 10$/ 24'5/ (6(73 '9M '9M F9?9F 2 '5/ 24'5/ .;@<:C;7<: /%ypool /%ypool/1s1

/%ypool /%ypool/1s1

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

12% 4ena'e %ypool/1s1 to %ypool/1s2% # >#s ren!$e $5pool/#s1 $5pool/#s2 1!% 8erify that %ypool/1s2 e,ists and that it is 'ounted% # >#s list <(.9 @09D %ypool 10$/ %ypool/1s2 24'5/ # >#s $ount %ypool /%ypool %ypool/1s2 /%ypool/1s2 A 1"% ?ist /%ypool% Does the 1s1 directory e,istF # ls /$5pool 1s2 A +o, the s1 directory no longer exists. 1(% Destroy the %ypool/1s2 file syste'% # >#s destro5 $5pool/#s2 A 16% 8erify that %ypool/1s2 is not 'ounted and no longer e,ists% # >#s $ount %ypool # >#s list <(.9 @09D %ypool - / A /%ypool (6(73 '9M F9?9F 24'5/ .;@<:C;7<: /%ypool (6(73 '9M '9M F9?9F 2 '5/ 24'5/ .;@<:C;7<: /%ypool /%ypool/1s2

1 % ?ist /%ypool% Does the 1s2 directory e,istF # ls /$5pool +o, the /m"pool directory is empty.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 10

Practice 4,.) >or&ing (ith 52S Properties


Overvie(
/n this practice, you set and list A@& properties and de'onstrate principles of A@& property inheritance%

%as&s
1% Use the G1s co''and to create a ne* A@& in %ypool called #%p% ?ist the space use for /%ypool/#%p% # >#s cre!te $5pool/c$p # >#s list <(.9 @09D %ypool 104/ %ypool/#%p 24'5/ A 2%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(6(73 '9M '9M

F9?9F 24'5/ 24'5/

.;@<:C;7<: /%ypool /%ypool/#%p

Use the tar co''and to create a partial archi1e of the /usr/l"b directory, and sa1e the archi1e as /%ypool/#%p/ar#h"!e'tar% Use the -k option to li'it the size of this archi1e to "00 :D% +ou use this file to de'onstrate ho* the co'pression property functions in A@& file syste's% # t!r c#k /$5pool/c$p/!rc"ive.t!r 609-00 /usr/lib tar: please "&sert &ew !olu%e, the& press F9:@F<'()nter /ontrol- /) A $ote) )he tar co''and *ill as3 you to press 4eturn *hen it has created an archi1e of the size Gin 3ilobytesH you specified% $nter 2o&trol-2 in response to this pro'pt% Doing so pre1ents tar fro' o1er*riting ar#h"!e'tar *ith the ne,t set of files that e,ceed the li'it you specified% Use the G1s )et co''and to display all of the properties for the %ypool/#%p file syste'% Do the properties all use the sa'e sourceF /f so, *hich source is it, and *hyF # >#s Aet !ll $5pool/c$p <(.9 CF;C9F:Q %ypool/#%p type %ypool/#%p #reat"o& %ypool/#%p used %ypool/#%p a!a"lable %ypool/#%p re1ere&#ed %ypool/#%p #o%pressrat"o %ypool/#%p %ou&ted %ypool/#%p Iuota %ypool/#%p reser!at"o& %ypool/#%p re#ords"Ge %ypool/#%p %ou&tpo"&t %ypool/#%p share&1s 6(3@9 1"lesyste% :hu 0ep 2 12:5400. -2'9M 400. 1'00x yes &o&e &o&e 12$/ /%ypool/#%p o11 0;@F29 2010 de1ault de1ault de1ault de1ault de1ault

!%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 11

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p %ypool/#%p A

#he#ksu% o& #o%press"o& o11 at"%e o& de!"#es o& exe# o& setu"d o& reado&ly o11 Go&ed o11 s&apd"r h"dde& a#l"&her"t restr"#ted #a&%ou&t o& share"s#s" o11 xattr o& #op"es 1 !ers"o& 4 ut1$o&ly o11 &or%al"Gat"o& &o&e #asese&s"t"!"ty se&s"t"!e !s#a& o11 &b%a&d o11 shares%b o11 re1Iuota &o&e re1reser!at"o& &o&e pr"%ary#a#he all se#o&dary#a#he all usedbys&apshots 0 usedbydataset 400. usedby#h"ldre& 0 usedbyre1reser!at"o& 0 lo)b"as late&#y sy&# sta&dard rst#how& o&

de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault de1ault

"%

3ll of the settable properties have the same source) de ault. This is true because none of the properties have been set locally or inherited from a locally set property. Use ls *ith the -lh options to list the size of /%ypool/#%p/ar#h"!e'tar% :a3e note of the size displayed% # ls -l" /$5pool/c$p/!rc"ive.t!r -rw-r--r-1 root root /%ypool/#%p/ar#h"!e'tar A 400. 0ep 2 03:50

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 12

(%

Use the G1s )et co''and to display the current settings of the used, #o%press"o&, and #o%pressrat"o properties for %ypool/#%p% 8erify that co'pression is o11, the co'pression ratio is 1'00x, and that the space used 'atches the size of ar#h"!e'tar% # >#s Aet used,co$pression,co$pressr!tio $5pool/c$p <(.9 CF;C9F:Q 6(3@9 %ypool/#%p used 400. %ypool/#%p #o%press"o& o11 %ypool/#%p #o%pressrat"o 1'00x A 0;@F29 de1ault -

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

6%

&et the #o%press"o& property for %ypool/#%p to o&% # >#s set co$pression=on $5pool/c$p #

Use G1s )et to display the current settings of the used, #o%press"o&, and #o%pressrat"o properties for %ypool/#%p% 8erify that co'pression is no* on% ;a1e the co'pression ratio or space used 1alues changedF /f not, *hy notF Chat source is listed for the #o%press"o& propertyF # >#s Aet used,co$pression,co$pressr!tio $5pool/c$p <(.9 CF;C9F:Q 6(3@9 %ypool/#%p used 400. %ypool/#%p #o%press"o& o& %ypool/#%p #o%pressrat"o 1'00x A 0;@F29 lo#al -

+o, the compression ratio remains 1.00, and the space used remains 0(( 4%. Turning on compression for a file system does not compress files that already exist within the file system. The compression property lists the local source. B% Change directory to /%ypool/#%p% Copy ar#h"!e'tar to ar#h"!e1'tar% # cd /$5pool/c$p # cp !rc"ive.t!r !rc"ive1.t!r 5% Use ls -lh and du -h to display the sizes of ar#h"!e'tar and ar#h"!e1'tar% Chat file sizes do these co''ands reportF # ls -l" total 134$943 -rw-r--r-- 1 root root 400. 0ep -rw-r--r-- 1 root root 400. 0ep # du -" D 400. ar#h"!e'tar 234. ar#h"!e1'tar A

2 1-:1$ ar#h"!e'tar 2 1-:3$ ar#h"!e1'tar

The ls -lh command reports that both files are 0(( 4% in si8e. The du -h command reports that archive.tar uses 0(( 4% of space, and archive1.tar uses about 2:0 4%.
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste'

Chapter 6 7 2age 1!

$ote) )he size of the co'pressed archi1e and co'pression ratio 1alues 'ay 1ary, depending on the archi1e content% 10% Use the G1s )et co''and to display the current settings of the used, #o%press"o&, and #o%pressrat"o properties for %ypool/#%p% ;o* ha1e the #o%pressrat"o and used 1alues changed fro' the last ti'e you chec3ed the', and *hyF # >#s Aet used,co$pression,co$pressr!tio $5pool/c$p <(.9 CF;C9F:Q 6(3@9 %ypool/#%p used 59. %ypool/#%p #o%press"o& o& %ypool/#%p #o%pressrat"o 1'22x A 0;@F29 lo#al -

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

The used property now lists about .'9 4%, and the compressratio property now indicates about 1.201 compression. The space used matches the sum of the file si8es, and the compression ratio indicates the compression achieved for all files in the file system. 11% &et the #o%press"o& property for %ypool/#%p to o11% # >#s set co$pression=o## $5pool/c$p # 12% Copy ar#h"!e'tar to ar#h"!e2'tar% # cp !rc"ive.t!r !rc"ive2.t!r # 1!% Use ls -lh and du -h to display the sizes of ar#h"!e'tar and ar#h"!e1'tar% Chat file sizes do these co''ands reportF # ls -l" total 21 $- 0 -rw-r--r-- 1 root root 400. 0ep -rw-r--r-- 1 root root 400. 0ep -rw-r--r-- 1 root root 400. 0ep

2 1-:1$ ar#h"!e'tar 2 1-:3$ ar#h"!e1'tar 2 1$:5 ar#h"!e2'tar

The ls -lh command reports that all three files are 0(( 4% in si8e. $ote) )he transactional se'antics *ill be happening in the bac3end of the syste'% ;ence, *ait for fe* 'inutes and then run du Vh B co''and% # du 400. 234. 400. -" D ar#h"!e'tar ar#h"!e1'tar ar#h"!e2'tar

The du -h command reports that archive.tar uses 0(( 4%, archive1.tar uses 2:0 4% of space, and archive2.tar uses 0(( 4%.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste'

Chapter 6 7 2age 1"

1"% Use G1s )et to display the current settings of the used, #o%press"o&, and #o%pressrat"o properties for %ypool/#%p% ;o* ha1e the #o%pressrat"o and used 1alues changed fro' the last ti'e you chec3ed the', and *hyF Chat source is listed for the #o%press"o& propertyF # >#s Aet used,co$pression,co$pressr!tio $5pool/c$p <(.9 CF;C9F:Q 6(3@9 0;@F29 %ypool/#%p used 1'01M %ypool/#%p #o%press"o& o11 lo#al %ypool/#%p #o%pressrat"o 1'15x A The used property now lists about &.(& ;%, and the compressratio property now indicates about 1.121 compression. The space used matches the sum of the file si8es. The compression ratio is smaller because a smaller proportion of the data in the file system is compressed. The compression property still lists the local source. 1(% Use G1s "&her"t to clear the #o%press"o& property for %ypool/#%p% 8erify that the change *as 'ade% Chat source is listed for the #o%press"o& propertyF # >#s in"erit co$pression $5pool/c$p # >#s Aet co$pression $5pool/c$p <(.9 CF;C9F:Q 6(3@9 %ypool/#%p #o%press"o& o11 A # >#s cre!te $5pool/c$p/! # >#s cre!te $5pool/c$p/!/b 1 % Use G1s )et to recursi1ely display the #o%press"o& property for %ypool/#%p% Do all three file syste's list the sa'e 1alue and sourceF # >#s Aet -r co$pression $5pool/c$p <(.9 CF;C9F:Q 6(3@9 %ypool/#%p #o%press"o& o11 %ypool/#%p/a #o%press"o& o11 %ypool/#%p/a/b #o%press"o& o11 A 0;@F29 de1ault de1ault de1ault

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

0;@F29 de1ault

16% Create t*o ne* file syste's na'ed %ypool/#%p/a and %ypool/#%p/a/b%

*es, all three file systems have compression turned off, and they list the de ault source for the compression property. 1B% Use the G1s set co''and to set the #o%press"o& property to o& for %ypool/#%p% # >#s set co$pression=on $5pool/c$p #

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 1(

15% Use the G1s )et co''and to recursi1ely display the #o%press"o& property for %ypool/#%p% Do all three file syste's list the sa'e 1alue and sourceF # >#s Aet -r co$pression $5pool/c$p <(.9 CF;C9F:Q 6(3@9 %ypool/#%p #o%press"o& o& %ypool/#%p/a #o%press"o& o& %ypool/#%p %ypool/#%p/a/b #o%press"o& o& %ypool/#%p 0;@F29 lo#al "&her"ted 1ro% "&her"ted 1ro%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

3ll three file systems have compression turned on. The m"pool/cmp file system lists the local source for the compression property, m"pool/cmp/a and m"pool/cmp/a/b indicate that they inherited their compression values from m"pool/cmp. 20% Use the G1s set co''and to set the #o%press"o& property to o11 for %ypool/#%p/a% # >#s set co$pression=o## $5pool/c$p/! 21% Use the G1s )et co''and to recursi1ely display the co'pression property for %ypool/#%p% Chat has changed in the reported 1alues and sourcesF # >#s Aet -r co$pression $5pool/c$p <(.9 CF;C9F:Q 6(3@9 %ypool/#%p #o%press"o& o& %ypool/#%p/a #o%press"o& o11 %ypool/#%p/a/b #o%press"o& o11 %ypool/#%p/a 0;@F29 lo#al lo#al "&her"ted 1ro%

The m"pool/cmp/a and m"pool/cmp/a/b file systems now have compression turned off. The m"pool/cmp/a file system lists the local source for the compression property, and m"pool/cmp/a/b now inherits its compression value from m"pool/cmp/a. 22% Use the G1s "&her"t co''and to clear the #o%press"o& property for %ypool/#%p% # >#s in"erit co$pression $5pool/c$p 2!% Use the G1s )et co''and to recursi1ely display the co'pression property for %ypool/#%p% Chat has changed in the reported 1alues and sourcesF # >#s Aet -r co$pression $5pool/c$p <(.9 CF;C9F:Q 6(3@9 %ypool/#%p #o%press"o& o11 %ypool/#%p/a #o%press"o& o11 %ypool/#%p/a/b #o%press"o& o11 %ypool/#%p/a A 0;@F29 de1ault lo#al "&her"ted 1ro%

3ll three file systems have compression turned off. The m"pool/cmp, m"pool/cmp/a, and m"pool/cmp/a/b file systems list the de ault, local, and inherited from sources, respectively. The m"pool/cmp/a/b file system inherits its compression value from m"pool/cmp/a.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste'

Chapter 6 7 2age 16

2"% Change directory to root G/H% Use the G1s destroy co''and to destroy %ypool/#%p and its dependent file syste's% 8erify that the file syste's no longer e,ist% # cd / # >#s destro5 -r $5pool/c$p # >#s list <(.9 @09D (6(73 %ypool 103/ '9M A

F9?9F 25'5/

.;@<:C;7<: /%ypool

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2(% Use the Gpool co''and to destroy %ypool file syste'% # >pool destro5 $5pool 26% 8erify that the %ypool file syste' no longer e,ists% # >pool list &o pools a!a"lable # >#s list &o datasets a!a"lable A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 1

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 60 A@& @ile &yste' Chapter 6 7 2age 1B

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 6) "escri'ing +nterface Configurations


Chapter 6

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 0 Describing /nterface Configurations Chapter 7 2age 1

Practices for *esson 6


Practices Overvie(
/n this practice, you use basic net*or37related co''ands such as the "1#o&1") utility, p"&) co''and, and s&oop utility%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 0 Describing /nterface Configurations Chapter 7 2age 2

Practice 6,1) /onitoring $et(or& +nterfaces


Assumptions
)o prepare for this practice, ensure the follo*ing0 Chec3 that you ha1e access to the t*o syste's listed in the /et#/"&et/hosts file on each syste'% Cor3 closely *ith a partner during the practice to ensure that you both are *or3ing on the sa'e steps, unless noted other*ise% #ain access to a console *indo* if you are perfor'ing this practice in an ?8C en1iron'ent% /n 8irtualDo, deli1ery en1iron'ent, use the second 1irtual 'achine as your partner syste' *hile perfor'ing this practice%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% On both syste's, log in as the root user, and open a ter'inal *indo*% Using the "1#o&1") -a co''and, display the basic configuration infor'ation about your net*or3 interfaces% @or your pri'ary interface Gfor e,a'ple, &)e0H, *hat does the "1#o&1") utility report for the follo*ing attributesF $nter your 1alues in a table as follo*s0 Attri'ute /2 address $thernet address /nterface up/do*n 2% ?alue <aries according to the system in use <aries according to the system in use The interface should be 34.

On both syste's, open a ne* ter'inal *indo*% /n the ne* *indo*, enter the s&oop co''and to display the net*or3 traffic bet*een your t*o syste's only% # snoop "ost1 "ost2 Use the p"&) co''and to 1erify that your syste' can contact the net*or3 interface on your partner<s syste'% # pinA host2 Obser1e the output fro' the s&oop co''and% Chich protocol does the p"&) co''and useF $#4" Does the s&oop output contain reEuests and replies Gyes or noHF 4eEuests0 *es 4eplies0 *es On one syste', use the "1#o&1") utility to 'ar3 its pri'ary interface as dow& and then display its configuration infor'ation% Carn your lab partner that the syste'<s interface *ill go do*n% $ote) Chile perfor'ing this step in ?8C en1iron'ent, the net*or3 interface of the partner syste' *ill go do*n% )he partner syste' *ould re'ain inaccessible unless the net*or3 interface is brought up% +ou need to ha1e console access to bring up the net*or3 interface of the partner syste'%

!%

"%

(%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 0 Describing /nterface Configurations Chapter 7 2age !

# i#con#iA nAe0 down # i#con#iA nAe0 ;as anything changed in the infor'ation that the "1#o&1") utility reportsF 6% The i con i5 utility no longer lists the interface as 34. On the syste' *hose interface re'ains up, atte'pt to use the p"&) co''and to contact the syste' *hose interface is do*n% Chat does the p"&) co''and reportF 3fter a time-out period, the pin5 command reports no answer from host. Obser1e the output fro' the s&oop utility on both syste's% ;o* does the s&oop output differ fro' the p"&) co''and output before and after you 'ar3ed the interface as do*nF The snoop utility only shows the pin5 command re7uests=no replies. ;o* 'any reEuests does the p"&) co''and send by defaultF Twenty Does the target syste' see the p"&) co''and reEuestsF /f so, ho* are these reEuests handledF *es, it does, but it does not send a reply. On the syste' *hose interface is do*n, use the "1#o&1") utility to 'ar3 its pri'ary interface as up% Chec3 that the change too3 place% $ote) Chile perfor'ing this step in ?8C en1iron'ent, the net*or3 interface of the partner syste' *ill go do*n% )he partner syste' *ould re'ain inaccessible unless the net*or3 interface is brought up% +ou need to ha1e console access to bring up the net*or3 interface of the partner syste'% # i#con#iA nAe0 up # i#con#iA nAe0 5% On the syste' *hose interface re'ained up, use the p"&) co''and to contact the other syste'% Chat does the p"&) co''and reportF The host is alive. Does the s&oop utility report a reply fro' the target hostF *es.

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

B%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 0 Describing /nterface Configurations Chapter 7 2age "

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 7) Performing Pac&age Administration


Chapter 7

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson B0 2erfor'ing 2ac3age 6d'inistration Chapter B 7 2age 1

Practices for *esson 7


Practices Overvie(
/n these practices, you *or3 *ith pac3age7related co''ands%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson B0 2erfor'ing 2ac3age 6d'inistration Chapter B 7 2age 2

Practice 7,1) Adding a Soft(are Pac&age


Overvie(
/n this practice, you use the pac3age7related co''ands to add soft*are pac3ages to the Oracle &olaris 10 O&%

Assumptions
)his e,ercise reEuires the pac3ages found in the /opt/ora/lab/pa#ka)es directory on student syste's% /f the pac3ages are located on a ser1er, your instructor *ill pro1ide their location and infor'ation about ho* to retrie1e the'% $ote) Use the pac3ages in the /opt/ora/lab/pa#ka)es directory to understand ho* to use pac3age ad'inistration co''ands% )he pac3ages used for this e,ercise are for de'onstration only%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% ?ist the pac3ages found in the /opt/ora/lab/pa#ka)es directory% # ls /opt/or!/l!b/p!ck!Aes 0@<Ooptd"r 0@<Ousrd"r 2% Display a long7for'at listing of the infor'ation for the pac3ages% # pkAin#o -d /opt/or!/l!b/p!ck!Aes -l :JKBoptdir # pkAin#o -d /opt/or!/l!b/p!ck!Aes -l :JKBusrdir !% 6dd the pac3ages fro' the /opt/ora/lab/pa#ka)es directory% 4espond y to Euestions as3ed by the pk)add co''and% # pkA!dd -d /opt/or!/l!b/p!ck!Aes :JKBoptdir # pkA!dd -d /opt/or!/l!b/p!ck!Aes :JKBusrdir "% Use pk)"&1o to list infor'ation about the installed pac3ages% # pkAin#o :JKBoptdir # pkAin#o :JKBusrdir (% Use pk)#hk to 1erify that the pac3ages *ere installed successfully% # pkAc"k -v :JKBoptdir # pkAc"k -v :JKBusrdir

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson B0 2erfor'ing 2ac3age 6d'inistration Chapter B 7 2age !

Practice 7,2) /anipulating Soft(are Pac&ages


Overvie(
/n this practice, you use pac3age7related co''ands to re'o1e, install, and spool pac3ages%

Assumptions
Defore you perfor' the steps in this practice, you 'ust attach and 'ount an Oracle &olaris 10 O& D8D /&O i'age% )he /&O i'ages are hosted on an 9@& ser1er% +our instructor *ill help you identify the host na'e and /2 address of the 9@& ser1er% +ou need to 'ount the /&O i'age to the /opt/ora/d!d directory of your lab syste'% Choose an /&O i'age appropriate for your lab syste' architecture% @or e,a'ple0
# un!$e -! 0u&;0 host41 5'10 Me&er"#4144500-19 su&4u spar# 0@<O,0u&-8lade-1500 # cd /opt/or!/dvd # ls sol-10-u10-)a-spar#-d!d'"so sol-10-u10-)a-x$ -d!d'"so # lo#i!d$ -! /opt/or!/dvd/sol-10-u10-A!-sp!rc-dvd.iso /de!/lo1"/1 # $ount -C "s#s -o ro /dev/lo#i/1 /$nt # ls /$nt boot MC343MC340our#e4;11er'txt 0olar"s410 2opyr")ht "&staller

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% Use the pk)"&1o co''and to search for pac3ages currently on your syste' that are related to 'anuals% Chich pac3ages *ere listedF # pkAin#o syste% syste% syste% syste% syste% syste% syste% E Arep -i $!nu!l 0@<O#r%a& 9&#rypt"o& /"t ;&-3"&e .a&ual Ca)es 0@<O%a& ;&-3"&e .a&ual Ca)es 0@<O%1%a& 2D9 .ot"1 .a&uals 0@<Oope&ssl-%a& ;pe&003 .a&ual Ca)es 0@<Operl5$4%a& Cerl 5'$'4 Fe1ere&#e .a&ual Ca)es 0@<Opl5% Cerl 5' '1 Fe1ere&#e .a&ual Ca)es 0@<Otltk% :ool:alk %a&ual pa)es

$ote) )he list that appears depends on selections that *ere 'ade during the installation process%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson B0 2erfor'ing 2ac3age 6d'inistration Chapter B 7 2age "

2%

Display a long7for'at listing of the infor'ation for the 0@<O%a& pac3age installed on your syste'% # pkAin#o -l :JKB$!n Chat is listed for the follo*ingF )he status of this pac3age )he install date of this pac3age )he nu'ber of files used by this pac3age )he nu'ber of bloc3s used by this pac3age Status) #ompletely installed $nstall date) Should match the date and time when you installed >racle Solaris >S on your system +umber of files) &20(2 installed path names, 2& shared directories, &9( directories +umber of blocks) .?:2? $ote) )hese 1alues 'ay differ a'ong different releases of Oracle &olaris 10% 8alues *ill be the sa'e for &264C and ,B6/,6" syste's for any gi1en release% )he 1alues listed are e,a'ples only% Display a long7for'at listing of the infor'ation for the 0@<O%a& pac3age on the Oracle &olaris 10 O& D8D i'age% Obtain the sa'e infor'ation as in the pre1ious step% @or e,a'ple0 # pkAin#o -d /$nt/:ol!ris/10/Lroduct -l :JKB$!n Status) Spooled $nstall date) +o install date indicated +umber of files) &2?.& spooled path names, &9- directories, 0 package information files +umber of blocks) ?&(&' 4e'o1e the 0@<O%a& pac3age fro' your syste' and co'plete the follo*ing steps0 a% 4espond y to Euestions as3ed by the pk)r% co''and% b% 8erify that 0@<O%a& has been re'o1ed by using the pk)"&1o co''and, and trying to access the 'anual pages% # pkAr$ :JKB$!n =output o%"tted* # pkAin#o :JKB$!n 9FF;F: "&1or%at"o& 1or 50@<O%a&5 was &ot 1ou&d # $!n ls <o %a&ual e&try 1or ls' A

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

!%

"%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson B0 2erfor'ing 2ac3age 6d'inistration Chapter B 7 2age (

(%

4einstall the 0@<O%a& pac3age fro' the Oracle &olaris 10 O& D8D i'age and co'plete the follo*ing steps0 a% 4espond y to Euestions as3ed by the pk)add co''and% b% Use pk)"&1o to list infor'ation about the 0@<O%a& pac3age% c% 8erify that the 'anual pages *or3% @or e,a'ple0 # pkA!dd -d /$nt/:ol!ris/10/Lroduct :JKB$!n (output o%"tted) # pkAin#o :JKB$!n syste% 0@<O%a& ;&-3"&e .a&ual Ca)es # $!n ls =output o%"tted* The manual page for ls appears.

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

6%

Chec3 *hether the 0@<Odo# pac3age is installed on your syste', and co'plete the follo*ing steps0 a% 4e'o1e the 0@<Odo# pac3age fro' your syste'% b% 4espond y to Euestions as3ed by the pk)r% co''and% # pkAin#o :JKBdoc syste% 0@<Odo# Do#u%e&tat"o& :ools # pkAr$ :JKBdoc :he 1ollow"&) pa#ka)e "s #urre&tly "&stalled: 0@<Odo# Do#u%e&tat"o& :ools (spar#) 11'10'0,F96R2005'01'21'15'53 Do you wa&t to re%o!e th"s pa#ka)eN Dy,&,N,IE 5 AA Fe%o!"&) "&stalled pa#ka)e "&sta&#e =0@<Odo#* :h"s pa#ka)e #o&ta"&s s#r"pts wh"#h w"ll be exe#uted w"th super- user per%"ss"o& dur"&) the pro#ess o1 re%o!"&) th"s pa#ka)e' Do you wa&t to #o&t"&ue w"th the re%o!al o1 th"s pa#ka)e Dy,&,N,IE 5 AA 6er"1y"&) pa#ka)e =0@<Odo#* depe&de&#"es "& )lobal Go&e O(F<7<M: :he =0@<Ou"u%* pa#ka)e depe&ds o& the pa#ka)e #urre&tly be"&) re%o!ed' O(F<7<M: :he =0@<O%a&* pa#ka)e depe&ds o& the pa#ka)e #urre&tly be"&) re%o!ed' O(F<7<M: :he =0@<Op%ow%* pa#ka)e depe&ds o& the pa#ka)e #urre&tly be"&) re%o!ed'
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson B0 2erfor'ing 2ac3age 6d'inistration Chapter B 7 2age 6

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

O(F<7<M: :he =0@<Oope&ssl-%a&* pa#ka)e depe&ds o& the pa#ka)e #urre&tly be"&) re%o!ed' O(F<7<M: :he =0@<Operl5$4%a&* pa#ka)e depe&ds o& the pa#ka)e #urre&tly be"&) re%o!ed' O(F<7<M: :he =0@<Opl5%* pa#ka)e depe&ds o& the pa#ka)e #urre&tly be"&) re%o!ed' O(F<7<M: :he =0@<O!ts%&* pa#ka)e depe&ds o& the pa#ka)e #urre&tly be"&) re%o!ed' Depe&de&#y #he#k"&) 1a"led' Do you wa&t to #o&t"&ue w"th the re%o!al o1 th"s pa#ka)e Dy,&,N,IE 5 AA Cro#ess"&) pa#ka)e "&1or%at"o&' AA 9xe#ut"&) prere%o!e s#r"pt' AA Fe%o!"&) path&a%es "& #lass =&o&e* /usr/share/%a& =shared path&a%e &ot re%o!ed* /usr/share/l"b/t%a#/!)r"&d (output o%"tted) /usr/b"&/apropos /usr/b"&/addb"b /usr/b"& =shared path&a%e &ot re%o!ed* /usr =shared path&a%e &ot re%o!ed* AA @pdat"&) syste% "&1or%at"o&' Fe%o!al o1 =0@<Odo#* was su##ess1ul' 6re there any pac3age dependencies related to re'o1ing this pac3ageF *es, there are. There are seven other packages dependent on the 63&7doc package. % Use the pk)add co''and to spool the 0@<Odo# pac3age into the default spool area% @or e,a'ple0 # pkA!dd -d /$nt/:ol!ris/10/Lroduct -s spool :JKBdoc

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson B0 2erfor'ing 2ac3age 6d'inistration Chapter B 7 2age

B%

Use the pk)"&1o co''and G*ith the appropriate optionsH to 1erify the presence of the 0@<Odo# pac3age in the default spool area% # pkAin#o -d spool :JKBdoc syste% 0@<Odo# Do#u%e&tat"o& :ools # pkAin#o -d /v!r/spool/pkA -l :JKBdoc C/M7<0:: 0@<Odo# (output o%"tted)

5%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

/nstall the 0@<Odo# pac3age and co'plete the follo*ing steps0 a% Obser1e the 'essages% b% 4espond y to Euestions as3ed by the pk)add co''and% c% 8erify that the pac3age *as installed fro' the /!ar/spool/pk) directory% # pkA!dd :JKBdoc Cro#ess"&) pa#ka)e "&sta&#e =0@<Odo#* 1ro% =/!ar/spool/pk)* (output o%"tted)

10% 4e'o1e the 0@<Odo# pac3age fro' the default spool area% # pkAr$ -s spool :JKBdoc :he 1ollow"&) pa#ka)e "s #urre&tly spooled: 0@<Odo# Do#u%e&tat"o& :ools (spar#) 11'10'0,F96R2005'01'21'15'53 Do you wa&t to re%o!e th"s pa#ka)eN Dy,&,N,IE y Fe%o!"&) spooled pa#ka)e "&sta&#e =0@<Odo#* A 11% 8erify that the 0@<Odo# pac3age no longer e,ists in the spool area and that it is installed on your syste'% # pkAin#o -d spool :JKBdoc 9FF;F: "&1or%at"o& 1or 50@<Odo#5 was &ot 1ou&d # pkAin#o -l :JKBdoc C/M7<0:: 0@<Odo# (output o%"tted) 12% Un'ount the Oracle &olaris 10 O& D8D i'age and delete the de1ice you created *ith the lo1"ad% co''and% # u$ount /$nt # lo#i!d$ -d /dev/lo#i/1

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson B0 2erfor'ing 2ac3age 6d'inistration Chapter B 7 2age B

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 8) /anaging Soft(are Patches


Chapter 8

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 50 :anaging &oft*are 2atches Chapter 5 7 2age 1

Practices for *esson 8


Practices Overvie(
/n these practices, you use co''ands to prepare patches for installation, e1aluate patch descriptions, and install and re'o1e patches%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 50 :anaging &oft*are 2atches Chapter 5 7 2age 2

Practice 8,1) /aintaining Patches


Assumptions
)his practice reEuires the set of patches found in the /opt/ora/lab/pat#hes directory on student syste's% /f the patches are located on a ser1er, your instructor *ill pro1ide the ser1er<s location and infor'ation about ho* to retrie1e the patches% )he patches that you install as part of this practice are dependent on the 0@<Ooptd"r and 0@<Ousrd"r pac3ages, *hich are installed *hen you co'plete 2ractice B71% /f for so'e reason you could not co'plete 2ractice B71, run the follo*ing co''ands0 # pkA!dd -d /opt/or!/l!b/p!ck!Aes :JKBoptdir # pkA!dd -d /opt/or!/l!b/p!ck!Aes :JKBusrdir $ote) Use the patch archi1es in the /opt/ora/lab/pat#hes directory to understand ho* to use patch ad'inistration co''ands%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% Copy the patch archi1es found in /opt/ora/lab/pat#hes to the /!ar/t%p directory% $ote) Use the patch archi1es in the /opt/ora/lab/pat#hes directory to understand ho* to use patch ad'inistration co''ands% Use the patch that is appropriate for your syste' architecture% )he patches for this e,ercise are for de'onstration only% # cd /opt/or!/l!b/p!tc"es/sp!rc or # cd /opt/or!/l!b/p!tc"es/x%# ls 12345 -01'G"p 54321-01'G"p # cp D.>ip /v!r/t$p A $ote) /f the patch archi1es are located on a ser1er, follo* the instructions your instructor pro1ides to copy the' to the /!ar/t%p directory on your syste'% Change directory to /!ar/t%p% # cd /v!r/t$p !% $,tract the patches fro' their archi1es% @or e,a'ple0 # un>ip 12360--01.>ip (r#h"!e: 12345 -01'G"p #reat"&): 12345 -01/ ''' (output o%"tted) # un>ip -06321-01.>ip (r#h"!e: 54321-01'G"p #reat"&): 54321-01/ ''' (output o%"tted)

2%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 50 :anaging &oft*are 2atches Chapter 5 7 2age !

"%

Use the u&a%e -r -p co''and to display your syste' O& release le1el, and architecture GprocessorH type% # un!$e -r -p 5'10 spar#

(%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Display the F9(D.9 files for the t*o patches you e,tracted, and deter'ine *hich of the' are the correct patches for your syste' architecture% 6lso 1erify that the patch you choose is for the &olaris release le1el in use on your syste'% @or e,a'ple0 # $ore 12360--01/*M@27MD # $ore -06321-01/*M@27MD Use the pat#hadd co''and to deter'ine if the patch you identified in the pre1ious step is currently installed on your syste'% @or e,a'ple0 # p!tc"!dd -p E Arep 12360# p!tc"!dd -p E Arep -06321

6%

% B%

8erify that the /!ar/sad%/pat#h directory is e'pty% # ls /v!r/s!d$/p!tc" 6dd the patch% @or e,a'ple0 # p!tc"!dd 12360--01 # p!tc"!dd -06321-01

5%

8erify that the patch is no* installed% Chat pac3age does the patch affectF @or e,a'ple0 # p!tc"!dd -p E Arep 12360--01 # p!tc"!dd -p E Arep -06321-01

10% $,a'ine the patch installation log file% )his file is located in the /!ar/sad%/pat#h directory% @or e,a'ple0 # # # # cd /v!r/s!d$/p!tc"/12360--01 $ore loA cd /v!r/s!d$/p!tc"/-06321-01 $ore loA

11% 4e'o1e the patch you .ust installed, and 1erify that the patch is no longer installed% # cd # p!tc"r$ 12360--01 # p!tc"r$ -06321-01

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 50 :anaging &oft*are 2atches Chapter 5 7 2age "

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 10


Chapter 10

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age 1

Practices for *esson 10


Practices Overvie(
/n this practice, you use the OpenDoot 24O: and Oracle &olaris O& co''ands to set and 1ie* OD2 para'eters, create a ne* de1ice alias, and boot the syste' by using the ne* alias%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age 2

Practice 10,1) 1sing 9oot P#O/ Commands


Overvie(
/n this practice, you use the OpenDoot 24O: and Oracle &olaris O& co''ands to set and 1ie* OD2 para'eters, create a ne* de1ice alias, and boot the syste' using the ne* alias%

Assumptions

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

4efer to the lecture notes, as necessary, to co'plete the follo*ing steps and ans*er the Euestions listed% )his practice lists e,a'ples fro' t*o syste's, a 8120 ser1er and a &un Dlade 1(00, to pro1ide e,a'ples of syste's that use &C&/ and /D$ internal dis3s% /f you are *or3ing in an ?8C en1iron'ent, gain access to a console *indo* to perfor' this e,ercise% )his practice is specific to &264C 'achines and not applicable for classroo's running ,B6 syste's% 6s an alternati1e, this practice also pro1ides a si'ulation to de'onstrate 1arious boot 24O: co''ands% &ee %as& 2 for the procedure on ho* to run the 1sing the %oot "5>4 #ommands si'ulation%

%as& 1) 1sing 9oot P#O/ Commands


1% 2% /f the Oracle &olaris O& is currently running, log in as the root user and halt your syste'% # init 0 Chen the ok pro'pt appears, use the help co''and to display the list of ;elp topics% 8120 e,a'ple0 ok "elp 9&ter Khelp #o%%a&d-&a%eK or Khelp #ate)ory-&a%eK 1or %ore help (@se ;<3Q the 1"rst word o1 a #ate)ory des#r"pt"o&) 9xa%ples: help sele#t -orhelp l"&e .a"& #ate)or"es are: 8reakpo"&ts (debu))"&)) Fepeated loops De1"&"&) &ew #o%%a&ds <u%er"# output Fad"x (&u%ber base #o&!ers"o&s) (r"th%et"# .e%ory a##ess 3"&e ed"tor 0yste% a&d boot #o&1")urat"o& para%eters 0ele#t 7/; de!"#es ?loppy e]e#t Cower o& reset D"a) (d"a)&ost"# rout"&es) Fesu%e exe#ut"o& ?"le dow&load a&d boot &!ra%r# (%ak"&) &ew #o%%a&ds per%a&e&t)
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age !

ok &un Dlade 1(00 e,a'ple0 ok "elp 9&ter Khelp #o%%a&d-&a%eK or Khelp #ate)ory-&a%eK 1or %ore help (@se ;<3Q the 1"rst word o1 a #ate)ory des#r"pt"o&) 9xa%ples: help sele#t -or- help l"&e .a"& #ate)or"es are: 8reakpo"&ts (debu))"&)) Fepeated loops De1"&"&) &ew #o%%a&ds <u%er"# output Fad"x (&u%ber base #o&!ers"o&s) (r"th%et"# .e%ory a##ess 3"&e ed"tor 0yste% a&d boot #o&1")urat"o& para%eters 0ele#t 7/; de!"#es e]e#t de!"#es Cower o& reset D"a) (d"a)&ost"# rout"&es) Fesu%e exe#ut"o& ?"le dow&load a&d boot &!ra%r# (%ak"&) &ew #o%%a&ds per%a&e&t) ok !% Use the help co''and to display infor'ation about the boot co''and% &un Dlade 1(00 e,a'ple0
ok "elp boot boot =spe#"1"er* 9xa%ples: boot ( -- ) boot ker&el ( de1ault ) or other 1"le - boot ker&el 1ro% de1ault de!"#e' ?a#tory de1ault "s to boot 1ro% D70/ "1 prese&t, otherw"se 1ro%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

<9:'

boot &et - boot ker&el 1ro% &etwork boot #dro% - boot ker&el 1ro% 2D-F;. boot d"sk1:h - boot 1ro% d"sk1 part"t"o& h boot tape - boot de1ault 1"le 1ro% tape boot d"sk %yu&"x -as - boot %yu&"x 1ro% d"sk w"th 1la)s 5-as5 dload =1"le&a%e* ( addr -- ) debu) load o1 1"le o!er &etwork at address 9xa%ples: 4000 dload /export/root/1oo/test N)o - "1 exe#utable pro)ra%, exe#ute "t
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age "

or "1 ?orth pro)ra%, #o%p"le "t ok

Chat does the help co''and list for bootF The help command lists examples of boot command syntax used to boot the system from various devices. Use the ba&&er co''and to obtain the follo*ing infor'ation0 OpenDoot 24O: re1ision0 :egabytes of installed 'e'ory0 &yste' type0 9846: serial nu'ber0 $thernet address0 ;ost /D0 @ach system presents its own uni7ue information. 8120 e,a'ple0 ok b!nner 0u& ?"re 6210, <o /eyboard 2opyr")ht 200- 0u& ."#rosyste%s, 7&#' (ll r")hts reser!ed' ;pe&8oot 4'22'33, 204$ .8 %e%ory "&stalled, 0er"al A 555- 5' 9ther&et address 0:3:ba:e$:54:a1, >ost 7D: $3e$54a1' ok &un Dlade 1(00 e,a'ple0 ok b!nner 0u& 8lade 1500 (0"l!er), /eyboard Crese&t 2opyr")ht 200- 0u& ."#rosyste%s, 7&#' (ll r")hts reser!ed' ;pe&8oot 4'1 '4, 1024 .8 %e%ory "&stalled, 0er"al A 4512991' 9ther&et address 0:3:ba:d$: 3:d1, >ost 7D: $3d$ 3d1' ok (% Use the pr"&te&! co''and to display the list of OpenDoot 24O: para'eters and record the current 1alues for the follo*ing para'eters0 output-de!"#e: s#ree& "&put-de!"#e: keyboard auto-bootN: true boot-de!"#e: d"sk &et
ok printenv 6ar"able <a%e asr-pol"#y test-ar)s d"a)-passes lo#al-%a#-addressN 1#ode-debu)N s#s"-"&"t"ator-"d oe%-lo)o 6alue &or%al 1 true 1alse De1ault 6alue &or%al 1 true 1alse <o de1ault

"%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10

C h a p t e r 1 0 7 2 a g e (

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

oe%-lo)oN oe%-ba&&er oe%-ba&&erN a&s"-ter%"&alN s#ree&-A#olu%&s s#ree&-Arows ttyb-rts-dtr-o11 ttyb-")&ore-#d ttya-rts-dtr-o11 ttya-")&ore-#d ttyb-%ode ttya-%ode output-device input-device auto-boot-o&-errorN error-reset-re#o!ery load-base !uto-boot4 &etwork-boot-ar)u%e&ts boot-#o%%a&d d"a)-1"le d"a)-de!"#e boot-1"le boot-device use-&!ra%r#N &!ra%r# se#ur"ty-%ode se#ur"ty-password se#ur"ty-Abadlo)"&s !erbos"ty d"a)-tr"))er ser!"#e-%odeN d"a)-s#r"pt d"a)-le!el d"a)-sw"t#hN ^1_ ok

1alse 1alse true $0 34 1alse true 1alse true 9 00,$,&,1,9 00,$,&,1,screen ke5bo!rd 1alse sy&# 1 3$4 true boot &et /pci+1e,-00000/ide+d/dis... 1alse &o&e 0 &or%al &o&e 1alse &or%al %ax 1alse

1alse <o de1ault 1alse true $0 34 1alse true 1alse true 9 00,$,&,1,9 00,$,&,1,screen ke5bo!rd 1alse sy&# 1 3$4 true boot &et disk net 1alse <o de1ault <o de1ault <o de1ault &or%al &o&e 1alse &or%al %ax 1alse

$ote) )he output differs fro' syste' to syste' based on the configuration%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age 6

6%

2re1ent the syste' fro' booting auto'atically after using the reset-all co''and by setting the auto-bootN para'eter to false% ok setenv !uto-boot4 #!lse auto-bootN R 1alse ok

Use the reset-all co''and to 1erify that the ne* auto-bootN 1alue is in effect% )he syste' should re'ain at the ok pro'pt after the reset-all co''and co'pletes% ok reset-!ll Fesett"&) 3;. e!e&t: L14dL1h39%5s host reset ) ''' N 0u& ?"re 6120 (@ltra0C(F2-77e 4$.>G), <o /eyboard ;pe&8oot 4'0, 204$ .8 %e%ory "&stalled, 0er"al A5-1 5033' 9ther&et address 0:3:ba: $:44:e9, >ost 7D: $3 $44e9' ok

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

B%

Use the probe-s#s", probe-s#s"-all, and probe-"dprpe co''ands to display the list of de1ices attached to your syste'<s &C&/ and /D$ buses% 9ot all of these co''ands are present on all syste's% 8120 e,a'ple0 ok probe-scsi :ar)et 0 @&"t 0 D"sk ?@J7:0@ .(C33 -< 0@<3 M 0401 :ar)et 1 @&"t 0 D"sk ?@J7:0@ .(C33 -< 0@<3 M 0401 ok probe-scsi-!ll /p#"+11,0/p#"+1/s#s"+$,1 /p#"+11,0/p#"+1/s#s"+$ :ar)et 0 @&"t 0 D"sk ?@J7:0@ .(C33 -< 0@<3 M 0401 :ar)et 1 @&"t 0 D"sk ?@J7:0@ .(C33 -< 0@<3 M 0401 ok probe-ide De!"#e 0 ( Cr"%ary .aster ) Fe%o!able (:(C7 .odel: D6-2$9-2 De!"#e 1 ( Cr"%ary 0la!e ) <ot Crese&t De!"#e 2 ( 0e#o&dary .aster ) <ot Crese&t De!"#e 3 ( 0e#o&dary 0la!e )
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age

<ot Crese&t ok &un Dlade 1(00 e,a'ple0 ok probe-scsi probe-s#s" N ok probe-s#s"-all /p#"+1e, 00000/p#"+3/0@<O,"sptwo+4 :ar)et 4 @&"t 0 Fe%o!able :ape >C 2153-( 3-0 ok probe-ide De!"#e 0 ( Cr"%ary .aster ) (:( .odel: 0:312002 ( De!"#e 1 ( Cr"%ary 0la!e ) (:( .odel: 0:312002 ( De!"#e 2 ( 0e#o&dary .aster ) Fe%o!able (:(C7 .odel: :;0>78( ;DD-D6D 0D-F1512 De!"#e 3 ( 0e#o&dary 0la!e ) <ot Crese&t ok Chat are the 'ain differences that you see in the infor'ation that these co''ands displayF The probe-scsi command lists only devices on the built-in S#S$ chain and does not list the full device paths. The probe-scsi-all command lists all devices on all S#S$ chains and their full device paths. The probe-ide command reports the list of $,@ devices attached to the system. 5% 4ecord the target nu'ber and de1ice type Gdis3, tape, or CD74O:H of all the de1ices sho*n by the probe-s#s", probe-s#s"-all, and probe-"de co''ands% @ach system presents its own uni7ue information. 10% 8erify that your default boot-de!"#e is set to dis3 net% ok printenv boot-device boot-de!"#e R d"sk &et ok $ote) )he output differs fro' syste' to syste' based on the configuration% 11% Use the de!al"as co''and to display the full de1ice path for the dis3 alias% ok dev!li!s disk 4ecord the path na'e reported0 This differs from system to system. >n an 1ltra ' workstation, the alias is defined as follows) /p#"+11,0/p#"+1,1/"de+3/d"sk+0,0 >n a Sun !ire <&2( server, the alias is defined as follows) /p#"+11,0/p#"+1/s#s"+$/d"sk+0,0
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2ractices for ?esson 10 Chapter 10 7 2age B

>n a Sun %lade &'(( system, the alias is defined as follows) /p#"+1e, 00000/"de+d/d"sk+0,0 12% Use the show-d"sks co''and to select the de1ice path that relates to the dis3 recorded in step 11 and co'plete the follo*ing steps0 a% Use the &!al"as co''and to create a ne* de1ice alias called %yd"sk% b% &et the %yd"sk alias to the path and dis3 na'e you recorded in step 11% 4e'e'ber to use the Ctrl J + 3ey seEuence to paste the dis3 path into your &!al"as co''and% +ou 'ust 'anually co'plete the path to specify the dis3 you *ant to use% 8120 e,a'ple0 ok s"ow-disks a) /p#"+11,0/p#"+1/s#s"+$,1/d"sk b) /p#"+11,0/p#"+1/s#s"+$/d"sk #) /p#"+11,0/p#"+1,1/"de+d/#dro% d) /p#"+11,0/p#"+1,1/"de+d/d"sk e) / p#"+11,0/p#"+1,1/ebus+#/0@<O,lo%h+14,200000 I) <; 09392:7;< 9&ter 0ele#t"o&, I to Iu"t: b /p#"+11,0/p#"+1/s#s"+$/d"sk has bee& sele#ted' :ype `Q ( 2o&trol-Q ) to "&sert "t "& the #o%%a&d l"&e' e')' ok &!al"as %yde! `Q 1or #reat"&) de!al"as %yde! 1or /p#"+11,0/p#"+1/s#s"+$/d"sk ok nv!li!s $5disk /pci+1#,0/pci+1/scsi+%/disk+0,0 ok &un Dlade 1(00 e,a'ple0 ok s"ow-disks a) /p#"+1e, 00000/p#"+3/0@<O,"sptwo+4/sd b) /p#"+1e, 00000/"de+d/#dro% #) /p#"+1e, 00000/"de+d/d"sk I) <; 09392:7;< 9&ter 0ele#t"o&, I to Iu"t: # /p#"+1e, 00000/"de+d/d"sk has bee& sele#ted' :ype `Q ( 2o&trol-Q ) to "&sert "t "& the #o%%a&d l"&e' e')' ok &!al"as %yde! `Q 1or #reat"&) de!al"as %yde! 1or /p#"+1e, 00000/"de+d/d"sk ok &!al"as %yd"sk /p#"+1e, 00000/"de+d/d"sk+0,0 ok

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2ractices for ?esson 10

C o p y r i g h t 2 0 1 1 , O r a c l e a n d / o r i t s a f f i l i a t e s % 6 l l r i g h t s r e s e r 1 e d %

ge 5

C h a p t e r 1 0 7 2 a

1!% 8erify that the ne* alias is correctly set% 8120 e,a'ple0 ok dev!li!s $5disk %yd"sk ok &un Dlade 1(00 e,a'ple0 ok dev!li!s $5disk %yd"sk ok ok printenv nvr!$rc Chat co''and does the &!ra%r# file contain that creates the %yd"sk aliasF Systems differ according to the disk devices they use. 3n 1ltra ' workstation would report the following) &!ra%r# R de!al"as %yd"sk /p#"+11,0/p#"+1,1/"de+3/d"sk+0,0 3 Sun !ire <&2( server would report the following) &!ra%r# R de!al"as %yd"sk /p#"+11,0/p#"+1/s#s"+$/d"sk+0,0 3 Sun %lade &'(( system would report the following) &!ra%r# R de!al"as %yd"sk /p#"+1e, 00000/"de+d/d"sk+0,0 1(% Use the pr"&te&! co''and to display the setting of the use-&!ra%r#N para'eter% ok printenv use-nvr!$rc4 use-&!ra%r#N R true ok Chat is the current setting of the use-&!ra%r#N para'eterF true 16% Doot your syste' by using the %yd"sk alias% ok boot $5disk (output o%"tted) 1 % ?og in as the root user on your syste' and open a ne* ter'inal *indo*% /p#"+1e, 00000/"de+d/d"sk+0,0 /p#"+11,0/p#"+1/s#s"+$/d"sk+0,0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

1"% Use the pr"&te&! co''and to display the contents of the &!ra%r# file%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age 10

1B% Use the eepro% co''and to list all <6F(. para'eters% # eepro$ ras-shutdow&-e&abledNR1alse shutdow&-te%pR-5 war&"&)-te%pR-0 e&!-%o&"torRd"sabled d"a)-passesR1 d"a)-#o&t"&ueNR0 d"a)-tar)etsR0 d"a)-!erbos"tyR0 keyboard-#l"#kNR1alse key%ap: data &ot a!a"lable' s#s"-"&"t"ator-"dRApower-#y#lesR0 syste%-board-ser"alA: data &ot a!a"lable' syste%-board-date: data &ot a!a"lable' ttyb-rts-dtr-o11R1alse ttyb-")&ore-#dRtrue ttya-rts-dtr-o11R1alse ttya-")&ore-#dRtrue ttyb-%odeR9 00,$,&,1,ttya-%odeR9 00,$,&,1,p#"a-probe-l"stR$,5, ,p#"b-probe-l"stR-,#,3,d,5(output o%"tted) 15% Use the eepro% co''and to list the setting of the boot-de!"#e para'eter% # eepro$ boot-device boot-de!"#eR d"sk &et A 20% Use the eepro% co''and to set the boot-de!"#e para'eter to the alias %yd"sk% # eepro$ boot-device=$5disk 21% Dring your syste' to run le1el 0% # init 0 22% 8erify that the eepro% co''and set the boot-de!"#e para'eter to the alias %yd"sk% ok printenv boot-device boot-de!"#e R %yd"sk ok

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age 11

2!% &et the boot-de!"#e para'eter to its default 1alue and 1erify the setting% ok set-de#!ult boot-device ok printenv boot-device boot-de!"#e R d"sk &et ok 2"% Use the &!u&al"as co''and to re'o1e the alias %yd"sk% ok nvun!li!s $5disk 2(% 8erify that the %yd"sk alias is no longer in the &!ra%r# file% ok printenv nvr!$rc &!ra%r# R ok 26% Use the de!al"as co''and to see *hether the %yd"sk alias has been re'o1ed fro' the list of de1ice aliases% ok dev!li!s $5disk %yd"sk /p#"+11,0/p#"+1/s#s"+$/d"sk+0,0 ok ;as itF +o. 2 % 4un the reset-all co''and, and then chec3 again *hether the %yd"sk alias has been re'o1ed fro' the list of de1ice aliases% ok reset-!ll G/f your syste' reboots, interrupt the reboot *ith a &top J 6 3ey seEuence%H ok dev!li!s $5disk %yd"sk : &o su#h al"as ok ;as itF *es.

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age 12

2B% &et the OpenDoot 24O: para'eters bac3 to their default 1alues and boot the syste' fro' the default de1ice% ok set-de#!ults 0ett"&) <6F(. para%eters to de1ault !alues' ok printenv 6ar"able <a%e 6alue De1ault 6alue ras-shutdow&-e&abledN 1alse 1alse shutdow&-te%p -5 -5 war&"&)-te%p -0 -0 e&!-%o&"tor d"sabled d"sabled d"a)-passes 1 1 (output o%"tted) ok reset-!ll ok boot 25% ?og in as the root user%

%as& 2) #unning @1sing the 9oot P#O/ CommandsA Simulation


1% ?og in as the root user and open a ter'inal *indo*% 2% Change to the /opt/ora/lab/de%o directory% # cd /opt/or!/l!b/de$o # ls @s"&)48oot4CF;.42o%%a&ds # cd JsinA/Noot/L*?7/Oo$$!nds F9(D.9':U: @s"&)48oot4CF;.42o%%a&ds'G"p !% 4ead the setup and playbac3 instructions gi1en in the F9(D.9':U: file% # $ore *M@27M.HFH "% $,tract the si'ulation7related files fro' the archi1e% # un>ip JsinA/Noot/L*?7/Oo$$!nds.>ip #reat"&): @s"&)48oot4CF;.42o%%a&ds/ #reat"&): @s"&)48oot4CF;.42o%%a&ds/"%a)es/ "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/"%a)es/;ra#e4lo)o'b%p "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/"%a)es/ora#le4lo)o')"1 "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/"%a)es/ora#le4lo)o1')"1 extra#t"&): @s"&)48oot4CF;.42o%%a&ds/"%a)es/su&-!"deo"#o&')"1 "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/"%a)es/su&4lo)o')"1 "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/"%a)es/:hu%bs'db #reat"&): @s"&)48oot4CF;.42o%%a&ds/%ed"a/ "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/%ed"a/(C7Orapper']s "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/%ed"a/?lash:a)']s "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/%ed"a/"%s%a&"1est'x%l "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/%ed"a/02;?u&#t"o&s']s

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10 Chapter 10 7 2age 1!

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

"&1lat"&): @s"&)48oot4CF;.42o%%a&ds/%ed"a/us"&)4bootpro%'sw1 "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/%ed"a/us"&)4bootpro%4!"ewlet'ht%l "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/re!"ew0tyle'#ss "&1lat"&): @s"&)48oot4CF;.42o%%a&ds/"&dex'ht%l (% Change to the root of the directory created by the A/2 archi1e%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

# cd JsinA/Noot/L*?7/Oo$$!nds # ls "%a)es "&dex'ht%l 6% Open the "&dex'ht%l file in a *eb bro*ser% # #ire#ox index."t$l P

%ed"a

re!"ew0tyle'#ss

Clic3 OB in the Ado'e 2lash Player 'essage bo, that 'ight appear% % /n the bro*ser that opens, clic3 the *aunch %our lin3 to start the si'ulation in another bro*ser *indo*%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 10

C h a p t e r 1 0 7 2 a g e 1 "

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 11) 1sing the G#and 1nified 9ootloader :G#19;
Chapter 11

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 110 Using the #4and Unified Dootloader G#4UDH Chapter 11 7 2age 1

Practices for *esson 11


Practices Overvie(
/n these practices, you change entries in the #4UD 'enu to boot the syste' in different *ays, and you use the eepro% co''and to set boot para'eters%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 110 Using the #4and Unified Dootloader G#4UDH Chapter 11 7 2age 2

Practice 11,1) 1sing G#19


Assumptions
4efer to the lecture notes as necessary to perfor' the follo*ing tas3s and ans*er the Euestions listed% )his e,ercise is specific to ,B6/,6" syste's and reEuires an ,B6/,6" syste' that is capable of using a 6"7bit 3ernel to co'plete all practice steps% /f you are using a syste' that is only !27bit capable, you *ill be able to run only a subset of the practice steps% /f you are *or3ing in an ?8C en1iron'ent, gain access to the console *indo* to perfor' this e,ercise%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% ?og in as root and open a ter'inal *indo*% 2% Use the "&"t co''and to shut do*n the syste' to run le1el 0% A init 0 !% Chen the Cress a&y key to reboot pro'pt appears, press any 3ey to start the boot process% "% Chen the #4UD 'ain 'enu appears, press the &pace bar to interrupt the boot process% )he #4UD 'ain 'enu re'ains displayed% @or e,a'ple0 M<@ MF@8 !ers"o& 0'95 (5-2/ lower / 33$0$0$/ upper %e%ory) L--------------------------------------------------------------L Y 0olar"s 10 $/11 s10x4u10wos41-a U$ Y 0olar"s 1a"lsa1e Y L-------------------------------------------------------------L @se the ` a&d ! keys to sele#t wh"#h e&try "s h")hl")hted' Cress e&ter to boot the sele#ted ;0, KeK to ed"t the #o%%a&ds be1ore boot"&), or K#K 1or a #o%%a&d-l"&e' $ote) )he D"a)&ost"# Cart"t"o& ite' in the #4UD 'enu is not resent unless the syste' had an unreco1erable startup failure% &elect the 0olar"s 10 $/11 s10x4u10wos41-a U$ entry, and press $ to display the list of co''ands it represents% Chat is the pathna'e of the boot archi1e this boot entry usesF /s a specific 3ernel listed in the ker&el co''and lineF

(%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 110 Using the #4and Unified Dootloader G#4UDH Chapter 11 7 2age !

M<@ MF@8 !ers"o& 0'9- ( 39/ lower / 209 0 4/ upper %e%ory) L--------------------------------------------------------------L Y 1"&droot (root1s0,0,a) Y ker&el /plat1or%/"$ p#/%ult"boot Y %odule /plat1or%/"$ p#/boot4ar#h"!e Y L--------------------------------------------------------------L

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

6% %

The 6olaris 10 8/11 s101_u10wos_18a 98: boot entry uses the /plat orm/i8:pc/boot_archive boot archive. The kernel command does not list a specific kernel to load. 2ress the $sc 3ey to return to the #4UD 'ain 'enu% &elect the 0olar"s 1a"lsa1e entry, and press $ to display the list of co''ands it represents% Chat is the pathna'e of the boot archi1e this boot entry usesF M<@ MF@8 !ers"o& 0'95 (5-2/ lower / 33$0$0$/ upper %e%ory) L--------------------------------------------------------------L Y 1"&droot (root1s0,0,a) Y ker&el /boot/%ult"boot ker&el/u&"x -s Y %odule /boot/x$ '%"&"root-sa1e Y L--------------------------------------------------------------L

The 6olaris ailsa e boot entry uses the /boot/18:.miniroot-sa e boot archive. B% 2ress the $sc 3ey to return to the #4UD 'ain 'enu% 5% &elect the 0olar"s 10 $/11 s10x4u10wos41-a U$ entry, and press 4eturn to boot the syste' to the default 'ilestone% 10% ?og in as root and open a ter'inal *indo*% 11% Use the eepro% co''and to display the list of boot para'eters defined in the boote&!'r# file% /s the boot-1"le para'eter currently definedF A eepro$ ata-d%a-e&abledR1 atap"-#d-d%a-e&abledR0 ttyb-rts-dtr-o11R1alse ttyb-")&ore-#dRtrue ttya-rts-dtr-o11R1alse ttya-")&ore-#dRtrue ttyb-%odeR9 00,$,&,1,ttya-%odeR9 00,$,&,1,lba-a##ess-okR1 preallo#-#hu&k-s"GeR0x2000 bootpathR/p#"+0,0/p#"1022,-450+2/p#"1000,30 0+3/sd+2,0: a keyboard-layoutR@0-9&)l"sh #o&soleRttya A +o, the boot- ile parameter is not defined.
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 110 Using the #4and Unified Dootloader G#4UDH Chapter 11 7

2age "

12% Use the prt#o&1 co''and to display the na'e of the 3ernel that the syste' is currently using% /f the 3ernel listed is a 6"7bit 3ernel, for e,a'ple /plat1or%/"$ p#/ker&el/a%d 4/u&"x, proceed to the ne,t step% /f the 3ernel listed is a !27bit 3ernel, for e,a'ple, /plat1or%/"$ p#/ker&el/u&"x, s3ip to step 20% A prtcon# -v E Arep /pl!t#or$/i%-pc/kernel !alueRK/plat1or%/"$ p#/ker&el/a%d 4/u&"xK A $ote) +ou cannot use a 6"7bit 3ernel to boot a !27bit syste'% 1!% Use the eepro% co''and to set the boot-1"le para'eter so that the syste' *ill boot by using the !27bit 3ernel% 8erify that the para'eter is no* set% A eepro$ boot-#ile=kernel/unix A eepro$ boot-#ile boot-1"leRker&el/u&"x A 1"% Use the "&"t co''and to reboot your syste'% Chen the boot process co'pletes, log in as root user and open a ter'inal *indo*% A init 1(% Use the prt#o&1 co''and to display the na'e of the 3ernel that the syste' is no* using% A prtcon# -v E Arep /pl!t#or$/i%-pc/kernel !alueRK/plat1or%/"$ p#/ker&el/u&"xK A 16% Use the "&"t co''and to reboot your syste'% Chen the #4UD 'ain 'enu appears, press $ to interrupt the boot process and edit the default boot entry% Does the ker&el co''and list a specific 3ernel to bootF A init (output o%"tted) M<@ MF@8 !ers"o& 0'95 (5-2/ lower / 33$0$0$/ upper %e%ory) L--------------------------------------------------------------L Y 1"&droot (root1s0,0,a) Y ker&el /plat1or%/"$ p#/%ult"boot Y %odule /plat1or%/"$ p#/boot4ar#h"!e Y L--------------------------------------------------------------L +o, the kernel command still lists no specific kernel. 1 % &elect the ker&el co''and fro' the #4UD 'enu, and press $ to enter the #4UD editor% )rub ed"t* ker&el /plat1or%/"$ p#/%ult"boot

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 110 Using the #4and Unified Dootloader

G#4UDH Chapter 11 7 2age (

1B% $dit the ker&el co''and to add the na'e of the 6"7bit 3ernel to the end of the co''and line% 2ress AreturnB to return to #4UD. )rub ed"t* ker&el /plat1or%/"$ p#/%ult"boot kernel/!$d-6/unix 15% 8erify that the ker&el co''and specifies the 6"7bit 3ernel, and press D to boot the syste'% 20% ?og in as root and open a ter'inal *indo*% 21% Use the prt#o&1 co''and to display the na'e of the 3ernel that the syste' is currently using% /s the syste' using the !27bit 3ernel that you specified *ith the eepro% co''and, or the 6"7bit 3ernel you specified using the ker&el co''andF A prtcon# -v E Arep /pl!t#or$/i%-pc/kernel !alueRK/plat1or%/"$ p#/ker&el/a%d 4/u&"xK The system is using the .0-bit kernel that you specified using the kernel command, overriding the entry in bootenv.rc file created by the eeprom command. 22% Use the eepro% co''and to set the boot-1"le para'eter to a null 1alue, and 1erify the change% A eepro$ boot-#ile=GG A eepro$ boot-#ile boot-1"leR A 2!% Use the "&"t co''and to reboot your syste'% Chen the #4UD 'ain 'enu appears, press the &pace bar to interrupt the boot process% A init (output o%"tted) M<@ MF@8 !ers"o& 0'95 (5-2/ lower / 33$0$0$/ upper %e%ory) L--------------------------------------------------------------L Y 0olar"s 10 $/11 s10x4u10wos41-a U$ Y 0olar"s 1a"lsa1e Y L-------------------------------------------------------------L @se the ` a&d ! keys to sele#t wh"#h e&try "s h")hl")hted' Cress e&ter to boot the sele#ted ;0, KeK to ed"t the #o%%a&ds be1ore boot"&), or K#K 1or a #o%%a&d-l"&e' 2"% &elect the 0olar"s 1a"lsa1e boot option and boot the syste'% 6llo* the &olaris instance that the syste' finds to 'ount on /a% ;ra#le 0olar"s 10 $/11 s10x4u10wos41-a U$ was 1ou&d o& /de!/dsk/#1d0s0' Do you w"sh to ha!e "t %ou&ted read-wr"te o& /aN Dy,&,NE 5

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 110 Using the #4and Unified Dootloader G#4UDH Chapter 11 7

2age 6

2(% Change the directory to /a/plat1or%/"$ p#, and create a directory na'ed ba#kup% A cd /!/pl!t#or$/i%-pc A $kdir b!ckup A 26% :o1e the boot4ar#h"!e file into the ba#kup directory and 1erify that it no longer e,ists in /a/plat1or%/"$ p#%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

A $v boot/!rc"ive b!ckup A ls ba#kup b"os"&t boot ker&el %ult"boot u#ode A 2 % Use the bootad% co''and to create a ne* boot archi1e in the /a/plat1or%/"$ p# directory% 8erify that it e,ists% A boot!d$ upd!te-!rc"ive -# -* /! 2reat"&) boot4ar#h"!e 1or /a updat"&) /a/plat1or%/"$ p#/boot4ar#h"!e A ls boot/!rc"ive boot4ar#h"!e A 2B% Change directory to root G/H, un'ount /a, and reboot the syste'% A cd / A u$ount /! A init -

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 110 Using the #4and Unified Dootloader G#4UDH Chapter 11 7

2age

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 110 Using the #4and Unified Dootloader G#4UDH Chapter 11 7 2age B

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 12) Performing *egacy 9oot and Shutdo(n Procedures
Chapter 12

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 120 2erfor'ing ?egacy Doot and &hutdo*n 2rocedures Chapter 12 7 2age 1

Practices for *esson 12


Practices Overvie(
)here is no practice for this lesson%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 120 2erfor'ing ?egacy Doot and &hutdo*n 2rocedures Chapter 12 7 2age 2

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 1.) Service /anagement 2acility :S/2;


Chapter 1.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1!0 &er1ice :anage'ent @acility G&:@H Chapter 1! 7 2age 1

Practices for *esson 1.


Practices Overvie(
/n these practices, you add, use, and re'o1e ser1ices in the &olaris :anage'ent @acility G&:@H% +ou also de'onstrate the function of the /et#/syste% file%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1!0 &er1ice :anage'ent @acility G&:@H Chapter 1! 7 2age 2

Practice 1.,1) /anaging Services (ith S/2


Assumptions
)his practice reEuires the ba&&er-r#, ba&&er-s%1, and ba&&er-s%1'x%l files, found in the /opt/ora/lab/s%1 directory% +our instructor *ill indicate if the files are located else*here% 4efer to the lecture notes, as necessary, to perfor' the tas3s listed% /f you are *or3ing in an ?8C en1iron'ent, gain access to the console *indo* to perfor' this e,ercise%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% Change to the directory /opt/ora/lab/s%1, and chec3 that the files ba&&er-r#, ba&&er-s%1, and ba&&er-s%1'x%l all ha1e e,ecute per'ission% A cd /opt/or!/l!b/s$# A ls -l b!nnerD -rwxr-xr-x 1 root root -rwxr-xr-x 1 root root -rwxr-xr-x 1 root root A 2% !% "% (% 6% A c"$od !Qx b!nnerD Create the /usr/lo#al/s!#/%ethod directory% A $kdir -p /usr/loc!l/svc/$et"od Copy the ba&&er-s%1 file to the /usr/lo#al/s!#/%ethod directory% A cp b!nner-s$# /usr/loc!l/svc/$et"od Copy the ba&&er-s%1'x%l file to the /!ar/s!#/%a&"1est/s"te directory% A cp b!nner-s$#.x$l /v!r/svc/$!ni#est/site 8erify that the ba&&er-s%1 ser1ice is not yet part of &:@% A svcs site/b!nner-s$# s!#s: Catter& Ks"te/ba&&er-s%1K does&Kt %at#h a&y "&sta&#es 0:(:9 0:7.9 ?.F7 A % /'port the ne* ba&&er-s%1 ser1ice into the &:@ repository% A svcc#A i$port /v!r/svc/$!ni#est/site/b!nner-s$#.x$l A

34- ?eb 2$ 14:2 ba&&er-r# 314 ?eb 2$ 14:29 ba&&er-s%1 9$9 ?eb 2$ 14:30 ba&&er-s%1'x%l

/f necessary, use #h%od to add e,ecute per'issions to these files%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1!0 &er1ice :anage'ent @acility G&:@H

Chapter 1! 7 2age !

B%

8erify that the ba&&er-s%1 ser1ice is no* part of &:@% A svcs site/b!nner-s$# 0:(:9 0:7.9 ?.F7 o&l"&e 9:11:54 s!#:/s"te/ba&&er-s%1:de1ault A

5%

Open a console *indo* to 1ie* the output of the ba&&er-s%1 ser1ice% $ote) /f you are already on a Console *indo*, you can s3ip this step% A dtter$ -O P Or A xter$ -O P

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

10% Use the s!#ad% co''and to disable the ba&&er-s%1 ser1ice and 1ie* the output in the console *indo*% A svc!d$ -v dis!ble site/b!nner-s$# s!#:/s"te/ba&&er-s%1:de1ault d"sabled' A svcs site/b!nner-s$# 0:(:9 0:7.9 ?.F7 d"sabled 9:11:54 s!#:/s"te/ba&&er-s%1:de1ault )he console *indo* should display 0(-200 as the banner% 11% Use the s!#ad% co''and to enable the ba&&er-s%1 ser1ice and 1ie* the output in the console *indo*% A svc!d$ -v en!ble site/b!nner-s$# s!#:/s"te/ba&&er-s%1:de1ault e&abled' A svcs site/b!nner-s$# 0:(:9 0:7.9 ?.F7 o&l"&e 9:11:54 s!#:/s"te/ba&&er-s%1:de1ault 12% &hut do*n the syste' to run state 0% A init 0 &264C7based syste's display the ok pro'pt, ,B6/,6"7based syste's display the Cress a&y key to reboot pro'pt% 1!% /f you are using a &264C syste', boot the syste' *ith the -% !erbose option% Use the follo*ing co''and0 ok boot -$ verbose Does the startup 'essage fro' ba&&er-s%1 appearF *es% 1"% /f you are using an ,B6/,6"7based syste', press any 3ey to initiate the boot process% )hen0 a% $nter $ *hen the #4UD 'ain 'enu appears% b% &elect the ker&el co''and line and enter $ to use the #4UD editor to 'odify the line%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1!0 &er1ice :anage'ent @acility G&:@H Chapter 1! 7 2age "

c%

6dd the -% 1erbose option to the end of the ker&el co''and line and press 4eturn% @or e,a'ple0 )rub ed"t* ker&el /plat1or%/"$ p#/%ult"boot -$ verbose 3*eturn>

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

$nter D to boot the syste'% Does the startup 'essage fro' ba&&er-s%1 displayF *es% 1(% ?og in as the root user and co'plete the follo*ing steps0 a% Open a ter'inal *indo*% b% Open a separate console *indo*% $ote) /f you are already on a Console *indo*, you can s3ip this step% A dtter$ -O P Or A xter$ -O P c% 4e'o1e the ba&&er-s%1 ser1ice fro' the syste'% A svc!d$ -v dis!ble site/b!nner-s$# s!#:/s"te/ba&&er-s%1:de1ault d"sabled A svcc#A delete -# svc:/site/b!nner-s$#:de#!ult A svcs site/b!nner-s$# s!#s: Catter& Ks"te/ba&&er-s%1K does&Kt %at#h a&y "&sta&#es 0:(:9 0:7.9 ?.F7 A r$ /v!r/svc/$!ni#est/site/b!nner-s$#.x$l 16% Copy the ba&&er-r# script fro' the /opt/ora/lab/s%1 directory to the /et#/"&"t'd directory% A cp /opt/or!/l!b/s$#/b!nner-rc /etc/init.d 1 % Change directory to /et#/"&"t'd and 1erify that the ba&&er-r# script runs *ith both the start and stop argu'ents% A cd /etc/init.d A ./b!nner-rc st!rt A ./b!nner-rc stop 1B% Change directory to /et#/r#2'd and create a hard lin3 called 022ba&&er that points to the sa'e data as the /et#/"&"t'd/ba&&er-r# file% A cd /etc/rc2.d A ln /etc/init.d/b!nner-rc :22b!nner 15% Change directory to /et#/r#0'd and create a hard lin3 called /99ba&&er that points to the sa'e data as the /et#/"&"t'd/ba&&er-r# file% A cd /etc/rc:.d A ln /etc/init.d/b!nner-rc ;99b!nner

d%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1!0 &er1ice :anage'ent @acility G&:@H Chapter 1! 7 2age (

20% 4eboot the syste' and *atch for the output of the script you .ust installed% A init Does the startup 'essage fro' 022ba&&er displayF *es% 21% ?og in as the root user and co'plete the follo*ing steps0 a% Open a ter'inal *indo*% b% Use the "&"t co''and to change to run le1el &%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

A init : Does the shutdo*n 'essage fro' /99ba&&er appearF *es% 22% $nter the pass*ord for the root user *hen it is reEuested and change to run le1el ! or press Ctrl J D to bypass% A Oontrol-d Does the startup 'essage fro' 022ba&&er appearF *es% 2!% ?og in as the root user and co'plete the follo*ing steps0 a% Open a ter'inal *indo*% b% Change to the /et# directory% A cd /etc 2"% :a3e a bac3up copy of the /et#/syste% file and na'e the bac3up file as syste%'or")% A cp s5ste$ s5ste$.oriA 2(% /f your syste' uses a &C&/ tape de1ice, co'plete the follo*ing steps0 $ote) /f you are using 8irtual Do, deli1ery en1iron'ent, then you *ill not be able to perfor' this step as there are no &C&/ tape de1ices attached to the 1irtual 'achines% a% Use the prt#o&1 co''and to list instances of the st dri1er currently loaded% A prtcon# E Arep Gst, inst!nceG ;o* 'any instances are reportedF +one $ote) )he output 1aries fro' syste' to syste'% $dit the /et#/syste% file so that it includes the follo*ing line0 1or#eload: dr!/st c% d% e% 4eboot the syste'% A init ?og in as root and open a ter'inal *indo*% 6gain, list instances of the st dri1er currently loaded% A prtcon# E Arep Gst, inst!nceG ;o* 'any instances are reportedF The number varies depending on how many S#S$ controllers are present. *ou should see $nstances ( through . for a system with one controller.
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

b%

2ractices for ?esson 1!0 &er1ice :anage'ent @acility G&:@H Chapter 1! 7 2age 6

26% $dit the /et#/syste% file so that it e,cludes the 'ain dis3 dri1er for your syste'% On &264C or ,B6/,6" syste's using &C&/ dis3s, add the follo*ing line0 ex#lude: dr!/sd On &264C syste's using /D$ dis3s, add the follo*ing line0 ex#lude: dr!/dad On ,B6/,6" syste's using &6)6 dis3s, add the follo*ing t*o lines0 ex#lude: dr!/#%dk ex#lude: dr!/a%d 4/#%dk /f you are uncertain of the type of dis3 or dis3 dri1er used for your boot dis3, use the follo*ing procedure to deter'ine the di1er in use0 a% Use the d1 co''and to display infor'ation for the root G/H file syste'% A d# -" / ?"lesyste% s"Ge /de!/dsk/#1d0s0 4'$M A b% used 22$. a!a"l 4'5M #apa#"ty 5T .ou&ted o& /

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Use the ls -l3 co''and to display physical de1ice file infor'ation for the root de1ice% A ls -lL /dev/dsk/c1d0s0 brw-r----- 1 root sys 102, 0 .ar 1 11:31 /de!/dsk/#1d0s0 A &earch in /et#/&a%e4to4%a]or for the 'a.or de1ice nu'ber listed in the pre1ious co''and% )his identifies the dri1er in use, in this e,a'ple, #%dk% &pecify this dri1er in the e,clude directi1e that you create in /et#/syste%% A Arep 102 /etc/n!$e/to/$!Ror #%dk 102 A

c%

2 % &hut do*n the syste' to run le1el 0, and then atte'pt to boot it again% # s"utdown -5 -i0 -A0 Gshutdo*n 'essagesH On a &264C syste'0 ok boot On an ,B6/,6" syste'0 Cress a&y key to reboot =press a&y key* Chat happenedF The system is unable to boot. @xcluding this driver prevents you from using the boot disk so long as you use the same /etc/s"stem file. *ou must boot using the -a option to be able to supply an alternative file for the /etc/s"stem file, or boot from the failsafe boot archive on x-./x.0 systems to correct the problem. 2B% /f you are using a &264C7based syste', use the boot -a co''and to boot the syste' and co'plete the follo*ing steps0 a% &upply the na'e of your bac3up file called /et#/syste%'or")%
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1!0 &er1ice :anage'ent @acility G&:@H Chapter 1! 7 2age

b%

2ress 4eturn to accept the default 1alues for all other boot para'eters% @or e,a'ple0 ok boot Va Feboot"&) w"th #o%%a&d: boot ! 8oot de!"#e: /p#"+1e, 00000/"de+d/d"sk+0,0 ?"le a&d ar)s: -! <a%e o1 syste% 1"le D/et#/syste%E: /et#/syste%'or") 0u&;0 Felease 5'10 6ers"o& Me&er"#4144500-10 4 b"t 2opyr")hta 19$3, 2011, ;ra#le a&d /or "ts a11l"ates' (ll r")hts reser!ed root 1"lesyste% type Du1sE: =Fetur&* 9&ter phys"#al &a%e o1 root de!"#e D/'''E: =Fetur&*

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c% ?og in as the root user and open a ter'inal *indo*% d% Copy the /et#/syste%'or") file to the /et#/syste% file% e% 4eboot the syste'% A cd /etc A cp s5ste$.oriA s5ste$ A init 25% /f you are using an ,B6/,6"7based syste', co'plete the follo*ing steps0 a% Chen the #4UD 'ain 'enu appears, press the space bar to cancel the ti'eout and auto'atic boot% b% &elect the 0olar"s 1a"lsa1e boot option, and boot the syste'% c% Chen pro'pted, choose to 'ount the &olaris instance belo* /a% d% Change directory to /et#, and copy syste%'or") to syste'% A cd /!/etc A cp s5ste$.oriA s5ste$ A e% Change directory to root G/H, and reboot the syste'% A cd / A init Goutput o'ittedH

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1!0 &er1ice :anage'ent @acility G&:@H Chapter 1! 7 2age B

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 10) Performing 1ser Administration


Chapter 10

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age 1

Practices for *esson 10


Practices Overvie(
/n these practices, you use the &olaris :anage'ent Console and the s%user, s%)roup, user%od, userdel, )roupadd, and )roupdel co''ands to create, 'odify, and delete 'ultiple user accounts and group entries%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age 2

Practice 10,1) Adding 1ser and Group Accounts


Assumptions
)his practice assu'es that no user accounts e,ist e,cept for the default accounts created during a default Oracle &olaris O& installation% Use the lo)"&s co''and to display the list of user accounts% Use the userdel -r co''and to re'o1e any of these accounts that you find% 4efer to the lecture notes, as necessary, to perfor' the tas3s listed% $ote) &o'e of the co''ands displayed in this section are Euite long and *ill *rap to the ne,t line% +ou should consider all co''ands in bold font follo*ing a co''and7line pro'pt to be all one line%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as& 1) "isa'ling the Oracle Solaris OS #egistration >indo(


/n this tas3, you disable the Oracle &olaris O& 4egistration *indo*% 1% ?og in as the root user and open a ter'inal *indo* Gor use the su co''and to change your identity to rootH% 2% !% "% Change to the /et#/de1ault directory% /n the /et#/de1ault directory, use the !" editor to create a file called solre)"s% A vi solreAis /n the solre)"s file, create a line that reads0 D70(839R1 (% $ote) )he character M1N is the nu'ber one% &a1e this file, and then e,it the editor%

%as& 2) Adding Group =ntries


/n this tas3, you use the )roupadd and s%)roup add co''ands to add group entries% 1% 2% 6s the root user, open a ter'inal *indo*% Use the )roupadd and s%)roup co''ands to add the groups #lass1 and #lass2, respecti1ely, as follo*s% Group $ame #lass1 #lass2 101 102 G+" $um'er

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age !

)he s%)roup co''and *ill reEuest a pass*ord for authentication% +ou should respond to the pro'pts as reEuired% # Aroup!dd -A 101 cl!ss1 # /usr/s!d$/bin/s$Aroup !dd -- -n cl!ss2 -A 102 (uthe&t"#at"&) as user: root :ype /N 1or help, press"&) =e&ter* a##epts the de1ault de&oted by D E Clease e&ter a str"&) !alue 1or: password :: #a&)et"& 3oad"&) :ool: #o%'su&'ad%"&'user%)r'#l"')roup'@ser.)rMroup2l" 1ro% host2 3o)"& to host2 as user root was su##ess1ul' Dow&load o1 #o%'su&'ad%"&'user%)r'#l"')roup'@ser.)rMroup2l" 1ro% host2 was su##ess1ul' A

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as& .) Adding 1ser Accounts


/n this tas3, you use the useradd and s%user add co''ands along *ith the &olaris :anage'ent Console to add user accounts% 1% /f the /export/ho%e directory does not e,ist, create it% # ls /export/"o$e /export/ho%e: <o su#h 1"le or d"re#tory # $kdir /export/"o$e A 2% Use the useradd co''and to add a user na'ed user3, and then set a pass*ord for user3, as follo*s0 Pass(ord 123pass Shell >orn 1+" 1003 Primary Group 10 Secondary Group #lass1

1ser $ame user3

# user!dd -u 1003 -A 10 -S cl!ss1 -d /export/"o$e/user3 -$ -s /bin/ks" user3 4 blo#ks # p!sswd user3 <ew Cassword: 123pass Fe-e&ter &ew Cassword: 123pass passwd: password su##ess1ully #ha&)ed 1or user3 !% Use the s%user co''and to add a user na'ed user4 and co'plete the follo*ing steps, as follo*s0 Pass(ord 123pass C Shell 1+" 1004 Primary Group 10 Secondary Group #lass1

1ser $ame user4

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age "

a%

4espond to s%user authentication pro'pts, as reEuired% # /usr/s!d$/bin/s$user !dd -- -n user6 -u 1006 -A 10 -S cl!ss1 d /export/"o$e/user6 -s /bin/cs" -x !uto"o$e=K (uthe&t"#at"&) as user: root :ype /N 1or help, press"&) =e&ter* a##epts the de1ault de&oted by D E Clease e&ter a str"&) !alue 1or: password :: #a&)et"& 3oad"&) :ool: #o%'su&'ad%"&'user%)r'#l"'user'@ser.)r2l" 1ro% host2 3o)"& to host2 as user root was su##ess1ul' Dow&load o1 #o%'su&'ad%"&'user%)r'#l"'user'@ser.)r2l" 1ro% host2 was su##ess1ul' A

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

b%

6s an alternati1e, use useradd to create the user4 account% # user!dd -u 1006 -A 10 -S cl!ss1 -d /export/"o$e/user6 -$ -s /bin/cs" user6 4 blo#ks A

c%

&et a pass*ord for user4% # p!sswd user6 <ew Cassword: 123p!ss Fe-e&ter &ew Cassword: 123p!ss passwd: password su##ess1ully #ha&)ed 1or user4

"%

?aunch the &olaris :anage'ent Console by typing s%# [ on the co''and line% 6fter the &olaris :anage'ent Console appears, co'plete the follo*ing steps to create a user te'plate and add user accounts that do not use auto'ounted ho'e directories0 a% &elect %his Computer C System Configuration C 1sers C 1ser %emplates to open the User )e'plates tool% +ou should respond to authentication pro'pts *ith root userna'e and pass*ord% $ote) /n the 9a1igation pane of the &olaris :anage'ent Console, you *ill see three M)his Co'puterN under the :anage'ent tools tree structure% &elect the first entry% b% @ro' the :enu Dar, select Action C Add 1ser %emplate% )he Add 1ser %emplate dialog bo, appears, containing blan3 fields for a te'plate na'e and description% c% $nter the na'e 0olar"s@ser in the 1ser %emplate $ame field and 2lass :e%plate for the "escription field% d% Clic3 the -ome "irectory tab and co'plete the follo*ing steps0 1H Deselect the 6uto'atically :ount ;o'e Directory chec3 bo,% 2H $nter the na'e of your syste' in the -ome "irectory Server field% e% Clic3 OB to create your te'plate%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration

Chapter 1" 7 2age (

(%

Co'plete the follo*ing steps to add user5 account as follo*s0 Pass(ord 123pass Shell Dourne 1+" 1005 Primary Group 10 Secondary Group 96

1ser $ame user5 a%

b%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Clic3 1ser Accounts, and add the user5 account by selecting Action C Add 1ser C 2rom %emplate on the 'enu bar% )he Add 1ser 2rom %emplate dialog bo, appears% $nter user5 in the 1ser $ame field and enter 1005 in the 1ser +" $um'er field%

6%

Clic3 the 1ser /ust 1se button, and then enter 123pass in both pass*ord fields for pass*ord infor'ation% d% Clic3 OB, and confir' your choice as reEuested% @ro' the &olaris :anage'ent Console, co'plete the follo*ing steps0 a% Use the 0olar"s@ser te'plate to add the users, #leared1 and lo#ked1% b% Use the U/D nu'bers as follo*s0 Shell 96 96 1+" 2001 2002 Primary Group <( <( Secondary Group 96 96

c%

1ser $ame lo#ked1 #leared1 %

B%

5%

c% ?ea1e the 1ser Account +s *oc&ed button selected for both users% Double7clic3 the #leared1 user and co'plete the follo*ing steps0 a% &elect the Pass(ord tab% b% &elect the pass*ord option, 1ser /ust Set Pass(ord At $e<t *ogin% c% Clic3 OB% Double7clic3 the lo#ked1 user and co'plete the follo*ing steps0 a% &elect the General tab% b% Under the Account Availa'ility section, 1erify that the Account is *oc&ed button is pressed% $,it the &olaris :anage'ent Console%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age 6

%as& 0) =<amining Configuration 2iles


/n this tas3, you e,a'ine the /et#/passwd and /et#/)roup configuration files% 1% $,a'ine the contents of the /et#/passwd file% Chat are the full path na'es of the shells used by user3, user4, and user5F user3 user4 user5 /b"&/ksh /b"&/#sh /b"&/sh

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2%

$,a'ine the contents of the /et#/shadow file% Chat te,t is found in the pass*ord field for the users lo#ked1 and #leared1F lo#ked1 #leared1 B3/B 0

!%

"%

+ou used the sa'e pass*ord for user3 through user5% 6re the pass*ord strings the sa'e in the /et#/shadow fileF +o% $,a'ine the contents of the /et#/)roup file, and then 1erify that user3 and user4 are both listed as secondary 'e'bers of the #lass1 group% 6re theyF The names user3 and user0 should be listed in the last field for the class1 group. ?og out of the *indo* 'anager, and then atte'pt to log in as lo#ked1% A telnet loc!l"ost :ry"&) 12-'0'0'1''' 2o&&e#ted to lo#alhost'lo#aldo%a"&' 9s#ape #hara#ter "s K`EK' lo)"&: locked1 Cassword: b 6re you able to log inF +o, you get a message that says login incorrect, no matter what you use as a password. Co'plete the follo*ing steps0 a% 6tte'pt to log in as #leared1% # telnet loc!l"ost :ry"&) 12-'0'0'1''' 2o&&e#ted to lo#alhost'lo#aldo%a"&' 9s#ape #hara#ter "s K`EK' lo)"&: #leared1 2hoose a &ew password' <ew Cassword:

(%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age

Chat happensF *ou are asked to choose a new password for the cleared1 user. b% 6tte'pt to use the pass*ord ab#de1)% Chat are the syste' reEuire'ents for the pass*ordF +ou 'ust not press 4eturn *hen you are as3ed for an initial pass*ord% *ou must choose an initial password for this user and then log in again. The first six characters must contain at least two alphabetic characters and at least one numeric or special character. Use the pass*ord ab#123, and then log in as #leared1 after you establish a pass*ord to 1erify that the login *or3s% ?og out, and then log in as the root user%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

c% d%

%as& 3) =sta'lishing Pass(ord Aging


/n this tas3, you use the &olaris :anage'ent Console to establish pass*ord aging for a user account% 1% &tart the &olaris :anage'ent Console and co'plete the follo*ing steps0 a% #o bac3 into the 1ser Accounts node% b% 4espond to authentication pro'pts as reEuired% c% &elect user5 fro' the list of users% 2% d% Clic3 Action C Properties to open the 1ser Properties for user0 dialog bo,% Co'plete the follo*ing steps0 a% &elect the Pass(ord Options tab% b% Change the pass*ord options for user5 so that it 'atches the follo*ing infor'ation% @ser .ust /eep ?or : 8e1ore 2ha&)e (lert @ser: @ser .ust 2ha&)e O"th"& : 9xp"res 71 <ot @sed ?or : !% 1 2 2 1 (o&e (two (two (o&e day) days) days) day)

c% Clic3 OB *hen you are finished, and e,it the &olaris :anage'ent Console% /n a ter'inal *indo*, atte'pt to log in as user5% A telnet loc!l"ost :ry"&) 12-'0'0'1''' 2o&&e#ted to lo#alhost'lo#aldo%a"&' 9s#ape #hara#ter "s K`EK' lo)"&: user0 Cassword: 123p!ss Qour password w"ll exp"re "& 2 days' Goutput o'ittedH c

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age B

"%

Chat happensF *ou can log in as user2, and a warning indicates that your password expires in two days. $ote) /f the pass*ord e,piration *arning does not appear *hen you log in, you can test the pass*ord aging feature by using the su user5 co''and% Doing so *ill cause the 'essage Qour password w"ll exp"re "& 2 days to appear in the ter'inal *indo* *here you run the su user5 co''and% Co'plete the login as user5 and atte'pt to change the pass*ord for user5% c p!sswd passwd: 2ha&)"&) password 1or user5 9&ter ex"st"&) lo)"& password: Chat happensF Chen you try to change your password, the following error message appears) passwd: 0orry: less tha& 1 days s"&#e the last #ha&)e' Cer%"ss"o& de&"ed

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(%

?og out, and then log in again as the root user%

%as& 4) /odifying 1ser Accounts and Group =ntries


/n this tas3, you use the )roupadd, )roupdel, user%od, userdel, s%user %od"1y, and s%)roup %od"1y co''ands to 'odify user accounts and group entries% 1% Open a ter'inal *indo*% 2% Use the )roupadd co''and to create a ne* group called #lass3 that uses #/D nu'ber 103% A Aroup!dd -A 103 cl!ss3 !% Co'plete the follo*ing steps0 a% Use the user%od co''and to change the follo*ing infor'ation for the lo#ked1 user0 )he login na'e to user )he U/D to 3001 )he ho'e directory to user

A ls -d /export/"o$e/locked1 /export/ho%e/lo#ked1 A user$od -u 3001 -d /export/"o$e/user- -$ -l user- locked1 4$ blo#ks b% 8erify that the changes you reEuest are recorded in the /et#/passwd file and that the directory *as 'o1ed% A ls -d /export/"o$e/locked1 /export/ho%e/lo#ked1: <o su#h 1"le or d"re#tory A ls -d /export/"o$e/user/export/ho%e/user A Arep user- /etc/p!sswd user :x:3001:10::/export/ho%e/user :/b"&/sh A
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age 5

The /etc/passwd file should reflect the new 1$, number and username. The directory under /e1port/home should get renamed from locked1 to user:. "% Use the s%user %od"1y co''and to change the login shell of user5 to /b"&/ksh and co'plete the follo*ing steps0 a% 4espond to authentication pro'pts as reEuired% A Arep user0 /etc/p!sswd user5:x:1005:10::/export/ho%e/user5:/b"&/sh A /usr/s!d$/bin/s$user $odi#5 -- -n user0 -s /bin/ks" (uthe&t"#at"&) as user: root :ype /N 1or help, press"&) =e&ter* a##epts the de1ault de&oted by D E Clease e&ter a str"&) !alue 1or: password :: #a&)et"& 3oad"&) :ool: #o%'su&'ad%"&'user%)r'#l"'user'@ser.)r2l" 1ro% host2 3o)"& to host2 as user root was su##ess1ul' Dow&load o1 #o%'su&'ad%"&'user%)r'#l"'user'@ser.)r2l" 1ro% host2 was su##ess1ul' b% 6s an alternati1e, use user%od to 'odify the user5 account% A user$od -s /bin/ks" user0 A c% 8erify that the changes you reEuest are recorded in the /et#/passwd file% A Arep user0 /etc/p!sswd user5:x:1005:10::/export/ho%e/user5:/b"&/ksh A (% The /etc/passwd file should show that the shell for user2 is /bin/ksh. Co'plete the follo*ing steps0 a% Use the userdel co''and to delete the user account #leared1 and the related ho'e directory% A userdel r cle!red1 b% 8erify that the /export/ho%e/#leared1 directory no longer e,ists% A ls /export/"o$e/cle!red1 /export/ho%e/#leared1: <o su#h 1"le or d"re#tory A The /e1port/home/cleared1 directory should no longer exist.

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age 10

6%

Use the s%)roup co''and to change the group na'e of #lass1 to )roup10 A Arep cl!ss1 /etc/Aroup #lass1::101:user4,user3 A /usr/s!d$/bin/s$Aroup $odi#5 -- -n cl!ss1 -K Aroup1 (uthe&t"#at"&) as user: root :ype /N 1or help, press"&) =e&ter* a##epts the de1ault de&oted by D E Clease e&ter a str"&) !alue 1or: password :: #a&)et"& 3oad"&) :ool: #o%'su&'ad%"&'user%)r'#l"')roup'@ser.)rMroup2l" 1ro% host2 3o)"& to host2 as user root was su##ess1ul' Dow&load o1 #o%'su&'ad%"&'user%)r'#l"')roup'@ser.)rMroup2l" 1ro% host2 was su##ess1ul' 8erify the change in the /et#/)roup file% A )rep cl!ss1 /etc/Aroup A Arep Aroup1 /etc/Aroup )roup1::101:user4,user3 A

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Co'plete the follo*ing steps0 a% Use the )roupdel co''and to re'o1e the group entry #lass2% A Aroupdel cl!ss2 b% 8erify that #lass2 is no longer in the /et#/)roup file% A Arep cl!ss2 /etc/Aroup A The group class2 should not exist.

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age 11

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1"0 2erfor'ing User 6d'inistration Chapter 1" 7 2age 12

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 13) Controlling System Processes


Chapter 13

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1(0 Controlling &yste' 2rocesses Chapter 1( 7 2age 1

Practices for *esson 13


Practices Overvie(
/n these practices, you co'plete the follo*ing tas3s0 Use the 2rocess :anager graphical user interface G#U/H and the prstat co''and to 'onitor and 3ill processes% Create an at .ob and an entry in a #ro&tab file%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1(0 Controlling &yste' 2rocesses Chapter 1( 7 2age 2

Practice 13,1) 1sing Process Control


Assumptions
4efer to the lecture notes as necessary to perfor' the tas3s listed%

%as&s
1% ?og in as the root user, open a ter'inal *indo*, and start the Process /anager #U/% # /usr/dt/bin/sdtprocess P /n the Process /anager *indo*, sort the listing according to 2C@T in descending order, and change the sa'ple ti'e to fi1e seconds% $ote) Chen you access the Process /anager #U/, a 'essage notifies you of the deprecation of the Co''on Des3top $n1iron'ent GCD$H% Open a second ter'inal *indo*, and run the prstat co''and% # prst!t !% 2osition the Process /anager *indo* and the ter'inal *indo* in *hich the prstat co''and is running so that you can obser1e both si'ultaneously% /n an a1ailable ter'inal *indo*, run the 1"&d co''and to list all files on your syste'% Obser1e ho* the Process /anager *indo* and the prstat co''and display statistics for the 1"&d co''and% # #ind / Chat is the 'a,i'u' percentage of recent C2U ti'e used by the 1"&d co''and as it e,ecutesF This varies according to your system configuration. Some systems might display values in the ?-&(-percent range. Open a third ter'inal *indo*, and run the ps co''and to deter'ine the 2/D of the shell% 4ecord the 2/D you find% # ps (% *our value appears here. /n the Process /anager *indo*, locate and select the shell process you identified in the pre1ious step% &elect the Sho( Ancestry option fro' the Process 'enu in the Process /anager *indo*% Chat is the na'e and 2/D of the first process listedF >n systems running D,S, the first process should be 5nome-terminal. Close the Sho( Ancestry *indo*% 6gain, select the shell process you identified in step "% @ro' the Process 'enu in the Process /anager *indo*, select the Bill option% Chat happensF The process stops, and the terminal window no longer appears /n the Process /anager *indo*, use the 2ind function to locate the prstat process% &elect the Signal option fro' the Process 'enu% /n the Signal fill7in field, enter the :9F. signal, and clic3 OB% Chat happens to the prstat processF Close the Process /anager *indo* *hen you are finished% The prstat process terminates, and the prompt appears in the terminal window in which it ran.

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2%

"%

6%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1(0 Controlling &yste' 2rocesses Chapter 1( 7 2age !

B%

/dentify the de1ice associated *ith your current ter'inal *indo* by using the tty co''and, and display the current syste' ti'e% # tt5 /de!/pts/2 A # d!te Oed&esday, 0epte%ber 21, 2011 0-:0$:4$ (. .D: A

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

5%

&ub'it an at .ob that echoes :est 2o%plete to your current *indo*% ;a1e the .ob run for about fi1e 'inutes fro' the current syste' ti'e, and sub'it it to the Eueue called x% A !t -< x 11:30 at* ec"o GHest Oo$pleteG > /dev/pts/# (A "s 1ro% the tty #o%%a&d) at* 3Oontrol-2> #o%%a&ds w"ll be exe#uted us"&) /usr/b"&/bash ]ob 12$3535300'x at ?r" 0ep 3 11:35:00 2010 A

10% Display the at .ob in the Eueue% # !t<


Fa&k 1st 9xe#ut"o& Date 0ep 3, 2010 11:35 ;w&er root Job 12$3535300'x Xueue x Job <a%e std"&

A 11% Open a ne* ter'inal *indo* and set and e,port the 9D7:;F en1iron'ent 1ariable to use the !" editor to edit #ro&tab files% /f you are using the Dourne or >orn shell, perfor' the co''and0 # M29H?*=vi # export M29H?* /f you are using the C shell, perfor' the co''and0 # setenv M29H?* vi 12% Use the #ro&tab co''and to 1ie* the current #ro&tab file for the root user% # cront!b -l A"de&t 5+(A)root 1'21 04/03/23 0.75 A A :he root #ro&tab should be used to per1or% a##ou&t"&) data #olle#t"o&' A A 10 3 B B B /usr/sb"&/lo)ad% 15 3 B B 0 /usr/l"b/1s/&1s/&1s1"&d (output o%"tted)

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1(0 Controlling &yste' 2rocesses Chapter 1( 7 2age "

1!% Chen is the lo)ad% process scheduled to runF :e& %"&utes a1ter 3:00 a'%' o& all days 1"% Use the #ro&tab co''and to edit the #ro&tab file for the root user% 6dd an entry that sends the 'essage, 7t worksH, to your current *indo* fi1e 'inutes fro' no*% @or e,a'ple, if the current ti'e is 1002(, 'a3e an entry in your #ro&tab file for the !0th 'inute of the sa'e hour% # tt5 /de!/pts/2 # d!te Oed&esday, 0epte%ber 21, 2011 0-:0$:4$ (. .D: # cront!b -e 3dd the following line, but substitute the correct time and terminal device) 40 11 B B B /usr/b"&/e#ho d7t worksHe * /dev/pts/2 &a1e the file, and Euit the !" edit session% /n about fi1e 'inutes, you should see the result in the ter'inal *indo*%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1(0 Controlling &yste' 2rocesses Chapter 1( 7 2age (

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 1(0 Controlling &yste' 2rocesses Chapter 1( 7 2age 6

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for *esson 14


Chapter 14

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 16 Chapter 16 7 2age 1

Practices for *esson 14


Practices Overvie( /n this practice, you are presented *ith a guided si'ulation of the Oracle &olaris 10 O& interacti1e installation process for both &264C and ,B6/,6"7based syste's%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 16 Chapter 16 7 2age 2

Practice 14,1) Oracle Solaris 10 Operating System +nstallation


Overvie(
)his practice uses a si'ulation to present an e,a'ple of the Oracle &olaris 10 O& interacti1e installation process% )he si'ulation describes installing the Oracle &olaris 10 O& on both &264C and ,B6/,6"7based syste's, using D8D installation 'edia% +our instructor *ill pro1ide instructions for using the installation si'ulation%

%as&s
1% 2% ?og in as the root user and open a ter'inal *indo*% Change to the /opt/ora/lab/de%o directory% # cd /opt/or!/l!b/de$o # ls ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o # cd ?r!cle/:ol!ris10/9nter!ctive/9nst!ll!tion/de$o # ls ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o'G" p F9(D.9':U: !% "% 4ead the setup and playbac3 instructions gi1en in the F9(D.9':U: file% # $ore *M@27M.HFH $,tract the si'ulation7related files fro' the archi1e and 1ie* the folder contents% # un>ip ?r!cle/:ol!ris10/9nter!ctive/9nst!ll!tion/de$o.>ip (r#h"!e: ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o'G"p #reat"&): ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o41"&al/ "&1lat"&): ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o41"&al/;ra#le40ol a r"s1047&tera#t"!e47&stallat"o&4de%o2'ht% "&1lat"&): ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o41"&al/;ra#le40ol a r"s1047&tera#t"!e47&stallat"o&4de%o2'sw1 "&1lat"&): ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o41"&al/sta&dard'] s A ls ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o41"&a l ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o'G"p A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 16 Chapter 16 7 2age !

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(%

Change to the root of the directory created by the A/2 archi1e% # cd ?r!cle/:ol!ris10/9nter!ctive/9nst!ll!tion/de$o/#in!l # ls ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o2'ht % ;ra#le40olar"s1047&tera#t"!e47&stallat"o&4de%o2'sw 1 sta&dard']s

6%

Open the "&dex'ht%l file in a *eb bro*ser% # #ire#ox ?r!cle/:ol!ris10/9nter!ctive/9nst!ll!tion/de$o2."t$ P Clic3 OB in the Ado'e 2lash Player 'essage bo, that 'ight appear% 4espond to the interacti1e pro'pts and co'plete the si'ulation%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for ?esson 16 Chapter 16 7 2age "

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for Appendi< A) Performing 2ile System 9ac&ups


Chapter 16

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, 60 2erfor'ing @ile &yste' Dac3ups Chapter 1 7 2age 1

Practices for Appendi< A


Practices Overvie(
/n these practices, you bac3 up an a1ailable file syste' on your syste' to a tape dri1e or to an e,tra dis3 dri1e%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, 60 2erfor'ing @ile &yste' Dac3ups Chapter 1 7 2age 2

Practice A,1) 9ac&ing 1p a 2ile System to %ape "rive


Overvie(
/n this practice, you bac3 up an a1ailable file syste' on your syste' to a tape dri1e%

Assumptions
)his practice reEuires a syste' that is configured *ith a tape dri1e and file syste' that is a1ailable to un'ount% )his e,ercise assu'es that the /export/ho%e file syste' e,ists on a separate partition fro' the / GrootH file syste' and can be un'ounted% /dentify the slice on *hich the /export/ho%e file syste' resides% #et a tape that is appropriate for your syste' fro' the instructor% @or classroo's *ithout a tape dri1e, s3ip to MDac3ing Up a @ile &yste' to an $,tra Dis3 Dri1e%N

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% 2% 4ecursi1ely copy the contents of the /opt/ora directory to /export/ho%e% # cp -r /opt/or! /export/"o$e Un'ount the /export/ho%e file syste'% /f your syste' reports that the /export/ho%e file syste' is busy, use the u%ou&t -1 co''and% # u$ount /export/"o$e !% "% (% /nsert a tape into your tape dri1e% Use the %t co''and to re*ind the tape to the beginning% # $t rewind Use the u1sdu%p co''and to create a bac3up tape for the /export/ho%e file syste'% # u#sdu$p 0u# /dev/r$t/0 /export/"o$e *ou should see an output similar to this) D@.C: Date o1 th"s le!el 0 du%p: Oed .ar 2$ 10:29:31 200D@.C: Date o1 last le!el 0 du%p: the epo#h D@.C: Du%p"&) /de!/rdsk/#0t0d0s- (sys-05:/export/ho%e) to /de!/r%t/0' D@.C: .app"&) (Cass 7) Dre)ular 1"lesE D@.C: .app"&) (Cass 77) Dd"re#tor"esE D@.C: Or"t"&) 32 /"lobyte re#ords D@.C: 9st"%ated 12130 blo#ks (5'92.8)' D@.C: Du%p"&) (Cass 777) Dd"re#tor"esE D@.C: Du%p"&) (Cass 76) Dre)ular 1"lesE D@.C: :ape rew"&d"&) D@.C: 12094 blo#ks (5'91.8) o& 1 !olu%e at -23 /8/se# D@.C: D@.C 70 D;<9 D@.C: 3e!el 0 du%p o& Oed .ar 2$ 10:29:31 200A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, 60 2erfor'ing @ile &yste' Dac3ups Chapter 1 7 2age !

6% % B% 5%

:ount the /export/ho%e file syste'% # $ount /export/"o$e Copy the contents of the /et#/uu#p directory to the /export/ho%e directory% # cp -r /etc/uucp /export/"o$e Un'ount the /export/ho%e file syste'% # u$ount /export/"o$e :o1e the tape to the ne,t tape record% # $t -# /dev/r$t/0n #s# 1

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

10% Use the u1sdu%p co''and to create an incre'ental bac3up for the /export/ho%e file syste', by using the nonre*inding tape de1ice% # u#sdu$p 1u# /dev/r$t/0n /export/"o$e *ou should see an output similar to this) D@.C: Date o1 th"s le!el 1 du%p: Oed .ar 2$ 10:31:39 200D@.C: Date o1 last le!el 0 du%p: Oed .ar 2$ 10:29:31 200D@.C: Du%p"&) /de!/rdsk/#0t0d0s- (sys-05:/export/ho%e) to /de!/r%t/0&' D@.C: .app"&) (Cass 7) Dre)ular 1"lesE D@.C: .app"&) (Cass 77) Dd"re#tor"esE D@.C: Or"t"&) 32 /"lobyte re#ords D@.C: 9st"%ated 0-2 blo#ks (2'9 .8)' D@.C: Du%p"&) (Cass 777) Dd"re#tor"esE D@.C: Du%p"&) (Cass 76) Dre)ular 1"lesE D@.C: 0-$ blo#ks (2'9-.8) o& 1 !olu%e at 22$4 /8/se# D@.C: D@.C 70 D;<9 D@.C: 3e!el 1 du%p o& Oed .ar 2$ 10:31:39 200A 11% 4e*ind and e.ect the tape fro' the tape dri1e% # $t -# /dev/r$t/0 o##line 12% 4e1ie* the contents of the /et#/du%pdates file% # $ore /etc/du$pd!tes *ou should see one line showing information for the level ( dump and another line for the level & dump, for example) /de!/rdsk/#0t0d0s/de!/rdsk/#0t0d0s1!% :ount the /export/ho%e file syste'% # $ount /export/"o$e 0 Oed .ar 2$ 10:29:31 2001 Oed .ar 2$ 10:31:39 200-

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, 60 2erfor'ing @ile &yste' Dac3ups Chapter 1 7 2age "

Practice A,2) 9ac&ing 1p a 2ile System to an =<tra "is& "rive


Overvie(
/n this practice, you bac3 up an a1ailable file syste' on your syste' to an e,tra dis3 dri1e%

Assumptions
)his practice reEuires a syste' that is configured *ith an e,tra dis3 dri1e and a file syste' that is a1ailable to un'ount% )his e,ercise assu'es that the /export/ho%e file syste' e,ists on a separate partition fro' the / GrootH file syste' and can be un'ounted% /dentify the slice on *hich the /export/ho%e file syste' resides% /n this practice, you use the 1or%at utility to partition your e,tra hard dri1e so that it has one partition that uses all of the dis3 space% +ou then create a file syste' on that partition and 'ount the file syste'%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as&s
1% Use the 1or%at utility to partition the e,tra hard dri1e and create one large partition to use as a bac3up de1ice% Use the (ll ?ree >o) 'ethod to set partition 0 to use all dis3 space% )his is an e,a'ple fro' a &264C syste'0 sys-05A #or$!t 0ear#h"&) 1or d"sks'''do&e (6(73(839 D70/ 09392:7;<0: 0' #0t0d0 =>D0-2251263(:$0 #yl 5-459 alt 2 hd 1 se# 255* /p#"+1e, 00000/"de+d/dad+0,0 1' #0t1d0 =D9?(@3: #yl 5-459 alt 2 hd 1 se# 255* /p#"+1e, 00000/"de+d/dad+1,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1 sele#t"&) #0t1d0 Chen you are through partitioning the e,tra dis3 dri1e, your partition table should loo3 so'ething li3e this0
Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed ?la) w% wu wu w% w% wu wu wu 2yl"&ders 0 - 5-45$ 0 0 - 5-45$ 0 0 0 0 0 0"Ge 111'-9M8 0 111'-9M8 0 0 0 0 0 8lo#ks (5-459/0/0) 234432-20 (0/0/0) 0 (5-459/0/0) 234432-20 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, 60 2erfor'ing @ile &yste' Dac3ups Chapter 1 7 2age (

)his is an e,a'ple fro' an ,B6/,6" syste'0 sys-05A #or$!t 0ear#h"&) 1or d"sks'''do&e (6(73(839 D70/ 09392:7;<0: 0' #1d0 =D9?(@3: #yl 39$$- alt 2 hd 4 se# 3* /p#"+0,0/p#"-"de+-/"de+0/#%dk+0,0 1' #2d0 =D9?(@3: #yl 1000$ alt 2 hd 255 se# 3* /p#"+0,0/p#"-"de+-/"de+1/#%dk+0,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1 sele#t"&) #2d0 Chen you are through partitioning the e,tra dis3 dri1e, your partition table should loo3 so'ething li3e this0
Cart :a) 0 reser!ed 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed $ boot 9 alter&ates ?la) w% wu wu wu wu wu wu wu wu w% 2yl"&ders 1 - 10000 0 - 10000 0 0 0 0 0 0 1 2 0"Ge - ' 4M8 0 - ' -M8 0 0 0 0 0 -'$4.8 15' 9.8 8lo#ks (10005/0/0) 143299$00 (0/0/0) 0 (1000$/0/0) 143315$ 5 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (1/0/0) 1 0 5 (2/0/0) 32130

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2%

Create a file syste' on the large partition on the e,tra dis3% @or e,a'ple, on a &264C syste'0 # new#s /dev/rdsk/c0t1d0s0 On an ,B6/,6" syste'0 A &ew1s /de!/rdsk/c2d0s0

!%

4un a file syste' chec3 on the ne* file syste'% @or e,a'ple, on a &264C syste'0 # #sck /dev/rdsk/c0t1d0s0 On an ,B6/,6" syste'0 # #sck /dev/rdsk/c2d0s0

"%

Create a 'ount point directory and 'ount the ne* file syste'% @or e,a'ple0 # $kdir /extr! # $ount /dev/dsk/c0t1d0s0 /extr!

(%

4ecursi1ely, copy the contents of the /opt/ora directory to /export/ho%e% # cp -r /opt/or! /export/"o$e

6% Un'ount the /export/ho%e file syste'% /f your syste' reports that the /export/ho%e file syste' is busy, use the u%ou&t -1 co''and% # u$ount /export/"o$e

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, 60 2erfor'ing @ile &yste' Dac3ups Chapter 1 7 2age 6

Use the u1sdu%p co''and to bac3 up the /export/ho%e file syste' to a file belo* the ne*ly created 'ount point% 4e1ie* the 'an page for u1sdu%p for infor'ation on ho* to use a du'p file instead of a tape de1ice%
# u#sdu$p 0u# /extr!/du$p/export/"o$e/0 /export/"o$e D@.C: Date o1 th"s le!el 0 du%p: Oed .ar 2$ 11:0-:04 200D@.C: Date o1 last le!el 0 du%p: the epo#h D@.C: Du%p"&) /de!/rdsk/#0t0d0s- (sys-05:/export/ho%e) to /extra/du%p4export4ho%e40' D@.C: .app"&) (Cass 7) Dre)ular 1"lesE D@.C: .app"&) (Cass 77) Dd"re#tor"esE D@.C: Or"t"&) 32 /"lobyte re#ords D@.C: 9st"%ated 12130 blo#ks (5'92.8)' D@.C: Du%p"&) (Cass 777) Dd"re#tor"esE D@.C: Du%p"&) (Cass 76) Dre)ular 1"lesE D@.C: 12094 blo#ks (5'91.8) o& 1 !olu%e at $0$4 /8/se# D@.C: D@.C 70 D;<9 D@.C: 3e!el 0 du%p o& Oed .ar 2$ 11:0-:04 200A

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

B% 5%

:ount the /export/ho%e file syste'% # $ount /export/"o$e Copy the contents of the /et#/uu#p directory to the /export/ho%e directory% # cp -r /etc/uucp /export/"o$e

10% Un'ount the /export/ho%e file syste'% # u$ount /export/"o$e 11% Use the u1sdu%p co''and to create an incre'ental bac3up for the /export/ho%e file syste'% &a1e this data in a separate file on the spare dis3%
# u#sdu$p 1u# /extr!/du$p/export/"o$e/1 /export/"o$e D@.C: Date o1 th"s le!el 1 du%p: Oed .ar 2$ 11:0$:35 200D@.C: Date o1 last le!el 0 du%p: Oed .ar 2$ 11:0-:04 200D@.C: Du%p"&) /de!/rdsk/#0t0d0s- (sys-05:/export/ho%e) to /extra/du%p4export4ho%e41' D@.C: .app"&) (Cass 7) Dre)ular 1"lesE D@.C: .app"&) (Cass 77) Dd"re#tor"esE D@.C: Or"t"&) 32 /"lobyte re#ords D@.C: 9st"%ated 0-2 blo#ks (2'9 .8)' D@.C: Du%p"&) (Cass 777) Dd"re#tor"esE D@.C: Du%p"&) (Cass 76) Dre)ular 1"lesE D@.C: 0-$ blo#ks (2'9-.8) o& 1 !olu%e at 5525 /8/se# D@.C: D@.C 70 D;<9 D@.C: 3e!el 1 du%p o& Oed .ar 2$ 11:0$:35 200A

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, 60 2erfor'ing @ile &yste' Dac3ups Chapter 1 7 2age

12% 4e1ie* the contents of the /et#/du%pdates file% # $ore /etc/du$pd!tes *ou should see one line showing information for the Eevel 0 dump and another line for the Eevel 1 dump, for example) /de!/rdsk/#0t0d0s/de!/rdsk/#0t0d0s0 Oed .ar 2$ 11:0-:04 2001 Oed .ar 2$ 11:0$:35 200-

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

1!% :ount the /export/ho%e file syste' and un'ount the /extra file syste'% # $ount /export/"o$e # u$ount /extr!

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, 60 2erfor'ing @ile &yste' Dac3ups Chapter 1 7 2age B

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for Appendi< 9) 9ac&ing 1p a /ounted 2ile System (ith a 12S Snapshot
Chapter 17

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, D0 Dac3ing Up a :ounted @ile &yste' *ith a U@& &napshot Chapter 1B 7 2age 1

Practices for Appendi< 9


Practices Overvie(
/n these practices, you co'plete the follo*ing tas3s0 Create a U@& snapshot of the /opt file syste'% 8ie* the contents of the bac3ing7store directory% Display detailed infor'ation for the U@& snapshot% 4e'o1e the snapshot and bac3ing7store file%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, D0 Dac3ing Up a :ounted @ile &yste' *ith a U@& &napshot Chapter 1B 7 2age 2

Practice 9,1) >or&ing (ith 12S Snapshots


%as&s
1% Create a snapshot of the /export/ho%e file syste' *ithout specifying a file na'e for the bac3ing7store file% # #ssn!p -C u#s -o bs=/v!r/t$p /export/"o$e /de!/1ss&ap/0 A ?ist the contents of the /!ar/t%p directory% # ls -l" /v!r/t$p total $ 2 (output o%%"tted) drwx-----2 root drwx-----1 1000 drwx-----1 user5 -rw------1 root (output o%%"tted)

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2%

root 1000 sta11 root

1'0/ 1'0/ 1'0/ 9'$M

;#t 15:53 0ep 25 14:03 ;#t 14:4 ;#t 1 :30

orb"t-root orb"t-stude&t/ orb"t-user5/ s&apshot0

!%

Chat is the default na'e assigned to the bac3ing7store fileF snapshot0 Display the detailed infor'ation about the snapshot% # /usr/lib/#s/u#s/#ssn!p -i /export/"o$e 0&apshot &u%ber : 0 8lo#k De!"#e : /de!/1ss&ap/0 Faw De!"#e : /de!/r1ss&ap/0 .ou&t po"&t : /export/ho%e De!"#e state : "dle 8a#k"&) store path : /!ar/t%p/s&apshot0 8a#k"&) store s"Ge : 0 /8 .ax"%u% ba#k"&) store s"Ge : @&l"%"ted 0&apshot #reate t"%e : :ue ;#t 0 1 :30:04 2009 2opy-o&-wr"te )ra&ular"ty : 32 /8 Chat is the 'a,i'u' bac3ing7store file size for the snapshotF 1nlimited Delete the snapshot fro' the syste'% # #ssn!p -d /export/"o$e Deleted s&apshot 0' A

"%

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, D0 Dac3ing Up a :ounted @ile &yste' *ith a U@& &napshot Chapter 1B 7 2age !

(%

?ist the contents of the /!ar/t%p directory% ;as the bac3ing7store file been re'o1edF # ls -l /v!r/t$p/sn!ps"ot0 -rw------1 root root /!ar/t%p/s&apshot0 A 105-419 -3 ;#t 1 :30

6%

+o. 4e'o1e the bac3ing7store file that you created in step 1% # r$ /v!r/t$p/sn!ps"ot0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, D0 Dac3ing Up a :ounted @ile &yste' *ith a U@& &napshot Chapter 1B 7 2age "

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Practices for Appendi< C) Performing 2ile System #estores


Chapter 18

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age 1

Practices for Appendi< C


Practices Overvie(
/n these practices, you do the follo*ing0 Dac3 up the / GrootH file syste' to tape% Dac3 up the / GrootH file syste' to a file on dis3% 4estore a selecti1e file fro' a u1sdu%p archi1e% 4estore the / GrootH file syste' fro' tape or dis3%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age 2

Practice C,1) #estoring 2iles and 2ile Systems


Assumptions
&o'e of the steps in this practice use a tape dri1e% /f your syste' has an attached tape dri1e, obtain an appropriate tape fro' your instructor% ;o*e1er, a tape dri1e is not necessary to co'plete the e,ercise% )his practice reEuires a syste' that has an unused spare dis3 *ith the capacity to store the entire / GrootH file syste'% /dentify the de1ice na'e of the / GrootH file syste'% @or e,a'ple0 # d# -" / ?"lesyste% /de!/dsk/#0t2d0s0 s"Ge 4'$M used 1-5. a!a"l #apa#"ty 4' M 4T .ou&ted o& /

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

4ecord the de1ice na'e of the root file syste', /de!/dsk/#0t0d0s0 in this e,a'ple%

%as& 1) 9ac& 1p the / :root; 2ile System to %ape


/n this tas3, you bac3 up the / GrootH file syste' to tape if your syste' has an attached tape dri1e% Obtain a tape for your tape dri1e fro' your instructor% 1% ?og in as the root user, and open a ter'inal *indo*% &hut do*n the syste' to run le1el 0% )hen boot the syste' to run le1el 0 Gs"&)le-user 'ilestoneH% &upply the root pass*ord as reEuired entering run le1el 0% # init 0 (output o%"tted) On a &264C syste', use the boot -s co''and at the o3 pro'pt0 ok boot -s On an ,B6/,6" syste', perfor' the follo*ing steps0 a% 2ress any 3ey at the Cress a&y key to reboot pro'pt% b% Chen the #4UD 'ain 'enu appears, enter e to display the list of co''ands for the default boot choice% @or e,a'ple0 M<@ MF@8 !ers"o& 0'95 (5-2/ lower / 33$0$0$/ upper %e%ory) L--------------------------------------------------------------L Y ker&el /plat1or%/"$ p#/%ult"boot Y %odule /plat1or%/"$ p#/boot4ar#h"!e Y L--------------------------------------------------------------L c% ;ighlight the ker&el co''and in the co''and list, and enter e to edit the co''and% 6dd the -s option to the end of the ker&el co''and line, and press 4eturn% @or e,a'ple0 )rub ed"t* ker&el /plat1or%/"$ p#/%ult"boot -s 2% !% d% $nter b to boot the syste'% 8erify that a tape is in your tape dri1e% Use the u1sdu%p co''and to create a bac3up tape for the / GrootH file syste'% # u#sdu$p 0u# /dev/r$t/0 /
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age !

"%

8erify that the / GrootH file syste' is on the tape% # u#srestore tv# /dev/r$t/0 The screen should list directory structures under / GrootH first, followed by files. 6llo* the syste' to re'ain at the single7user 'ilestone%

(%

%as& 2) 9ac& 1p the / :#oot; 2ile System to a 2ile on "is&


/n this tas3, you bac3 up your / GrootH file syste' to a file on your spare dis3% 1% Use the 1or%at utility to partition the e,tra hard dri1e and create one large partition to use as a bac3up de1ice% Use the (ll ?ree >o) 'ethod to set partition 0 to use all dis3 space% )his is an e,a'ple fro' a &264C syste'0 # #or$!t 0ear#h"&) 1or d"sks'''do&e (6(73(839 D70/ 09392:7;<0: 0' #0t0d0 =>D0-2251263(:$0 #yl 5-459 alt 2 hd 1 se# 255* /p#"+1e, 00000/"de+d/dad+0,0 1' #0t1d0 =D9?(@3: #yl 5-459 alt 2 hd 1 se# 255* /p#"+1e, 00000/"de+d/dad+1,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1 sele#t"&) #0t1d0 Chen you are finished partitioning the e,tra dis3 dri1e, your partition table should loo3 so'ething li3e this0
Cart :a) 0 root 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed ?la) w% wu wu w% w% wu wu wu 2yl"&ders 0 - 5-45$ 0 0 - 5-45$ 0 0 0 0 0 0"Ge 111'-9M8 0 111'-9M8 0 0 0 0 0 8lo#ks (5-459/0/0) 234432-20 (0/0/0) 0 (5-459/0/0) 234432-20 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

)his is an e,a'ple fro' an ,B6/,6" syste'0 $ote) )his procedure assu'es that on ,B6/,6" syste's, the spare dis3 has one Oracle &olaris 1d"sk partition that consu'es the entire dis3% A 1or%at 0ear#h"&) 1or d"sks'''do&e (6(73(839 D70/ 09392:7;<0: 0' #1d0 =D9?(@3: #yl 39$$- alt 2 hd 4 se# 3* /p#"+0,0/p#"-"de+-/"de+0/#%dk+0,0 1' #2d0 =D9?(@3: #yl 1000$ alt 2 hd 255 se# 3* /p#"+0,0/p#"-"de+-/"de+1/#%dk+0,0 0pe#"1y d"sk (e&ter "ts &u%ber): 1 sele#t"&) #2d0

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age "

Chen you are finished partitioning the e,tra dis3 dri1e, your partition table should loo3 so'ething li3e this0
Cart :a) 0 reser!ed 1 swap 2 ba#kup 3 u&ass")&ed 4 u&ass")&ed 5 u&ass")&ed u&ass")&ed - u&ass")&ed $ boot 9 alter&ates ?la) w% wu wu wu wu wu wu wu wu w% 2yl"&ders 1 - 10000 0 - 10000 0 0 0 0 0 0 1 2 0"Ge - ' 4M8 0 - ' -M8 0 0 0 0 0 -'$4.8 15' 9.8 8lo#ks (10005/0/0) 143299$00 (0/0/0) 0 (1000$/0/0) 143315$ 5 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (0/0/0) 0 (1/0/0) 1 0 5 (2/0/0) 32130

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

2%

Create a file syste' on the large partition on the e,tra dis3% On a &264C syste'0 # new#s /dev/rdsk/c0t1d0s0 On an ,B6/,6" syste'0 # new#s /dev/rdsk/c2d0s0

!%

:ount the ne* file syste' on /%&t% On a &264C syste'0 # $ount /dev/dsk/c0t1d0s0 /$nt On an ,B6/,6" syste'0 # $ount /dev/dsk/c2d0s0 /$nt

"%

Use the u1sdu%p co''and to bac3up the / GrootH file syste' to a file belo* the /%&t directory% @or e,a'ple0 # u#sdu$p 0u# /$nt/du$p/root/0 / $ote) /t 'ight ta3e appro,i'ately ( to 10 'inutes for the u1sdu%p co''and to bac3 up the / GrootH file syste'% 8erify that the / GrootH file syste' has been bac3ed up to the file on dis3% @or e,a'ple0 # u#srestore tv# /$nt/du$p/root/0 The screen should list directory structures under / GrootH first, followed by files.

(%

6%

6llo* the syste' to continue to boot to run le1el 3 G%ult"-user or all 'ilestoneH% # 3Oontrol-2> $ote) +ou 'ay need to 'anually reboot if the syste' does not continue to boot to run le1el 3 after you press Ctrl J D%

%as& .) #estore /etc/inet/"osts from %ape or 2ile on "is&


1% ?og in as the root user, and open a ter'inal *indo*% Change to the /!ar/t%p directory% # cd /v!r/t$p

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age (

2%

8erify that the ne* file syste' that contains your bac3up file is still 'ounted on /%&t, and that the bac3up file e,ists in it% # ls /$nt du%p4root40 lostL1ou&d A /f the file syste' is no longer 'ounted, 'ount the ne* file syste' on /%&t% On a &264C syste'0 # $ount /dev/dsk/c0t1d0s0 /$nt On an ,B6/,6" syste'0 # $ount /dev/dsk/c2d0s0 /$nt

!%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

"%

$nter the u1srestore "1 co''and to retrie1e the /et#/"&et/hosts file fro' the tape or the bac3up file on dis3% @or e,a'ple, to restore the file fro' tape0 # u#srestore i# /dev/r$t/0 @or e,a'ple, to restore the file fro' a file on dis30 # u#srestore i# /$nt/du$p/root/0 u1srestore * ls See files and directories for the / (root file system. Change to the /et#/"&et directory in the u1sdu%p archi1e, and list the files in the directory% &ee files and directories for the /et#/"&et file syste'% u1srestore * cd /etc/inet u1srestore * ls 6dd the hosts file to the list of files to e,tract, and display the list% &ee the hosts file listed% u1srestore * !dd "osts u1srestore * $!rked '/et#/"&et: Bhosts u1srestore *

(%

$,tract the hosts file fro' the u1sdu%p archi1e% &pecify 1olu'e nu'ber 1% Do not set the o*ner and 'ode for ', and then Euit the u1srestore co''and% u1srestore * extr!ct 9xtra#t reIuested 1"les Qou ha!e &ot read a&y !olu%es yet' @&less you k&ow wh"#h !olu%e your 1"le(s) are o& you should start w"th the last !olu%e a&d work towards the 1"rst' 0pe#"1y &ext !olu%e A: 1 set ow&er/%ode 1or K'KN Dy&E n u1srestore * <

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age 6

6%

8erify that the et#/"&et/hosts file e,ists in the /!ar/t%p directory% # ls etc/inet/"osts et#/"&et/hosts

Un'ount the file syste' 'ounted on /%&t% # u$ount /$nt A $ote) Un'ount the /%&t file syste' before you destroy your root file syste' in the ne,t tas3, especially if your only / GrootH file syste' bac3up is in a file belo* /%&t%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

%as& 0) "estroy and #estore the / :root; 2ile System


/n this tas3, you0 Destroy the / GrootH file syste' Doot the syste' fro' D8D Create a ne* root file syste' and prepare for the restore operation 4estore the / GrootH file syste' fro' tape or dis3

/nstall the boot bloc3 or #4UD boot progra's 4eboot the syste' $ote) /f you are using 8irtualDo, deli1ery en1iron'ent, you need not perfor' step 1 to step (% 6lternati1ely, you can use the M&olaris @ailsafeN option in the #4UD 'enu to boot your syste' into single7user shell and proceed to step 6% "estroy the / :root; 2ile System 1% Change to the / GrootH directory, and re'o1e the follo*ing critical syste' directories and their contents0 /plat1or% and /de!"#es% # cd / # r$ -r /pl!t#or$ /devices $ote) )he r% co''and *ill not be able to delete all the files and directories in the /plat1or% and /de!"#e directories% )he co''and 'ight display 'essages stating that an operation is not applicable or it *as unable to re'o1e a particular directory% 6tte'pt to shut do*n the syste' to run7state 0% # init 0 /f the syste' fails to shut do*n0 a% On &264C syste's, press the &top J 6 3ey seEuence to abort the operating syste'% b% On ,B6/,6" syste's, press the reset button, or use a 3ey seEuence Gfor e,a'ple, Ctrl J 6lt J DeleteH to reset the syste'% 2o*er7cycle the syste' as an alternati1e% 6tte'pt to boot the syste' fro' the boot dis3% +ou *ill see that the syste' fails to boot% &264C syste's display the follo*ing 'essage0 8oot load 1a"led' :he 1"le ]ust loaded does &ot appear to be exe#utable ,B6/,6" syste's display the follo*ing 'essage0 9rror 20: .ult"boot ker&el %ust be loaded be1ore %odules
Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2% !%

"%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age

9oot the SPA#C System from "?" 1% /nsert the Oracle &olaris 10 O& D8D% 2% Doot the syste' fro' the D8D *ith the single7user 'ode option% ok boot cdro$ s $ote) Use the boot &et -s co''and to boot the syste' if you are *or3ing in an ?8C en1iron'ent% 9oot the <74 <40 System from "?" 1% /nsert the Oracle &olaris 10 O& D8D% 2% /f the Cress a&y key to #o&t"&ue pro'pt appears, press any 3ey, and allo* the syste' to boot fro' D8D% $ote) +our syste' needs to be configured to boot fro' D8D, *hich 'ight reEuire changes to D/O& settings before booting% !% /f the syste' is not responsi1e, use the reset button, or the reEuired 3ey seEuence Gfor e,a'ple, Control J 6lt J DeleteH to reset the syste'% +ou can po*er7cycle the syste' as an alternati1e% "% )he syste' begins its boot process fro' the Oracle &olaris 'iniroot on D8D% )he follo*ing list of boot choices appears0 1' 0olar"s 7&tera#t"!e (de1ault) 2' 2usto% Ju%p0tart 3' 0olar"s 7&tera#t"!e :ext (Desktop sess"o&) 4' 0olar"s 7&tera#t"!e :ext (2o&sole sess"o&) 5' (pply dr"!er updates ' 0"&)le user shell 9&ter the &u%ber o1 your #ho"#e' (% &elect boot choice 6, the single user shell% /f an instance of Oracle &olaris is found on dis3, the syste' as3s *hether you *ant to 'ount it on /a% @or e,a'ple0 0olar"s 10 $/11 s10x4u10wos41-a U$ was 1ou&d o& /de!/dsk/#1d0s0' Do you w"sh to ha!e "t %ou&ted read-wr"te o& /aN Dy,&,NE 6% $nter & to a1oid 'ounting the root file syste'% +ou *ill 'anually 'ount the file syste' you *ant to restore%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Create a $e( #oot 2ile System and Prepare for the #estore 1% Use the &ew1s co''and to create a ne* file syste' on the / GrootH slice% $ote) De certain to specify the correct de1ice na'e for the root slice% De sure you do not specify a slice on the spare dis3% @or e,a'ple, on a &264C syste'0 # new#s /dev/rdsk/c0t0d0s0 On an ,B6/,6" syste'0 # new#s /dev/rdsk/c1d0s0

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age B

2%

:ount the ne* file syste' on the /a directory% @or e,a'ple, on a &264C syste'0 # $ount /dev/dsk/c0t0d0s0 /! On an ,B6/,6" syste'0 # $ount /dev/dsk/c1d0s0 /!

!% "%

8erify that your / GrootH bac3up tape is in the tape dri1e% :ount the file syste' on your spare dis3 that contains your root bac3up as /%&t% @or e,a'ple, on a &264C syste'0 # $ount /dev/dsk/c0t1d0s0 /$nt On an ,B6/,6" syste'0 # $ount /dev/dsk/c2d0s0 /$nt

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

(%

8erify that the file syste' that contains your bac3up file is 'ounted on /%&t, and that the bac3up file e,ists in it% # ls /$nt du%p4root40 lostL1ou&d

#estore the / :root; 2ile System from %ape or "is& 1% 2% Change directory to /a% # cd /! )o restore the / GrootH file syste' fro' tape, use the u1srestore co''and and specify the tape de1ice0 # u#srestore r# /dev/r$t/0 !% )o restore the / GrootH file syste' fro' dis3, use the u1srestore co''and and specify the bac3up file on dis30 # u#srestore r# /$nt/du$p/root/0 "% (% 6% 4e'o1e the restoresy%table file% # r$ restores5$t!ble Change directory to / GrootH% # cd / Un'ount the file syste's 'ounted on /a and /%&t% # u$ount /! # u$ount /$nt

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age 5

+nstall the 9oot 9loc& or G#19 9oot Programs Depending on the da'age incurred on dis3, it 'ay or 'ay not be necessary to install the boot bloc3 on &264C syste's, or the #4UD boot progra's Gsta)e1 and sta)e2H on ,B6/,6" syste's% /f it is necessary to install these progra's, perfor' the follo*ing steps0 1% On a &264C syste', to install a ne* boot bloc3 in sectors 1 through 1( of the / GrootH slice, change directory to the location of the boot bloc3, and use the "&stallboot co''and% @or e,a'ple0 # cd /usr/pl!t#or$/Tun!$e -$T/lib/#s/u#s # inst!llboot bootblk /dev/rdsk/c0t0d0s0 2% On an ,B6/,6" syste', to install the #4UD sta)e1 and sta)e2 progra's found in %"&"root fro' the Oracle &olaris O& D8D, use the "&stall)rub co''and% # /sbin/inst!llArub /boot/Arub/st!Ae1 /boot/Arub/st!Ae2 /dev/rdsk/c1d0s0 #e'oot the System 1% On an ,B6/,6" syste', e.ect the Oracle &olaris O& D8D to pre1ent the syste' fro' booting fro' it% 2% 4eboot the syste'% # init !% ?og in as root and 1erify that the syste' is operational%

Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates

Copyright 2011, Oracle and/or its affiliates% 6ll rights reser1ed%

2ractices for 6ppendi, C0 2erfor'ing @ile &yste' 4estores Chapter 15 7 2age 10

You might also like