Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use LVM storage operator for dynamic PV provisioning #4117

Open
anjannath opened this issue Apr 15, 2024 · 4 comments
Open

Use LVM storage operator for dynamic PV provisioning #4117

anjannath opened this issue Apr 15, 2024 · 4 comments
Assignees
Labels

Comments

@anjannath
Copy link
Member

anjannath commented Apr 15, 2024

Currently we are using the hostpath-provisioner for dynamic pv creation, however since it has limited functionality work is being done in crc-org/snc#877, crc-org/snc#869 and #4114 to install and setup lvm-operator

We need to make a decision whether to make the lvm-operator the default one and remove hostpath-provisioner, the behavior of expanding disk space using the config settingdisk-size will change if we move to lvm-operator as in that case disk-size will refer to the root partition size

to increase the space for PVs user has to use the config option persistent-volume-size

while talking with @praveenkumar he suggested the following to avoid any behavior change for users who don't want to use lvm-operator and are happy with hostpath-provisioner:

First method

  1. Introduce a new config enable-lvm-operator use-lvm-operator with default value false to allow users to make a choice of which operator they want to use
  2. When this config is enabled/set to true the LVMCluster CR will be created and the extra partition will be used for PV
  3. When this config is disabled/set to false the root partition is extended to take up the space from the extra partition (and optionally also delete the operator installation or scale down the deployments as the operatorgroup and subscription objects are created during snc)

Second method

  1. Introduce a new config enable-lvm-operator with default value false to allow users to make a choice of which operator they want to use
  2. When this config is enabled/set to true the extra partition will not be merged with the root partition and user has to follow the guide on openshift docs to setup/install the LVM operator on their own
  3. When this config is disabled/set to false the extra partition is merged into the root partition
@praveenkumar
Copy link
Member

done in # and # to install and setup

Looks like you forget to attach the issue number.

I personally think second method is much better because it will educate user about how it is enabled in a OpenShift cluster and also we don't have to worry about the changes which might happen during major release.

@cfergeau
Copy link
Contributor

cfergeau commented Apr 16, 2024

I don't think we should keep both lvm-operator and hostpath-provisioner. We pick one, and we maintain that. Easier for testing, easier for users who don't care about storage operators, ...

@anjannath
Copy link
Member Author

anjannath commented May 27, 2024

supporting both makes it complicated for the user, and as using topolvm needs to alter the disk layout for creating a separate partition to be used, so it also changes the existing behavior of disk-resizing.

currently crc config disk-size 35 would increase the root partition size by 4gb, but when we use topolvm since the root partition is before the topolvm partition we cannot easily resize the root partition, (in case of microshift the root partition is also a lvm logical volume)

we could look at moving the topolvm partition to the end of the disk after a disk-size increase and then increase the root parition (seems using sfdisk this is possible, but requires a restart of the crc vm) but is there any use case where users would need to increase the root partition? (note: the image-registry is also using a pvc for storage so images pulled will be stored in the topolvm partition)

@anjannath
Copy link
Member Author

is there any use case where users would need to increase the root partition? (note: the image-registry is also using a pvc for storage so images pulled will be stored in the topolvm partition)

pulled images are stored in the dir /var/lib/containers/storage and when running containers it uses the location /var/run/containers/storage which are both in the root partition, so there might be need to increase the root partition, furthermore and there's also emptyDir type volumes for ephemeral storage which uses /tmp location

@anjannath anjannath changed the title Should LVM storage operator be enabled by default? Use LVM storage operator for dynamic PV provisioning May 30, 2024
@anjannath anjannath self-assigned this Jul 19, 2024
@anjannath anjannath moved this to Ready for review in Project planning: crc Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready for review
Development

Successfully merging a pull request may close this issue.

3 participants