Study guide

12.2 Add Partitions, Logical Volumes, and Swap Non-Destructively

Red Hat Certified System Administrator RHCSA

Track your progress as you read

Finished sections get a check mark.

1 Introduction & Exam Overview

1.1 Current Exam Facts 1.2 Lab Setup & Performance-Based Study Strategy

2 Essential Tools: Shell, Redirection & Text Analysis

2.1 Shell Prompt and Command Syntax 2.2 Input-Output Redirection and Pipes 2.3 grep and Regular Expressions for Text Analysis

3 Essential Tools: Remote Access, Users & Text Editing

3.1 Access Remote Systems Using SSH 3.2 Log In and Switch Users in Multiuser Targets 3.3 Create and Edit Text Files

4 Essential Tools: Files, Links & Archives

4.1 Create, Delete, Copy, and Move Files and Directories 4.2 Hard and Soft Links 4.3 Archive and Compress with tar, gzip, and bzip2

5 Essential Tools: Permissions & System Documentation

5.1 List, Set, and Change Standard ugo/rwx Permissions 5.2 System Documentation: man, info, and /usr/share/doc

6 Manage Software: RPM and Flatpak

6.1 Configure Access to RPM Repositories 6.2 Install and Remove RPM Software Packages 6.3 Configure Access to Flatpak Repositories 6.4 Install and Remove Flatpak Software Packages

7 Create Simple Shell Scripts

7.1 Conditional Execution: if, test, and [] 7.2 Looping Constructs for Files and Input 7.3 Process Script Inputs ($1, $2, and Beyond) 7.4 Process Shell Command Output in Scripts

8 Operate Running Systems: Boot and Recovery

8.1 Boot, Reboot, and Shut Down a System Normally 8.2 Boot Systems into Different Targets Manually 8.3 Interrupt the Boot Process to Gain Access

9 Operate Running Systems: Processes and Tuning

9.1 Identify and Kill CPU/Memory Intensive Processes 9.2 Adjust Process Scheduling 9.3 Manage Tuning Profiles

10 Operate Running Systems: Logs, Services & File Transfer

10.1 Locate and Interpret System Log Files and Journals 10.2 Preserve System Journals 10.3 Start, Stop, and Check Status of Network Services 10.4 Securely Transfer Files Between Systems

11 Configure Local Storage: Partitions and LVM

11.1 List, Create, and Delete Partitions on GPT Disks 11.2 Create and Remove Physical Volumes 11.3 Assign Physical Volumes to Volume Groups 11.4 Create and Delete Logical Volumes

12 Configure Local Storage: Mounting and Expansion

12.1 Mount File Systems at Boot by UUID or Label 12.2 Add Partitions, Logical Volumes, and Swap Non-Destructively

13 Create and Configure File Systems: Local FS and Permissions

13.1 Create, Mount, and Use VFAT, ext4, and XFS File Systems 13.2 Extend Existing Logical Volumes 13.3 Diagnose and Correct File Permission Problems

14 Create and Configure File Systems: NFS and autofs

14.1 Mount and Unmount Network File Systems Using NFS 14.2 Configure autofs

15 Deploy and Maintain: Scheduling, Services & Targets

15.1 Schedule Tasks with at, cron, and systemd Timers 15.2 Start, Stop, and Enable Services at Boot 15.3 Configure Systems to Boot into a Specific Target

16 Deploy and Maintain: Time, Software Updates & Bootloader

16.1 Configure Time Service Clients 16.2 Install and Update Software from CDN, Remote Repos, and Local Files 16.3 Modify the System Bootloader

17 Manage Basic Networking

17.1 Configure IPv4 and IPv6 Addresses 17.2 Configure Hostname Resolution 17.3 Configure Network Services to Start Automatically at Boot 17.4 Restrict Network Access Using firewalld and firewall-cmd

18 Manage Users and Groups

18.1 Create, Delete, and Modify Local User Accounts 18.2 Change Passwords and Adjust Password Aging 18.3 Create, Delete, and Modify Local Groups and Memberships 18.4 Configure Privileged Access

19 Manage Security: Firewall, umask & SSH Keys

