diskSelector
expression and has enough free space to satisfy the minSize
requirement.
The raw volume is identified by a unique name, which is used both as a mount location and as a label for the volume.
The volume name must be unique across all raw volumes, and it should be between 1 and 34 characters long, and can only contain ASCII letters, digits, and -
(dash) characters.
The volume label is derived from the volume name as r-<volume-name>
, and it is used to identify the volume on the disk after initial provisioning.
Disk encryption can be optionally enabled for raw volumes.
Note: If you need to allocate a volume to be mounted to a container, please see User Volumes guide.
Creating Raw Volumes
To create a raw volume, append the following document to the machine configuration:openebs-vol1
is created on the first disk which is not the system disk and has 2GB
of disk space available.
The volume will be created as a partition with a size of 2GB
.
The status of the volume can be checked using the following command:
/dev/disk/by-partlabel/r-openebs-vol1
, which is created automatically by Talos Linux.
Note: Ceph will not create a partition if the partition label contains the substring ceph
. Avoid using such names for your labels.
Removing Raw Volumes
Before removing a raw volume, ensure that it is not used anymore. In order to remove a raw volume, first remove the configuration document from the machine configuration. TheVolumeStatus
resource will be removed automatically by Talos Linux.
Note: The actual disk data hasn’t been removed yet, so you can re-apply the raw volume configuration back and it will be re-provisioned on the same disk.To wipe the disk data, and make it allocatable again, use the following command:
sda1
is the partition name, and it can be obtained from the VolumeStatus
resource before the raw volume is removed,
or from the DiscoveredVolume
resource any time later.