13.1 Create, Mount, and Use VFAT, ext4, and XFS File Systems

Key Takeaways

  • Create file systems with mkfs.ext4, mkfs.xfs, and mkfs.vfat (or mkfs -t TYPE) only on the intended new partition or LV—never format live root or data you must keep.
  • Mount with mount [-t TYPE] DEVICE DIR; unmount with umount PATH or DEVICE; busy mounts fail until processes release the tree (lsof/fuser, leave the directory).
  • XFS is the common RHEL default for data volumes; ext4 remains fully supported; VFAT (vfat/msdos) is for interoperability with Windows/firmware-style media, not SELinux-rich Linux app data.
  • Using a file system on the exam means create → mount → read/write proof (touch, cp) → umount when required → often persist with UUID fstab (related storage objectives).
  • Verify with lsblk -f, blkid, findmnt, and df -h; wrong TYPE in mount/fstab or formatting the wrong device are the highest-cost mistakes.
Last updated: August 2026

13.1 Create, Mount, and Use VFAT, ext4, and XFS File Systems

Quick Answer: Format with mkfs.ext4, mkfs.xfs, or mkfs.vfat on the correct device, mkdir a mountpoint, mount the device, prove you can create files, then umount when the task requires unmounting. Confirm TYPE/UUID with blkid / lsblk -f. On EX200, “use” means a working mounted tree—and often a reboot-safe setup via fstab from related objectives.

Official skill and exam language

Under Create and configure file systems, Red Hat expects you to create, mount, unmount, and use VFAT, ext4, and XFS file systems. Lab wording often looks like:

  • “Create an XFS file system on the new LV and mount it at /data.”
  • “Format /dev/sdb1 as ext4; mount it temporarily at /mnt/backup and copy files.”
  • “Create a VFAT file system on the partition; ensure it can be mounted and written.”
  • “Unmount /shared cleanly after the transfer.”

This section is the file-system layer: superblock and TYPE, not GPT carving (earlier storage chapters) and not solely “UUID in fstab” (mount-at-boot objective)—though real tasks chain them.

Three types you must handle

Typemkfs toolTypical use on RHELNotes
XFSmkfs.xfsDefault-style data volumes, large filesCannot shrink easily; grow with xfs_growfs after LV extend
ext4mkfs.ext4General Linux FS, still common in tasksGrow with resize2fs; mature tools (e2fsck, tune2fs, e2label)
VFATmkfs.vfat / mkfs.fatCross-platform sticks, some firmware/shared mediaLimited permissions/ownership model; no native Linux ACL/SELinux richness

RHEL 10 install media and cloud images commonly use XFS for root or large data LVs. EX200 still tests that you can create all three when asked—do not assume every disk is XFS.

Safety: only format what you should

lsblk -f
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
findmnt
blkid
sudo pvs; sudo lvs   # if the target is an LV

Never mkfs a mounted root, an active PV you still need as LVM metadata only after careful planning, or a partition that already holds required exam data unless the task explicitly reformats it. mkfs is destructive to previous file-system contents.

If the device is mounted:

findmnt /dev/sdb1
sudo umount /dev/sdb1   # or umount /mountpoint

Format only after unmount (except specialized online tools—not the EX200 create path).

Create file systems: mkfs family

XFS

sudo mkfs.xfs /dev/sdb1
sudo mkfs.xfs -f /dev/vgdata/lvapp    # -f force if prior signature exists (only if intentional)
sudo mkfs.xfs -L APPDATA /dev/sdb1    # set label at create time
blkid /dev/sdb1

Default mkfs.xfs is fine for most exam sizes. Force (-f) only when you deliberately overwrite an old signature and the task allows it.

ext4

sudo mkfs.ext4 /dev/sdb1
sudo mkfs.ext4 -L BACKUP /dev/sdc1
sudo mkfs.ext4 -m 1 /dev/sdb1         # reserved blocks % for root (optional awareness)
blkid /dev/sdb1

Equivalents: mkfs -t ext4 /dev/sdb1. Labels also settable later with e2label / tune2fs -L.

VFAT

