Flylib.com

Books Software

 
 
 

Certification Summary


Certification Summary

Everything in Solaris is a file—for example, a regular file, a directory, a link, a command, and a device. Information about a file is contained inside a data structure called an inode. The maximum number of modes you can create on a file system determines the maximum number of files that can be created and depends on the file system size . The files are grouped into a directory, and the directories in turn are organized into an inverted hierarchy tree with root (/) at the top.

Files can be stored on a permanent storage medium (the disk) or in a volatile storage medium (the memory); the corresponding file systems are called disk-based file systems and memory-based file systems. Files can. be stored in such a way that they can be accessed across systems over a network. The file systems that support this access are called distributed or network-based file systems. File system inconsistencies are detected and fixed by using the fsck command, which is automatically run during booting. If you run the fsck command manually, make sure you unmount the file system before running fsck on it.

Solaris offers commands to monitor disk space usage at different levels of detail: df at the file system level, du at the file level, and quot at the user level. If you do not want your users to access a file or a directory directly, create links that point to these files or directories. A hard link can point only to a file and not to a directory, and only to a file existing on the same file system where the link itself is. A symbolic link, in contrast, can point to a file or a directory and can span across file systems. Furthermore, you cannot create a hard link for a non-existent file, whereas you can create a symbolic link for it. Links can be removed with the same rm command that is used to remove files.

Most of the file systems that you will manage as a system administrator reside on a disk, and the disk must be managed as well. Therefore, in the next chapter we will explore disk management.

Inside the Exam

Comprehend

  • Only the connected devices have entries in the /devices directory, and the /dev directory contains symbolic links to these entries (files).

  • Unmount a file system before running the fsck command on it, in order to avoid generating inconsistencies during the repair.

  • A hard link cannot point to a file across the file systems because the file and the link must have the same inode.

Look Out

  • The fsck is used not only to check the file system inconsistencies but to repair them.

  • {% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}

    Deleting a file in the /proc directory does not kill the corresponding process.

  • Files in the /tmp and /var/run directories are deleted when the system is rebooted.

  • The command ln creates a hard link by default if you do not give the option - s for creating the symbolic link.

Memorize

  • Logging is enabled by default in Solaris 10 UFS.

  • You can create a multiterabyte UFS in Solaris 10 with a size of up to 16 terabytes and a maximum file size of up to about 1 terabyte.

  • A hard link can only point to a file, whereas a symbolic link can point to either a file or a directory.

  • The /tmp directory contains temporary non-system files, whereas the /var/run directory contains the temporary system file.



Two-Minute Drill

Exploring the Solaris Directory Hierarchy

q   

Everything in Solaris is a file: regular files, directories, commands, links, devices, etc.

q   

Information about a file is contained inside a data structure called inode.

q   

The maximum number of files that you can create on a system depends on the maximum number of inodes that you can create, which in turn depends on the size of the file system.

Understanding Solaris File Systems

q   

The general associations of disk-based file systems to the storage media are as follows : HSFS is created on a CD-ROM, PCFS on a diskette, UDF on a DVD, and UFS on a hard disk.

q   

Solaris 10 supports network file system (NFS) version 4.

q   

Solaris supports the following memory-based file systems: cache file system, loopback file system, process file system, and temporary file system.

q   

The /proc directory contains information about the active processes on the system.

q   

The devices on Solaris 10 are managed by device file system ( devfs ), which is mounted to /devices .

q   

UNIX file system (UFS) is the default file system for Solaris.

Managing File System Inconsistencies and Disk Space

q   

File system inconsistencies arise when the system is shut down improperly or from hardware errors, such as disk errors.

q   

The inconsistencies can be checked and repaired by using the fsck command.

q   

The fsck runs automatically during the system bootup .but can be executed manually any time after the system is up and running.

q   

You must unmount a file system before running fsck on it.

q   

The df command is used to get a report on disk usage by the file systems.

q   

The du command is used to get a report on disk usage by directories and files.

q   

The quot command is used to get a report on disk usage by users.

q   

The links are created with the following command:

ln [-fs] <source> [<target>]

q   

The hard link is created by default, whereas the symbolic link is created with the -s option.

q   

The links are removed with the following command:

rm [<linkName>]

q   

A file can be removed without removing its symbolic link, but all of its hard links must be removed. Unless the last hard link is removed, the file content will still exist.