19.1 Configure Firewall Settings with firewall-cmd and firewalld 19.2 Manage Default File Permissions 19.3 Configure Key-Based Authentication for SSH

20 Manage Security: SELinux Modes and Contexts

20.1 Set Enforcing and Permissive Modes for SELinux 20.2 List and Identify SELinux File and Process Contexts 20.3 Restore Default File Contexts

21 Manage Security: SELinux Ports and Booleans

21.1 Manage SELinux Port Labels 21.2 Use Boolean Settings to Modify SELinux Settings

12.2 Add Partitions, Logical Volumes, and Swap Non-Destructively

Key Takeaways Explain This Topic AI

Non-destructive means add capacity without wiping existing partitions, volume groups, logical volumes, or file systems that already hold data.

New partitions go into free space (or new disks) with parted/gdisk-style tools; new LVs consume free extents in a VG after any new PVs are extended into the group.

Swap is created with mkswap on a partition, LV, or file, activated with swapon, and made persistent with a swap line in /etc/fstab (prefer UUID=).

Always re-check existing mounts and LVM layout (lsblk, findmnt, vgs/lvs/pvs) before writing a new partition table or lvcreate so you do not overwrite live storage.

Exam success is added usable storage or active swap still present after reboot—pair creation with fstab (and mounts from 12.1) when persistence is required.

Last updated: August 2026

12.2 Add Partitions, Logical Volumes, and Swap Non-Destructively

Quick Answer: Add storage—do not wipe what already works. Create new partitions in free space , new LVs in VG free PE , and swap with mkswap + swapon + fstab UUID= . Verify with lsblk , lvs / vgs , swapon --show , and mount -a . Destroying existing data fails both the system and the objective.

Official skill

Under Configure local storage , EX200 expects you to add new partitions and logical volumes, and swap to a system non-destructively . The key word is non-destructively : grow the system’s usable storage without deleting or reformatting volumes that already contain required data.

Related skills you already use:

  • GPT partitioning, PV/VG/LV create/delete (prior chapter)
  • Mount by UUID/label (Section 12.1)

Later: extend existing logical volumes and grow file systems (separate objective—do not confuse “add new LV” with “extend this LV and xfs_growfs”)

This section focuses on adding capacity and adding swap safely.

What “non-destructive” means on the exam

  • Allowed (additive) Destructive (avoid unless the task explicitly deletes)
  • Create a new partition in free space on a disk mkfs on a partition that already holds production data
  • Add a new disk as a new PV and vgextend vgremove / lvremove of in-use volumes “to start clean”
  • lvcreate a new LV from free extents Recreating a whole partition table that overlaps existing partitions
  • mkswap on a new partition/LV reserved for swap Using wipefs / dd on the wrong device
  • Append fstab lines Deleting unrelated fstab mounts that already work

If a disk already has / or /home partitions, you do not rebuild the entire table from scratch. You inspect free space and add beside existing partitions.

  • Always inventory first lsblk -f
  • lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
  • findmnt
  • sudo pvs; sudo vgs; sudo lvs
  • cat /etc/fstab
  • free -h
  • swapon --show

Sketch what is already mounted and which VGs have free space ( VFree in vgs ). Only then plan the new partition, LV, or swap device.

  • Adding partitions non-destructively
  • New free space on an existing disk

Confirm free space: lsblk , sudo parted /dev/sdb print free (or gdisk / fdisk print).

Create a new partition only in the free region—do not delete partition 1 to “make room” if it still holds data.

Write the table, run partprobe or re-read as needed ( udevadm settle , reboot only if the kernel will not re-read—prefer non-reboot methods first).

Optionally mkfs only on the new partition if the task wants a data FS (or mkswap if it is swap).

  • Persist mounts with UUID fstab (12.1). sudo parted /dev/sdb print free
  • # Example: create a new primary partition in free space (sizes/names are task-specific)
  • sudo parted -s /dev/sdb mkpart primary xfs 20GiB 40GiB
  • sudo partprobe /dev/sdb
  • lsblk /dev/sdb
  • # New node might be /dev/sdb2 — confirm before mkfs
  • sudo mkfs.xfs /dev/sdb2
  • blkid /dev/sdb2

