[ Team LiB ] Previous Section Next Section

Types of File Systems

The Solaris Operating Environment supports three types of file systems.

  • Disk based.

  • Network based.

  • Virtual (previously called pseudo).

Disk-Based File Systems

Disk-based file systems are stored on physical media such as hard disks, CD-ROMs, diskettes, and DVD discs. Disk-based file systems can be written in different formats. The following list describes the available formats.

  • UFS— UNIX file system (based on the BSD Fat Fast File system that was provided in the 4.3 Tahoe release). The default disk-based file system in Solaris system software is UFS. Before you can create a file system on a disk, the disk must be formatted and divided into slices (partitions).

  • S5FS— IA UNIX file system (based on the BSD Fat Fast File system that was provided in the 4.3 Tahoe release). The default disk-based file system in Solaris IA system software is S5FS.

  • HSFS— High Sierra and ISO 9660 file system. High Sierra is the first CD-ROM file system; ISO 9660 is the official standard. The HSFS file system is used on CD-ROM and is a read-only file system. The Solaris HSFS supports Rock Ridge extensions to ISO 9660, which provide all UFS file system semantics and file types except for writability and hard links.

  • PCFS— The PC file system allows read/write access to data and programs on DOS-formatted diskettes written for DOS-based personal computers.

  • UDFS— Universal Disk Format file system, new in the Solaris 8 release, is the industry-standard format for storing information on the optical media technology called DVD (Digital Versatile Disc or Digital Video Disc). See "Using DVD-ROM Devices" on page 256 for more information.

    UDFS support is provided in the following new packages.

    • SUNWudfr—32-bit kernel component.

    • SUNWudfrx—64-bit kernel component.

    • SUNWudf/usr component.

    The Solaris UDF file system provides the following features.

    • Access to industry-standard CD-ROM and DVD-ROM media when they contain a UDF file system.

    • Flexibility in exchanging information across platforms and operating systems.

    • A mechanism for implementing, according to the DVD video specification based on the UDF format, new applications that offer broadcast-quality video, high-quality sound, and interactivity.

    This UDF release does not contain the following features.

    • Support for write-once media, CD-RW, and DVD-RAM, with either the sequential disk-at-once and incremental recording.

    • UFS components such as quotas, ACLs, transaction logging, file system locking, and file system threads. These components are not part of the UDF 1.50 specification.

The System V (S5) file system traditionally provided with System V releases is not included in the Solaris Operating Environment because of significant limitations, such as a maximum of 64,000 files in a file system, a restriction of 14 characters for file names, and lack of a quota facility.

Each type of disk-based file system is customarily associated with a particular media device.

  • UFS and S5FS with hard disk and any other media (CD-ROM, DVD, diskette).

  • HSFS with CD-ROM.

  • PCFS with diskette.

  • UDF with DVD.

These associations are not, however, restrictive. For example, CD-ROMs and diskettes can have UFS file systems installed on them.

Network-Based File Systems

Network-based file systems are file systems that are accessed over the network. Typically, network-based file systems are file systems that reside on one system and are accessed by other systems across the network. The available network-based file system is the NFS network, or distributed file system.

With NFS you can administer distributed resources (files or directories) by sharing them (exporting them from a server) and mounting them on individual systems. See "Making File Systems Available" on page 199 for more information.

Virtual File Systems

Virtual file systems (previously called pseudo file systems) are virtual or memory-based file systems that provide access to special kernel information and facilities. Most virtual file systems do not use file system disk space. Some virtual file systems, such as the temporary file system, may, however, use the swap space on a physical disk. Cache file systems use a file system on the disk to contain the cache.

The Cache File System (CacheFS)

You can use the Cache file system to improve performance of remote file systems or slow devices such as CD-ROM drives. 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. See "Cache File Systems" on page 223 for more information.

The Temporary File System (TMPFS)

The TMPFS file system uses local memory for disk reads and writes. Access to files in a TMPFS file system is typically much faster than access to files in a UFS file system. Files in the TMPFS file system are not permanent. They cease to exist when the file system is unmounted and when the system is shut down. When the system is rebooted, the entire file system is recreated.

TMPFS is the default file system type for the /tmp directory in the Solaris Operating Environment. You can copy or move files into or out of the /tmp directory, just as you would in a UFS /tmp file system.

TMPFS file systems can improve system performance by saving the cost of reading and writing temporary files to a local disk or across the network. For example, temporary files are created when you compile a program. The operating system generates a lot of disk or network input and output activity while manipulating these files. Using TMPFS file systems to hold these temporary files can significantly speed up their creation, manipulation, and deletion.

