Beruflich Dokumente
Kultur Dokumente
Sun
Abstract:
This study guide will help you prepare for the Sun Solaris 9 Certified System
Administrator I exam. Exam topics include: managing file systems; installing
software; performing system boot process; performing user and security
administration; managing network printers and system processes; and performing
system backups and restores.
Contents:
Prerequisites ................................................................................................. 5
File Systems.................................................................................................. 5
Root Subdirectories..................................................................................... 5
File Types .................................................................................................. 6
Filenames, Inodes and Data Blocks ............................................................... 7
Hard Links ................................................................................................. 8
Disk Architecture ........................................................................................ 9
Physical Structure.................................................................................... 9
Disk Components .................................................................................... 9
Disk Slices.............................................................................................. 9
Disk Slice Naming Convention ................................................................... 9
How to List Devices....................................................................................10
The /etc/path_to_inst File........................................................................10
The prtconf Command.............................................................................11
The format Command .............................................................................11
How to reconfigure devices .........................................................................12
Disk Partitioning ........................................................................................12
File System Types......................................................................................15
Disk-Based File Systems..........................................................................16
Distributed File Systems ..........................................................................16
Pseudo File Systems ...............................................................................16
How to create a ufs File System ...................................................................17
How to Mount File Systems .........................................................................17
Mount Points and the mount Command .....................................................17
Mounting a File System ...........................................................................17
The Virtual File System Table (vfstab)...........................................................18
Software Installation .....................................................................................19
System Requirements ................................................................................19
Before You Begin .......................................................................................19
Software Packages.....................................................................................20
Package Information ...............................................................................20
Package Installation................................................................................21
Package Check .......................................................................................22
The var/sadm/install/contents File ............................................................23
The Boot PROM.............................................................................................23
What is the Boot PROM...............................................................................23
What is NVRAM? ........................................................................................23
Boot PROM commands................................................................................23
Boot PROM Version Identification ..............................................................24
Boot The System ....................................................................................24
List/Change NVRAM Parameters ...............................................................24
Display Devices Connected to the Bus .......................................................25
Prerequisites
It will be very beneficial to have access to a Sparc system running Solaris 9. If you
do not have Solaris 9 installed on your Sparc system, you can download it free of
cost at:
http://survey1.sun.com/servlet/viewsflash?cmd=showform&pollid=sol9_download
File Systems
Root Subdirectories
There are several root directories that are created upon the installation of the Solaris
Operating System. Each of these directories resides under the root (/) directory and
serves a special purpose.
• /bin – This directory is a symbolic link to the /usr/bin directory which stores
binary files or system commands
Note: Names in this directory will look like the following examples:
• /devices – This directory stores physical device names and device files
• /export – This is the default directory for commonly shared file systems.
These include user home directories and client file systems
• /home – This is the default location or mount point for user home
directories
• /tmp – Directory for temporary files. These files are cleared every time the
system is rebooted.
File Types
There are four main file types in the Solaris Operating Environment.
• Regular files
• Directories
• Symbolic Links
• Device Files
The first three file types store data. Device files do not store data. They provide
access to devices. It is very easy to differentiate between them by using the ls
command.
# cd /etc
# ls -l
total 458
drwxr-xr-x 2 adm adm 512 Jun 20 18:26 acct
lrwxrwxrwx 1 root root 14 Jun 20 17:50 aliases ->
./mail/aliases
drwxr-xr-x 2 root bin 512 Jun 20 18:30 apache
-rw-r--r-- 1 root bin 83 Jun 20 20:34 auto_home
-rw-r--r-- 1 root bin 113 Jun 20 17:50 auto_master
<Output Truncated>
# cd /devices/pci@1f,0/pci@1,1/ide@3
# ls –l
total 0
brw-r----- 1 root sys 136, 0 Jun 20 17:57 dad@0,0:a
crw-r----- 1 root sys 136, 0 Jun 20 17:57 dad@0,0:a,raw
brw-r----- 1 root sys 136, 1 Jun 20 17:57 dad@0,0:b
crw-r----- 1 root sys 136, 1 Jun 20 17:57 dad@0,0:b,raw
<Output Truncated>
• - – Regular files
• d – Directories
• l – Symbolic links
Hard Links
The association between a file name and an inode is called a hard link. Think of a
filename as a hard link to an inode. Let’s create a file and then link it.
As you can see, the inodes for both files are identical. This means that both the
filenames point to the same physical location. In other words, inode 721025 has two
hard links. One to file1 and the other for file2.
Even though we deleted one of the files the same information can be accessed via
the filename “file2.”
Disk Architecture
Physical Structure
If you have ever opened a hard disk enclosure, you know that it is made up of
magnetic platters stacked on a spindle. The spindle spins at high speeds while the
heads move between them reading and writing data. The heads are moved by the
head actuator arm.
Disk Components
Each disk platter is further divided into the following components:
• Sector – Also known as a disk block, a sector is the smallest addressable unit
on a platter. Each sector contains 512 bytes
Disk Slices
Each disk can be divided into logical partitions known as slices. Slices are groupings
of cylinders and are used to organize data by function.
• Disk Number – The disk number indicates the number of disks at the target
location. The disk number is often referred to as the logical unit number
(LUN)
# more /etc/path_to_inst
#
# Caution! This file contains critical kernel state
#
"/pci@1f,0" 0 "pcipsy"
"/pci@1f,0/pci@1,1" 0 "simba" (pci bus A controller)
"/pci@1f,0/pci@1,1/ebus@1" 0 "ebus" (extended bus)
"/pci@1f,0/pci@1,1/ebus@1/power@14,724000" 0 "power" (power management
bus)
"/pci@1f,0/pci@1,1/ebus@1/fdthree@14,3023f0" 0 "fd" (floppy disk)
"/pci@1f,0/pci@1,1/ebus@1/SUNW,CS4231@14,200000" 0 "audiocs"
"/pci@1f,0/pci@1,1/ebus@1/su@14,3062f8" 1 "su" (mouse)
"/pci@1f,0/pci@1,1/ebus@1/se@14,400000" 0 "se" (serial ports A and B)
"/pci@1f,0/pci@1,1/ebus@1/su@14,3083f8" 0 "su" (keyboard)
"/pci@1f,0/pci@1,1/ebus@1/ecpp@14,3043bc" 0 "ecpp" (extended
capability parallel port)
"/pci@1f,0/pci@1,1/ide@3" 0 "uata"
"/pci@1f,0/pci@1,1/ide@3/sd@2,0" 0 "sd"
"/pci@1f,0/pci@1,1/ide@3/dad@0,0" 0 "dad" (disk)
"/pci@1f,0/pci@1,1/network@1,1" 0 "hme" (Fast-Ethernet)
"/pci@1f,0/pci@1,1/SUNW,m64B@2" 0 "m64" (color memory frame buffer)
"/pci@1f,0/pci@1" 1 "simba" (pci bus A controller)
"/options" 0 "options"
"/scsi_vhci" 0 "scsi_vhci"
"/pseudo" 0 "pseudo"
In order to get a list of connected devices, we are filtering the output of the prtconf
command by using “grep –v not”. The “grep –v not” command is used to omit all
lines that contain the word “not.”
SUNW,Ultra-5_10
options, instance #0
pci, instance #0
pci, instance #0
ebus, instance #0
power, instance #0
se, instance #0
su, instance #0
su, instance #1
fdthree, instance #0
SUNW,CS4231, instance #0
network, instance #0
SUNW,m64B, instance #0
ide, instance #0
dad, instance #0
sd, instance #0
pci, instance #1
pseudo, instance #0
# format
Searching for disks...done
# touch /reconfigure
# init 5
7. Use the prtconf or the format command to verify that the peripheral device
has been detected and added.
Disk Partitioning
The format command is used to repartition disks.
2. Select the disk that you wish to work on. In our example, we will work on
disk zero.
3. Type partition.
4. Type print.
6. Type a name for the new slice or press Return to keep the default. You can
also type ? to get a list of choices.
11. Enter a new partition size. In this example, we are not changing anything.
Now, let’s take a look at an example to get familiar with the menus. In this example,
we will not really change anything but will run through the menus.
# format
Searching for disks...done
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
show - translate a disk address
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
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: 17660 + 2 (reserved cylinders)
partition> 0
Part Tag Flag Cylinders Size Blocks
0 root wm 1041 - 4458 1.64GB (3418/0/0)
3445344
home alternates
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
show - translate a disk address
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> quit
• Unix File System (ufs) – Based on the Berkeley fast file system, this is the
standard UNIX file system.
• High Sierra File System (hsfs) – A special file system developed for CD-
ROM media.
• Universal Disk Format (udf) – A special optical storage file system for DVD
and CD-ROM media.
• Network File System (nfs) – Allows files sharing between different systems
in a network.
• Temporary File System (tmpfs) – This file system is created at boot time
and is not persistent. It is “flushed” when the system is rebooted. The file
system is used for file storage in memory without the I/O overhead
associated with disk-based file systems.
• Swap File Systems (swapfs) – Used by the kernel to manage the swap
space on disks.
• File Descriptor File System (fdfs) – Provides names for opening files using
file descriptors such as /dev/fd/0.
• Process File System (procfs) – Contains a list of active processes. The list
is stored in the /proc directory.
1. Type the newfs command for the partition you want to build the file system
on; e.g., newfs /dev/rdsk/c1t3d0s0.
2. Type y to proceed.
That’s all there is to creating an ufs file system. However, the new partition must be
mounted before it can be used.
# mount
/ on /dev/dsk/c0t0d0s0
read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=2200000 on
Thu Jun 20 18:41:03 2002
/proc on /proc read/write/setuid/dev=38c0000 on Thu Jun 20 18:41:02
2002
/etc/mnttab on mnttab read/write/setuid/dev=3980000 on Thu Jun 20
18:41:02 2002
/dev/fd on fd read/write/setuid/dev=39c0000 on Thu Jun 20 18:41:04 2002
/var/run on swap read/write/setuid/xattr/dev=1 on Thu Jun 20 18:41:16
2002
/tmp on swap read/write/setuid/xattr/dev=2 on Thu Jun 20 18:41:18 2002
/export/home on /dev/dsk/c0t0d0s7
read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=2200007 on
Thu Jun 20 18:41:18 2002
/home/athar on /export/home/athar read/write/setuid/dev=2200007 on Mon
Jun 24 11:38:35 2002
This would mount the slice seven on disk zero as the home directory. Since we did
not specify any file system options, ufs is used by default. If another file system is
required, it must be specified. This is most commonly used with floppy disks. For
example,
# cat /etc/vfstab
#device device mount FS fsck mount
mount
#to mount to fsck point type pass at boot
options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1
no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs
2 yes -
swap - /tmp tmpfs - yes -
Notice that these fields do not align properly because they are tab separated. This
can lead to confusion. It appears correctly formatted on the screen. Here is the
output copied and pasted in the Solaris Text Editor.
Software Installation
System Requirements
To install Solaris 2.9, your system must meet the following requirements.
• 64MB of RAM
Notice that the Intel platform is no longer supported. The software spans 3 CD-
ROMs.
• Host Name
• Geographic Region
• Root Password
• Language to install
Software Packages
Similar to a setup.exe file that we are familiar with on a Windows platform, software
products for the Solaris platform are called packages. These are basically a collection
of files and directories.
Package Information
In the following example, we are using the pkginfo command and filtering for lines
that contain the word “application.” The pkginfo command displays the category,
package instance and names of all installed packages.
For example:
# pkginfo -l SUNWman
PKGINST: SUNWman
Package Installation
You can use the pkgadd command to install an application from an installation
source. The usual syntax is as follows:
In the following example, we will initiate an installation but will not complete it:
# pkgadd -d /cdrom/cdrom0/s0/Solaris_9/Product/
<Output Truncated>
The following files are being installed with setuid and/or setgid
permissions:
* /usr/bin/admintool <setuid root>
Package Check
The pkgchk command checks the contents and attributes of an installed package. For
example:
# pkgchk SUNWadmap
# pkgchk -v SUNWadmap
/usr
/usr/bin
.
.
<Output Omitted>
.
.
/usr/snadm/lib/libnsnis.so.1
/usr/snadm/lib/libnsnisplus.so
/usr/snadm/lib/libnsnisplus.so.1
/usr/snadm/lib/libnsnone.so
/usr/snadm/lib/libnsnone.so.1
#
$ more /var/sadm/install/contents
/bin=./usr/bin s none SUNWcsr
/dev d none 0755 root sys SUNWcsr SUNWcsd
/dev/allkmem=../devices/pseudo/mm@0:allkmem s none SUNWcsd
/dev/arp=../devices/pseudo/arp@0:arp s none SUNWcsd
/dev/conslog=../devices/pseudo/log@0:conslog s none SUNWcsd
/dev/console=../devices/pseudo/cn@0:console s none SUNWcsd
<Output Truncated>
What is NVRAM?
The Non-Volatile Random Access Memory (NVRAM) is another key component in the
Sun system. NVRAM stores the Ethernet address, host ID, and time.
ok boot
ok printenv
ok printenv boot-device
boot-device = disk:a disk net
To change or set a NVRAM parameter, you can use the setenv command. In this
example, we will check the current value for auto-boot and then change it:
ok printenv auto-boot?
auto-boot? = true
ok
ok setenv auto-boot? False
ok reset
Resetting ...
The reset command commits changes to the NVRAM and resets the system.
ok show-devs
<Output Omitted>
Other commands to list and identify peripheral devices include the following:
• probe-ide
• probe-scsi
• probe-scsi-all
ok printenv boot-device
boot-device = disk
ok devalias
screen /pci@1f,0/pci@1,1/SUNW,m64B@2
net /pci@1f,0/pci@1,1/network@1,1
cdrom /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f
disk /pci@1f,0/pci@1,1/ide@3/disk@0,0
disk3 /pci@1f,0/pci@1,1/ide@3/disk@3,0
disk2 /pci@1f,0/pci@1,1/ide@3/disk@2,0
disk1 /pci@1f,0/pci@1,1/ide@3/disk@1,0
disk0 /pci@1f,0/pci@1,1/ide@3/disk@0,0
ide /pci@1f,0/pci@1,1/ide@3
floppy /pci@1f,0/pci@1,1/ebus@1/fdthree
ttyb /pci@1f,0/pci@1,1/ebus@1/se:b
ttya /pci@1f,0/pci@1,1/ebus@1/se:a
keyboard! /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8:forcemode
keyboard /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8
mouse /pci@1f,0/pci@1,1/ebus@1/su@14,3062f8
name aliases
The nvalias command is used to create custom device aliases and is used as follows:
For example:
As we learned previously, the setenv command can be used to set this newly created
disk as the boot device.
# eeprom
tpe-link-test?=true
scsi-initiator-id=7
keyboard-click?=false
keymap: data not available.
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
ttya-rts-dtr-off=false
ttya-ignore-cd=true
ttyb-mode=9600,8,n,1,-
ttya-mode=9600,8,n,1,-
pcia-probe-list=1,2,3,4
pcib-probe-list=1,2,3
mfg-mode=off
diag-level=max
#power-cycles=56
system-board-serial#: data not available.
system-board-date: data not available.
fcode-debug?=false
output-device=screen
input-device=keyboard
load-base=16384
boot-command=boot
auto-boot?=true
watchdog-reboot?=false
diag-file: data not available.
diag-device=net
boot-file: data not available.
boot-device=disk:a disk net
local-mac-address?=false
ansi-terminal?=true
screen-#columns=80
screen-#rows=34
silent-mode?=false
use-nvramrc?=false
nvramrc: data not available.
security-mode=none
security-password: data not available.
security-#badlogins=0
oem-logo: data not available.
oem-logo?=false
oem-banner: data not available.
oem-banner?=false
hardware-revision: data not available.
last-hardware-update: data not available.
diag-switch?=false
# eeprom boot-device
boot-device=disk:a disk net
# eeprom boot-device=cramdisk
#
# eeprom boot-device
boot-device=cramdisk
There are several strategies that can be used to interrupt an unresponsive system.
4. Synchronizing the file system using the OpenBoot PROM (OBP) sync
command. This causes the system to create a crash dump of the memory and
reboot.
Phase Details
PROM Runs POST
boot locates boot-device
Boot PROM Phase
boot reads bootblk
boot loads bootblk
bootblk loads secondary boot program (ufsboot)
Boot Programs Phase
ufsboot loads kernel (32-bit kernel or 64-bit kernel)
kernel initializes itself and loads modules
Kernel Initialization Phase
Reads configuration file /etc/system
kernel starts /etc/init
init phase
init starts rc scripts
• User’s Home Directory – A directory that the user is placed in upon login
• User Initialization Files – Shell scripts that determine how the work
environment is set up for the user
User Creation
Users can be added to the local system by using the useradd command. This
command adds an entry for the user to the /etc/passwd and /etc/shadow files.
For example:
• Shell: K Shell
User Modification
Users can be modified on the local system by using the usermod command
For example, the following command renames cramusr1 to cramusr2 while retaining
all its properties:
User Deletion
The userdel command can be used to delete a user’s account from a system. It can
also remove the user’s home directory and its contents if used with the “-r” option.
For example:
# userdel –r cramusr2
For example, the following command creates a new group account called cramusrs
with a group ID of 301.
In the following example, we will change the Group ID (GID) from 301 to 400:
In the following example, we will delete the cramusrs group account from the local
system:
# groupdel cramusrs
Notice the difference between the two files (especially the “x” following a user
name):
# cat /etc/passwd
root:x:0:1:Super-User:/:/sbin/sh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:
lp:x:71:8:Line Printer Admin:/usr/spool/lp:
uucp:x:5:5:uucp Admin:/usr/lib/uucp:
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
smmsp:x:25:25:SendMail Message Submission Program:/:
listen:x:37:4:Network Admin:/usr/net/nls:
nobody:x:60001:60001:Nobody:/:
noaccess:x:60002:60002:No Access User:/:
nobody4:x:65534:65534:SunOS 4.x Nobody:/:
athar:x:100:0::/home/athar:/bin/sh
# cat /etc/shadow
root:s5JR561b9zPVs:6445::::::
daemon:NP:6445::::::
bin:NP:6445::::::
sys:NP:6445::::::
adm:NP:6445::::::
lp:NP:6445::::::
uucp:NP:6445::::::
nuucp:NP:6445::::::
smmsp:NP:6445::::::
listen:*LK*:::::::
nobody:NP:6445::::::
noaccess:NP:6445::::::
nobody4:NP:6445::::::
athar:QROSXsUei6iEU:11859::::::
file, there is an x following the user name. This “x” indicates that the password for
the user exists in the /etc/shadow file.
# touch /var/adm/loginlog
Once this file has been created, all failed login activity after five attempts is recorded
in this file automatically. If there are fewer than five failed attempts, the file will not
contain any information.
Once the file is created, and we purposefully enter incorrect passwords at a telnet
session, the following message is displayed in a terminal window on the console:
# cat /var/adm/loginlog
athar:/dev/pts/4:Sun Jul 7 15:24:24 2002
athar:/dev/pts/4:Sun Jul 7 15:24:30 2002
athar:/dev/pts/4:Sun Jul 7 15:24:37 2002
athar:/dev/pts/4:Sun Jul 7 15:24:44 2002
athar:/dev/pts/4:Sun Jul 7 15:25:03 2002
# who
root pts/3 Jul 7 15:41 (mylaptop.mydomain.com:6954.0)
root dtremote Jul 4 23:39 (mylaptop.mydomain.com:6954)
Also, the last command is used to display a record of system access. It obtains this
information from the /var/adm/wtmpx file.
# last
athar ftp mylaptop.mydomai Sun Jul 7 15:30 still logged
in
• Network Printer – A printer attached to the network with its own hostname
and IP address without being attached to a print server
• Tracking – The service tracks the status of all print requests. This allows
users to view and cancel their own requests. And, it allows root to manage
them if necessary. Any errors that occur are logged by the tracking feature
• Fault Notification – In the event that a print request cannot be fulfilled, this
feature of the service notifies the user either by a message on the console or
via email
3. lpsched matches the printer type and file content type. It also identifies the
destination printer for the print client.
4. If necessary, lpsched filters the print request.
In the following example, we will create a printer class called “complab” for a college
computer lab with two printers.
Notice that the complab class is created automatically when printer1 is added to it.
Now that both printers are added to the class, students may submit print requests as
follows:
# lp –d complab myfile
# lpadmin -x printer1
# reject printer1
# disable printer1
# lpadmin -x printer1
# /usr/lib/lpshut
# /usr/lib/lpsched
# /usr/bin/enable printer1
printer “printer1” now enabled
The “-W” switch causes the command to wait to until the current print request is
completed. Conversely, if the “–c” switch had been used, the current print request
would have been cancelled.
2. Use the reject command to prevent additional print requests from being
accepted.
lpstat –o
<Output Omitted>
# lpstat –a printer2
printer printer2 accepting requests since Sun May 5
# accept printer1
destination “printer1” now accepting requests
• The CDE Process Manager – A graphical tool that can be launched from the
CDE workspace or from the command line by typing /usr/dt/bin/sdtprocess
• The ps command – The Process Status (ps) command is the most commonly
used method
• The prstat command – This is a new and improved command that was
included with Solaris 8
The at and batch commands are used to schedule a one-time execution at a certain
time. For recurring execution of commands, a crontab file is used. These files are
located at /var/spool/cron/crontabs
Media Capacity
½ Inch Reel Tape 140 MB
¼ Inch QIC Cartridge Tape 8 GB
4 mm 24 GB
8 mm Cartridge Tape 40 GB
½ Inch DLT Cartridge Tape 70 GB
• 0 – This is the logical number of the tape. For example, the first tape could be
named /dev/rmt/0 and so on
• h – This part of the name indicates the tape density. For example:
l – Low Density
m – Medium Density
h – High Density
c – Compressed
u – Ultra Compressed
• n – This part of the name indicates whether a tape is to be rewound when the
operation is completed. If there is an “n” in the name, this indicates that the
tape is not to be rewound
Going back to our example, we can see that the tape in question is the first logical
tape of high density and is not to be rewound.
Backup Types
There are only two types of backups in the Solaris Operating Environment.
• Incremental – A backup of new and modified files since the previous backup
Usually the crontab file is used to schedule nightly, weekly and monthly backups.
The flexibility of the ufsdump and crontab offer endless possibilities and allow system
administrators to create backup strategies specific to their needs. Be sure to read the
man pages for this command and understand the various options and usage.
ok boot cdrom –s
# newfs /dev/rdsk/c0t0d0s0
# mount /dev/dsk/c0t0d0s0 /x
# cd /x
4. Restore the root file system from backup. Note that we need to always start a
restore from the tape that contains the level 0 backup. Here let’s assume that
it resides on tape 0.
# ufsrestore rf /dev/rmt/0
# rm restoresymtable
# cd /usr/platform/`uname -m`/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t0d0s0
# cd /
# umount /x
# fsck /dev/rdsk/c0t0d0s0
# init 6
10. Perform a full back up of the new file system. This is necessary because the
ufsrestore command changes the position of the files and re-allocates inodes.
Step 6 is important when restoring the root partition. It can be skipped when
restoring the /usr and /var file systems. In order to restore regular file systems,
steps 1, 6 and 9 can be skipped.
For example, if we want to find out how many bytes it would take to perform a full
backup of the / partition:
# ufsdump 0S /
1249763328
Or, if we want to find out the number of bytes required to perform a level 3 back up
the /export/home file system:
# ufsdump 3S /export/home
122871808
Now we can take the number of bytes reported back and divide it by the capacity of
the tape. This will give us the number of tapes required to perform the backup.
Special thanks to
Athar Khan for contributing this
Cramsession.
Please visit his site at
http://www.atharkhan.net/