GPT vs legacy: RHEL 10 labs commonly use GPT. Match tools to the disk label already in use. Do not convert tables casually.

Entire new disk

A new unused disk (no existing partitions/data required by the system) can be partitioned from scratch on that disk only —still non-destructive relative to other disks. Never initialize the wrong disk ( /dev/sda vs /dev/sdb ). lsblk

  • # Triple-check the device name before parted/mkfs
  • Adding logical volumes non-destructively

Non-destructive LVM addition usually means one of:

lvcreate a new LV in a VG that still has free physical extents.

Add a new PV ( pvcreate on a new partition/disk) → vgextend an existing VG → lvcreate (or later extend an LV). sudo vgs

# VG has free space? create new LV only:

  • sudo lvcreate -n lvdata -L 5G vgapp
  • sudo mkfs.xfs /dev/vgapp/lvdata
  • blkid /dev/vgapp/lvdata
  • sudo mkdir -p /data
  • # fstab UUID=... /data xfs defaults 0 0
  • sudo mount -a
  • findmnt /data

When the VG is full, extend the VG first without removing old PVs: # New partition /dev/sdc1 dedicated as PV (created in free space / new disk)

  • sudo pvcreate /dev/sdc1
  • sudo vgextend vgapp /dev/sdc1
  • sudo vgs
  • sudo lvcreate -n lvlogs -L 2G vgapp

Do not vgremove vgapp just because you want another LV. Do not lvremove the root LV to free space. Free space comes from unused PE or new PVs.

  • lvcreate sizing reminders sudo lvcreate -L 10G -n lv1 vg1 # exact size
  • sudo lvcreate -l 100%FREE -n lv2 vg1 # consume remaining PE (careful: leaves no free PE)
  • sudo lvcreate -l 50%FREE -n lv3 vg1

Prefer exact sizes from the task ( 5G , 512M ). Using 100%FREE is fine when the task says “use all remaining space,” but it blocks later additive LVs until you add more PV space.

Adding swap non-destructively

Swap can be a partition , a logical volume , or less often a swap file . EX200 commonly uses a partition or LV. Steps:

Create the partition or LV without destroying other volumes.

mkswap initialize swap signature.

swapon activate immediately.

/etc/fstab entry for boot persistence (UUID preferred).

Verify with swapon --show and free -h .

  • Swap on a new partition # After creating /dev/sdb3 as type linux-swap (or generic partition for swap)
  • sudo mkswap /dev/sdb3
  • blkid /dev/sdb3
  • # UUID="...." TYPE="swap"
  • sudo swapon /dev/sdb3
  • swapon --show
  • free -h
  • Swap on a new LV sudo lvcreate -n swapvol -L 1G vg0
  • sudo mkswap /dev/vg0/swapvol
  • blkid /dev/vg0/swapvol
  • sudo swapon /dev/vg0/swapvol
  • swapon --show
  • fstab for swap UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap defaults 0 0
  • Also acceptable in many systems: UUID=... swap swap defaults 0 0

Field meaning: type is swap ; mount point is conventionally none or swap ; dump and pass are 0 0 (never run fsck on swap as a normal FS).

  • Activate all fstab swap devices: sudo swapon -a
  • swapon --show
  • Swap file (awareness) sudo fallocate -l 1G /swapfile
  • # or dd if fallocate unsuitable on some FS
  • sudo chmod 600 /swapfile
  • sudo mkswap /swapfile
  • sudo swapon /swapfile
  • # fstab: /swapfile none swap defaults 0 0

Prefer partition/LV when the task says “partition” or “logical volume.” Swap files are non-destructive to disks but still consume file-system space—do not place them carelessly on tiny root filesystems without reading the task.

  • Disable swap (only when needed) sudo swapoff /dev/sdb3
  • sudo swapoff -a

Do not swapoff production swap during the exam unless you are resizing/replacing that swap device carefully.

Combining add + persistent mount

A full “add data storage” story often chains objectives: new partition or LV → mkfs → UUID fstab mount (12.1) → mount -a → findmnt

