Linux

Filesystems & Mounting

102 flashcards · answers and spaced-repetition review in the KnowCard app

Partitioning a disk reserves space, yet you still can't store files on that space until you do one more step. What is that step called, and what does it actually add?
Someone assumes every Linux install uses the same file system. Which type is the most common default for general Linux use, and when would you reach for xfs or btrfs instead?
You spin up a server on RHEL and never picked a file system during install. Which one did you get by default, and why does that choice fit servers?
btrfs is the default on Fedora and SUSE, so a smart guess is that RHEL supports it too. What's actually true on RHEL, and since when?
A swap partition doesn't hold a normal file system, yet you still can't just point the kernel at fresh swap space and use it. What preparation is required, and who normally does it?
You run df on a busy system and the output is cluttered with tmpfs and snap entries you don't care about. Which command gives human-readable sizes while hiding those internal file systems?
You have a directory path but aren't sure which partition it physically lives on. Which command tells you, and how?
df says a partition is nearly full but you don't know what's eating the space inside a directory tree. Which command reports per-directory usage, and what's an interactive alternative?
During boot the kernel has to locate the root file system before /etc/fstab is even read. How is the root partition identified to the kernel, and what supplies that value?
Beyond the mandatory root partition, how does Linux know which additional partitions to mount at boot, and where must that configuration itself live?
A Windows admin expects each disk to appear as its own drive letter. How does Linux present multiple file systems differently, and where do extra disks show up?
You want to format a USB flash drive from the terminal so a Windows laptop can read it. What's the command sequence, and what must you check before wiping it?
When you mount a USB partition manually with mount /dev/sdb1 /media/data, do you have to tell it the file system type, and what privilege is normally required?
You want an external disk to mount automatically at a chosen directory via fstab. Which three pieces of information must you gather first, and how?
You add an external disk to fstab, but the disk isn't always plugged in. Which option keeps boot from failing when it's absent, and which one stops programs on it from running?
You're unsure which file system type a currently mounted partition is using. Which df option reveals it?
ext4 has been the Linux standard for over a decade. Roughly when did it become standard, and what's its maximum file system size?
btrfs advertises snapshots, RAID, and device-mapper features all built in. What's the tradeoff, and what's its support status on RHEL?
xfs originated on a completely different platform before becoming a Linux server staple. Where did it come from, and at what scale does its maturity really pay off?
ZFS is often held up as the benchmark for file systems, yet it isn't in the official Linux kernel. What legal reason keeps it out, and how is it used instead?
You're choosing a file system for a large 128 GB SD card meant for a camera. Why is plain vfat the wrong pick, and what's the standard above 32 GB?
The CD-ROM file system standard only allows short file names, yet CDs routinely show long names. What standard defines it, and how do long names work?
Some entries in /proc/filesystems don't store files on any disk at all. What are file systems like proc, sysfs, tmpfs, and devtmpfs for, and how are they marked?
The NTFS driver on Linux runs differently from most file system drivers. What mechanism lets a file system driver run outside the kernel, and what is it called?
You want to mount an ISO image or put a whole file system inside a single ordinary file. What kernel feature makes this possible, and how does it work?
Ubuntu's Snap packages show up as extra mounts you can't write to. Which compressed file system backs them, and what's its key property?
Docker needs to record the changes a container makes without touching the underlying base image. Which modern file system does it use for that, and what does it do?
You want to see every mounted file system with its options, but mount and df both have limits. What does each show, and how do you cut through the noise?
What's the general syntax of the mount command, and what precondition about the target must hold before it will succeed?
Your root file system booted read-only because of an fstab error, and you need to edit files to fix it. How do you make root writable without rebooting?
Each line in /etc/fstab has six columns. What does each column specify, in order?
Device names like /dev/sdb1 can shift when disks are detected in a different order. What can you put in fstab's first column instead, and where do you get the value?
Beyond just mounting a disk, which fstab options harden it or enable SSD maintenance? Name what discard, noexec, nosuid, and nodev each do.
In /etc/fstab's sixth column you can enter 0, 1, or 2. What does each value mean for the boot-time file system check, and what's the common convention?
A single typo in /etc/fstab can leave a remote server unbootable. Before rebooting, how can you safely test that a new fstab entry actually works?
You edited /etc/fstab and the change doesn't seem to take on a systemd system. What extra step makes systemd re-read the file?
Your root file system is nearly full but /home has plenty of space, and you want a subdirectory to physically live on /home while keeping its original path. What mechanism does this, and how does it differ from a symlink?
systemd can mount the home and swap partitions even when they have no /etc/fstab entry. What has to be set on those partitions for this to work?
After a crash, older Linux systems could spend hours scanning a file system before it was usable. What feature lets modern file systems recover almost instantly, and how does it work?
A colleague claims journaling guarantees a consistent file system even if the power is pulled mid-write. Why is that wrong?
Someone worries ext4's 16 TiB limit means it can't hold big data sets. Distinguish ext4's max file size from its max file system size, and compare with btrfs, xfs, and ZFS.
You're administering an ext4 file system but keep seeing tools named with a '2', like tune2fs. Do those actually work on ext4, and what does the naming reflect?
You grow an ext4 file system onto a bigger disk and later run out of inodes even though there's free space. Why can that happen?
You want an ext file system to force a consistency check periodically, not just after crashes. Which tune2fs options control the mount-count and time triggers?
You need to change an ext file system's label and its UUID, ideally without unmounting it. Which commands do each, and can they run on a live file system?
When resizing an ext file system with resize2fs, the order of operations relative to the underlying partition matters. What's the rule for growing versus shrinking, and why does the order matter?
You provisioned an xfs volume too large and now want to reclaim space by shrinking it. What does xfs let you do, and what's the tool for resizing?
You run fsck.xfs on an xfs partition and it instantly returns OK. Why is that misleading, and what actually checks an xfs file system?
Windows uses several file systems Linux can access. What are the three fundamental families, and what distinguishes NTFS from the FAT lineage?
On a dual-boot machine, why can writing to the Windows partition from Linux corrupt it, and what setting prevents this?
VFAT has no concept of Unix permissions and NTFS doesn't map them the Unix way. When you mount such a disk, how do you decide which Linux user can access the files?
The Linux NTFS driver is implemented unlike most other file system drivers. How is it built, and what does that imply about where the driver code runs?
You need to create Windows-compatible file systems from Linux. Which commands create VFAT, exFAT, and NTFS, and what might you need first?
You want to force a file system consistency check with fsck, but it's your running root partition. Why can't you just run fsck on it, and what do you do instead?
You have an ext4 partition and decide you'd rather it were xfs. Can you convert it in place, and if not, what's the actual procedure?
On ext you'd change a label with e2label and the UUID with tune2fs -U. What's the single equivalent tool for xfs, and what precondition does it have that the ext tools don't?
On a shared server one user keeps filling the disk and starving everyone else. Which subsystem caps per-user space, and what happens when a user hits the cap?
The boot disk shows up as three different device names on a physical server, an NVMe workstation, and a cloud VM. What are the naming conventions?
You can format an extra data partition as NTFS or HFS+ and Linux will mount it fine — but the root partition doesn't get that freedom. Why?
IDE, SATA, USB, and FireWire disks are very different hardware, yet one kernel driver handles them all. Which driver, and when do you actually touch the device files?
In the cloud you can enlarge a virtual disk with a click. Why do some cloud setups skip partitioning and put the file system straight on the raw device?
You attach a Mac-formatted disk to Linux. What can you do with an HFS+ volume versus an APFS volume?
You want to graft a directory from another machine into your local tree. Which Linux network file systems fit a Unix server, a Windows/Samba share, and a plain SSH login?
A server lists dozens of NFS directories but only a few are ever used at once. What kernel extension mounts each one only when needed and drops it when idle?
Two virtual file systems both expose kernel internals, but at different places and for different things. What do proc and sysfs each map, and where are they mounted?
You mount a disk onto /data, which already had some files in it. Do those files have to be gone first, and what happens to them after mounting?
You want to force a thorough offline consistency check of an ext4 data partition (not the root fs). Which command does it, what state must the partition be in, and where do orphaned pieces end up?
ext4 caps a single file at 16 TiB, so someone concludes 16 TiB is the hard ceiling for any file on Linux. What layer actually governs the maximum file size, and what is its limit?
You have a fresh partition and want to put an xfs file system on it, then later inspect the parameters it chose. Which commands do each, and what package might be missing?
You format a 128 GB camera card as FAT32 and later can't copy a 6 GB video onto it despite plenty of free space. What FAT32 limit bites here, and what are the FAT lineage's size boundaries?
You mount an NTFS disk on Linux and try to work with its encrypted and compressed files. What can the Linux ntfs driver actually do, and where does it fall short?
A single NTFS file can hold several independent data streams. When mounted on Linux, how do you read and write those extra streams, and which option switches to the Windows-style notation?
You need to create and repair NTFS file systems from Linux. Which package provides the tooling, and what are the main commands it gives you?
Your machine has 8 GiB of RAM but a program's memory footprint grows beyond that and it keeps running instead of crashing. What mechanism lets Linux use more memory than physical RAM, and what is it called?
After a server has run for a week, free shows swap in use even though gigabytes of RAM are free. Does this mean you're short on RAM, and why does it happen?
You have two swap partitions on two separate physical disks and want them to boost speed rather than be used one-after-another. Which fstab option arranges that, and when should you not bother?
You want to stop the kernel from swapping out an idle GUI app's memory overnight so it stays responsive the next morning. Which kernel parameter tunes this, what's its default and range, and what do the extremes mean?
You're sizing swap on a desktop with 16 GiB RAM and remember the old "twice your RAM" rule. Is that still good advice, and when does swap actually need to exceed RAM?
You decide you want an existing, populated ext4 partition encrypted. Can you convert it in place, and what's actually possible?
LUKS is the standard for Linux disk encryption, but LUKS itself doesn't do the encrypting. What kernel component actually performs it, and how does it sit relative to your data?
Walk through the LUKS lifecycle for encrypting a USB stick with cryptsetup: from formatting it to safely unplugging it. What's the command sequence and which final step is easy to forget?
fstrim on your LUKS-encrypted SSD returns "the discard operation is not supported." Why, how do you enable TRIM anyway, and what's the security cost?
Your encrypted LVM volume is too small and you've added disk space. In what order must you resize the layers, and which command grows the crypto layer itself?
You want to encrypt not just /home but the entire system including the root partition. Why is a separate unencrypted boot partition mandatory, and how is the rest typically laid out?
If you encrypt each partition separately instead of using one encrypted LVM, the swap partition is awkward to give a fixed password. What's the neat alternative for swap, and what other keying option exists?
Your machine with a fully encrypted LVM system won't boot. From a live USB, what's the sequence to reach your data, and what two commands rescue you if the LVM tools find nothing?
You just want to encrypt one sensitive file to email or store, not a whole file system. Which command does it, what algorithm does it default to, and how do you get the file back?
A vendor sells you a "1 TB" SSD but Linux reports only about 931 GiB free. Nothing is broken — where did the space go?
You never asked for a disk check, yet after a power failure fsck runs on its own at boot. When does that happen, and where do fragments it can't reattach end up?
You'd like a warning before a disk actually dies and takes your data with it. What built-in disk technology gives that early warning, and how?
After you delete a file, the SSD still treats those blocks as occupied. Why does that matter, and what mechanism fixes it?
You want a stolen laptop's disk to be unreadable to whoever takes it. What's the most common Linux mechanism for encrypting a file system?
Several people share one encrypted external disk and you don't want them all to know a single passphrase. What LUKS feature makes this possible, and what's the limit?
You create a LUKS container without specifying any crypto options. What cipher and key length do you get by default, how do you inspect what was actually chosen, and what's the concern about the key-derivation function?
You plug a LUKS-encrypted external disk into a desktop running GNOME or KDE. What happens automatically, and under what device-mapper name does it appear?
You want an encrypted local partition to be unlocked and mounted automatically at every boot. Which two config files are involved, what goes in the crypttab columns, and what's the recommended way to name the device?
Windows can format a drive as ReFS instead of NTFS. Since when has ReFS existed, and what's the catch if you plug such a disk into Linux?
You need more swap on a running system but don't want to repartition. How do you create, format, and activate a swap file, and which file system refuses to host one?
SSDs need to know which blocks a file system no longer uses so they can optimize their cells. What is this operation called, and why does an SSD need it when a spinning disk doesn't?
On a default modern distro, how is TRIM normally carried out on an SSD, how do you check that schedule, and how do you trigger it by hand?
Instead of the weekly batch TRIM you can have the SSD notified the instant each file is deleted. How do you enable that, which file systems support it, and what's the tradeoff?
Your file system is journaled, so a coworker insists periodic full consistency checks are a waste of time. Why is that reasoning flawed?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play