CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

GPT Partitioning with parted

One objective, and the commands are short. Two things are worth the guide: parted writes every change the instant the command returns, with no save step; and a partition recreated at the same offset on a reused disk inherits the previous filesystem's signature, which is demonstrated here rather than described.

Local Storage Guide 31 of 67 Intermediate

parted applies changes immediately. There is no w step as in fdisk, and no way to abandon a session. Add -s for scripted use so it never waits for a prompt, and -a optimal so alignment is handled for you.

One machine with a spare disk. /dev/sda here is a 15 GB scratch disk; the OS is on /dev/sdb.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

This guide includes

Use this before touching a disk. This matters because proving which disk is safe comes first every single time - and a filesystem signature can outlive the partition it was written in.

Before you start

  1. Prove which disk is safe

  2. Writing a label and creating partitions

  3. A signature that outlives its partition

  4. Clearing it properly

  5. Deleting, and when it takes effect

  6. GPT versus MBR

Official sources