diff --git a/en_US.ISO8859-1/books/handbook/disks/chapter.sgml b/en_US.ISO8859-1/books/handbook/disks/chapter.sgml index 3ea01a2f64..23db613cc2 100644 --- a/en_US.ISO8859-1/books/handbook/disks/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/disks/chapter.sgml @@ -91,6 +91,227 @@ + + Slices and partitions + + Physical disks usually contain + slices, unless they are + dangerously dedicated. Slice numbers follow + the device name, prefixed with an s: + da0s1. + + Slices, dangerously dedicated physical + drives, and other drives contain + partitions, which represented as + letters from a to h. + b is reserved for swap partitions, and + c is an unused partition the size of the + entire slice or drive. This is explained in . + + + + + Mounting and unmounting filesystems + + The filesystem is best visualized as a tree, + rooted, as it were, at /. + /dev, /usr, and the + other directories 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 certain of these + directories on separate filesystems. /var + contains log, spool, and various types of temporary files, and + as such, may get filled up. Filling up the root filesystem + isn't a good idea, so splitting /var from + / is often a good idea. + + Another common reason to contain certain directory trees on + other filesystems is if they are to be housed on separate + physical disks, or are separate virtual disks, such as Network File System mounts, or CDROM + drives. + + + The fstab file + + During the boot process, + filesystems listed in /etc/fstab are + automatically mounted (unless they are listed with + ). + + The /etc/fstab file contains a list + of lines of the following format: + + device /mount-point fstype options dumpfreq passno + + device is a device name (which should + exist), as explained in the Disk + naming conventions above. + + mount-point is a directory (which + should exist), on which to mount the filesystem. + + fstype is the filesystem type to pass + to &man.mount.8;. The default FreeBSD filesystem is + ufs. + + options is either + for read-write filesystems, or for + read-only filesystems, followed by any other options that may + be needed. A common option is for + filesystems not normally mounted during the boot sequence. + Other options in the &man.mount.8; manual page. + + dumpfreq is the number of days the + filesystem should be dumped, and passno is + the pass number during which the filesystem is mounted during + the boot sequence. + + + + The mount command + + The &man.mount.8; command is what is ultimately used to + mount filesystems. + + In its most basic form, you use: + + + &prompt.root; mount device mountpoint + + + There are plenty of options, as mentioned in the + &man.mount.8; manual page, but the most common are: + + + mount options + + + + + + Mount all filesystems in + /etc/fstab, as modified by + , if given. + + + + + + + + Do everything but actually mount the + filesystem. + + + + + + + + Force the mounting the filesystem. + + + + + + + + Mount the filesystem read-only. + + + + + + fstype + + + Mount the given filesystem as the given filesystem + type, or mount only filesystems of the given type, if + given the option. + + ufs is the default filesystem + type. + + + + + + + + Update mount options on the filesystem. + + + + + + + + Be verbose. + + + + + + + + Mount the filesystem read-write. + + + + + The takes a comma-separated list of + the options, including the following: + + + + nodev + + + Do not interpret special devices on the + filesystem. Useful security option. + + + + + noexec + + + Do not allow execution of binaries on this + filesystem. Useful security option. + + + + + nosuid + + + Do not interpret setuid or setgid flags on the + filesystem. Useful security option. + + + + + + + The umount command + + The umount command takes, as a parameter, one of a + mountpoint, a device name, or the or + option. + + All forms take to force unmounting, + and for verbosity. + + and are used to + unmount all mounted filesystems, possibly modified by the + filesystem types listed after . + , however, doesn't attempt to unmount the + root filesystem. + @@ -267,7 +488,7 @@ 5120+0 records in 5120+0 records out &prompt.root; vnconfig -s labels -c vn0 newimage -&prompt.root; disklabel -r -w vn0 +&prompt.root; disklabel -r -w vn0 auto &prompt.root; newfs vn0c Warning: 2048 sector(s) in last cylinder unallocated /dev/rvn0c: 10240 sectors in 3 cylinders of 1 tracks, 4096 sectors diff --git a/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml b/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml index 3ea01a2f64..23db613cc2 100644 --- a/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml +++ b/en_US.ISO_8859-1/books/handbook/disks/chapter.sgml @@ -91,6 +91,227 @@ + + Slices and partitions + + Physical disks usually contain + slices, unless they are + dangerously dedicated. Slice numbers follow + the device name, prefixed with an s: + da0s1. + + Slices, dangerously dedicated physical + drives, and other drives contain + partitions, which represented as + letters from a to h. + b is reserved for swap partitions, and + c is an unused partition the size of the + entire slice or drive. This is explained in . + + + + + Mounting and unmounting filesystems + + The filesystem is best visualized as a tree, + rooted, as it were, at /. + /dev, /usr, and the + other directories 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 certain of these + directories on separate filesystems. /var + contains log, spool, and various types of temporary files, and + as such, may get filled up. Filling up the root filesystem + isn't a good idea, so splitting /var from + / is often a good idea. + + Another common reason to contain certain directory trees on + other filesystems is if they are to be housed on separate + physical disks, or are separate virtual disks, such as Network File System mounts, or CDROM + drives. + + + The fstab file + + During the boot process, + filesystems listed in /etc/fstab are + automatically mounted (unless they are listed with + ). + + The /etc/fstab file contains a list + of lines of the following format: + + device /mount-point fstype options dumpfreq passno + + device is a device name (which should + exist), as explained in the Disk + naming conventions above. + + mount-point is a directory (which + should exist), on which to mount the filesystem. + + fstype is the filesystem type to pass + to &man.mount.8;. The default FreeBSD filesystem is + ufs. + + options is either + for read-write filesystems, or for + read-only filesystems, followed by any other options that may + be needed. A common option is for + filesystems not normally mounted during the boot sequence. + Other options in the &man.mount.8; manual page. + + dumpfreq is the number of days the + filesystem should be dumped, and passno is + the pass number during which the filesystem is mounted during + the boot sequence. + + + + The mount command + + The &man.mount.8; command is what is ultimately used to + mount filesystems. + + In its most basic form, you use: + + + &prompt.root; mount device mountpoint + + + There are plenty of options, as mentioned in the + &man.mount.8; manual page, but the most common are: + + + mount options + + + + + + Mount all filesystems in + /etc/fstab, as modified by + , if given. + + + + + + + + Do everything but actually mount the + filesystem. + + + + + + + + Force the mounting the filesystem. + + + + + + + + Mount the filesystem read-only. + + + + + + fstype + + + Mount the given filesystem as the given filesystem + type, or mount only filesystems of the given type, if + given the option. + + ufs is the default filesystem + type. + + + + + + + + Update mount options on the filesystem. + + + + + + + + Be verbose. + + + + + + + + Mount the filesystem read-write. + + + + + The takes a comma-separated list of + the options, including the following: + + + + nodev + + + Do not interpret special devices on the + filesystem. Useful security option. + + + + + noexec + + + Do not allow execution of binaries on this + filesystem. Useful security option. + + + + + nosuid + + + Do not interpret setuid or setgid flags on the + filesystem. Useful security option. + + + + + + + The umount command + + The umount command takes, as a parameter, one of a + mountpoint, a device name, or the or + option. + + All forms take to force unmounting, + and for verbosity. + + and are used to + unmount all mounted filesystems, possibly modified by the + filesystem types listed after . + , however, doesn't attempt to unmount the + root filesystem. + @@ -267,7 +488,7 @@ 5120+0 records in 5120+0 records out &prompt.root; vnconfig -s labels -c vn0 newimage -&prompt.root; disklabel -r -w vn0 +&prompt.root; disklabel -r -w vn0 auto &prompt.root; newfs vn0c Warning: 2048 sector(s) in last cylinder unallocated /dev/rvn0c: 10240 sectors in 3 cylinders of 1 tracks, 4096 sectors