Workbook 3: Linux Filesystem Management Flashcards
How does the Linux kernel refer to the 7th partition on the drive /dev/sdc? [6]
/dev/sdc7
What two items does the MBR contain and how large is the MBR? [8]
The MBR is 512 bytes. It contains the bootloader and the partition table.
What is a bootloader’s function? [8]
When booting, BIOS passes control to the bootloader, which is then responsible for loading and passing control to the appropriate operating system.
For how many partitions can the partition table store information? [8]
This small amount of space records information for up to 4 partitions, referred to as primary partitions.
How many primary partitions can each disk be divided into? [8]
Each disk can be divided into up to four primary partitions
What is the function of an extended partition? [8]
The extended partition is used as a container for storing more partitions, referred to as logical partitions
What is a logical partition? [8]
Within the extended partition, multiple logical partitions may be created.
How does Linux always begin counting the first logical partition? [8]
first logical partition as partition number 5, even if not all 4 primary partitions are used.
Give a command line that lists all known partitions on a disk. [9]
With the -l command line switch, fdisk will list partition tables for all known disks.
What is the partition Id for a Linux ext2 or ext3 filesystem? [11]
x
What is the partition Id for a Linux swap partition? [11]
x
Give a command line to edit a disk’s partition table. [12]
When using fdisk to edit a partition table, the fdisk command should be called with a single argument: the device node of the disk to be edited.
Give two ways to force a Linux kernel to reread a disk’s partition table. [17]
Rebooting will cause the change to take affect, but so will running a relatively newer called partprobe.
Which proc filesystem lists all known partitions? [18]
/proc/partitions lists all known partitions, as well as sizes (in blocks of 1024 bytes) and activity statistics.
What is Linux’s native filesystem? [27]
ext2
What is the primary difference between the ext3 and ext2 filesystems? [27/34]
ext3 is the same as ext2. ext3 is the default filesystem for RHEL
What is the filesystem associated with compact disks? [27]
iso9660
What is the purpose of the nfs filesystem? [27]
nfs is used to share directories between Linus and Unix Machines
What is the proc filesystem? [28]
is a virtual file system that resides entirely within the kernel
Give three equivalent command lines that initialize the /dev/hda6 partition with an ext2 filesystem. [28]
mkfs.ext2 /dev/hda6
In Linux, what is equivalent to a volume label in the Windows operating system? [29]
an ext2 filesystem can be labeled with a text string identifier, which is at most 16 characters. Other operating systems often refer to this label as a volume name (as they refer to a partition formatted with a filesystem as a volume).
What block sizes does the mke2fs command choose by default? [30]
By default, the mke2fs chooses a block size of either 1k or 4k
Give two situations where you should directly specify the number of inodes when creating a filesystem. [30]
- When a filesystem is expected to contain a large number of small files, the number of inodes may need to be increased, or the filesystem may run out.
- When the filesystem is expected to contain a small number of large files, the excess amount of space devoted to unused inodes
By default, how much space on a disk does the ext2 filesystem reserve for the root user? [30]
By default, the ext2 filesystem reserves 5% of its space for the root user
What is the purpose of the needs_recovery flag? [33]
the internal information of the filesystem (i.e., which blocks are being used for what purpose) could be left in an inconsistent state.
What are the three steps taken by a journaling filesystem when writing information to a disk? [34]
- The filesystem writes to the journal the details about the transaction it is about to perform.
- The filesystem performs the transaction.
- Upon successful completion, the filesystem removes the details about the transaction from the journal.
Give four equivalent command lines that initialize the /dev/hda6 partition with an ext3 filesystem. [34]
xs