Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   repart.d    ( 5 )

файлы определения разделов для автоматического переразметки при загрузке (Partition Definition Files for Automatic Boot-Time Repartitioning)

  Name  |  Synopsis  |    Description    |  [partition] section options  |  Specifiers  |  Examples  |  See also  |  Note  |

Описание (Description)

repart.d/*.conf files describe basic properties of partitions of
       block devices of the local system. They may be used to declare
       types, names and sizes of partitions that shall exist. The
       systemd-repart(8) service reads these files and attempts to add
       new partitions currently missing and enlarge existing partitions
       according to these definitions. Operation is generally
       incremental, i.e. when applied, what exists already is left
       intact, and partitions are never shrunk, moved or deleted.

These definition files are useful for implementing operating system images that are prepared and delivered with minimally sized images (for example lacking any state or swap partitions), and which on first boot automatically take possession of any remaining disk space following a few basic rules.

Currently, support for partition definition files is only implemented for GPT partitition tables.

Partition files are generally matched against any partitions already existing on disk in a simple algorithm: the partition files are sorted by their filename (ignoring the directory prefix), and then compared in order against existing partitions matching the same partition type UUID. Specifically, the first existing partition with a specific partition type UUID is assigned the first definition file with the same partition type UUID, and the second existing partition with a specific type UUID the second partition file with the same type UUID, and so on. Any left-over partition files that have no matching existing partition are assumed to define new partition that shall be created. Such partitions are appended to the end of the partition table, in the order defined by their names utilizing the first partition slot greater than the highest slot number currently in use. Any existing partitions that have no matching partition file are left as they are.

Note that these definitions may only be used to create and initialize new partitions or to grow existing ones. In the latter case it will not grow the contained files systems however; separate mechanisms, such as systemd-growfs(8) may be used to grow the file systems inside of these partitions. Partitions may also be marked for automatic growing via the GrowFileSystem= setting, in which case the file system is grown on first mount by tools that respect this flag. See below for details.