๐Ÿš€ Master Disk Partitioning Like a Pro! ๐Ÿ–ฅ๏ธ๐Ÿ’ฝ

Satyam AhirraoSatyam Ahirrao
2 min read

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! ๐Ÿ”ฅ

0
Subscribe to my newsletter

Read articles from Satyam Ahirrao directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Satyam Ahirrao
Satyam Ahirrao