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

The tutorial instructions and scripts should be able to deal with ext4/overlayfs out of the box #13

Open
TinCanTech opened this issue Nov 23, 2021 · 4 comments

Comments

@TinCanTech
Copy link

Working through: https://github.com/knorrie/network-examples/blob/master/birdhouse-intro/README.md

Following Cloning and configuring new containers;

The container/config uses:

  • lxc.rootfs.path = overlay:/var/lib/lxc/birdbase/rootfs:/var/lib/lxc/weaver/delta0

However, this does not mount /var/lib/lxc/weaver/rootfs
This causes later copied data to be omitted when the container is running.

After searching and testing, I found that this configuration works correctly:

  • lxc.rootfs.path = overlay:/var/lib/lxc/weaver/rootfs:/var/lib/lxc/birdbase/rootfs:/var/lib/lxc/weaver/delta0

Also note, the mounting-order is Crucial, otherwise data in weaver/rootfs is still unavailable.

@TinCanTech
Copy link
Author

This becomes a major problem for "Hands ON: Step 4" of https://github.com/knorrie/network-examples/blob/master/ospf-intro/README.md

The data copied into ALL ${container}/rootfs folders is not available to the running containers without the change above.

@knorrie
Copy link
Owner

knorrie commented Nov 23, 2021

Hi! Thanks for trying out the tutorial.

I suspect your filesystem is ext4 and lxc is trying to use overlayfs for the snapshot functionality. In this case the situation indeed ends up being differently than in my case while writing all of it (using btrfs).

The instructions or little parts of tooling that are provided should do the right thing in both cases, so that the user does not end up spending energy on debugging irrelevant stuff.

The necessary changes for this simply did not happen yet.

Also see #12 which is about the same thing. The least I could immediately do was add a note about this (e3b5d60) in the text.

I have an idea, let's rename this issue from "Node/config: lxc.rootfs.path = overlay: x : y : z is incorrect" to "The tutorial instructions and scripts should be able to deal with ext4/overlayfs out of the box" and keep it open until that's the case. Are you ok with that?

Hans

@TinCanTech
Copy link
Author

TinCanTech commented Nov 23, 2021

Hi,

you can edit this ticket as you prefer.

You are right, I am using ext4 and did not understand the depth of the problem. At least I found a temporary solution and can continue, for now. Thanks.

@knorrie knorrie changed the title Node/config: lxc.rootfs.path = overlay: x : y : z is incorrect The tutorial instructions and scripts should be able to deal with ext4/overlayfs out of the box Nov 23, 2021
@knorrie
Copy link
Owner

knorrie commented Nov 23, 2021

Ok, done. I want to do this combined with doing #15

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

No branches or pull requests

2 participants