|
| 1 | +## topolvm components and architecture |
| 2 | +See diagram https://github.com/topolvm/topolvm/blob/topolvm-chart-v15.5.5/docs/design.md |
| 3 | + |
| 4 | +## Preqrequisites |
| 5 | +`topolvm` does not automatically creates Volume Groups (specified in device-classes). This needs to be configured additionally (e.g. manually, via ansible, ...) |
| 6 | + |
| 7 | +Manual example (Ubuntu 22.04): |
| 8 | +1. Create partition to use later (`sudo fdisk /dev/sda`) |
| 9 | +2. Create PV (`sudo pvcreate /dev/sda2`) |
| 10 | + * Prerequisite: `sudo apt install lvm2` |
| 11 | +3. Create Volume group (`sudo vgcreate topovg-sdd /dev/sda2`) |
| 12 | + * Note: Volume group's name must correspond to the setting of `volume-group` inside `lvmd.deviceClasses` |
| 13 | +4. Check volume group (`sudo vgdisplay`) |
| 14 | + |
| 15 | +Source: https://github.com/topolvm/topolvm/blob/topolvm-chart-v15.5.5/docs/getting-started.md#prerequisites |
| 16 | + |
| 17 | +## Deleting PV(C)s with `retain` reclaim policy |
| 18 | +1. Delete release (e.g. helm uninstall -n test test) |
| 19 | +2. Find LogicalVolume CR (`kubectl get logicalvolumes.topolvm.io` |
| 20 | +3. Delete LogicalVolume CR (`kubectl delete logicalvolumes.topolvm.io <lv-name>`) |
| 21 | +4. Delete PV (`kubectl delete PV <pv-name>`) |
| 22 | + |
| 23 | +## Backup / Snapshotting |
| 24 | +1. Only possible while using thin provisioning |
| 25 | +2. We use thick (non-thin provisioned) volumes --> no snapshot support |
| 26 | + |
| 27 | + Track this feature request for changes https://github.com/topolvm/topolvm/issues/1070 |
| 28 | + |
| 29 | +Note: there might be alternative not documented ways (e.g. via Velero) |
| 30 | + |
| 31 | +## Resizing PVs |
| 32 | +1. Update storage capacity in configuration |
| 33 | +2. Deploy changes |
| 34 | + |
| 35 | +Note: storage size can only be increased. Otherwise, one gets `Forbidden: field can not be less than previous value` error |
| 36 | + |
| 37 | +## Node maintenance |
| 38 | + |
| 39 | +Read https://github.com/topolvm/topolvm/blob/topolvm-chart-v15.5.5/docs/node-maintenance.md |
| 40 | + |
| 41 | +## Using topolvm. Notes |
| 42 | +* `topolvm` may not work with pods that define `spec.nodeName` Use node affinity instead |
| 43 | + https://github.com/topolvm/topolvm/blob/main/docs/faq.md#the-pod-does-not-start-when-nodename-is-specified-in-the-pod-spec |
0 commit comments