sudo mkfs.vfat /dev/sdb1
sudo mkfs.vfat -F 32 /dev/sdb1        # FAT32 when size warrants
sudo mkfs.vfat -n SHARE /dev/sdb1     # volume name (label-like)
# sometimes written as:
sudo mkfs -t vfat /dev/sdb1
blkid /dev/sdb1

TYPE in blkid often shows vfat. Mount type is usually vfat.

Generic form

sudo mkfs -t xfs /dev/mapper/vg-lv
sudo mkfs -t ext4 /dev/sdb2
sudo mkfs -t vfat /dev/sdb3

After mkfs, always re-read identity:

lsblk -f
blkid /dev/sdb1

You need TYPE (and later UUID) for mount and fstab.

Mount: make the file system usable

Manual mount

sudo mkdir -p /data
sudo mount /dev/sdb1 /data
# or explicit type:
sudo mount -t xfs /dev/sdb1 /data
sudo mount -t ext4 /dev/vgdata/lv1 /mnt/ext
sudo mount -t vfat /dev/sdb2 /mnt/winshare

Mount by UUID or LABEL (same as fstab teaching):

sudo mount UUID=a1b2c3d4-e5f6-7890-abcd-ef1234567890 /data
sudo mount LABEL=APPDATA /data

Prove “use”

Graders and your own checklist should show the FS is writable (unless the task says read-only):

findmnt /data
df -h /data
touch /data/exam_proof.txt
echo "ok" | sudo tee /data/exam_proof.txt
ls -la /data
cp /etc/hosts /data/

If touch fails with “Read-only file system” or “Permission denied,” diagnose mount options, ownership, or VFAT mount options—not more mkfs.

Common mount options (awareness)

OptionRole
defaultsStandard rw mount bundle
ro / rwRead-only / read-write
noexecDisallow execution (sometimes security tasks)
uid= / gid= / umask=Often relevant on vfat so Linux users can write

Example VFAT write access for a shared stick-style volume:

sudo mount -t vfat -o uid=1000,gid=1000,umask=0002 /dev/sdb2 /mnt/winshare

Only add exotic options when the task needs them; many labs accept plain mount with defaults.

Unmount: umount cleanly

sudo umount /data
sudo umount /dev/sdb1
sudo umount -a -t vfat    # all of a type—use carefully

Busy mount errors mean a process still uses the tree:

# You are sitting inside the mountpoint?
pwd
cd /
sudo umount /data

# Find holders
sudo lsof +f -- /data
sudo fuser -vm /data
# fuser -km /data  # kills holders—last resort on exam if appropriate

Do not reboot as your first unmount strategy; leave the directory, stop the writing service, then umount.

Lazy unmount (umount -l) detaches when idle—know it exists; prefer a clean umount for exam clarity.

Persistence vs temporary use

GoalWhat to do
Temporary lab mountmount only; may not survive reboot
Survive reboot/etc/fstab with UUID= or LABEL= + correct TYPE + mount -a (prior chapter skill)
SwapNot a VFAT/ext4/XFS data FS—mkswap path

If the task says “mount at boot” or “persistently,” fstab is required. If it only says “create and mount at /data for use,” a correct live mount may be enough—read the verb carefully. When unsure and time allows, durable UUID fstab plus mount -a is safer for “configure storage” style wording on RHEL exams that always stress reboot survival.

End-to-end exam workflows

Workflow A — XFS on new LV at /data

sudo lvs
sudo mkfs.xfs /dev/vgstorage/data
blkid /dev/vgstorage/data
sudo mkdir -p /data
sudo mount /dev/vgstorage/data /data
touch /data/ok
findmnt /data
# If persistence required:
# UUID=...  /data  xfs  defaults  0  0  in fstab; mount -a

Workflow B — ext4 partition, temporary use, then unmount

sudo mkfs.ext4 /dev/sdb1
sudo mkdir -p /mnt/backup
sudo mount -t ext4 /dev/sdb1 /mnt/backup
cp -a /var/tmp/project /mnt/backup/
sudo umount /mnt/backup