The TMPFS file system uses swap space as a temporary storage area. If a system with a TMPFS file system does not have adequate swap space, two problems can occur.

  • The TMPFS file system can run out of space, just as a regular file system can fill up.

  • Because TMPFS allocates swap space to save file data (if necessary), some programs may not be able to execute because there is not enough swap space.

See Chapter 9, "Administering Systems," for information about increasing swap space.

The Loopback File System (LOFS)

The LOFS file system lets you create a new virtual file system. You can access files through an alternative path name. For example, you can create a loopback mount of / onto /tmp/newroot. The entire file system hierarchy looks like it is duplicated under /tmp/newroot, including any file systems that were mounted from NFS servers. All files are accessible either with a path name starting from / or with a path name starting from /tmp/newroot until a different file system is mounted in /tmp/newroot or any of its subdirectories. See "Making File Systems Available" on page 199 for more information about mounting and unmounting file systems.

The Process File System (PROCFS)

graphics/new.gif

The PROCFS file system maps all processing information into a file system so that you can use the file system programming paradigm to manipulate and debug processes and perform accounting and other activities.

The PROC file system resides in memory. It contains a list of active processes, by number, in the /proc directory. Information in the /proc directory is used by commands such as ps. Debuggers and other development tools can also access the address space of the processes by using file system calls. The following example shows a listing of the contents of the /proc directory.


paperbark% ls -l /proc
total 128
dr-x--x--x   5 root      root      736 May 11 08:45 0
dr-x--x--x   5 root      root      736 May 11 08:45 1
dr-x--x--x   5 root      root      736 May 11 08:46 108
dr-x--x--x   5 root      root      736 May 11 08:46 125
dr-x--x--x   5 root      root      736 May 11 08:46 155
dr-x--x--x   5 root      root      736 May 11 08:46 161
dr-x--x--x   5 daemon    daemon    736 May 11 08:46 165
dr-x--x--x   5 root      root      736 May 11 08:46 168
dr-x--x--x   5 root      root      736 May 11 08:46 179
dr-x--x--x   5 root      root      736 May 11 08:46 185
dr-x--x--x   5 root      root      736 May 11 08:46 195
dr-x--x--x   5 root      root      736 May 11 08:45 2
dr-x--x--x   5 root      root      736 May 11 08:46 200
dr-x--x--x   5 root      root      736 May 11 08:46 213
dr-x--x--x   5 root      root      736 May 11 08:46 222
dr-x--x--x   5 root      root      736 May 11 08:46 225
dr-x--x--x   5 root      root      736 May 11 08:46 227
dr-x--x--x   5 daemon    other     736 May 11 08:46 241
dr-x--x--x   5 daemon    other     736 May 11 08:46 242
dr-x--x--x   5 root      root      736 May 11 08:46 275
dr-x--x--x   5 root      root      736 May 11 08:45 3
dr-x--x--x   5 root      root      736 May 11 08:46 304
dr-x--x--x   5 root      root      736 May 11 08:46 317
dr-x--x--x   5 root      root      736 May 11 08:46 323
dr-x--x--x   5 root      root      736 May 11 08:46 324
dr-x--x--x   5 root      root      736 May 11 08:46 333
dr-x--x--x   5 root      root      736 May 11 08:46 336
dr-x--x--x   5 root      root      736 May 11 08:46 337
dr-x--x--x   5 root      staff     736 May 11 08:46 340
dr-x--x--x   5 root      root      736 May 11 08:46 346
dr-x--x--x   5 root      root      736 May 11 08:46 349
dr-x--x--x   5 root      root      736 May 11 08:46 350
dr-x--x--x   5 root      root      736 May 11 08:46 357
dr-x--x--x   5 root      root      736 May 11 08:47 370
dr-x--x--x   5 winsor    staff     736 May 11 08:47 375
dr-x--x--x   5 winsor    staff     736 May 11 08:47 385
dr-x--x--x   5 winsor    staff     736 May 11 08:47 389
dr-x--x--x   5 winsor    staff     736 May 11 08:47 421
dr-x--x--x   5 winsor    staff     736 May 11 08:47 422
dr-x--x--x   5 winsor    staff     736 May 11 08:47 424
dr-x--x--x   5 winsor    staff     736 May 11 08:47 439
dr-x--x--x   5 root      root      736 May 11 08:45 44
dr-x--x--x   5 winsor    staff     736 May 11 08:47 440
dr-x--x--x   5 root      root      736 May 11 08:47 441
dr-x--x--x   5 winsor    staff     736 May 11 08:47 447
dr-x--x--x   5 winsor    staff     736 May 11 08:47 449
dr-x--x--x   5 winsor    staff     736 May 11 08:47 450
dr-x--x--x   5 winsor    staff     736 May 11 08:47 451
dr-x--x--x   5 winsor    staff     736 May 11 08:47 452
dr-x--x--x   5 winsor    staff     736 May 11 08:47 453
dr-x--x--x   5 winsor    staff     736 May 11 08:47 455
dr-x--x--x   5 root      root      736 May 11 08:45 46
dr-x--x--x   5 winsor    staff     736 May 11 08:48 461
dr-x--x--x   5 winsor    staff     736 May 11 08:48 462
dr-x--x--x   5 winsor    staff     736 May 11 08:48 463
dr-x--x--x   5 winsor    staff     736 May 11 08:48 464
dr-x--x--x   5 winsor    staff     736 May 11 08:48 466
dr-x--x--x   5 root      root      736 May 11 08:48 468
dr-x--x--x   5 winsor    staff     736 May 11 08:48 470
dr-x--x--x   5 winsor    staff     736 May 11 08:48 473
dr-x--x--x   5 winsor    staff     736 May 11 08:48 476
dr-x--x--x   5 winsor    staff     736 May 11 08:48 483
dr-x--x--x   5 winsor    staff     736 May 11 08:48 486
dr-x--x--x   5 winsor    staff     736 May 11 09:36 521
paperbark%

