-
Notifications
You must be signed in to change notification settings - Fork 242
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
Update disk resize to work with lvms-storage-operator
/topolvm
#4114
Commits on Jul 31, 2024
-
use label to find the root partition in ocp preset
after using topolvm as storage provisioner there's two partitions of type xfs and its ambiguos which is the root partition but the root partition also has a label 'root' in case of the ocp bundle
Configuration menu - View commit details
-
Copy full SHA for d21c532 - Browse repository at this point
Copy the full SHA d21c532View commit details -
config: make persistent-volume-size applicable for ocp preset
this allows users to also configure the persistent volume's partition size for the ocp preset, in case of ocp preset the default size of the persistent volume partition (topolvm partition) is 3G
Configuration menu - View commit details
-
Copy full SHA for 7b5c5c0 - Browse repository at this point
Copy the full SHA 7b5c5c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0f939f - Browse repository at this point
Copy the full SHA d0f939fView commit details -
update disk resize to work with new disk layout
to be able to use topolvm we need a separate parition this new partition is added at the end of the disk and used by topolvm so the new disk layout is |efi|boot|root|pv| earlier the root parition could be easily extended after increasing the disk size as there was no patition after it, with the new layout after increasing the disk size we have to move the "pv" partition to create free space after the "root" partition to increase its size this adds code to move topolvm partition and restart the VM which is needed to re-read the changed partition table, after moving the part the root partition can be grown
Configuration menu - View commit details
-
Copy full SHA for 4be7f76 - Browse repository at this point
Copy the full SHA 4be7f76View commit details -
refactor: move function related to paritions into separate file
this makes it a bit easier to navigate the start.go file by moving some of the disk size and partition modification functions into a separate disks.go file in the same machine package
Configuration menu - View commit details
-
Copy full SHA for 4b63967 - Browse repository at this point
Copy the full SHA 4b63967View commit details -
remove hardcoded topolvm partition name
this uses `blkid -t PARTLABEL=topolvm` to get the topolvm partition name and introduces a helper 'runBlkidQuery' to run different forms of the `blkid` command
Configuration menu - View commit details
-
Copy full SHA for 7155747 - Browse repository at this point
Copy the full SHA 7155747View commit details -
refactor: rename growRootFileSystem to growFileSystem
since it does more than growing only the root file system it additionally grows the partition used by topolvm/lvms operator
Configuration menu - View commit details
-
Copy full SHA for 2f814b3 - Browse repository at this point
Copy the full SHA 2f814b3View commit details -
disk-resize: use actual partition sizes to calculate pv shift size
instead of relying on the config values and the constants for default disk-size and pv partition size, this fetches the size of disk, root and pv partition using `lsblk` and uses these values to calculate the size by which the pv partition needs to be shifted to apply requested new values for 'disk-size' and 'persistent-volume-size' configs it uses the 'strongunits' package from containers/common for bytes to GiB conversions and its types to deal with storage sizes
Configuration menu - View commit details
-
Copy full SHA for d129b86 - Browse repository at this point
Copy the full SHA d129b86View commit details