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)

17.  Creating and Mounting File Systems (Tasks)

Creating Oracle Solaris File Systems

Creating ZFS File Systems

Creating UFS File Systems

Creating a Temporary File System

Creating a LOFS File System

Mounting and Unmounting Oracle Solaris File Systems

Field Descriptions for the /etc/vfstab File

Prerequisites for Unmounting Oracle Solaris File Systems

Creating and Mounting Oracle Solaris File Systems

How to Create an ZFS File System

How to Create and Mount a UFS File System

How to Create a Multiterabyte UFS File System

How to Expand a Multiterabyte UFS File System

How to Expand a UFS File System to a Multiterabyte UFS File System

Troubleshooting Multiterabyte UFS File System Problems

How to Create and Mount a TMPFS File System

How to Create and Mount an LOFS File System

How to Add an Entry to the /etc/vfstab File

How to Mount a File System (/etc/vfstab File)

How to Mount a UFS File System (mount Command)

How to Mount a UFS File System Without Large Files (mount Command)

How to Mount an NFS File System (mount Command)

x86: How to Mount a PCFS (DOS) File System From a Hard Disk (mount Command)

How to Stop All Processes Accessing a File System

How to Unmount a File System

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

Mounting and Unmounting Oracle Solaris File Systems

ZFS file systems are mounted and unmounted automatically. You can make a legacy UFS file system available by mounting it, which attaches the file system to the system directory tree at the specified mount point. The root (/) file system is always mounted.

The following table provides guidelines on mounting file systems based on how you use them.

Mount Type Needed
Suggested Mount Method
Local or remote file systems that need to be mounted infrequently.
The mount command that you type manually from the command line.
Local UFS file systems that need to be mounted frequently. Local ZFS file systems are automatically mounted by an SMF service.
The /etc/vfstab file, which mounts the file system automatically when the system is booted in multi user state.
Remote UFS file systems, such as home directories, that need to be mounted frequently.
  • The /etc/vfstab file, which automatically mounts the file system when the system is booted in multiuser state.
  • autofs, which automatically mounts the file system when you access it or unmounts the file system when you change to another directory.

You can mount removable media that contains a file system by inserting the media into the drive and running the volcheck command, if necessary. For more information on mounting removable media, see Chapter 1, Managing Removable Media (Overview).

You can determine which file systems are already mounted by using the mount command.

$ mount [ -v ]

The -v displays the list of mounted file systems in verbose mode.

Example 17-1 Determining Which File Systems Are Mounted

This example shows how to use the mount command to display information about the file systems that are currently mounted.

$ mount
/ on rpool/ROOT/zfsBE read/write/setuid/devices/rstchown/dev=40d0002 on Wed ...
/devices on /devices read/write/setuid/devices/rstchown/dev=9500000 on Wed ...
/dev on /dev read/write/setuid/devices/rstchown/dev=9580000 on Wed Jun ...
/system/contract on ctfs read/write/setuid/devices/rstchown/dev=95c0001 ...
/proc on proc read/write/setuid/devices/rstchown/dev=9540000 on Wed Jun  ...
/etc/mnttab on mnttab read/write/setuid/devices/rstchown/dev=9600001 on Wed ...
/system/volatile on swap read/write/setuid/devices/rstchown/xattr/dev=9640001 ...
/system/object on objfs read/write/setuid/devices/rstchown/dev=9680001 on Wed ...
/etc/dfs/sharetab on sharefs read/write/setuid/devices/rstchown/dev=96c0001 on ...
/dev/fd on fd read/write/setuid/devices/rstchown/dev=97c0001 on Wed Jun  8 ...
/tmp on swap read/write/setuid/devices/rstchown/xattr/dev=9640002 on Wed Jun  ...
/export on rpool/export read/write/setuid/devices/rstchown/nonbmand/exec/xattr/
/export/home on rpool/export/home read/write/setuid/devices/rstchown
/rpool on rpool read/write/setuid/devices/rstchown/nonbmand/exec/
/home/rimmer on pluto:/export/home/rimmer remote/read/write/setuid/xattr/...

This example shows how to use the zfs mount command to display information about ZFS file systems that are currently mounted.

$ zfs mount
rpool/ROOT/zfsBE                /
rpool/export                    /export
rpool/export/home               /export/home
rpool                           /rpool

The unmounting of a UFS file system removes it from the file system mount point, and deletes the entry from the /etc/mnttab file. Some file system administration tasks cannot be performed on mounted file systems. You should unmount a UFS file system when the following occurs:

In an emergency situation, you can use the umount -f option to forcibly unmount a busy file system. This practice is not recommended under normal circumstances because the unmounting of a file system with open files could cause a loss of data. This option is only available for UFS and NFS file systems.

Field Descriptions for the /etc/vfstab File

An entry in the /etc/vfstab file has seven fields, which are described in the following table.

Table 17-1 Field Descriptions for the /etc/vfstab File

Field Name
Description
device to mount
This field identifies one of the following:
  • The block device name for a local UFS file system (for example, /dev/dsk/c0t0d0s0).

  • The resource name for a remote file system (for example, myserver:/export/home). For more information about NFS, see System Administration Guide: IP Services.

  • The block device name of the slice on which to swap (for example, /dev/dsk/c0t3d0s1).

  • A directory for a virtual file system.

device to fsck
The raw (character) device name that corresponds to the UFS file system identified by the device to mount field (for example, /dev/rdsk/c0t0d0s0). This field determines the raw interface that is used by the fsck command. Use a dash (-) when there is no applicable device, such as for a read-only file system or a remote file system.
mount point
Identifies where to mount the file system (for example, /usr).

FS type
Identifies the type of file system.
fsck pass
The pass number used by the fsck command to decide whether to check a UFS file system. When the field contains a dash (-), the file system is not checked. Currently, the fsck pass value in the /etc/vfstab file is ignored during the boot process.

When the field contains a zero, UFS file systems are not checked. When the field contains a value greater than zero, the UFS file system is always checked.

All UFS file systems with a value of 1 in this field are checked one at a time in the order they appear in the vfstab file. When the fsck command is run on multiple UFS file systems that have fsck pass values greater than 1 and the preen option (-o p) is used, the fsck command automatically checks the file systems on different disks in parallel to maximize efficiency. Otherwise, the value of the pass number does not have any effect.

mount at boot
Set to yes or no for whether the file system should be automatically mounted by the mountall command when the system is booted. Note that this field has nothing to do with autofs. The root (/), /usr and /var file systems are not mounted from the vfstab file initially. This field should always be set to no for these file systems and for virtual file systems such as /proc and /dev/fd.
mount options
A list of comma-separated options (with no spaces) that are used for mounting the file system. Use a dash (-) to indicate no options. For more information, see vfstab(4).

Note - You must have an entry in each field in the /etc/vfstab file. If there is no value for a field, be sure to specify a dash (-). Otherwise, the system might not boot successfully. Similarly, white space should not be used as a field value.


Prerequisites for Unmounting Oracle Solaris File Systems

The prerequisites for unmounting file systems include the following:

To verify that you unmounted a file system or a number of file systems, examine the output from the mount command.

$ mount | grep unmounted-file-system