Академический Документы
Профессиональный Документы
Культура Документы
D61734GC30
Edition 3.0
September 2011
D74405
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Disclaimer
This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and
print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way.
Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.
The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective
owners.
Authors
Vijetha M Malkai, Venu Poddar
Practices Overview
There is no practice for this lesson.
Practice Overview
In this practice, you use basic Oracle Solaris commands to identify and work with the four major
file types in the Oracle Solaris OS.
newdir/dir2:
total 4
266150 drwxr-xr-x 2 root root 512 Aug 6 20:18 .
266149 drwxr-xr-x 3 root root 512 Aug 6 20:18 ..
Exercise Summary
Discussion: Take a few minutes to discuss the experiences, issues, or discoveries that you
had during the practice exercises.
• Experiences
• Interpretations
• Conclusions
• Applications
Practices Overview
In this practice, you:
• Identify logical, physical, and instance names for disk devices
• Add a new disk or tape drive to a system
• Create and manage disk slices on SPARC systems running the Oracle Solaris 10 OS
Create and manage fdisk partitions and disk slices on x86/x64 systems running the Oracle
Solaris 10 OS
Assumptions
This practice requires one unused spare disk and applies to both SPARC and x86/x64 systems.
Remember that these different systems typically use different disk device names. For example:
The boot disk of a Sun Blade 1500 (SPARC) is typically c0t0d0.
Throughout this practice, be certain to use the correct device names for your particular system.
Task 2 in this practice is optional and requires a system that is configured with an external disk
or tape drive. In order to perform this practice, one of these two conditions must be met:
• The external device was turned off during system installation, so no device files for the
device will exist in the /dev structure.
• Device files for the external device are removed before starting Task 2. To remove
device files:
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format>
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
partition>
Note: The list of defined partitions will vary, depending on how the spare disk was last
used.
GB: Your entry will depend on the disks present in your system.
6. Divide the number of GB by 4 and complete the following steps:
a. Use the result as the number of GB to assign as disk space to four slices.
b. Round down to the next whole GB if the result includes a fraction.
For example, if slice 2 is 111.79 GB, 111.79 / 4 = 27.94 GB. In this case use 27 GB as
the size for the four slices.
GB/4: Your entry will depend on your system.
partition>
8. Set the sizes of slices 1, 3, and 4 so that they are the same as slice 0.
You should begin each successive slice on the cylinder that follows the ending cylinder of
the previous slice.
partition> 1
Part Tag Flag Cylinders Size Blocks
1 swap wu 65 - 129 129.49MB (65/0/0) 265200
partition>
9. Set slices 5, 6, and 7 to start at Cylinder 0, and then assign them 0 MB.
partition> 6
Part Tag Flag Cylinders Size Blocks
6 usr wm 130 - 57458 111.53GB (57329/0/0) 233902320
Enter partition id tag[usr]: <Return>
Enter partition permission flags[wm]: <Return>
Enter new starting cyl[130]: 0
partition>
Except for slice 2, is there any overlap of ending and beginning cylinders for any of the
slices listed?
No.
b. Proceed to the following steps to introduce this problem.
11. Complete the following steps:
a. Add 1 to the number GB/4 value listed in step 6.
(GB/4) + 1: Your entry will depend on your system.
b. Change slice 0 so that it uses the new size.
partition> 0
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 13878 27.00GB (13879/0/0) 56626320
Enter partition id tag[root]: <Return>
Enter partition permission flags[wm]: <Return>
Enter new starting cyl[0]: 0
partition> modify
Select partitioning base:
0. Current partition table (unnamed)
1. All Free Hog
Choose base (enter number) [0]? 0
Warning: Overlapping partition (1) in table.
Warning: Fix, or select a different partition table.
partition>
Which warnings appear?
partition> q
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
fdisk - run the fdisk program
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format>
Type "y" to accept the default partition, otherwise type "n" to edit the
partition table.
n
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Solaris2 1 10010 10010 100
Are you sure you want to delete partition 1? This will make all files and
programs in this partition inaccessible (type "y" or "n").
Cylinders
Partition Status Type Start End Length %
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Solaris2 1 10011 10010 100
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 10008 + 2 (reserved cylinders)
partition>
Note: Various slices might already be defined. This task replaces all slices that already
exist.
partition>
10. Attempt to select slices 8 and 9 for modification. What happens?
partition> 8
‘8’ is not expected.
partition> 9
‘9’ is not expected.
partition>
The format utility prevents you from modifying these two predefined slices.
11. Set the sizes of slices 1, 3, and 4 so that they are the same as slice 0.
partition>
partition>
Except for slice 2, is there any overlap of ending and beginning cylinders for any of the
slices listed?
No.
14. Complete the following steps to introduce the overlapping problem:
a. Add 1 to the number GB/4 value listed in step 6.
(GB/4) + 1: Your entry will depend on your system.
b. Change slice 0 so that it uses the new size.
partition> 0
Part Tag Flag Cylinders Size Blocks
7 reserved wm 3 - 2483 19.01GB (2481/0/0) 39857265
partition>
The Cylinders column in the partition table should now indicate that slice 0 ends
partition> modify
Select partitioning base:
0. Current partition table (unnamed)
1. All Free Hog
Choose base (enter number) [0]? 0
Warning: Overlapping partition (1) in table.
Warning: Fix, or select a different partition table.
partition>
partition>
Okay to make this the current partition table [yes]?
At the end of this process, you should have three slices of equal size, where slice 4
takes up any extra room if it exists.
19. Name the partition table "MYDISKpartition", and then label the disk.
Okay to make this the current partition table[yes]? y
Enter table name (remember quotes): "MYDISKpartition"
partition> q
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
fdisk - run the fdisk program
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format>
20. Save your new partition table to the /etc/format.dat file and complete the following
steps:
a. Carefully read the message that the format utility displays, and then enter the correct
file name.
b. Quit the format utility when you have finished.
c. Use the tail command to view the contents of the /etc/format.dat file.
d. Note that your new partition information is appended to the file.
format> save
Saving new disk and partition definitions
Enter file name["./format.dat"]: "/etc/format.dat"
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
partition = "MYDISKpartition" \
: disk = "DEFAULT" : ctlr = ata \
: 0 = reserved, wm, 3, 39857265 : 1 = 2484, 39857265 \
: 2 = 0, 160778520 : 3 = unassigned, wu, 4965, 39857265 \
: 4 = unassigned, wu, 7446, 41158530 : 8 = 0, 16065 \
: 9 = 1, 32130
#
21. Verify your new partition table with the prtvtoc command.
# prtvtoc /dev/rdsk/c2d0s2
* /dev/rdsk/c2d0s2 partition map
*
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
(output omitted)
format>
b. Display the fdisk menu.
format> fdisk
Total disk size is 10011 cylinders
Cylinder size is 16065 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Solaris2 1 10010 10010 100
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
Practices Overview
In these practices, you complete the following tasks:
• Create ufs file systems.
• Calculate and adjust minfree values.
• Destroy the superblock on an unused file system and repair it by using an alternative
superblock.
Assumptions
This exercise requires an unused disk, divided into four slices. Slices 0, 1, and 3 must be equal
in size, roughly one quarter of the entire disk each, and slice 4 takes up the remaining space on
the disk. If it is necessary to partition this disk, this exercise requires an understanding of how to
use the format utility.
This exercise applies to both SPARC and x86/x64 systems. Keep in mind that these different
systems typically use different disk device names. For example:
• The spare disk of a Sun Blade 1500 (SPARC) is typically c0t1d0.
• The spare disk of a Sun Ultra 20 (x86/x64) is typically c2d0.
Throughout this exercise, be certain to use the correct device names for your particular system.
Practices Overview
In this practice, you complete the following tasks:
• Create mount points.
• Mount file systems.
• Specify mount options.
Assumptions
This exercise requires a spare disk that contains four unmounted ufs file systems on slices 0,
1, 3, and 4 of the spare disk on your system. If you have to partition this disk for this exercise,
you must understand how to use the format utility. If you need to make file systems on the
slices for this exercise, you must understand how to use the newfs command.
Note: If necessary, use the format –e command to reset the label of the spare disk.
This exercise applies to both SPARC and x86/x64 systems. These systems typically have
different disk device names. For example:
• The spare disk of a Sun Blade 1500 (SPARC) is typically c0t1d0.
• The spare disk of a Sun Ultra 20 (x86/x64) is typically c2d0.
Throughout this exercise, use the correct device names for your system.
Practices Overview
In these practices, you complete the following tasks:
• Create and destroy ZFS storage pools.
• Create, rename, and destroy ZFS file systems.
• Work with ZFS properties.
Tasks
1. Use the zpool command to display the list of ZFS pools. Verify that no ZFS pool currently
exists.
# zpool list
no pools available
#
2. Use the zfs command to display the list of ZFS file systems. Verify that no ZFS exists.
# zfs list
no datasets available
#
#
Mirrored pool result:
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
firstpool 77K 66.9G 24.5K /firstpool
#
Nonredundant pool result:
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
firstpool 76K 66.9G 24.5K /firstpool
#
The space available should be roughly equal to twice the size of the smallest disk, if you
created a pool that consists of one, three-disk RAID-Z device. This accounts for the space
required to store parity data in this particular pool. The space available should roughly
match the size of the smallest disk, if you created a pool with a single, two-disk mirror. The
space available should roughly match the size of the disk you specified, if you created a
nonredundant pool.
10. Use the zpool command to display the name of your pool, and only its space used and
space available statistics.
RAID-Z pool result:
# zpool list -o name,allocated,free
NAME ALLOC FREE
firstpool 141K 204G
#
Overview
In this practice, you create a basic storage pool and manipulate a ZFS file within that pool.
Assumptions
This practice requires a minimum of one unused spare disk. It provides steps to create storage
pools that consist of 1, 2, or 3 disks, if they are available. You must evaluate the list of disk
devices on your system to determine the correct choices to make for this practice. The path
names of your disk devices might differ from those described in these exercises. Use the device
path names appropriate to your system.
Tasks
1. Use the zpool command to display the list of ZFS pools. Verify that no ZFS pool currently
Overview
In this practice, you set and list ZFS properties and demonstrate principles of ZFS property
inheritance.
Tasks
1. Use the zfs command to create a new ZFS in mypool called cmp. List the space use for
/mypool/cmp.
# zfs create mypool/cmp
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mypool 104K 66.9G 24.5K /mypool
Practices Overview
In this practice, you use basic network-related commands such as the ifconfig utility, ping
command, and snoop utility.
Assumptions
To prepare for this practice, ensure the following:
• Check that you have access to the two systems listed in the /etc/inet/hosts file
on each system.
• Work closely with a partner during the practice to ensure that you both are working on
the same steps, unless noted otherwise.
• Gain access to a console window if you are performing this practice in an LVC
environment.
• In VirtualBox delivery environment, use the second virtual machine as your partner
system while performing this practice.
Practices Overview
In these practices, you work with package-related commands.
Overview
In this practice, you use the package-related commands to add software packages to the Oracle
Solaris 10 OS.
Assumptions
This exercise requires the packages found in the /opt/ora/lab/packages directory on
student systems. If the packages are located on a server, your instructor will provide their
location and information about how to retrieve them.
Note: Use the packages in the /opt/ora/lab/packages directory to understand how to use
package administration commands. The packages used for this exercise are for demonstration
only.
Overview
In this practice, you use package-related commands to remove, install, and spool packages.
Assumptions
• Before you perform the steps in this practice, you must attach and mount an Oracle
Solaris 10 OS DVD ISO image. The ISO images are hosted on an NFS server. Your
instructor will help you identify the host name and IP address of the NFS server. You
need to mount the ISO image to the /opt/ora/dvd directory of your lab system.
Choose an ISO image appropriate for your lab system architecture. For example:
# uname -a
SunOS host41 5.10 Generic_144500-19 sun4u sparc SUNW,Sun-Blade-1500
# cd /opt/ora/dvd
Tasks
1. Use the pkginfo command to search for packages currently on your system that are
related to manuals.
Which packages were listed?
# pkginfo | grep -i manual
system SUNWcrman Encryption Kit On-Line Manual Pages
system SUNWman On-Line Manual Pages
system SUNWmfman CDE Motif Manuals
system SUNWopenssl-man OpenSSL Manual Pages
system SUNWperl584man Perl 5.8.4 Reference Manual Pages
system SUNWpl5m Perl 5.6.1 Reference Manual Pages
system SUNWtltkm ToolTalk manual pages
Note: The list that appears depends on selections that were made during the installation
process.
(output omitted)
/usr/bin/apropos
/usr/bin/addbib
/usr/bin <shared pathname not removed>
/usr <shared pathname not removed>
## Updating system information.
Practices Overview
In these practices, you use commands to prepare patches for installation, evaluate patch
descriptions, and install and remove patches.
Assumptions
This practice requires the set of patches found in the /opt/ora/lab/patches directory on
student systems. If the patches are located on a server, your instructor will provide the server’s
location and information about how to retrieve the patches.
The patches that you install as part of this practice are dependent on the SUNWoptdir and
SUNWusrdir packages, which are installed when you complete Practice 8-1. If for some reason
you could not complete Practice 8-1, run the following commands:
# pkgadd -d /opt/ora/lab/packages SUNWoptdir
# pkgadd -d /opt/ora/lab/packages SUNWusrdir
Note: Use the patch archives in the /opt/ora/lab/patches directory to understand how to
use patch administration commands.
Practices Overview
In this practice, you use the OpenBoot PROM and Oracle Solaris OS commands to set and
view OBP parameters, create a new device alias, and boot the system by using the new alias.
Overview
In this practice, you use the OpenBoot PROM and Oracle Solaris OS commands to set and
view OBP parameters, create a new device alias, and boot the system using the new alias.
Assumptions
Refer to the lecture notes, as necessary, to complete the following steps and answer the
questions listed.
This practice lists examples from two systems, a V120 server and a Sun Blade 1500, to provide
examples of systems that use SCSI and IDE internal disks.
If you are working in an LVC environment, gain access to a console window to perform this
exercise.
This practice is specific to SPARC machines and not applicable for classrooms running x86
/pci@1f,0/pci@1/scsi@8
Target 0
Unit 0 Disk FUJITSU MAP3367N SUN36G 0401
Target 1
Unit 0 Disk FUJITSU MAP3367N SUN36G 0401
ok probe-ide
Device 0 ( Primary Master )
Removable ATAPI Model: DV-28E-C
Practices for Lesson 11: Using the GRand Unified Bootloader (GRUB)
Chapter 11 - Page 1
Practices for Lesson 11
Practices Overview
In these practices, you change entries in the GRUB menu to boot the system in different ways,
and you use the eeprom command to set boot parameters.
Practices for Lesson 11: Using the GRand Unified Bootloader (GRUB)
Chapter 11 - Page 2
Practice 11-1: Using GRUB
Assumptions
Refer to the lecture notes as necessary to perform the following tasks and answer the questions
listed.
This exercise is specific to x86/x64 systems and requires an x86/x64 system that is capable of
using a 64-bit kernel to complete all practice steps. If you are using a system that is only 32-bit
capable, you will be able to run only a subset of the practice steps.
If you are working in an LVC environment, gain access to the console window to perform this
exercise.
Tasks
1. Log in as root and open a terminal window.
Practices for Lesson 11: Using the GRand Unified Bootloader (GRUB)
Chapter 11 - Page 3
GNU GRUB version 0.97 (639K lower / 2096064K upper memory)
+--------------------------------------------------------------+
| findroot (rootfs0,0,a)
| kernel /platform/i86pc/multiboot
| module /platform/i86pc/boot_archive
|
+--------------------------------------------------------------+
The Solaris 10 8/11 s10x_u10wos_17a X86 boot entry uses the
/platform/i86pc/boot_archive boot archive. The kernel command does not list a
specific kernel to load.
6. Press the Esc key to return to the GRUB main menu.
7. Select the Solaris failsafe entry, and press E to display the list of commands it
represents. What is the pathname of the boot archive this boot entry uses?
Practices for Lesson 11: Using the GRand Unified Bootloader (GRUB)
Chapter 11 - Page 4
12. Use the prtconf command to display the name of the kernel that the system is currently
using. If the kernel listed is a 64-bit kernel, for example
/platform/i86pc/kernel/amd64/unix, proceed to the next step. If the kernel listed is
a 32-bit kernel, for example, /platform/i86pc/kernel/unix, skip to step 20.
# prtconf -v | grep /platform/i86pc/kernel
value='/platform/i86pc/kernel/amd64/unix'
#
Note: You cannot use a 64-bit kernel to boot a 32-bit system.
13. Use the eeprom command to set the boot-file parameter so that the system will boot by
using the 32-bit kernel. Verify that the parameter is now set.
# eeprom boot-file=kernel/unix
# eeprom boot-file
boot-file=kernel/unix
Practices for Lesson 11: Using the GRand Unified Bootloader (GRUB)
Chapter 11 - Page 5
18. Edit the kernel command to add the name of the 64-bit kernel to the end of the command
line. Press <return> to return to GRUB.
grub edit> kernel /platform/i86pc/multiboot kernel/amd64/unix
19. Verify that the kernel command specifies the 64-bit kernel, and press B to boot the
system.
20. Log in as root and open a terminal window.
21. Use the prtconf command to display the name of the kernel that the system is currently
using. Is the system using the 32-bit kernel that you specified with the eeprom command,
or the 64-bit kernel you specified using the kernel command?
# prtconf -v | grep /platform/i86pc/kernel
value='/platform/i86pc/kernel/amd64/unix'
The system is using the 64-bit kernel that you specified using the kernel command,
Practices for Lesson 11: Using the GRand Unified Bootloader (GRUB)
Chapter 11 - Page 6
25. Change the directory to /a/platform/i86pc, and create a directory named backup.
# cd /a/platform/i86pc
# mkdir backup
#
26. Move the boot_archive file into the backup directory and verify that it no longer exists in
/a/platform/i86pc.
# mv boot_archive backup
# ls
backup biosint boot kernel multiboot ucode
#
27. Use the bootadm command to create a new boot archive in the /a/platform/i86pc
directory. Verify that it exists.
Practices for Lesson 11: Using the GRand Unified Bootloader (GRUB)
Chapter 11 - Page 7
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 11: Using the GRand Unified Bootloader (GRUB)
Chapter 11 - Page 8
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 12:
Performing Legacy Boot and
Shutdown Procedures
Chapter 12
Practices for Lesson 12: Performing Legacy Boot and Shutdown Procedures
Chapter 12 - Page 1
Practices for Lesson 12
Practices Overview
There is no practice for this lesson.
Practices for Lesson 12: Performing Legacy Boot and Shutdown Procedures
Chapter 12 - Page 2
Oracle Internal & Oracle Academy Use Only
Practices for Lesson 13:
Service Management Facility
(SMF)
Chapter 13
Practices Overview
In these practices, you add, use, and remove services in the Solaris Management Facility
(SMF). You also demonstrate the function of the /etc/system file.
Assumptions
This practice requires the banner-rc, banner-smf, and banner-smf.xml files, found in the
/opt/ora/lab/smf directory. Your instructor will indicate if the files are located elsewhere.
Refer to the lecture notes, as necessary, to perform the tasks listed.
If you are working in an LVC environment, gain access to the console window to perform this
exercise.
Tasks
1. Change to the directory /opt/ora/lab/smf, and check that the files banner-rc,
banner-smf, and banner-smf.xml all have execute permission.
# cd /opt/ora/lab/smf
Practices Overview
In these practices, you use the Solaris Management Console and the smuser, smgroup,
usermod, userdel, groupadd, and groupdel commands to create, modify, and delete
multiple user accounts and group entries.
Assumptions
This practice assumes that no user accounts exist except for the default accounts created
during a default Oracle Solaris OS installation. Use the logins command to display the list of
user accounts. Use the userdel -r command to remove any of these accounts that you find.
Refer to the lecture notes, as necessary, to perform the tasks listed.
Note: Some of the commands displayed in this section are quite long and will wrap to the next
line. You should consider all commands in bold font following a command-line prompt to be all
one line.
Practices Overview
In these practices, you complete the following tasks:
• Use the Process Manager graphical user interface (GUI) and the prstat command to
monitor and kill processes.
• Create an at job and an entry in a crontab file.
Assumptions
Refer to the lecture notes as necessary to perform the tasks listed.
Tasks
1. Log in as the root user, open a terminal window, and start the Process Manager GUI.
# /usr/dt/bin/sdtprocess &
In the Process Manager window, sort the listing according to CPU% in descending order,
and change the sample time to five seconds.
Note: When you access the Process Manager GUI, a message notifies you of the
deprecation of the Common Desktop Environment (CDE).
2. Open a second terminal window, and run the prstat command.
Practices Overview
In this practice, you are presented with a guided simulation of the Oracle Solaris 10 OS
interactive installation process for both SPARC and x86/x64-based systems.
Overview
This practice uses a simulation to present an example of the Oracle Solaris 10 OS interactive
installation process. The simulation describes installing the Oracle Solaris 10 OS on both
SPARC and x86/x64-based systems, using DVD installation media.
Your instructor will provide instructions for using the installation simulation.
Tasks
1. Log in as the root user and open a terminal window.
2. Change to the /opt/ora/lab/demo directory.
# cd /opt/ora/lab/demo
# ls
Practices Overview
In these practices, you back up an available file system on your system to a tape drive or to an
extra disk drive.
Overview
In this practice, you back up an available file system on your system to a tape drive.
Assumptions
This practice requires a system that is configured with a tape drive and file system that is
available to unmount. This exercise assumes that the /export/home file system exists on a
separate partition from the / (root) file system and can be unmounted. Identify the slice on
which the /export/home file system resides. Get a tape that is appropriate for your system
from the instructor.
For classrooms without a tape drive, skip to “Backing Up a File System to an Extra Disk Drive.”
Tasks
Overview
In this practice, you back up an available file system on your system to an extra disk drive.
Assumptions
This practice requires a system that is configured with an extra disk drive and a file system that
is available to unmount. This exercise assumes that the /export/home file system exists on a
separate partition from the / (root) file system and can be unmounted. Identify the slice on
which the /export/home file system resides.
In this practice, you use the format utility to partition your extra hard drive so that it has one
partition that uses all of the disk space. You then create a file system on that partition and
mount the file system.
Practices for Appendix B: Backing Up a Mounted File System with a UFS Snapshot
Chapter 18 - Page 1
Practices for Appendix B
Practices Overview
In these practices, you complete the following tasks:
• Create a UFS snapshot of the /opt file system.
• View the contents of the backing-store directory.
• Display detailed information for the UFS snapshot.
• Remove the snapshot and backing-store file.
Practices for Appendix B: Backing Up a Mounted File System with a UFS Snapshot
Chapter 18 - Page 2
Practice B-1: Working with UFS Snapshots
Tasks
1. Create a snapshot of the /export/home file system without specifying a file name for the
backing-store file.
# fssnap -F ufs -o bs=/var/tmp /export/home
/dev/fssnap/0
#
2. List the contents of the /var/tmp directory.
# ls -lh /var/tmp
total 862
(output ommitted)
Practices for Appendix B: Backing Up a Mounted File System with a UFS Snapshot
Chapter 18 - Page 3
5. List the contents of the /var/tmp directory. Has the backing-store file been removed?
# ls -l /var/tmp/snapshot0
-rw------- 1 root root 10574196736 Oct 6 16:30
/var/tmp/snapshot0
#
No.
6. Remove the backing-store file that you created in step 1.
# rm /var/tmp/snapshot0
Practices for Appendix B: Backing Up a Mounted File System with a UFS Snapshot
Chapter 18 - Page 4
Oracle Internal & Oracle Academy Use Only
Practices for Appendix C:
Performing File System
Restores
Chapter 19
Practices Overview
In these practices, you do the following:
• Back up the / (root) file system to tape.
• Back up the / (root) file system to a file on disk.
• Restore a selective file from a ufsdump archive.
• Restore the / (root) file system from tape or disk.
Assumptions
Some of the steps in this practice use a tape drive. If your system has an attached tape drive,
obtain an appropriate tape from your instructor. However, a tape drive is not necessary to
complete the exercise.
This practice requires a system that has an unused spare disk with the capacity to store the
entire / (root) file system.
Identify the device name of the / (root) file system. For example:
# df -h /
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t2d0s0 4.8G 175M 4.6G 4% /
Record the device name of the root file system, /dev/dsk/c0t0d0s0 in this example.
Create a New Root File System and Prepare for the Restore
1. Use the newfs command to create a new file system on the / (root) slice.
Note: Be certain to specify the correct device name for the root slice. Be sure you do not
specify a slice on the spare disk.
For example, on a SPARC system:
# newfs /dev/rdsk/c0t0d0s0
On an x86/x64 system:
# newfs /dev/rdsk/c1d0s0