new swap device → mkswap → UUID fstab swap → swapon -a → swapon --show

Non-destructive discipline applies at every step: only format new devices.

  • End-to-end exam scenarios
  • Scenario A — New 2G data LV, mounted at /data sudo vgs
  • sudo lvcreate -n data -L 2G vgstorage
  • sudo mkfs.xfs /dev/vgstorage/data
  • UUID=$(blkid -s UUID -o value /dev/vgstorage/data)
  • sudo mkdir -p /data
  • echo "UUID=${UUID} /data xfs defaults 0 0" | sudo tee -a /etc/fstab
  • sudo mount -a
  • findmnt /data
  • (Editing fstab with vim is equally valid—avoid duplicate lines.)
  • Scenario B — Add 512M swap LV that survives reboot sudo lvcreate -n swap1 -L 512M vg0
  • sudo mkswap /dev/vg0/swap1
  • UUID=$(blkid -s UUID -o value /dev/vg0/swap1)
  • echo "UUID=${UUID} none swap defaults 0 0" | sudo tee -a /etc/fstab
  • sudo swapon -a
  • swapon --show
  • free -h
  • Scenario C — New disk becomes PV; new LV without touching old LVs lsblk
  • sudo parted -s /dev/sdd mklabel gpt mkpart primary 1MiB 100%
  • sudo pvcreate /dev/sdd1
  • sudo vgextend vgapp /dev/sdd1
  • sudo lvcreate -n newapp -L 10G vgapp

# old LVs unchanged — verify:

  • sudo lvs
  • findmnt
  • Scenario D — Free space partition for swap only sudo parted /dev/sdb print free
  • # create partition in free space, type suitable for linux swap if your tool sets codes
  • sudo mkswap /dev/sdb2
  • sudo swapon /dev/sdb2
  • # fstab UUID line
  • sudo swapon -a
  • Verification checklist (use before leaving the station)
  • Goal Check
  • New partition exists lsblk , parted print
  • New LV exists lvs , /dev/vg/lv path
  • Existing data still mounted findmnt , application paths
  • Data FS persistent fstab UUID + mount -a + findmnt
  • Swap active now swapon --show , free -h
  • Swap at boot fstab swap line + swapon -a clean
  • VG still healthy vgs , pvs without missing PVs

Optional reboot in practice labs confirms persistence; on timed exams, mount -a / swapon -a plus correct fstab is the standard pre-reboot proof.

Common traps

mkfs on the wrong device — erases existing data; always lsblk / blkid first.

Deleting partitions to recreate the disk when free space existed for an additive partition.

lvremove of the wrong LV to “free space” instead of adding a PV.

mkswap without fstab — swap works until reboot, then vanishes.

fstab device path for swap that renames after reboot—use UUID= .

Forgetting swapon after mkswap— free -h still shows old swap.

Duplicate UUIDs if you clone disks without re-making swap/FS UUIDs—regenerate with mkswap / xfs_admin -U only on the clone you intend to change.

Using 100%FREE for one LV when the task also requires a second new LV—plan sizes first.

Confusing this objective with LV extend — lvextend + xfs_growfs grows an existing FS; lvcreate adds a new volume. Read the task verb: add vs extend .

Wiping /etc/fstab while appending—back up or edit carefully so root still mounts.

Ordering relative to other chapters

  • Step Objective family
  • Create partitions / PVs / VGs / LVs fundamentals Storage partitions & LVM chapter
  • Add more of them without destroying existing layout This section
  • Mount by UUID/label 12.1
  • Create/use ext4/XFS/VFAT, unmount File systems chapter
  • Extend existing LV and grow FS Extend logical volumes objective
  • Section checkpoint

You should inventory the system first, add partitions only in free space, add LVs with lvcreate (and vgextend when needed) without removing live volumes, build swap with mkswap / swapon /fstab UUID lines, verify with lsblk , lvs / vgs , findmnt , and swapon --show , and never run destructive format/remove commands on devices that already hold required data. That is the EX200 meaning of adding partitions, logical volumes, and swap non-destructively .