๐ Master Disk Partitioning Like a Pro! ๐ฅ๏ธ๐ฝ


Struggling with disk partitions? Whether you're managing a server, optimizing storage, or setting up cloud infrastructure, mastering disk partitioning is a must-have skill for Linux admins, DevOps engineers, and system architects!
๐ฅ Storage Types โ Know Your Tech!
๐ด DAS โ Directly attached to one machine.
๐ NAS โ Network-accessible shared storage.
๐๏ธ SAN โ High-speed, enterprise-grade storage.
๐ LVM โ Advanced, flexible partitioning.
๐ Disk Naming in Linux
๐ IDE HDDs: /dev/hda
๐ SCSI/SAS Disks: /dev/sda
โก NVMe SSDs: /dev/nvme0n1
๐ฅ๏ธ KVM/QEMU Disks: /dev/vda
๐ Multipath Storage: /dev/mpath
๐ Pro Tip: Disk names are assigned by the kernel but can be customized via /etc/udev/rules.d/
๐ ๏ธ Partition Like a Pro!
๐น Check available disks: lsblk -f
๐น View partition table: sudo fdisk -l
๐น See free space: parted /dev/sda print free
๐ Before you start: Always back up your data!
๐ Create a new partition:
fdisk /dev/sda # Open disk partition tool
n # Create a new partition
w # Save and exit
๐ Update kernel: partprobe -s
or reboot (init 6
)
๐ Format & Mount โ Make It Work!
๐ Format (ext4 example):
mkfs.ext4 /dev/sda3
๐ Mount the partition:
mkdir /mnt/newdrive
mount /dev/sda3 /mnt/newdrive
๐ Verify your setup:
df -h
blkid
๐ Make it permanent: Add it to /etc/fstab
๐ฏ Key Takeaways โ Level Up Your Linux Game!
โ
Always check disk space before partitioning ๐
โ
Choose GPT for modern storage, MSDOS for legacy setups โ๏ธ
โ
Format with mkfs
& mount using /etc/fstab
๐
โ
Master these commands, and storage management is a breeze! ๐
Got questions? Dive into the full guide here & supercharge your Linux skills today! ๐ฅ
Subscribe to my newsletter
Read articles from Satyam Ahirrao directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