Workflow C — VFAT share volume

sudo mkfs.vfat -n EXAMSHARE /dev/sdc1
sudo mkdir -p /mnt/share
sudo mount -t vfat /dev/sdc1 /mnt/share
echo test | sudo tee /mnt/share/hello.txt
findmnt /mnt/share
blkid /dev/sdc1

Workflow D — Wrong type recovery

sudo mount -t ext4 /dev/sdb1 /data
# mount: wrong fs type...
blkid /dev/sdb1    # TYPE="xfs"
sudo mount -t xfs /dev/sdb1 /data

Or omit -t and let mount use blkid helpers when the superblock is valid.

XFS vs ext4 operational differences (exam-relevant)

TopicXFSext4
Createmkfs.xfsmkfs.ext4
Labelmkfs.xfs -L / xfs_admin -Lmkfs.ext4 -L / e2label
Online grow (after LV extend)xfs_growfs mountpointresize2fs device (often after extend)
ShrinkNot a normal admin pathPossible offline with care—not a typical EX200 ask
Check FSxfs_repair (unmounted)e2fsck

For this section, creation/mount/use/unmount dominate; grow tools appear when you extend logical volumes (next section).

VFAT traps on a Linux exam host

  1. Permissions look wrong — VFAT does not store Unix mode bits the same way; use mount uid/gid/umask if writes fail for a non-root user.
  2. Filename case / special characters — stay with simple names in demos.
  3. Not for /var/lib app data requiring SELinux contexts—if the task wants VFAT, use it as a portable volume, not as a substitute for ext4/XFS application FS.
  4. TYPE spellingvfat in mount/fstab; do not invent fat32 as the primary fstab type on RHEL teaching materials (kernel type is vfat).

Verification checklist

CheckCommand
FS existsblkid, lsblk -f shows TYPE
Mounted where intendedfindmnt /path, df -h /path
Writabletouch / tee test file
Unmounted when requiredfindmnt no longer shows path; umount succeeded
Correct typeTYPE matches task (xfs vs ext4 vs vfat)

Relationship to other objectives

SkillWhere
Partitions / PV / VG / LV createStorage LVM chapters
Mount at boot by UUID/labelStorage mount chapter
Create/mount/use VFAT, ext4, XFSThis section
Extend LV + grow FSSection 13.2
Permission diagnosis on Linux treesSection 13.3

Common traps

  1. mkfs on the wrong disk — double-check lsblk size and emptiness.
  2. Formatting while mounted — unmount first.
  3. Creating XFS when the task required ext4 (or vice versa) — read the FS type in the prompt.
  4. Mount succeeds but empty application path — wrong mountpoint directory.
  5. Forgetting to create the mountpointmkdir -p first.
  6. Leaving cwd inside the mountumount fails with target busy.
  7. Assuming VFAT preserves chmod the way ext4 does — different model.
  8. Stopping after mkfs without mount when the task said “use” or “mount at.”
  9. fstab TYPE mismatch after creating XFS but writing ext4 in fstab.
  10. Using mkfs.xfs on a tiny USB-style VFAT-required partition against the task text.

Section checkpoint

You should invent nothing about mystery disks: identify the device, create ext4, XFS, or VFAT with the matching mkfs.* tool, mount it on an existing directory, demonstrate file create/copy, unmount cleanly with umount, and verify with blkid, lsblk -f, findmnt, and df. That is the EX200 bar for creating, mounting, unmounting, and using local VFAT, ext4, and XFS file systems on RHEL 10.

Test Your Knowledge

Which command creates an XFS file system on the logical volume /dev/vgdata/app?

A
B
C
D
Test Your Knowledge

You need a VFAT volume on /dev/sdb1 mounted at /mnt/share so files can be exchanged with non-Linux systems. Which sequence is correct?

A
B
C
D
Test Your Knowledge

umount /data fails with “target is busy.” What is the best first response on an exam system?

A
B
C
D
Test Your Knowledge

After mkfs.ext4 /dev/sdc1, blkid shows TYPE="ext4". A mount command using -t xfs fails. What should you do?

A
B
C
D