Greetings all. I have two LXD servers: server(a) is running 2.08 and server(b) is running 2.12. Both servers have BTRFS filesystems. I am trying to copy/migrate a container from server(a) to server(b) but keep running into LXD issues:
root@WP-Container-Mgmt:~# lxc stop WP-Container-004:wordpress-testsite-com1 && copy WP-Container-004:wordpress-testsite-com1 WP-Container-005: (works OK) On the receiving side, I see a similar directory with a timestamp: ------------------------------- root@HJ-WP-Container-005: ls -la /var/lib/lxd/storage-pools/default/containers drwxr-xr-x 1 root root 132 May 15 22:46 . drwxr-xr-x 1 root root 62 Apr 28 09:34 .. drwx------ 1 root root 10 May 15 22:46 wordpress-testsite-com1845325915 …and, inside that site directory I see this: ----------------------------- root@HJ-WP-Container-005: ls -la /var/lib/lxd/storage-pools/default/containers/wordpress-testsite-com1845325915/ total 0 drwx------ 1 root root 10 May 15 22:46 . drwxr-xr-x 1 root root 132 May 15 22:46 .. drwxr-xr-x+ 1 100000 100000 12 May 15 22:49 .root Running an “lxc list”, I see this: ----------------------------- root@HJ-WP-Container-005:/var/lib/lxd/storage-pools/default/containers# lxc list +--------------------------+---------+--------------------------------+------+------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +--------------------------+---------+--------------------------------+------+------------+-----------+ | wordpress-testsite-com1 | STOPPED | | | PERSISTENT | 0 | +--------------------------+---------+--------------------------------+------+------------+-----------+ Trying to sort the container on the receiving side: --------------------------------------------------- root@HJ-WP-Container-005:/var/lib/lxd/storage-pools/default/containers# lxc start wordpress-testsite-com error: saving config file for the container failed Try `lxc info --show-log wordpress-testsite-com` for more info root@HJ-WP-Container-005:/var/lib/lxd/storage-pools/default/containers# lxc info --show-log wordpress-testsite-com Name: wordpress-testsite-com Remote: unix:/var/lib/lxd/unix.socket Architecture: x86_64 Created: 2017/05/16 03:30 UTC Status: Stopped Type: persistent Profiles: WP__Default Log: At this point, LXD is in an inconsistent state. BTRFS now has a sub volume for this container (under container_name/.root), but LXC won’t allow me to remove it until I do some *hackery* ------------------------------------------------------------ root@HJ-WP-Container-005:/var/lib/lxd/storage-pools/default/containers# lxc delete wordpress-testsite-com1 error: Failed to run: btrfs subvolume delete /var/lib/lxd/storage-pools/default/containers/wordpress-testsite-com1: ERROR: cannot access subvolume /var/lib/lxd/storage-pools/default/containers/wordpress-testsite-com1: No such file or directory btrfs sub list /var/lib/lxd/storage-pools/default/containers --------------------------- ID 257 gen 1238 top level 5 path containers ID 258 gen 1176 top level 5 path snapshots ID 259 gen 229 top level 5 path images ID 260 gen 12 top level 5 path custom ID 1087 gen 1245 top level 257 path wordpress-testsite-com1845325915/.root root@HJ-WP-Container-005:/var/lib/lxd/storage-pools/default/containers# btrfs sub del wordpress-testsite-com1845325915/.root/ Delete subvolume (no-commit): '/var/lib/lxd/storage-pools/default/containers/wordpress-testsite-com1845325915/.root’ root@HJ-WP-Container-005:/var/lib/lxd/storage-pools/default/containers# rmdir wordpress-testsite-com1845325915/ root@HJ-WP-Container-005:/var/lib/lxd/storage-pools/default/containers# btrfs sub create wordpress-testsite-com1 Create subvolume './wordpress-testsite-com1’ root@HJ-WP-Container-005:/var/lib/lxd/storage-pools/default/containers# lxc delete wordpress-testsite-com1 Obviously, there are a *few* bugs here, but I really need to get those containers from the 2.08 server to the 2.12 server. What is the best way to make this happen? -Ron _______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
