AdvancedPartitioningSchemes

Revision 1 as of 2012-05-24 13:55:54

Clear message

Terminology

Let's introduce some terms (copied from ReliableRaid/History):

  • component: a single block device node used to make up a part of an array. e.g. "block device" for md (/dev/sda1), "physical volume" for LVM (also /dev/sda1). It is a component only if the array software understands it as a component (usually via some form of superblock, etc).

  • array: a single logical unit made up of components. e.g. "RAID device" for md (/dev/md1), "volume group" for LVM (/dev/vg-name/).

  • logical device: a block device made available from an array. e.g. "RAID device" for md (/dev/md1), "logical volume" for LVM (/dev/vg-name/lv-name or /dev/mapper/vg--name-lv--name; yes, "-" is escaped with "--" for mapper names).

  • mount point: final / top-level allocation of filesystem type & mount point.

Example

  • regular disk (attached as sata), name /dev/sda

    • has MBR (for bootloader)
    • can become a component of another array as a whole
  • components
    • can be partitioned into components aka partitions, e.g. (/dev/sda1, /dev/sda2)

    • /dev/sda1 can become formatted filesystems / mountpoints
    • /dev/sda1 can become a component of another array
  • LVM - Logical Volume Group (combines many disks together)
    • combines multiple devices into a single array ( volume group )
      • e.g. combine /dev/sda (100GB) & /dev/sdb2 (300GB) into /dev/vg-big (400GB)

    • creates variable length logical devices ( logical volume )
      • logical volumes can become mount-points.
      • e.g. create /dev/vg-big/lv-medium1 (200GB) and /dev/vg-big/lv-medium2 (200 GB)

  • LUKS aka cryptsetup, dm-crypt, full-disk encryption
    • takes 1 component & creates 1 encrypted device from it

    • e.g. /dev/sda -> /dev/crypt1

    • /dev/crypt1 can be used as a mountpoint, or as a component of another array (e.g. LVM)

    • hopefully (?!) cannot be partitioned, use LVM on top of it.
  • RAID
    • takes 2+ components and creates an array /dev/md

    • resulting array can be used as component of another array (e.g. LUKS/LVM) or become a mountpoint
    • hopefully (?!) cannot be partitioned, use LVM on top of it

There are many ways to partition and install your system.

What

Pre-requisites

  • 'what disks you have'

Reasoning

  • 'why is it sane to partition like that'

Final disk layout

  • first row: end mount point, filesystem

    rows of nested block devices

    mbr

    last row: real/physical disk(s)

Steps

  • # 'steps to create it'

d-i slideshow

Slideshow

Typical single disk installation

Pre-requisites

  • one disk
  • no-other operating systems

Reasoning

  • want to custom specify amount of swap
  • want to leave empty space for future use

Final disk layout

  • /

    swap fs

    empty

    mbr

    sda1

    swap

    empty

Steps

  • # 'steps to create it'

d-i slideshow

Slideshow

Single full-disk encryption

Pre-requisites

  • want / require full-disk encryption
  • want simplicity (no other additional)

Reasoning

  • 'why is it sane to partition like that'

Final disk layout

  • first row: end mount point, filesystem

    rows of nested block devices

    mbr

    last row: real/physical disk(s)

Steps

  • # 'steps to create it'

d-i slideshow

Slideshow


CategorySpec