Skip to main content

Storage Configuration Rules

Documentation about the rules used to validate the storage configuration.

Contents

Block Device Description

This table lists all the different kinds of block devices that exist in the configuration, along with their descriptions.

Block device kindDescription
diskA disk
partitionA new physical partition
adopted-partitionAn existing physical partition that is being adopted
raid-arrayA RAID array
ab-volumeAn A/B volume
encrypted-volumeAn encrypted volume
verity-deviceA verity device

Referrer Description

This table lists all the different kinds of referrers that exist in the configuration, along with their descriptions.

Referrer kindDescription
raid-arrayA RAID array
ab-volumeAn A/B volume
encrypted-volumeAn encrypted volume
verity-deviceA verity device
swap-deviceA swap mount
filesystem-newA new filesystem
filesystem-imageA filesystem from an image
filesystem-espAn ESP/EFI filesystem
filesystem-adoptedAn adopted filesystem

Reference Validity

This table contains the rules for valid references in the storage configuration. The rows represent the different types of referrers that exists in the configuration, and the columns represent the different types of block devices that can be referenced.

A single cell in the table represents whether a referrer of a certain type can reference a block device of a certain type.

Referrer ╲ Devicediskpartitionadopted-partitionraid-arrayab-volumeencrypted-volumeverity-device
raid-arrayNoYesNoNoNoNoNo
ab-volumeNoYesNoYesNoYesNo
encrypted-volumeNoYesNoYesNoNoNo
verity-deviceNoYesNoYesYesNoNo
swap-deviceNoYesNoNoNoYesNo
filesystem-newNoYesNoYesYesYesNo
filesystem-imageNoYesNoYesYesYesYes
filesystem-espNoYesYesYesNoNoNo
filesystem-adoptedNoNoYesNoNoNoNo

Reference Count

A referrer may only reference a certain number of block devices. The table below shows valid reference counts for each referrer type.

Referrer typeMinMax
raid-array2
ab-volume22
encrypted-volume11
verity-device22
swap-device11
filesystem-new01
filesystem-image11
filesystem-esp11
filesystem-adopted11

Reference Sharing

Most referrers claim exlusive access over their references. This table contains the rules for sharing references in the storage configuration.

Referrer typeValid sharing peers
raid-array(none)
ab-volume(none)
encrypted-volume(none)
verity-device(none)
swap-device(none)
filesystem-new(none)
filesystem-image(none)
filesystem-esp(none)
filesystem-adopted(none)

Unique Field Value Constraints

Some block device types require that the value of a specific field be unique across all block devices of that type.

Device KindField Name
diskdevice
adopted-partitionmatchLabel
adopted-partitionmatchUuid
raid-arrayname
encrypted-volumedeviceName
verity-devicename

Filesystem Block Device Requirements

Depending on the type of a filesystem, they may or may nor reference a backing block device.

Filesystem TypeExpects Block Device
ext4Yes
xfsYes
vfatYes
ntfsYes
tmpfsNo
autoYes

Filesystem Source Requirements

Depending on the type of a filesystem, they may have different source types.

Filesystem TypeValid Source Type
ext4new or adopted or image
xfsnew or adopted or image
vfatnew or adopted or image
ntfsnew or adopted or image
tmpfsnew
autoadopted

Filesystem Mounting

Depending on the type of a filesystem, they may or may not have a mount point configured.

Filesystem TypeMount Point
ext4Optional
xfsOptional
vfatOptional
ntfsOptional
tmpfsRequired
autoOptional

Filesystem Verity Support

Depending on the type of a filesystem, they may or may not be used for verity.

Filesystem TypeSupports Verity
ext4Yes
xfsYes
vfatNo
ntfsNo
tmpfsNo
autoNo

Homogeneous References

The following referrers require that all referenced devices are of the same type:

  • raid-array
  • ab-volume
  • encrypted-volume
  • verity-device
  • swap-device

Homogeneous Partition Types

The following referrers require that all underlying partitions are of the same type:

  • raid-array
  • ab-volume
  • encrypted-volume
  • swap-device
  • filesystem-new
  • filesystem-image
  • filesystem-esp
  • filesystem-adopted

Homogeneous Partition Sizes

The following referrers require that all underlying partitions are of the same size:

  • raid-array
  • ab-volume

Allowed Partition Types

Some referrers only support specific underlying partitions types.

Referrer typeAllowed partition types
raid-arrayany
ab-volumeany
encrypted-volumeany type except 'esp' or 'root' or 'root-verity' or 'usr-verity' or 'home'
verity-device'root' or 'root-verity' or 'usr' or 'usr-verity' or 'linux-generic'
swap-device'swap'
filesystem-newany type except 'esp'
filesystem-imageany
filesystem-esp'esp'
filesystem-adoptedany type except 'esp'

Allowed RAID Levels

Some referrers may only refer to RAID arrays with certain RAID levels.

Referrer typeAllowed RAID levels
raid-arrayMay not refer to a RAID array
ab-volumeany
encrypted-volumeany
verity-deviceany
swap-deviceMay not refer to a RAID array
filesystem-newany
filesystem-imageany
filesystem-esp'raid1'
filesystem-adoptedMay not refer to a RAID array

Partition Type Valid Mounting Paths

This rule is not strictly enforced, but is provided as a warning to the user.

Some partition types have expected mount point paths, and will generally be mounted at the expected path. For example, the boot partition is generally mounted at /boot, and the root partition is generally mounted at /.

The following table lists the expected mount points for each partition type, as defined in the Discoverable Partition Specification (DPS):

Mount PathValid Mount Paths
esp/boot or /efi or /boot/efi
root/
swapNone
root-verityNone
home/home
var/var
usr/usr
usr-verityNone
tmp/var/tmp
linux-genericAny path
srv/srv
xbootldr/boot
unknownAny path

Partition Type Matching Hash Partition

Partitions being used for verity need a matching partition for the hash data.

This table lists the expected hash partition for each partition type. Types that are not listed are not valid for verity.

Partition TypeMatching Hash Partition
rootroot-verity
usrusr-verity
linux-genericlinux-generic