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

Add support for using thin provisioned lvm volumes when creating a container. #67

Closed
wants to merge 3 commits into from

Conversation

@sidnei
Copy link
Contributor

sidnei commented Oct 18, 2013

Per issue #32, add a --thinpool argument to lxc-create, to use thin pool backed lvm when creating
the container. When cloning a container backed by a thin pool, the clone will default
to the same thin pool.

…when creating

the container. When cloning a container backed by a thin pool, the clone will default
to the same thin pool.
char *cmd, output[12];
const char *lvscmd = "lvs --unbuffered --noheadings -o lv_attr %s 2>/dev/null";

len = strlen(lvscmd) + strlen(path) - 1;

This comment has been minimized.

Copy link
@hallyn

hallyn Oct 18, 2013

Member

Why -1 here? The strlen() returns length not including final \0. So I think you actually want a +1 for a final \0. Am I thinking wrong?

This comment has been minimized.

Copy link
@sidnei

sidnei Oct 18, 2013

Author Contributor

'%s' is 2 chars long and gets replaced by path, so if I'm doing the math right then -1 is correct.

This comment has been minimized.

Copy link
@hallyn

hallyn Oct 18, 2013

Member

Gotcha!

@sidnei sidnei closed this Oct 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.