Linux
Partitioning, LVM & RAID
108 flashcards · answers and spaced-repetition review in the KnowCard app
You need to repartition a disk after Linux is already installed and prefer a graphical tool. Which tool do you reach for, and what runs underneath it?
Two partition-table schemes exist on modern disks. Which one is standard on internal SSDs and hard disks today, and roughly when did it take over?
A colleague plans to put an MBR partition table on a new 4 TB hard disk. What goes wrong, and what is the hard ceiling on MBR-managed disk size?
On an MBR disk you already have four partitions but need a fifth. Why can't you just add another primary partition, and what is the workaround?
How does GPT's partition model differ from MBR's primary/extended/logical structure, and how large can a single GPT partition be?
Your SSD is sold as 1 TB but Linux reports about 931 GiB. Where did the missing capacity go?
When installing a desktop Linux, which single partition is truly required, where is it mounted, and what size is a sensible default?
What practical advantage do you gain by putting your data on a separate /home partition mounted at /home?
How does a Linux swap partition compare to the Windows swap file, and why does it have no mount point?
The old rule was to make swap twice the size of RAM. Why is that outdated, and when does swap size still actually matter?
You install Ubuntu desktop and notice no swap partition was created. Is this a bug, and what did the installer set up instead?
On an EFI system, what file system must the ESP contain, where is it accessed in Linux, and what minimum size applies?
What is LVM, and what capability does it give you that raw partitions do not?
LVM stacks three abstractions between the raw disk and your file system. Name them in order and what each represents.
In LVM, what exactly is a physical volume, and how does it relate to a volume group?
An LVM logical volume is full and you need more space. Under what condition can you grow it, and does growing the LV alone finish the job?
How are SATA/USB disks named in /dev versus PCIe NVMe SSDs, and how do virtio disks in a KVM/Xen VM appear?
Why is it dangerous to reference an NVMe SSD by its /dev/nvme0n1 name in /etc/fstab on a multi-SSD machine?
On an MBR disk, why do partition numbers often have gaps like 1, 2, 5, 6, 7?
Which command gives a tree view of all disks and partitions with mount points, and what do the loop devices it lists usually represent?
Device names like /dev/sdb can shift when disks are added or reordered. What directory provides stable references, and by what attributes?
You're about to repartition a disk. What is the one rule you must never break, and what can happen if you do?
You resized a partition to make it bigger but the file system still reports the old size. What step did you miss?
Between parted and fdisk, which handles both MBR and GPT, and what limits the other?
How do you create a fresh partition table on an empty disk with parted, and what's the catch you must warn users about?
After creating a partition in parted for use by LVM, RAID, or booting, what extra step is required, and how is it done?
To set up an EFI System Partition with parted on a GPT disk, what partition type and which flags do you use?
On an MBR disk in parted, why can't you immediately create a logical partition, and what must precede it?
GParted queues your edits rather than applying them one by one. What's the practical consequence, and what can it not edit?
When Linux mounts an NTFS volume with the default driver setting, how are NTFS alternate data streams exposed?
Which package supplies NTFS administration commands on Linux, and name a few of its tools.
Which command shows RAM plus swap usage in one view, and how do you display it in MiB?
Your machine has lots of free RAM yet keeps swapping out idle app memory after long file-heavy jobs. Which parameter controls this, and what does setting it to 0 do?
Contrast RAID-0, RAID-1, and RAID-5 by their goal, redundancy, and minimum disk count.
Why might you choose RAID-5 over RAID-1 for a three-disk array, and what two downsides do you accept in return?
What kernel driver backs Linux software RAID, how are the arrays named, and where do you check their status?
You cat /proc/mdstat and see [UU]. What does that indicate, and which config file lists all active arrays?
How do you build a brand-new software RAID array from two partitions, and what do you do with the resulting device?
How do you test recovery on a RAID-1 array by simulating a disk failure and then re-integrating the member?
Which mdadm operations stop and restart an array, and which read metadata or show its state?
Files on a RAID array can sit untouched for months. How do you proactively verify that redundant copies still match, and how are errors fixed?
A RAID disk failed and you're about to physically pull it. What uniquely identifies the right drive, and how do you read it?
LVM commands come in three families distinguished by prefix. What are the prefixes, and give one command from each.
What is the correct two-step order to enlarge an ext4 file system living on an LVM logical volume?
What is an LVM snapshot, what is it mainly used for, and what makes it suddenly become invalid?
SMART is meant to warn you before a disk dies. What have studies actually shown about that, and what's the lesson?
How do you get a quick disk health verdict versus detailed SMART attributes, and which values signal trouble?
How do you run a SMART self-test in the background and later read the result, and how do you view recent errors?
Since running smartctl by hand is impractical for ongoing monitoring, what handles continuous SMART checks, and how is it configured?
SSDs need to be told which blocks are free. Contrast weekly batch TRIM with online TRIM, including how each is enabled.
How do you trigger a manual TRIM right now, and how do you make it run faster on a busy file system?
What is the simplest way to password-encrypt a single file on Linux, what algorithm is used by default, and how do you decrypt it?
What is the most popular Linux file-system encryption method, and what kernel module underpins it?
Walk through the LUKS lifecycle for a partition: what initializes it, activates it, and what must you not forget after unmounting?
What cipher and key length does cryptsetup use by default, how do you inspect the crypto metadata, and how many passwords can one LUKS device hold?
Against brute-force attacks on LUKS, which key-derivation function is currently the strongest choice, and what single measure matters most?
The luksFormat helper simplifies setup but leaves a trap. What does it do, what file system does it create by default, and what remains active?
To mount an encrypted partition automatically at boot, which file must you configure, and what do its columns hold?
What is the correct resize order when enlarging a file system that sits on an encrypted (LUKS) device?
Your encrypted Linux machine won't boot due to a hardware defect. How do you get at the data, and when is this impossible?
Why can a backup taken while files keep changing be inconsistent, and how does an LVM snapshot fix it — with what prerequisite?
When creating an LVM snapshot for backup, what does the -L buffer size actually represent, and where must the space come from?
What is the full command flow for an LVM-snapshot-based backup, from creating the snapshot to cleaning it up?
After a snapshot backup, lvdisplay shows only 5.23% Allocated to snapshot. What does that confirm, and why isn't it a guarantee?
When imaging a VM's disk stored in a logical volume, how do you keep the heavy backup job from starving other work and saturating the network?
During install you pick full-disk encryption but never explicitly ask for LVM — why does the installer set up LVM anyway?
What makes password-based full-disk encryption a poor fit for a remote server sitting in a data center with no one on site?
For a business laptop, why is full-disk encryption treated as a baseline requirement rather than an optional extra?
You want to switch your encrypted Linux laptop to a different distribution while keeping the existing encrypted data partition — what usually goes wrong?
You create three partitions, delete the middle one, then fill the freed gap with two new partitions. Why can the device numbers end up out of physical order under GPT but never under MBR?
What is the maximum number of partitions a single disk can hold under MBR versus GPT?
What do the storage-interface abbreviations ATA, SATA, PCIe, and SCSI each refer to?
Beyond /dev/sdX and /dev/nvme0n1, how are CD/DVD drives and a Raspberry Pi's SD card named in /dev?
You set up a disk with MBR and later decide you want GPT instead. Why is converting a bad idea?
You can't repartition the running system partition. Which bootable live systems does the book recommend for offline disk partitioning?
Under what condition can a partition be enlarged in place, and can you shuffle partitions around to make room?
At what boundary should partitions start, and why is the first MiB of a disk usually left empty?
In parted's print output a partition shows as 50.0GB. What unit is that by default, and how do you make parted work in binary MiB/GiB?
Your backup script references a disk via /dev/disk/by-path and it breaks after you move the drive to a different USB port. Why, and what generates these links?
A swap partition holds no real file system. What one-time step must still be done before it is first used, and who normally does it?
More and more installs create no swap partition at all. What does Fedora do instead to use RAM efficiently?
LVM inserts a layer between partitions and file systems for flexibility. What does that flexibility cost you in performance?
In parted, sizes print in decimal GB but you want binary GiB, or percentages of the disk. Which command switches that, and what counts as the default?
The mkpart arguments differ between an MBR and a GPT disk. What does the first parameter mean in each case, and how do you request a swap or Windows partition?
You launch parted by typing just parted with no arguments. Which disk are you now about to edit, and why is that dangerous?
A partition ran out of room but there is free space right behind it on the disk. Which parted command grows it, and what must you still do afterward?
Besides parted and GParted, which graphical or distribution tools can partition disks, and what extra thing can GNOME Disks do?
A GPT partition can carry a "partition type GUID" — how is that different from a file-system UUID, and which command reads it?
RAID can be done in hardware or software. What distinguishes them, and what are the three kinds of software RAID — including which one Linux cannot read?
Beyond RAID-0/1/5, what do RAID-10 and RAID-6 add, and how many disks does each need at minimum?
When can you skip the mdadm multidevice driver entirely, and if you do want both LVM and RAID, which do you build first?
On Debian/Ubuntu, installing mdadm and enabling its monitoring drags in a mail server. How do you avoid it at install time, and what makes email alerts actually work?
You built RAID arrays with mdadm commands. How do you record them permanently, and what must you watch for when appending to the config file?
Even with a fully mirrored RAID, why does the book call the root file system the weak point of the system?
You want to reuse an old RAID member disk for something else, but installers keep treating it as part of a former array. What clears that, and where must you apply it?
A disk in a RAID-1 array died. Instead of hand-partitioning the replacement identically, how can you clone the layout, and what finishes the job?
After swapping a failed RAID disk and resyncing, the box may still not boot from it. What must you restore on a BIOS machine versus an EFI machine?
In LVM, a logical volume's size is always a multiple of some smallest unit. What is that unit called, and what is its default size?
Which kernel module drives LVM, which package holds the commands, and how do you initialize LVM the very first time?
Growing an LVM logical volume is easy, but shrinking one has a strict order. What is the correct sequence, and why does order matter?
You enlarged a cloud VM's disk (e.g. an AWS EC2 volume) but Linux still shows the old partition size. Which command reclaims the space, and where does it come from?
You want to add swap without repartitioning, on a btrfs root. What's the create-format-activate sequence, and why might it fail on btrfs?
A separate /boot partition used to be mandatory. Why is it largely obsolete now, and which distributions still suggest one?
Fedora's installer partitions an empty disk automatically but never shows you the result. What three partitions does it create, and what does the Encrypt My Data option encrypt?
A key behavioral difference makes parted riskier than fdisk for beginners. What is it?
What three inputs does lvcreate require, and what device paths does it produce?
You just deleted the wrong partition in parted with rm. Is the data gone, and what two ways might you recover the partition?
mdadm has both --detail and --examine. One reports on the array, the other on a member — which is which?
Start learning today
Free to start — download the app or use it in your browser.
