From ba512eff0e3c8fa4f1132cf9b69cac5ad887d456 Mon Sep 17 00:00:00 2001 From: sjg Date: Tue, 12 Jun 2012 10:13:20 -0700 Subject: [PATCH] removed --- docs/handbook/handbook-mount-unmount.mdwn | 176 ---------------------- 1 file changed, 176 deletions(-) delete mode 100644 docs/handbook/handbook-mount-unmount.mdwn diff --git a/docs/handbook/handbook-mount-unmount.mdwn b/docs/handbook/handbook-mount-unmount.mdwn deleted file mode 100644 index f25f5304..00000000 --- a/docs/handbook/handbook-mount-unmount.mdwn +++ /dev/null @@ -1,176 +0,0 @@ - - - -## Mounting and Unmounting File Systems - - - -The file system is best visualized as a tree, rooted at `/`. - -The directories, e.g. `/dev` and `/usr`, in the root directory are branches, - -which may have their own branches, such as `/usr/local`, and so on. - - - -There are various reasons to house some of these directories on separate file systems. `/var` contains the directories `log/` and `spool/`, and various types of temporary files, and as such, may get filled up. Filling up the root file system is not a good idea, so splitting `/var` from `/` is often favorable. - - - -Another common reason to contain certain directory trees on other file systems is if they are to be housed on separate physical disks, e.g. CD-ROM, or are used as separate virtual disks, such as [Network File System](network-nfs.html) exports. - - - - - -### The fstab File - - - -During the [boot process](boot.html), file systems listed in `/etc/fstab` are automatically mounted (unless they are listed with the `noauto` option). - - - -The `/etc/fstab` file contains a list of lines of the following format: - - - - - - device mount-point fstype options dumpfreq passno - - - - - - -* `device`: A device name (which should exist), as explained [here](disks-naming.html). - - -* `mount-point`: A directory (which should exist), on which to mount the file system. - - -* `fstype`: The file system type to pass to [mount(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=mount§ion8). The default DragonFly file system is `ufs`. - - -* `options`: Either `rw` for read-write file systems, or `ro` for read-only file systems, followed by any other options that may be needed. A common option is `noauto` for file systems not normally mounted during the boot sequence. Other options are listed in the [mount(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=mount§ion8) manual page. - - -* `dumpfreq`: This is used by [dump(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=dump§ion8) to determine which file systems require dumping. If the field is missing, a value of zero is assumed. - - -* `passno`: This determines the order in which file systems should be checked. File systems that should be skipped should have their `passno` set to zero. The root file system (which needs to be checked before everything else) should have its `passno` set to one, and other file systems' `passno` should be set to values greater than one. If more than one file systems have the same `passno` then [fsck(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=fsck§ion8) will attempt to check file systems in parallel if possible. - - - -Consult the [fstab(5)](http://leaf.dragonflybsd.org/cgi/web-man?command=fstab§ion5) manual page for more information on the format of the `/etc/fstab` file and the options it contains. - - - - - -### The mount Command - - - -The [mount(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=mount§ion8) command is what is ultimately used to mount file systems. - - - -In its most basic form, you use: - - - - - - # mount device mountpoint - - - - - -Or, if `mountpoint` is specified in `/etc/fstab`, just: - - - - - - # mount mountpoint - - - - - -There are plenty of options, as mentioned in the [mount(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=mount§ion8) manual page, but the most common are: - - - - **Mount Options** - - - - -* `-a`: Mount all the file systems listed in `/etc/fstab`. Except those marked as `noauto`, excluded by the `-t` flag, or those that are already mounted. - - -* `-d`: Do everything except for the actual mount system call. This option is useful in conjunction with the `-v` flag to determine what [mount(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=mount§ion8) is actually trying to do. - - -* `-f`: Force the mount of an unclean file system (dangerous), or forces the revocation of write access when downgrading a file system's mount status from read-write to read-only. - - -* `-r`: Mount the file system read-only. This is identical to using the `rdonly` argument to the `-o` option. - - -* `-t` ***fstype***: Mount the given file system as the given file system type, or, if used with `-a` option, mount only file systems of the given type. `ufs` is the default file system type. - - -* `-u`: Update mount options on the file system. - - -* `-v`: Be verbose. - - -* `-w`: Mount the file system read-write. - - - -The `-o` option takes a comma-separated list of the options, including the following: - - - - -* `nodev:` Do not interpret special devices on the file system. This is a useful security option. - - -* `noexec`: Do not allow execution of binaries on this file system. This is also a useful security option. - - -* `nosuid`: Do not interpret setuid or setgid flags on the file system. This is also a useful security option. - - - -### The umount Command - - - -The [umount(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=umount§ion8) command takes, as a parameter, one of a mountpoint, a device name, or the `-a` or `-A` option. - - - -All forms take `-f` to force unmounting, and `-v` for verbosity. Be warned that `-f` is not generally a good idea. Forcibly unmounting file systems might crash the computer or damage data on the file system. - - - -`-a` and `-A` are used to unmount all mounted file systems, possibly modified by the file system types listed after `-t`. `-A`, however, does not attempt to unmount the root file system. - - - - - - - -CategoryHandbook - -CategoryHandbook-basics - -- 2.41.0