Mounting and Unmounting File Systems (System Administration Guide: Devices and File Systems) (2024)

Before you can access the files on a file system, you need to mount the filesystem. 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 connectedor disconnected from the root (/) file system.

When you mount a file system, any files or directories in the underlyingmount point directory are unavailable as long as the file system is mounted. Thesefiles are not permanently affected by the mounting process, and they become availableagain when the file system is unmounted. However, mount directories are typicallyempty, because you usually do not want to obscure existing files.

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

Figure 15–1 Sample root (/) File System

Mounting and Unmounting File Systems (System Administration Guide: Devices and File Systems) (1)

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

  • First, you must create a directory to use as a mount point for thefile system you want to mount, for example, /opt/unbundled.

  • Once the mount point is created, you can mount the file system (byusing the mount command), which makes all of the files and directoriesin /opt/unbundled available, as shown in the following figure.

For step-by-step instructions on how to mount file systems, see Chapter17, Mounting and Unmounting File Systems (Tasks).

Figure 15–2 Mounting a File System

Mounting and Unmounting File Systems (System Administration Guide: Devices and File Systems) (2)

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 mountedfile systems. You can display the contents of this file with the cat or more commands, but you cannot edit it. Here is an example of an /etc/mnttab file:


$ more /etc/mnttab/dev/dsk/c0t0d0s0 / ufs rw,intr,largefiles,onerror=panic,suid,dev=2200000 938557523/proc /proc proc dev=3180000 938557522fd /dev/fd fd rw,suid,dev=3240000 938557524mnttab /etc/mnttab mntfs dev=3340000 938557526swap /var/run tmpfs dev=1 938557526swap /tmp tmpfs dev=2 938557529/dev/dsk/c0t0d0s7 /export/home ufs rw,intr,largefiles,onerror=panic,suid,dev=2200007 ...$

The Virtual File System Table

It would be a very time-consuming and error-prone task to manually mount filesystems every time you wanted to access them. To avoid this problem, the virtual file system table (the /etc/vfstab file) provides a list of file systems and how to mount them.

The /etc/vfstab file provides two important features:

  • You can specify file systems to automatically mount when the systemboots.

  • You can mount file systems by using only the mount point name, becausethe /etc/vfstab file contains the mapping between the mount pointand the actual device slice name.

A default /etc/vfstab file is created when you install a system, depending on theselections you make when installing system software. However, you can edit the /etc/vfstab file on a system whenever you want. To add an entry, the maininformation you need to specify is the device where the file system resides, the nameof the mount point, the type of the file system, whether you want the file systemto mount automatically when the system boots (by using the mountall command),and any mount options.

The following is an example of an /etc/vfstab file. Commentlines 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/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -/proc - /proc proc - no -/dev/dsk/c0t0d0s1 - - swap - no -swap - /tmp tmpfs - yes -/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 2 no -/dev/dsk/c0t3d0s7 /dev/rdsk/c0t3d0s7 /test ufs 2 yes -$

In the preceding example, the last entry specifies that a UFS file system onthe /dev/dsk/c0t3d0s7 slice will be automatically mounted onthe /test mount point when the system boots. Note that, for root(/) and /usr, the mount at boot field value is specified as no, because these file systemsare mounted by the kernel as part of the boot sequence before the mountall command is run.

For descriptions of each of the /etc/vfstab fields andinformation on how to edit and use the file, see Chapter17, Mounting and Unmounting File Systems (Tasks).

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, withother systems on the network. For example, you might want to share third-party applicationsor source files with users on other systems.

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