NOTE. /proc files do not use disk space, so there is little reason to delete files from this directory.


The /proc directory does not require any system administration.

Starting with the Solaris 2.6 release, the flat /proc file system is restructured into a directory hierarchy that contains additional subdirectories for state information and control functions. It also provides a watchpoint facility that remaps read/write permissions on the individual pages of the address space of a process. This facility has no restrictions and is multithread (MT) safe.

The new /proc file structure provides complete binary compatibility with the old /proc interface except that the new watchpoint facility cannot be used with the old interface. Debugging tools have been modified to use the new /proc watchpoint facility, which means the entire watchpoint process is faster.

The following restrictions no longer apply to setting watchpoints with the dbx debugging tool.

  • Setting watchpoints on local variables on the stack because of SPARC register windows.

  • Setting watchpoints on multithreaded processes.

For more information, refer to the proc(4), core(4), and adb(4) manual pages.

The /etc/mnttab File System (MNTFS)

The system modifies the /etc/mnttab (mount table) whenever you mount or unmount a file system. In previous Solaris releases, the /etc/mnttab mount table was a text-based file that stored information about mounted file systems. This file could get out of sync with the state of mounted file systems.

In the Solaris 8 release, /etc/mnttab is an MNTFS file system that provides read-only information directly from the kernel about mounted file systems for the local system.

Because of this structural difference, the following mnttab behavior is changed.

  • Programs or scripts cannot write to /etc/mnttab.

  • The mount -m option for faking mnttab entries no longer works.

MNTFS requires no administration. See mnttab(4) for more information.

You can display the contents of the /etc/mnttab file with the cat or more commands, but you cannot edit it. The following example shows an /etc/mnttab file. You can use the grep command to search for specific entries in the /etc/mnttab file.


paperbark% more /etc/mnttab
/dev/dsk/c0t0d0s0       /       ufs
 rw,intr,largefiles,onerror=panic,suid,de
v=800000        958013089
/proc   /proc   proc    dev=2d80000     958013088
fd      /dev/fd fd      rw,suid,dev=2e40000     958013090
mnttab  /etc/mnttab     mntfs   dev=2f40000     958013092
swap    /var/run        tmpfs   dev=1   958013092
swap    /tmp    tmpfs   dev=2   958013094
/dev/dsk/c0t0d0s7       /export/home    ufs
 rw,intr,largefiles,onerror=panic
,suid,dev=800007      958013094
/dev/dsk/c0t1d0s7     /export/home0     ufs
 rw,intr,largefiles,onerror=panic
,suid,dev=80000f       958013094
-hosts  /net   autofs  indirect,nosuid,ignore,nobrowse,dev=3000001
 95801311
8
auto_home      /home   autofs  indirect,ignore,nobrowse,dev=3000002
 95801311
8
-xfn    /xfn   autofs  indirect,ignore,dev=3000003     958013118
paperbark:vold(pid228) /vol    nfs     ignore,dev=2fc0001      958013123
paperbark%



Additional Virtual File Systems

The following additional types of virtual file systems are listed for your information. They do not require administration.

  • FIFOS (first-in first-out)— Named pipe files that give processes common access to data.

  • FDFS (file descriptors)— Provides explicit names for opening files using file descriptors.

  • NAMEFS— Used mostly by STREAMS for dynamic mounts of file descriptors on top of files.

  • SPECFS (special)— Provides access to special character and block devices.

  • SWAPFS— Slice or file system used by the kernel when you create additional swap space with the swap command. When you put the swap file in a file system, you first create a special file with the mkfile command.

    [ Team LiB ] Previous Section Next Section