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

Free up loopdevice after image is built #594

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

kishen-v
Copy link
Contributor

Fixes: #591

Before image creation:


[root@pvsadm-tester1 bin]# df -h /
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root  233G   11G  223G   5% /

After image creation:

[root@pvsadm-tester1 bin]# df -h /
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root  233G   17G  217G   7% /

After deleting image that was created.

[root@pvsadm-tester1 bin]# df -h /
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root  233G   15G  219G   7% /

With Fix

Before Image creation


[root@pvsadm-tester1 bin]# df -h /
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root  233G   11G  223G   5% /

After image creation

[root@pvsadm-tester1 bin]# df -h /
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root  233G   13G  221G   6% /



After deleting the image that was created.

(Avail space before image creation = Avail space after image creation)

[root@pvsadm-tester1 bin]# df -h /
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/cl-root  233G   11G  223G   5% /

The built image was tested on PowerVS to ensure its functioning.

@ppc64le-cloud-bot ppc64le-cloud-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 18, 2024
@@ -29,15 +29,6 @@ import (

const losetupCMD = "losetup"

func findFreeLoop(file string) (string, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function definition is unused.

Copy link
Contributor

@Amulyam24 Amulyam24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick fix @kishen-v. LGTM!

Copy link
Member

@mkumatag mkumatag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ppc64le-cloud-bot ppc64le-cloud-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 23, 2024
@ppc64le-cloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kishen-v, mkumatag

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ppc64le-cloud-bot ppc64le-cloud-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2024
@ppc64le-cloud-bot ppc64le-cloud-bot merged commit 7348686 into ppc64le-cloud:main Apr 23, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pvsadm image qcow2ova conversion doesn't clean up used space
4 participants