A system becomes an NFS server if it has resources to shareon the network. A server keeps a list of currently shared resources and their accessrestrictions (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:

  • By using the share or shareall command

  • By adding an entry to the /etc/dfs/dfstab (distributedfile system table) file and rebooting the system

For information on how to share resources, see Chapter17, Mounting and Unmounting File Systems (Tasks). For a completedescription of NFS, see Chapter 14, Managing Network File Systems (Overview), in System Administration Guide: Resource Management and Network Services.

Automounting or AutoFS

You can mount NFS file system resources by using a client-side service calledautomounting (or AutoFS), which enables a system to automatically mount and unmountNFS resources whenever you access them. The resource remains mounted as long as youremain in the directory and are using a file. If the resource is not accessed fora certain period of time, it is automatically unmounted.

AutoFS provides the following features:

  • NFS resources don't need to be mounted when the system boots, whichsaves booting time.

  • Users don't need to know the root password to mount and unmount NFSresources.

  • Network traffic might be reduced, since NFS resources are only mountedwhen they are in use.

TheAutoFS service is initialized by the automount utility, which runsautomatically when a system is booted. The automountd daemon runscontinuously and is responsible for the mounting and unmounting of the NFS file systemson an as-needed basis. By default, the /home file system is ismounted by the automount daemon.

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

For complete information on how to set up and administer AutoFS, see System Administration Guide: IP Services.

Mounting and Unmounting File Systems (System Administration Guide: Devices and File Systems) (2024)
Top Articles
Pros and cons of binge-watching shows
How to Delete Coin Master and Start Again: A Simple Guide - Playbite
Katie Nickolaou Leaving
Tiny Tina Deadshot Build
Www.fresno.courts.ca.gov
Was ist ein Crawler? | Finde es jetzt raus! | OMT-Lexikon
Chris wragge hi-res stock photography and images - Alamy
South Carolina defeats Caitlin Clark and Iowa to win national championship and complete perfect season
Soap2Day Autoplay
Fallout 4 Pipboy Upgrades
Palace Pizza Joplin
Nonuclub
Jvid Rina Sauce
Sky X App » downloaden & Vorteile entdecken | Sky X
Ups Access Point Lockers
Florida History: Jacksonville's role in the silent film industry
Rondom Ajax: ME grijpt in tijdens protest Ajax-fans bij hoofdbureau politie
Royal Cuts Kentlands
Persona 4 Golden Taotie Fusion Calculator
How your diet could help combat climate change in 2019 | CNN
Johnnie Walker Double Black Costco
Anotherdeadfairy
Raw Manga 1000
Nesb Routing Number
Webworx Call Management
208000 Yen To Usd
Stockton (California) – Travel guide at Wikivoyage
Rgb Bird Flop
Kuttymovies. Com
Willys Pickup For Sale Craigslist
Rlcraft Toolbelt
Springfield.craigslist
October 31St Weather
Louisville Volleyball Team Leaks
Cherry Spa Madison
Wisconsin Women's Volleyball Team Leaked Pictures
Tiny Pains When Giving Blood Nyt Crossword
Fapello.clm
Armageddon Time Showtimes Near Cmx Daytona 12
Clima De 10 Días Para 60120
Sams Gas Price Sanford Fl
Anderson Tribute Center Hood River
Tgirls Philly
Academic Calendar / Academics / Home
St Vrain Schoology
Kushfly Promo Code
The 13 best home gym equipment and machines of 2023
Marine Forecast Sandy Hook To Manasquan Inlet
Minute Clinic Mooresville Nc
Who We Are at Curt Landry Ministries
Itsleaa
Latest Posts
Article information

Author: Prof. An Powlowski

Last Updated:

Views: 5701

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Prof. An Powlowski

Birthday: 1992-09-29

Address: Apt. 994 8891 Orval Hill, Brittnyburgh, AZ 41023-0398

Phone: +26417467956738

Job: District Marketing Strategist

Hobby: Embroidery, Bodybuilding, Motor sports, Amateur radio, Wood carving, Whittling, Air sports

Introduction: My name is Prof. An Powlowski, I am a charming, helpful, attractive, good, graceful, thoughtful, vast person who loves writing and wants to share my knowledge and understanding with you.