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

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants
@sidnei
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.

Sidnei da Silva
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.
+ 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.

@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?

@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.

@sidnei

sidnei Oct 18, 2013

Contributor

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

@sidnei

sidnei Oct 18, 2013

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.

@hallyn

hallyn Oct 18, 2013

Member

Gotcha!

@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