Adopt Existing Partitions
Goals
By following this how-to guide, you will learn how to adopt existing partitions with Trident, by using Host Configuration.
Instructions
Step 1: Determine Desired Partitions for Adoption
Find the desired adoption partitions on your host, either by:
-
Partition labels, using a command like:
lsblk -o NAME,PARTLABEL
-
UUIDs, using a command like:
lsblk -o NAME,UUID
Step 2: Add adoptedPartitions
Configuration
Inside the storage
section of your Trident Host Configuration,
add a new adoptedPartitions
section to the disk
section containing the partitions you want
to adopt. This section should include the partition IDs and their
corresponding uniquely identifying labels or UUIDs.
For example:
storage:
disks:
- id: disk-with-partitions-to-adopt
adoptedPartitions:
- id: adopted-partition-by-label
matchLabel: disklabel-part1
- id: adopted-partition-by-uuid
matchUuid: 12345678-abcd-1234-abcd-123456789abc
To adopt filesystems from the above partitions:
filesystems:
- deviceId: adopted-partition-by-label
source: adopted
mountPoint: /adopted-filesystem-by-label
- deviceId: adopted-partition-by-uuid
source: adopted
mountPoint: /adopted-filesystem-by-uuid
With this information, Trident will ensure that these partitions are preserved in the target OS.