JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 8/11 Information Library
search filter icon
search icon

Document Information

About This Book

1.  Managing Removable Media (Overview)

2.  Managing Removable Media (Tasks)

3.  Accessing Removable Media (Tasks)

4.  Writing CDs and DVDs (Tasks)

5.  Managing Devices (Overview/Tasks)

6.  Dynamically Configuring Devices (Tasks)

7.  Using USB Devices (Overview)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

12.  SPARC: Setting Up Disks (Tasks)

13.  x86: Setting Up Disks (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

What's New in Oracle Solaris File Systems?

File System Monitoring Tool (fsstat)

Oracle Solaris ZFS File System

Enhancements to UFS File System Utilities (fsck, mkfs, and newfs)

Automatic Search for Backup Superblocks

fsck Reports When it Needs to be Rerun

New fsck Messages Regarding Extended Attributes

Better Handling of Duplicate Blocks or Fragments

Where to Find File System Management Tasks

Overview of File Systems

Types of Oracle Solaris File Systems

Oracle Solaris Disk-Based File Systems

The Universal Disk Format (UDFS) File System

Network-Based File Systems

Virtual File Systems

CacheFS File System

NFS Version 4 and CacheFS Compatibility Issues

Temporary File System

The Loopback File System

Process File System

Additional Virtual File Systems

Platform-Specific Libraries

Extended File Attributes

Swap Space

Commands for UFS File System Administration

How File System Commands Determine the File System Type

Manual Pages for Generic and Specific File System Commands

Default Oracle Solaris File Systems

UFS File System

UFS File System Features

Planning UFS File Systems

Support of Multiterabyte UFS File Systems

Features of Multiterabyte UFS File Systems

Limitations of Multiterabyte UFS File Systems

Where to Find Multiterabyte UFS Tasks

UFS Logging

UFS Snapshots

UFS Direct Input/Output (I/O)

Overview of Mounting and Unmounting File Systems

The Mounted File System Table

The Virtual File System Table

The NFS Environment

NFS Version 4

Automounting (autofs)

Determining a File System's Type

How to Determine a File System's Type

17.  Creating and Mounting File Systems (Tasks)

18.  Using The CacheFS File System (Tasks)

19.  Configuring Additional Swap Space (Tasks)

20.  Checking UFS File System Consistency (Tasks)

21.  UFS File System (Reference)

22.  Backing Up and Restoring UFS File Systems (Overview)

23.  Backing Up UFS Files and File Systems (Tasks)

24.  Using UFS Snapshots (Tasks)

25.  Restoring UFS Files and File Systems (Tasks)

26.  UFS Backup and Restore Commands (Reference)

27.  Copying Files and File Systems (Tasks)

28.  Managing Tape Drives (Tasks)

Index

Overview of Mounting and Unmounting File Systems

Before you can access the files on a file system, you need to mount the file system. When you mount a file system, you attach that file system to a directory (mount point) and make it available to the system. The root (/) file system is always mounted. Any other file system can be connected or disconnected from the root (/) file system.

Most file systems are automatically mounted by SMF services at system boot time. Generally, you do not need to mount or unmount file systems manually. For more information about mounting different file system types, see Mounting and Unmounting Oracle Solaris File Systems.

When you mount a file system, any files or directories in the underlying mount point directory are unavailable as long as the file system is mounted. These files are not permanently affected by the mounting process. They become available again when the file system is unmounted. However, mount directories are typically empty because you usually do not want to obscure existing files.

For example, the following figure shows a local file system, starting with a root (/) file system and the sbin, etc, and opt subdirectories.

Figure 16-1 Sample UFS root (/) File System

image:Diagram shows sample UFS root (/) file system with partial entries from the sbin, etc, and opt directories listed.

To access a local file system from the /opt file system that contains a set of unbundled products, you must do the following:

Figure 16-2 Mounting a UFS File System

image:Diagram shows a UFS file system mounted on the /opt/unbundled directory with a listing of the newly accessible items in the /opt/unbundled directory.

For step-by-step instructions on how to mount file systems, see Mounting and Unmounting Oracle Solaris File Systems.

The Mounted File System Table

Whenever you mount or unmount a file system, the /etc/mnttab (mount table) file is modified with the list of currently mounted file systems. You can display the contents of this file by using the cat or more commands. However, you cannot edit this file. Here is an example of an /etc/mnttab file:

$ more /etc/mnttab
rpool/ROOT/s10zfsBE     /       zfs     dev=4010002     0
/devices        /devices        devfs   dev=53c0000     1307136647
ctfs    /system/contract        ctfs    dev=5440001     1307136648
proc    /proc   proc    dev=5400000     1307136648
mnttab  /etc/mnttab     mntfs   dev=5480001     1307136648
swap    /etc/svc/volatile       tmpfs   xattr,dev=54c0001       1307136648
objfs   /system/object  objfs   dev=5500001     1307136648
sharefs /etc/dfs/sharetab       sharefs dev=5540001     1307136648
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1   ...
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 ...
fd      /dev/fd fd      rw,dev=56c0001  1307136677
swap    /tmp    tmpfs   xattr,dev=54c0002       1307136678
swap    /var/run        tmpfs   xattr,dev=54c0003       1307136678
rpool/export    /export zfs     rw,devices,setuid,nonbmand,exec ...
rpool/export/home       /export/home    zfs     rw,devices, ...
rpool   /rpool  zfs     rw,devices,setuid,nonbmand,exec,

The Virtual File System Table

Most file systems are mounted automatically by an SMF service at system boot time.

Manually mounting file systems every time you wanted to access them would be a very time-consuming and error-prone. To avoid these problems, the virtual file system table (the /etc/vfstab file) provides a list of file systems and information on how to mount them.

The /etc/vfstab file provides two important features:

A default /etc/vfstab file is created when you install a system, depending on the selections during installation. To add an entry, the information you need to specify is as follows:

The following is an example of an /etc/vfstab file for a system that runs a UFS root file system. Comment lines begin with #. This example shows an /etc/vfstab file for a system with two disks (c0t0d0 and c0t3d0).

$ more /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/c0t0d0s6  /dev/rdsk/c0t0d0s6 /usr             ufs     1       no      -
/dev/dsk/c0t0d0s7  /dev/rdsk/c0t0d0s7 /export/home     ufs     2       yes     -
/dev/dsk/c0t0d0s5  /dev/rdsk/c0t0d0s5 /opt             ufs     2       yes     -
/devices           -                  /devices         devfs   -       no      -
sharefs            -                  /etc/dfs/sharetabsharefs -       no      -
ctfs               -                  /system/contract ctfs    -       no      -
objfs              -                  /system/object   objfs   -       no      -
swap               -                  /tmp             tmpfs   -       yes     -

In this example, root (/) and /usr, the mount at boot field value is specified as no. These file systems are mounted by the kernel as part of the boot sequence before the mountall command is run.

The following vfstab example if from a system that runs a ZFS root file system.

# 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/zvol/dsk/rpool/swap -      -               swap    -       no      -
/devices        -              /devices         devfs   -       no      -
sharefs         -              /etc/dfs/sharetabsharefs -       no      -
ctfs            -              /system/contract ctfs    -       no      -
objfs           -              /system/object   objfs   -       no      -
swap            -              /tmp             tmpfs   -       yes     -

ZFS file systems are mounted automatically by the SMF service at boot time. You can mount ZFS file systems from the vfstab by using the legacy mount feature. For more information, see Oracle Solaris ZFS Administration Guide.

For descriptions of each /etc/vfstab field and information on how to edit and use the file, see vfstab(4).

The NFS Environment

NFS is a distributed file system service that can be used to share resources (files or directories) from one system, typically a server, with other systems on the network. For example, you might want to share third-party applications or source files with users on other systems.

NFS makes the actual physical location of the resource irrelevant to the user. Instead of placing copies of commonly used files on every system, NFS allows you to place one copy on one system's disk and let all other systems access it from the network. Under NFS, remote files are virtually indistinguishable from local files.

For more information, see Chapter 4, Managing Network File Systems (Overview), in System Administration Guide: Network Services.

A system becomes an NFS server if it has resources to share on the network. A server keeps a list of currently shared resources and their access restrictions (such as read/write or read-only access).

When you share a resource, you make it available for mounting by remote systems.

You can share a resource in these ways:

For a complete description of NFS, see Chapter 4, Managing Network File Systems (Overview), in System Administration Guide: Network Services.

NFS Version 4

Oracle's implementation of the NFS version 4 distributed file access protocol is included in the Oracle Solaris release.

NFS version 4 integrates file access, file locking, and mount protocols into a single, unified protocol to ease traversal through a firewall and improve security. The Oracle Solaris implementation of NFS version 4 is fully integrated with Kerberos V5, also known as SEAM, thus providing authentication, integrity, and privacy. NFS version 4 also enables the negotiation of security flavors to be used between the client and the server. With NFS version 4, a server can offer different security flavors for different file systems.

For more information about NFS Version 4 features, see What’s New With the NFS Service in System Administration Guide: Network Services.

Automounting (autofs)

You can mount NFS file system resources by using a client-side service called automounting (or autofs). The autofs service enables a system to automatically mount and unmount NFS resources whenever you access them. The resource remains mounted as long as you remain in the directory and are using a file within that directory. If the resource is not accessed for a certain period of time, it is automatically unmounted.

The autofs service provides the following features:

The autofs service is initialized by the automount utility, which runs automatically when a system is booted. The automountd daemon runs continuously and is responsible for the mounting and unmounting of NFS file systems on an as-needed basis. By default, the /home file system is mounted by the automount daemon.

With autofs, you can specify multiple servers to provide the same file system. This way, if one of these servers is down, autofs can try to mount the file system from another machine.

For complete information on how to set up and administer autofs, see Chapter 5, Network File System Administration (Tasks), in System Administration Guide: Network Services.