This chapter familiarizes you with changes to file system layout and the changes to file systems, virtual file systems, directories, and files. The chapter also describes changes to file system administration including:
Mounting file systems
Monitoring file systems
Sharing file systems
Creating new file systems
Checking file systems
Backing up and restoring files
For more information on understanding and managing file systems, see System Administration Guide, Volume I.
SunOS release 5.7 and SunOS release 4.x file systems are similar, but there are changes in the locations and names of system directories and files. There are also new file systems and new pseudo file systems, and one directory was removed.
Some of the changes to file system locations and names are:
The /dev directory has changed from a flat directory to a hierarchical one.
The /etc directory has changed and contains specific system configuration information. Several files and subdirectories have been added, removed, or changed.
The /etc/vfstab tab file replaces /etc/fstab.
The SunOS release 5.7 /sbin directory contains the rc scripts used to alter system run levels as well as the rcs script used to initialize the system prior to mounting file systems.
The SunOS release 5.7 /usr directory contains sharable files and executables provided by the system.
The /var directory contains files that change size during normal operation. Several files and subdirectories in the /var directory have been added, removed, or changed.
The TFS pseudo file system is not included in the SunOS release 5.7 software.
The added pseudo file systems are:
The PROCFS pseudo file system resides in memory and contains a list of active processes, by process number, in the /proc directory. See the proc(4) man page.
The NAMEFS pseudo file system is used mostly by STREAMS for dynamic mounts of file descriptors on top of files.
The SWAPFS pseudo file system is the default swap device when the system boots or you create additional swap space.
The following file systems are included in the SunOS release 5.7 directory structure:
The optional /opt file system can be used to store third-party or unbundled software. If /opt is not a separate file system, it may be a symbolic link to /usr/opt.
The /vol file system provides the default file system for the Volume Management daemon, vold(1M). See the volfs(7) man page.
The SunOS release 5.7 file system is hierarchical.Figure 9-1 graphically depicts SunOS release 5.7 default directories and file systems (indicated by dotted lines). Subdirectories shown are just a sample of what the directory or file system actually holds. Table 9-1 gives a brief description of each.
The Solaris 7 software contains a default set of file systems and directories, and uses a set of conventions to group similar types of files together. Table 9-1 lists the default file systems and directories with a brief description.
Table 9-1 Solaris 7 File Systems and Directories
The SunOS release 5.7 software features a virtual file system (VFS) architecture that simplifies file system management for systems that support multiple file systems.
Over the years, several different UNIX file systems were developed, with each its own set of commands for file system management. Learning all the variations can be confusing and difficult. The SunOS release 5.7 software addresses this issue with a set of generic commands for file system management. These commands are a part of a common VFS interface that makes differences between file systems transparent with respect to maintenance. The subsections below list a summary of supported file systems and the generic file system commands.
Most file system types included in the SunOS release 4.x software are also included in the SunOS release 5.7 software. There is one exception: The translucent file system (TFS) type has been withdrawn from the SunOS release 5.7 software. Table 9-2 summarizes file-system type availability in the SunOS release 4.x and SunOS release 5.7 environment.
Table 9-2 Summary of File System Types
Category |
Name |
Description |
SunOS release 4.x |
SunOS release 5.7 |
---|---|---|---|---|
Disk-based |
UNIX file system |
Yes |
Yes |
|
CD-ROM file system |
Yes |
Yes |
||
PC file system |
Yes |
Yes |
||
NFS |
Sun's distributed computing file system |
Yes |
Yes |
|
Device special file system |
Yes |
Yes |
||
/tmp temporary file system |
Yes |
Yes |
||
Loopback file system |
Yes |
Yes |
||
Translucent file system |
Yes |
No |
||
|
Process access file system |
No |
Yes |
|
|
File descriptor file system |
No |
Yes |
|
|
FIFO/Pipe file system |
No |
Yes |
|
|
Name file system |
No |
Yes |
|
|
Swap file system |
No |
Yes |
|
|
Cache file system |
No |
For more information on file systems, see the proc(4) and fd(4) man pages and System Administration Guide, Volume I.
The Cache File System can be used to improve performance of remote file systems or slow devices such as CD-ROM. When a file system is cached, the data read from the remote file system or CD-ROM is stored in a cache on the local system.
In the SunOS release 5.7 software SWAPFS is the default swap device when the system boots or you create additional swap space. This swap device uses physical memory as swap space, but also requires physical swap space on disk.
In SunOS release 4.x systems, the default physical swap device depends on the system configuration. Standalone systems default to sd0b and diskless systems get their swap files from the bootparam server. The SunOS release 5.7 software uses the swap file as the default dump device instead of specifying a file on disk.
Table 9-3 shows SVR4 file system types that are not supported in the SunOS release 5.7 software.
Table 9-3 Not Supported SVR4 File System Types
Name |
Description |
---|---|
Boot file system |
|
System V file system |
|
Most file system administration commands have a generic and a file system component. Use the generic commands, which call the file system component. Table 9-4 lists the generic file-system administrative commands, which are located in the /usr/bin directory.
Table 9-4 Generic File-System Administrative Commands
Command |
Description |
---|---|
Clears inodes |
|
Reports the number of free disk blocks and files |
|
Lists file names and statistics for a file system |
|
Checks the integrity of a file system and repairs any damage found |
|
File system debugger |
|
Determines the file-system type |
|
Lists or provides labels for file systems when copied to tape (for use by the volcopy command only) |
|
Makes a new file system |
|
Mounts file systems and remote resources |
|
Mounts all file systems specified in a file-system table |
|
Generates a list of path names with their i-numbers |
|
Unmounts file systems and remote resources |
|
Unmounts all file systems specified in a file-system table |
|
Most of these commands also have a file system counterpart.
Do not use the file system commands directly. If you specify an operation on a file system that does not support it, the generic command displays this error message: command: Operation not applicable for FSType type.
Most of these commands use this syntax:
command [-F type] [-V] [generic-options] [-o specific-options] [special|mount-point] [operands]
The options and arguments to the generic commands are:
-F type
Specifies the type of file system. If you do not use this option, the command looks for an entry that matches special or mount point in the /etc/vfstab file. Otherwise, the default is taken from the file /etc/default/fs for local file systems and from the file /etc/dfs/fstypes for remote file systems.
-V
Echoes the completed command line. The echoed line may include additional information derived from /etc/vfstab. Use this option to verify and validate the command line. The command is not run.
generic-options
Options common to different types of file systems.
-o specific-options
A list of options specific to the type of file system. The list must have the following format: -o followed by a space, followed by a series of keyword [=value] pairs separated by commas with no intervening spaces.
special|mount-point
Identifies the file system. The name must be either the mount point or the special device file for the slice holding the file system. For some commands, the special file must be the raw (character) device; for other commands it must be the block device. In some cases, this argument is used as a key to search the file /etc/vfstab for a matching entry from which to obtain other information. In most cases, this argument is required and must come immediately after specific-options. However, the argument is not required when you want a command to act on all the file systems (optionally limited by type) listed in the /etc/vfstab file.
operands
Arguments specific to a type of file system. See the specific man page of the command (for example, mkfs_ufs(4) for a detailed description.
The default remote file system type is /etc/dfs/fstype. The default local file system type is /etc/default/fs. See the default_fs(4) man page for more information.
In previous SunOS releases, all file system commands were located in the /etc directory. In the SunOS release 5.7 software, file system commands are organized into separate hierarchies for convenience. All of the file system commands are included in /usr/lib/fs/fstype. Commands needed before /usr is mounted are duplicated in /etc/fs/fstype.
The generic commands are located in /usr/sbin. The commands needed before /usr is mounted are duplicated in /sbin.
Table 9-5 lists the locations of the file-system commands.
Table 9-5 Locations of File System Commands
Type |
Location of Primary Version |
Location of Duplicate Version (root) |
---|---|---|
Generic |
/usr/sbin |
/sbin |
Specific |
/usr/lib/fs |
To ignore access time updates on files, you can specify the o noatime option when mounting a UFS file system. This option reduces disk activity on file systems where access times are unimportant (for example, a Usenet news spool).
This section describes the changes to directories and files between the SunOS release 4.x and SunOS release 5.7 environment.
The /dev directory has changed from a flat directory to a hierarchical one. Table 9-6 describes the subdirectories that have been added.
Table 9-6 Additions to the /dev Directory
Subdirectory |
Description |
---|---|
Contains block disk devices |
|
Contains raw disk devices |
|
Contains pseudo terminal (pty) slave devices |
|
Contains raw tape devices |
|
Contains entry points for the STREAMS Administrative Driver |
|
Contains terminal devices |
The /etc directory contains system configuration information. Several files and subdirectories have been added, removed, or changed.
File system commands, such as mount*, have been moved to subdirectories of the /usr/lib/fs directory.
The SunOS release 4.x /etc/fstab file has been replaced by /etc/vfstab.
Initialization scripts, such as rc, rc.boot, rc.local, and rc.single, are not available in the SunOS release 5.7 software. They are replaced by the scripts shown in Table 9-7, which are run by their corresponding run control files. Table 9-8 describes the subdirectories that have been added to the SunOS release 5.7 /etc directory.
Scripts |
Run Control Files |
---|---|
/sbin/rc0 |
|
/etc/rc1.d |
/sbin/rc1 |
/etc/rc2.d |
/sbin/rc2 |
/etc/rc3.d |
/sbin/rc3 |
/etc/rc4.d |
/sbin/rc4 |
/etc/rc5.d |
/sbin/rc5 |
/etc/rc6.d |
/sbin/rc6 |
/sbin/rcS |
Table 9-8 Additions to the /etc Directory
Subdirectory |
Description |
---|---|
Defines default system configuration |
|
Defines Internet services configuration |
|
Defines LP system configuration |
|
Defines installed optional software |
|
Defines run-state transition operations |
|
Defines Service Access Facility (SAF) configuration |
In the SunOS release 5.7 software, the virtual file system file /etc/vfstab replaces the /etc/fstab file. In the virtual file system architecture, the /etc/vfstab file provides default file system parameters used by the generic commands for file system management. For information about these commands, see "Generic File System Commands".
In addition to the name change, the /etc/vfstab file is different from the /etc/fstab file in the following ways:
A device to fsck field has been added to specify the names of raw devices to be checked by fsck.
An automount field has been added to control the routine mounting of file systems by mountall (the automount daemon does not use this field).
The freq field, which specified the number of days between dumps, has been eliminated.
The file system table has seven fields, each separated by a tab. Table 9-9 explains the field entries.
You must have an entry in each field in the /etc/vfstab file. If there is no value for a field, be sure to type a dash (-).
Field Name |
Content |
---|---|
device to mount |
The entry in this field may be any of the following: The block special device for local UFS file systems (for example, /dev/dsk/c0t0d0s0) The resource name for remote file systems (for example, myserver:/export/home for an NFS system) The name of the slice on which to swap (for example, /dev/dsk/c0t3d0s1) The /proc directory and proc file system type CD-ROM as hsfs file system type /dev/diskette as pcfs or ufs file system type This field is also used to specify swap file systems. For more information on remote file systems, see NFS Administration Guide . |
device to fsck |
The raw (character) special device that corresponds to the file system identified by the device to mount field (for example, /dev/rdsk/c0t0d0s0). This field determines the raw interface that is used by fsck. Use a dash (-) when there is no applicable device, such as for a read-only file system or a network-based file system. |
mount point |
The default mount-point directory (for example, /usr for /dev/dsk/c0t0d0s6). |
FS type |
The type of file system identified by the device to mount field. |
fsck pass |
The pass number used by fsck to determine whether to check a file system. When the field contains a dash (-), the file system is not checked. When the field contains a value of 1 or more, the file system is checked; non-UFS file systems with a 0 fsck pass are checked. For UFS file systems only, when the field contains a 0, the file system is not checked. When fsck is run on multiple UFS file systems that have fsck pass values greater than 1 and the preen option (-o p) is used, fsck automatically checks the file systems on different disks in parallel to maximize efficiency. When the field contains a value of 1, the file system is checked sequentially. Otherwise, the value of the pass number does not have any effect. In SunOS 5.6 system software, the fsck pass field does not explicitly specify the order in which file systems are checked. |
automount? |
yes or no for whether the file system should be automatically mounted by mountall when the system is booted. An auto in the fourth column of your SunOS release 4.x /etc/fstab would translate to a "yes" in this column; a noauto, a "no." Note that this field has nothing to do with the automount program. |
mount options |
A list of comma-separated options (with no spaces) that are used in mounting the file system. Use a dash (-) to show no options. See the mount(1M) man page for a list of the available options. |
For detailed information about the /etc/vfstab file, see System Administration Guide, Volume I.
The SunOS release 5.7 software contains an /etc/shadow file, which includes entries that force password aging for individual user login accounts. The /etc/shadow file also contains encrypted passwords. The /etc/shadow file does not have general read permissions. This prevents general access to the encrypted passwords that formerly appeared in the /etc/passwd file.
The SunOS release 5.7 /sbin directory contains the rc scripts used to alter system run levels as well as the rcs script used to initialize the system prior to mounting file systems. See the rc man pages and "Changing System Run Levels" for a description of the scripts.
The SunOS release 5.7 /usr directory contains sharable files and executables provided by the system. Table 9-10 describes the subdirectories that have been added to the SunOS release 5.7 /usr directory.
Table 9-10 Additions to the /usr Directory
Subdirectory |
Description |
---|---|
C compilation systems |
|
Executables and other files used by admintool |
Table 9-11 shows files that were in the SunOS release 4.x /usr directory but have been moved in the SunOS release 5.7 software.
Table 9-11 Files Changed in the /usr Directory
SunOS release 4.x Location |
SunOS release 5.7 Location |
---|---|
/usr/sbin |
|
Contents removed |
|
/usr/bin |
|
/usr/lib |
|
/usr/include |
Appendix E, / and /usr File Systems Changes, contains tables with detailed information about the directories and files in each of these file systems.
The /var directory contains files that change sizes during normal operation. Several files and subdirectories in the /var directory have been added, removed, or changed.
The /var/opt/packagename directory contains software package objects that change sizes, such as log and spool files.
The SunOS release 4.x /var/spool/mail directory has been moved to /var/mail.
Two directories were added to the SunOS release 5.x file system: /kernel and /opt.
The SunOS release 5.7 /kernel directory contains the operating system kernel and kernel-level object modules that were in the SunOS release 4.x /sys directory. Table 9-12 describes the subdirectories that have been added to the /kernel directory.
Table 9-12 Additions to the /kernel Directory
Subdirectory |
Description |
---|---|
Device driver and pseudo-device driver modules |
|
Kernel modules to run ELF or a.out executable files |
|
Kernel modules that implement file systems such as ufs, nfs, proc, fifo, and so on |
|
Miscellaneous modules |
|
Modules containing scheduling classes and corresponding dispatch tables |
|
STREAMS modules |
|
Loadable system calls such as system accounting and semaphore operations |
|
Operating system kernel, loaded at boot time |
The SunOS release 5.7 /opt directory contains optional add-on application software packages. These packages were installed in the SunOS release 4.x /usr directory..
The /sys directory has been retired. Its files, used to reconfigure the kernel, have been made obsolete by the dynamic kernel.
The file system administration commands that have changed in the SunOS release 5.7 software include those for:
Mounting file systems
Monitoring file systems
Sharing file systems
Creating a new file system
Checking a file system
Backing up and restoring files
When you are ready to administer file systems on your SunOS release 5.7 system, see System Administration Guide, Volume I for details on performing the tasks involved.
The biggest change to the mounting capability is automatic mounting or autofs. The autofs program automatically mounts directories when you access them using, for example cd(1) or ls(1). This capability includes file hierarchies, CD-ROM, and diskette file systems.
autofs starts automatically when the system enters run level 3, or you can invoke it from a shell command line.
autofs works with the file systems specified in maps. These maps can be maintained as NIS, NIS+, or local files. The autofs maps can specify several remote locations for a particular file. This way, if one of the servers is down, autofs can try to mount from another system. You can specify in the maps which servers are preferred for each resource by assigning each server a weighting factor.
Mounting some file hierarchies with autofs does not exclude the ability to mount others with the mount command. A diskless system must have entries for / (root), /usr, and /usr/kvm in the /etc/vfstab file. Because shared file systems should always remain available, do not use autofs to mount /usr/share.
The following example shows how to manually mount a file system listed in the /etc/vfstab file using the mount command.
Change to the directory in which you want to create the mount point.
Create the mount-point directory.
Specify either the mount point or the block device.
Specifying the mount point is usually easier. The rest of the information is read from /etc/vfstab.
Become root and type the mount command, specifying either the mount point or the block device.
Specifying the mount point is usually easier. The rest of the information is read from /etc/vfstab.
# mount mount-point |
The file system is now mounted.
For instructions showing how to mount different types of file systems using mount with or without options, see System Administration Guide, Volume I.
Some of the names and forms of the mount commands are different, as listed in Table 9-13.
Table 9-13 mount Command Differences
SunOS Release 4.x |
SunOS release 5.7 |
---|---|
mount |
mount |
mount -a |
mountall |
umount |
|
exportfs | |
showmount -e |
See Appendix A, Commands Reference Table, for more information on changes to these commands.
In this release, the CD-ROM and diskette file systems are automatically mounted in /cdrom and /floppy when removable media are inserted into these drives. Since these file systems are now managed by the Volume Management daemon, vold(1M), you cannot mount these devices yourself. See "Using Volume Management " for more information.
In the SunOS release 5.7 system, you need to list file systems that you want mounted at system startup in your /etc/vfstab, instead of in the /etc/fstab file. The format of /etc/vfstab differs from that of /etc/fstab. For a discussion of the /etc/vfstab file, see "/etc/vfstab File ".
Table 9-14 shows the file and directory monitoring commands and changes, where they apply.
Table 9-14 File and Directory Monitoring Commands
Command |
Information Provided |
Change (if applicable) |
---|---|---|
Size, age, permissions, owner of files |
None |
|
Total size of directories and their contents |
None |
|
Disk space occupied by file systems, directories, or mounted resources; used and available disk space |
The SunOS release 4.x version of this command provides a different output format containing somewhat different output than the SunOS release 5.7 df command. The SunOS release 5.7 -k option provides output formats similar to those in the SunOS release 4.x command. The SunOS release 4.x df -t filesystem type reports on files of the specified type, whereas the SunOS release 5.7 df-t command prints full listings with totals. |
|
Number of blocks owned by users |
None |
|
Names of files meeting search criteria |
The -n cpio-device SunOS release 4.x option is not available in the SunOS release 5.7 command. Write the current file on device in cpio -c format. |
File systems were "exported" in the SunOS release 4.x software to make them available to other systems. This was done through the /etc/exports file and the exportfs command. However, only NFS systems could be exported.
In the SunOS release 5.7 software, this same concept is referred to as "sharing resources," and it has been expanded to include more file systems. File systems are shared with the share(1M) and shareall(1M) commands. The share command is similar to the exportfs pathname command, while shareall is similar to the exportfs -a command.
The share -F fstype option specifies the type of file system to be shared. If the -F option is not specified, share uses the first file-system type listed in the /etc/dfs/dfstab file.
File systems that you want to be shared automatically should have share command entries in the /etc/dfs/dfstab file (which replaces the /etc/export file). The commands specified in this file are run automatically when the system enters run level 3 (multiuser mode with network file sharing).
The following entry gives clients on mercury, venus, and mars read-write access to /export/home1; the second entry gives clients on saturn and jupiter read-only access to /export/news.
share -F nfs -o rw=mercury:venus:mars -d "Home Dir" /export/home1 share -F nfs -o ro=saturn:jupiter -d "News Postings" /export/news |
When the system is running in multiuser mode, these file systems are available to the clients listed. The share command displays all resources shared by the local system:
% share - /export/home1 rw=mercury:venus:mars "Home Dir" - /export/news ro=saturn:jupiter "News Postings" |
You define, specify, and create a new file system using either the newfs(1M) or the mkfs(1M) command. The following sections highlight changes in the newfs and mkfs commands.
The SunOS release 5.7 newfs command is a convenient front end to the mkfs command. The newfs command does not support the virtual file-system architecture; it is intended for creating UFS-type file systems only. When you use newfs, it calls and passes arguments to mkfs, which does the real work when creating a ufs file system.
The newfs command accepts only names that conform to the SunOS release 5.7 device naming conventions (see "Device Naming Conventions").
The SunOS release 5.7 mkfs command differs significantly from the SunOS release 4.x version of the command. The SunOS release 5.7 version provides for different file system types, and its command syntax is entirely different (see "Generic File System Commands"). Like newfs, mkfs accepts only names conforming to the SunOS release 5.7 device naming conventions.
Although mkfs now supports different types of file systems, in practice it is almost always used to create ufs file systems. However, mkfs isn't usually run directly; it is usually called by the newfs command.
See mkfs(1) man pages for additional details.
The SunOS release 5.7 fsck(1M) command differs significantly from the SunOS release 4.x version of the command. In keeping with the virtual file-system (VFS) architecture, the fsck file-checking utility has two parts:
A generic command that is called first, regardless of the type of file system.
A specific command that is called by the generic command, depending on the type of the target file system (see "Generic File System Commands").
In addition, fsck accepts only names conforming to the SunOS release 5.7 device naming conventions. For more information, see "Device Naming Conventions".
The fsck command performs faster consistency checks at mount time. In addition, the SunOS release 5.7 software does not require you to reboot the system after running fsck on the root and /usr file systems. This results in faster system startup compared to previous SunOS releases. The fsck -m command enables you to skip checking for file systems that are clean. See fsck(1m) for additional details.
This section discusses the changes to backup and restore commands and SunOS release 5.7 and describes how to use the ufsdump, ufsrestore, dd, tar, and cpio commands.
The SunOS release 4.x software supported several utilities for backing up and restoring files: dump, restore, tar, cpio, dd, and bar, as well as the unbundled Backup CoPilot program. This release supports all of these utilities except bar and Backup Copilot. SunOS release 4.x bar files can be restored on a SunOS release 5.7 system but you cannot create new bar files. The dump(8) and restore(8) commands were renamed ufsdump(1M) and ufsrestore(1M). Files created with the SunOS release 4.x dump command can be restored on a SunOS release 5.7 system with ufsrestore.
The SunOS release 5.7 software has two additional utilities for copying file systems: volcopy(1M) and labelit(1M).
The ufsdump command accepts the same command syntax as the SunOS release 4.x dump command. ufsdump also accepts options listed in Table 9-15.
Table 9-15 ufsdump Command Options Not Available With the dump Command
Option |
Function |
---|---|
-l |
Autoload. When reaching the end of a tape (before completing the dump), take the drive off line and wait up to two minutes for the tape drive to be ready again. This gives autoloading (stackloader) tape drives a chance to load a new tape. If the drive is ready within two minutes, continue. If it is not ready after two minutes, prompt an operator to load another tape, as usual, and wait. |
-o |
Off line. When finished with a tape or diskette (completing the dump or reaching the end of the medium), take the drive off line. In the case of a diskette drive, also eject the diskette. In the case of a tape drive, also rewind the tape. This prevents another process that rushes in to use the drive from inadvertently converting the data. |
-S |
Estimate size of dump. Determine the amount of space that is needed to perform the dump and output a single number indicating the estimated size of the dump in bytes. This is most useful for incremental backups. |
Unlike dump, ufsdump can detect the end of medium, so you no longer have to use the -s size option to force dump programs to move to the next tape before reaching the end. Nevertheless, to ensure compatibility with older versions of the restore command, the -s option has been retained in ufsdump.
Even though ufsdump now can detect the end of medium, it has no way to predict the number of diskettes or tapes needed for a dump--unless you specify the medium size with the -s option. Therefore, the messages displayed at the start of a backup do not indicate the number of diskettes or tapes required unless you have specified the medium size.
The -w and -W options behave a little differently in the SunOS release 5.7 software. In the SunOS release 4.x software, these options list all file systems that are scheduled for backup according to the backup frequencies specified in the /etc/fstab file. Since the SunOS release 5.7 equivalent file, /etc/vfstab, has no provision for specifying backup frequencies, these options now assume that each file system will be backed up daily. Therefore, they now list any file systems that have not been backed up within a day.
When performing backups across the network (backing up local file systems to a remote tape drive), use the device naming convention that's appropriate for the system with the tape drive. If the system with the tape drive is a SunOS release 5.7 system, use the device naming convention to identify the tape drive; otherwise, use the SunOS release 4.x convention.
The ufsrestore command in the SunOS release 5.7 software is similar to the restore command in the SunOS release 4.x software. You will be able to restore backups made with the SunOS release 4.x dump command with one exception: you cannot restore multivolume backups from diskette. If you have backup scripts that invoke restore, change them to invoke ufsrestore instead.
In the SunOS release 4.x version of the dd command, the size suffix -w (words) denotes a size unit of 4 bytes. In the SunOS release 5.7 version, -w denotes a unit of 2 bytes. In addition, the SunOS release 5.7 version now supports the -unblock and -block conversion options.
Because they use a nonbinary format, the tar and cpio commands are the only utilities to successfully interchange data between SVR4 implementations. Other backup utilities, such as ufsdump and dd, are unique to the vendor and are not guaranteed to work successfully from one SVR4 implementation to another.
The tar command is unchanged in this release; it accepts the same options and command syntax as the SunOS release 4.x command. However, since the device naming scheme has changed in the SunOS release 5.7 software, the tarfile (or device) argument is affected. When using the -f function modifier, specify the device argument as /dev/rmt/unit, where unit is a tape drive number and density. Table 9-16 shows the tape drive density characters in tape device names.
Table 9-16 Tape Drive Density Characters in Tape Device Names
Density |
Description |
---|---|
Null |
Default "preferred" (highest) density |
l |
Low |
m |
Medium |
h |
High |
c |
Compressed |
u |
Ultra |
The tar command no longer uses /dev/rmt8 as its default output device. When the -f modifier is not used and the TAPE
environment variable is not set, the tar command uses the defaults set in the /etc/default/tar file.
The SunOS release 5.7 cpio command supports the SunOS release 4.x options and command syntax. cpio has been expanded to include many new options, as listed in Table 9-17.
Table 9-17 Additional cpio Options
Option |
Command Available With Option |
Description |
---|---|---|
-A |
cpio -o |
Appends files to an archive. |
-k |
cpio -i |
Attempts to skip corrupt file headers and I/O errors encountered. This option lets you copy files from a medium that is corrupted or out of sequence. |
-L |
cpio -o or cpio -p |
Follows symbolic links. |
-V |
cpio -i, cpio -o, or cpio -p |
Special verbose. Prints a dot for each file read or written. This option assures you that cpio is working, without printing all file names. |
-C bufsize |
cpio -i or cpio -o |
Blocks I/O bufsize bytes to the record, where bufsize is a positive integer. When neither -C nor -B is specified, the default buffer size is 512 bytes. |
-E filename |
cpio -i |
Specifies and inputs file containing a list of file names to be extracted from the archive. |
-H header |
cpio -i or cpio -o |
Reads or writes header information in header format. header can be one of: bar (read only), crc, CRC, odc, tar, TAR, ustar, or USTAR. |
-I filename |
cpio -i |
Reads filename as an input archive. |
-M message |
cpio -i -I filename or cpio -o -O filename |
Defines a message to use when switching media. |
-O filename |
cpio -o |
Directs the output to filename. |
-R userid |
cpio -i or cpio -p |
Reassigns ownership and group information for each file to userid. |
cpio requires one of three mutually exclusive options to specify the action to take: -i (copy in), -o (copy out), or -p (pass).
The Solaris 7 release provides UFS logging, the process of storing transactions (changes that make up a complete UFS operation) into a log before the transactions are applied to the UFS File system. Once a transaction is stored, the transaction can be applied to the file system later.
UFS logging provides two advantages. It prevents file systems from becoming inconsistent, therefore eliminating the need to run fsck(1M). And, because fsck can be bypassed, UFS logging reduces the time required to reboot a system if it crashes, or after an unclean halt.
UFS logging is not enabled by default. To enable UFS logging, you must specify the -o logging option with the mount(1M) command when mounting the file system. Also, the fsdb(1M) command has been updated with new debugging commands to support UFS logging.
See System Administration Guide, Volume I, for more information.