In MAAS, a partition is a logical division of a physical storage device (disk) that allows for structured data allocation, filesystem creation, and boot management. MAAS manages partitions dynamically during machine deployment, ensuring they align with the desired system configuration.
Purpose in MAAS
MAAS uses partitions to control how a machine’s storage is structured during deployment. Partitions are created, modified, or removed based on storage layouts, user-defined configurations, or pre-existing disk states.
- Primary role: Define storage allocation on a machine’s disk(s).
- Used for: OS installation, swap space, additional data storage, or custom partitioning needs.
- Managed by: The MAAS storage subsystem and provisioning workflows.
Partition Scope in MAAS
A partition in MAAS is always tied to a block device (i.e., a disk) and is part of a machine’s storage configuration. It can exist within various storage layouts, such as:
- Flat Layout: A single root partition with no separate boot or swap.
- LVM Layout: Uses Logical Volume Management to create flexible, resizable partitions.
- Custom Layout: User-defined partitioning schema, allowing for precise control.
Partition management in MAAS
Creating a partition (CLI example)
A partition must be added to a specific block device using MAAS:
maas <profile> partitions create <block-device-id> size=20G
Creates a 20GB partition on the given disk.
Listing partitions
maas <profile> partitions read <block-device-id>
Shows all partitions on a specific disk.
Formatting a partition
maas <profile> partition format <partition-id> fstype=ext4
Formats a partition with the ext4 filesystem.
Deleting a partition
maas <profile> partition delete <partition-id>
Removes a partition from a disk.
Key considerations
- Partitioning impacts deployment – Incorrect setups may prevent a machine from booting.
- Partitions are disk-specific – Each partition belongs to a specific block device in MAAS.
- Formatting is required – Unless part of an LVM or RAID setup, partitions must be formatted for usability.
- Some partitions are mandatory – For example, an EFI partition is needed for UEFI-based deployments.
Last updated 15 hours ago.