Disks, Filesystems, and Mounting Flashcards
Linux allows low level access to…?
disk drives through device nodes in the /dev directory.
Usually, disks are _______ with a filesystem, and _______ to a directory instead.
formatted, mounted.
Filesystems are created with some variant of the…?
mkfs command.
The default filesystem of Red Hat Enterprise Linux is the..?
ext3 filesystem.
The mount command is used to map the root directory of a disk’s (or a disk partition’s) filesystem to an…?
already existing directory. (This directory is then referred to as a mount point.
The umount command is used to …?
unmount a filesystem from a mount point.
The df command is used to report…?
filesystem usage, and tables currently mounted devices.
Linux Disk Device Nodes:
/dev/fd0 disk type…?
floppy disk
Linux Disk Device Node:
/dev/hda disk type…?
IDE Primary Master
Linux Disk Device Node:
/dev/hdb disk type…?
IDE Primary Slave
Linux Disk Device Node:
/dev/hdc disk type…?
IDE Secondary Master
Linux Disk Device Node:
/dev/hdd disk type…?
IDE Secondary Slave.
Linux Disk Device Node:
/dev/sd[a-z] …?
SCSI Disks
Linux Disk Device Node:
/dev/cdrom …?
Symbolic Link to CD/ROM
Although device nodes exist for disk drives, usually standard users do not have…?
permissions to access them directly.
More often than not, hard disks are further divided into partitions. Partitions are regions of the hard disk that can…?
each be used as if it were a separate disk.
(Just as there are device nodes for every disk, there are also device nodes for every disk partition. The name of a partition’s device node is simply the partition number appended to the name of the disk’s device node. For example, the device node for the third partition of the primary slave IDE drive is called /dev/hdb3.)
By accessing disk drives through their device nodes, users may see (and write) the contents of the drive byte for byte. To the user, the drive looks like a (very big) file. When elvis cats the contents of a file to the drive’s device node, the information is…?
Transferred, byte for byte, to the drive.
On the floppy, what is the filename associated with the information?
Trick question. It doesn’t have one. Who is the user owner? What are the permissions? There are none. It’s just data.
A filesystem provides order to disk drives by organizing the drive into…?
Fixed sized chunks called blocks.
(The filesystem then organizes these blocks, effectively saying “this block is going to contain only inodes”, “this block is going to contain only dentries”, “these 3 block over here, and that one over there, are going to contain the contents of the file /etc/services”, or “this first block is going to store information which keeps track of what all the other blocks are being used for”. Filesystems provide all of this structure that is usually taken for granted.)
Before a disk can be used to store files in a conventional sense, it must be…?
initialized with this type of low level structure. In Linux, this is usually referred to as “creating a filesystem”. In other operating systems, it is usually referred to as “formatting the disk”.
Linux supports a large number of different types of filesystems (the fs(5) man page lists just a few). While Linux’s native filesystem is the ext2 (or in Red Hat Enterprise Linux, the ext3) filesystem, it also….?
supports the native filesystems of many other operating systems, such as the DOS FAT filesystem, or the OS/2 High Performance File System.
In Linux, filesystems are created with some variant of the mkfs command. Because these commands are usually used only by the administrative user, they do not…?
live in the stadard /bin or /usr/bin directories, and therefore cannot be invoked as simple commands. Instead, they live in the /sbin directory, which is reserved for administrative commands.
The mkfs command, and its variants, can be configured with a large collection of command line switches which specify…?
low level details about the filesystem. These details are beyond the scope of this course, however. Fortunately, the various options default to very reasonable general purpose defaults. For the curious, more information can be found in the mkfs.ext2(8) and similar man pages.
Once a disk or a disk partition has been formatted with a filesystem, users need some way to access the directories and files that the filesystem provides. In other operating systems, sers are usually very aware of disk partitions, because they have to refer to them using labels such as C: or D:. In Unix, users are…?
often unaware of partitions, because different disk partitions are organized into a single directory structure.