Table of Content

  • Creating a Swap Partition
  • Understanding Disk Layout
  • Exploring Linux Storage Options
  • Understanding GPT and MBR Partitions
  • Creating Partitions with fdisk
  • Creating and Mounting
  • File Systems
  • Mounting Partitions through /etc/fstab
  • Using UUID and Labels
  • Defining Systemd Mounts
  • Creating a Swap Partition
  • linux has two main partion types
    • mbr
    • gpt

lsblk
cat /proc/partitions
fdisk -l /dev/sda

Linux Storage Options

Linux Block Devices

  • According to the driver that is used, different block devices can be used
  • Use Isblk to get an overview of currently existing devices
    • /dev/sdx is common for SCSI and SATA disks
    • /dev/vdx is used in KVM virtual machines
    • /dev/nvmexny is used for NVME devices

Partition numbering

Partitions

MBR

  • Master Boot Record (MBR) is part of the 1981 PC specification
    • 512 bytes to store boot information
    • 64 bytes to store partitions
    • Place for 4 partitions only with a max size of 2 TiB
    • To use more partitions, extended and logical partitions must be used

GPT

  • GUID Partition Table (GPT) is a newer partition table (2010)
    • More space to store partitions
    • Used to overcome MBR limitations
    • 128 partitions max

storages