Unix File Systems
Unix was invented with one of the first true hierarchical filesystems for its time. A directory five levels down from the root was treated the same as any one in a more shallow level. The filename could be any character string, up to 14 whole characters.
Introduction Unix
File Systems
By contrast, early versions of VAX/VMS, a contemporary OS from Digital Equipment Corporation, had a system where a disk would have one home directory for each user, numbered by the user number, for instance [38,1061], and that was it. There were no subdirectories, and no top-level directories unattached to user identities. And no files were allowed at the root layer. Filenames had to be 9.3 format (up to 9 char name, and a dot and a 3 char suffix). This was a big improvement over RT-11's 6.3 names. Each character could be A-Z (upper case only), 0-9, or one of five punctuation marks. (Three characters were packed into two bytes, to save space, and the period was implied, not stored.) Later versions allowed named subdirectories similar to Unix, although the top-level directories continued to be user accounts.
A unix pathname is either absolute or relative. Absolute names start with a slash and describe the path from the root directory down to where the file is. For instance, /usr/bin/diff is the program file for the diff command. Relative filenames don't start with a slash so bin/diff , if used from the /usr directory, would refer to the same diff program. If there's no slashes at all, it refers to a file in the same directory.
In a Unix filesystem, one volume is always special, the root volume . Its root is the root of the entire filesystem.
Other volumes are mounted as subdirectories called mount points . The subdirectories can be located anywhere, even chained on top of other volumes by using a directory located in them as a mount point.
In the picture, one hard disk partition in yellow is mounted as " / " , the root, known by a single character, slash.
Another partition, in red, is mounted on /usr . This directory and its subdirectories is often the biggest piece of a Unix OS installation, and often there is no need to ever write to it, so this sysadmin decided to make it a separate volume and mount it write-protected, to guarantee that it can't be tampered with.
Typically the unix mount command (see man mount) takes a preexisting directory, and manipulates the kernel data structures to make the given volume appear in place of that directory. Specifically, the root directory of the subvolume appears as the contents of the mount point directory, and all of its subdirectories appear relative to their parents, all the way down. Any previous contents are hidden; usually the directories used for these purposes are empty. Automount systems typically create their own mountpoint directories dynamically. Usually there's a directory devoted to these directories coming and going. For instance, on Mac OS X, if you mount a network volume named sonic , it will make a mount point directory named /Volumes/sonic before mounting the volume there.
The mount point can be either in the root volume, or in one of its direct or indirect subdirectories.
The other argument to the mount command is the 'device'. At least that's what it was originally.
- For a hard disk partition it might look like /dev/hda3 on Linux or /dev/disk0s5 on Mac OS X. These actually refer to special block device files that represent either a whole disk or a disk partition.
- For an NFS network volume it might look like jurassic:/export/jurassic .
- Many other kinds of volumes have their own syntax for the 'device' field.

Hard disk partitions are usually consecutive groups of cylinders .
The CD in our examples is mounted on /cdrom , a special directory placed there for that purpose. Other Unix systems might put all new mount points in a special directory for that purpose, /mnt . This may or may not be an automount system .
|