// learn Β· linux Β· rhcsa Β· 9 min

Block devices & partitions.

A disk is a long strip of bytes. The partition table divides it into named regions you can format and mount. Watch a fresh disk grow partitions one at a time, learn MBR vs GPT, and the difference between lsblk, blkid, and /proc/partitions.

Block devices and partitions animated tutorial. lsblk and /proc/partitions, MBR vs GPT partition tables, parted interactive and script modes, partition alignment, partprobe, blkid for UUIDs. RHCSA EX200 ready.
// block devices & partitions

A disk is a strip of bytes. A partition table divides it into named regions. Watch a fresh disk grow partitions one at a time.

// before you start
you should know
  • Β·Know that /dev/sda etc. are disks
  • Β·Helpful: the filesystems lesson (next)
  • Β·Comfortable as root
by the end you'll

Read lsblk/blkid, pick MBR vs GPT, create properly aligned partitions with parted, and make the kernel notice them.

pace: 9 minutes

disk layout β€” step 1 / 6 Β· lsblk
πŸ’½ /dev/sdb Β· 100 GB
table: none
free Β· 100 GB
no partition table yet β€” `parted mklabel` first

lsblk β€” what disks does Linux see?

`lsblk` prints the tree of block devices: physical disks (sda, nvme0n1, vda) and their partitions, sizes, mount points, and types. It reads from sysfs (no root needed). Add -f to also show filesystem type and UUID. /proc/partitions is the raw equivalent. Always start with lsblk to know what you're working on β€” it's the cheapest way to avoid `parted /dev/sda` (your boot disk) when you meant `/dev/sdb`.

$lsblk
$lsblk -f
$lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
$cat /proc/partitions
// key insight

Three tools, three jobs: lsblk for layout (what disks/partitions exist), blkid for identity (UUID + fs type), findmnt for mounts (what's mounted where). Master those before reaching for parted, and you'll never accidentally repartition the wrong disk.

// exam-ready Β· disks & partitions
$lsblk / lsblk -f
$/proc/partitions
$blkid [DEV]
$findmnt /path
$parted /dev/sdX print
$parted /dev/sdX mklabel gpt
$parted /dev/sdX mklabel msdos
$parted /dev/sdX mkpart primary ext4 1MiB 1025MiB
$parted /dev/sdX rm 1
$parted /dev/sdX print free
$partprobe /dev/sdX
$partx -u /dev/sdX
$fdisk -l
$wipefs -a /dev/sdXn
$dd if=/dev/zero of=/dev/sdX bs=1M count=10
$smartctl -a /dev/sdX
// check yourself
4 quick questions
Q1

You're about to repartition a disk. Which command do you run FIRST to be sure you're working on the right one?

Q2

Difference between MBR and GPT partition tables?

Q3

You ran parted to create a new partition; lsblk still doesn't show it. What's the missing step?

Q4

Why reference partitions by UUID in /etc/fstab instead of /dev/sdXn?

These aren't graded β€” they're just for active recall, which is what actually makes the lesson stick.

πŸ“‚
// next

File systems & mounts

A partition is just bytes until you mkfs and mount it. See how XFS, ext4, mount, and /etc/fstab fit together.

open β†’
// more in linux

keep going β€” these pair well with what you just learned.

see all linux β†’
back to RHCSA trackall lessons