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 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;
Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants