{"action":"created","issue":{"url":"https://api.github.com/repos/lxc/lxc/issues/2118","repository_url":"https://api.github.com/repos/lxc/lxc","labels_url":"https://api.github.com/repos/lxc/lxc/issues/2118/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxc/issues/2118/comments","events_url":"https://api.github.com/repos/lxc/lxc/issues/2118/events","html_url":"https://github.com/lxc/lxc/issues/2118","id":293495532,"number":2118,"title":"overlayfs: unable to copy second level snapshot","user":{"login":"timofurrer","id":1008252,"avatar_url":"https://avatars0.githubusercontent.com/u/1008252?v=4","gravatar_id":"","url":"https://api.github.com/users/timofurrer","html_url":"https://github.com/timofurrer","followers_url":"https://api.github.com/users/timofurrer/followers","following_url":"https://api.github.com/users/timofurrer/following{/other_user}","gists_url":"https://api.github.com/users/timofurrer/gists{/gist_id}","starred_url":"https://api.github.com/users/timofurrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timofurrer/subscriptions","organizations_url":"https://api.github.com/users/timofurrer/orgs","repos_url":"https://api.github.com/users/timofurrer/repos","events_url":"https://api.github.com/users/timofurrer/events{/privacy}","received_events_url":"https://api.github.com/users/timofurrer/received_events","type":"User","site_admin":false},"labels":[{"id":146847520,"url":"https://api.github.com/repos/lxc/lxc/labels/Incomplete","name":"Incomplete","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-01T11:28:49Z","updated_at":"2018-02-12T08:14:54Z","closed_at":null,"author_association":"NONE","body":"# Required information\r\n\r\n * Distribution: debian\r\n * Distribution version:  stretch / 9.3\r\n * The output of\r\n   * `lxc-start --version`: `2.0.7`\r\n   * `lxc-checkconfig`: everything is enabled.\r\n   * `uname -a`: `Linux T-000732319b72 4.9.0-4-rt-amd64 #1 SMP PREEMPT RT Debian 4.9.65-3 (2017-12-03) x86_64 GNU/Linux` It also happens with a 4.14 kernel.\r\n\r\n# Issue description\r\n\r\nI have the following situation:\r\n* `/var/lib/lxc` is read-only mounted on the system via NFS\r\n* There are two containers in this `lxcpath` at `/var/lib/lxc` . One is an overlayfs snapshot (created by `lxc-copy`) of the other one. \r\n   * `original`: original container\r\n   * `level-1-snapshot`: overlayfs snapshot of `original`\r\n* Now I want to create another overlayfs snapshot (`level-2-snapshot`) on top of the already snapshot container with the following command:\r\n```\r\nlxc-copy --snapshot --backingstorage overlay --name level-1-snapshot \\\r\n    --newname level-2-snapshot --lxcpath /var/lib/lxc --newpath /.writable/lxc\r\n```\r\n\r\nThis command then leads to the following error:\r\n```\r\nlxc-copy: utils.c: mkdir_p: 253 Read-only file system - failed to create directory '/var/lib/lxc/level-1-snapshot/delta0'\r\nlxc-copy: bdev/lxcoverlay.c: ovl_rsync: 704 Failed mounting original container fs\r\nlxc-copy: bdev/lxcoverlay.c: ovl_do_rsync: 757 copying overlayfs delta\r\nlxc-copy: bdev/bdev.c: bdev_copy: 388 failed getting pathnames for cloned storage: overlayfs:/var/lib/lxc/original/rootfs:/var/lib/lxc/level-1-snapshot/delta0\r\nlxc-copy: lxccontainer.c: copy_storage: 2867 Error copying storage.\r\nclone failed\r\n```\r\n\r\nWhy is that? Am I doing something wrong or is this just not supported?\r\n\r\nNote: If `/var/lib/lxc` is writeable is working fine.\r\n\r\nMy guess is that because we mount `/var/lib/lxc` read-only via NFS the overlayfs from `level-1-snapshot` to `original` is obviously not there and re-creating it doesn't work because `level-1-snapshot` is on the read-only mount, too. Does that make any sense?\r\n\r\nI assume I would need a way to specify a writeable branch for the `delta` directory used by the copy ..?"},"comment":{"url":"https://api.github.com/repos/lxc/lxc/issues/comments/364852618","html_url":"https://github.com/lxc/lxc/issues/2118#issuecomment-364852618","issue_url":"https://api.github.com/repos/lxc/lxc/issues/2118","id":364852618,"user":{"login":"timofurrer","id":1008252,"avatar_url":"https://avatars0.githubusercontent.com/u/1008252?v=4","gravatar_id":"","url":"https://api.github.com/users/timofurrer","html_url":"https://github.com/timofurrer","followers_url":"https://api.github.com/users/timofurrer/followers","following_url":"https://api.github.com/users/timofurrer/following{/other_user}","gists_url":"https://api.github.com/users/timofurrer/gists{/gist_id}","starred_url":"https://api.github.com/users/timofurrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timofurrer/subscriptions","organizations_url":"https://api.github.com/users/timofurrer/orgs","repos_url":"https://api.github.com/users/timofurrer/repos","events_url":"https://api.github.com/users/timofurrer/events{/privacy}","received_events_url":"https://api.github.com/users/timofurrer/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T08:14:54Z","updated_at":"2018-02-12T08:14:54Z","author_association":"NONE","body":"I've compiled https://github.com/lxc/lxc/tree/lxc-2.1.1 myself and it seems to work on a debian stretch 9.3 👍 \r\n\r\nThanks for the hint. Do you know if there are any pre-packed debian packages for stretch for 2.1.1 ?"}}
{"actor":{"display_login":"timofurrer"}}