Chapter 12. The FreeBSD Filesystem


IN THIS CHAPTER

  • The FreeBSD Directory Structure

  • Monitoring Filesystem Usage

  • Mounting and Unmounting FreeBSD Filesystems

  • Mounting and Unmounting Filesystems from Other Operating Systems

  • Mounting and Unmounting CD-ROM and Floppy-Based Filesystems

  • Understanding the /etc/fstab File

  • Checking and Repairing Filesystems with fsck

  • Setting and Enforcing Disk Usage Quotas

  • Blocks, Files, and Inodes

To understand how FreeBSD operates, it is essential to have a clear idea of how the system manages files as well as the critical differences between FreeBSD's method and those of other operating systems.

Files in any operating system are catalogued and accessed using a filesystem, which is a particular architecture and set of interfaces between the kernel and the system's stored data. There are at least as many filesystems in existence as there are operating systemsquite a lot more, as a matter of fact, because any single operating system can use several different filesystems at once, as long as its kernel supports them all. Filesystems have cryptic and abbreviated names that sometimes, but not always, indicate what system they're a part of; Linux typically uses Ext2FS or Ext3FS (as well as a couple of other alternatives such as ReiserFS), Windows 2000/XP uses NTFS, Mac OS X primarily uses HFS+, and Windows 95/98/Me use VFAT, the MS-DOS filesystem. There are a great many more filesystems in use throughout the computing world, each with its own particular technical advantages or intended uses.

FreeBSD uses the BSD Fast Filesystem (FFS), which replaced the original UFS (Universal or Unix Filesystem, depending on who you ask). Many of the tools discussed in this chapter (such as mount) refer to UFS as the default filesystem type for FreeBSD, but this isn't really the case. The original, "true" UFS was used only in very early BSD-style UNIXes and has been replaced by FFSa completely different filesystemin FreeBSD. Incorrect as it is to do so, the names are often used interchangeably.

FFS is commonly used in FreeBSD, OpenBSD, NetBSD, and others, including Mac OS X (whose foundation, called Darwin, is based on FreeBSD and the core BSD distribution). This information will be useful to know later in this chapter when we discuss mounting filesystems from other operating systems.

Note

A fuller reference and discussion of the filesystem types used in the computing world can be found at http://www.faqs.org/docs/Linux-HOWTO/Filesystems-HOWTO.html.


In this chapter, you'll see how the FreeBSD filesystem is laid out, how to attach (or mount) hard disk partitions to it in appropriate locations, how to work with CD-ROMs, floppy disks, and network-based filesystems, and how to monitor how much disk space is being used on any of them. You'll also learn about maintenance techniques such as the fsck command, which ensures efficiently running disks, and setting quotas for disk usage by users.




FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net