0

Alright, so on the beginning I’ll say that I’m not a master at Linux and that it is my first post here. If you’ll need me to do anything, I’ll do my best, but I can’t promise I’ll be successful. Also I can name terms, programs etc. wrong.

uname -a

Linux XXXXXX 5.3.0-51-generic #44~18.04.2-Ubuntu SMP Thu Apr 23 14:27:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

lxc --version lxd --version

4.0.1

dpkg -s zfsutils-linux (Only version)

Version: 0.7.5-1ubuntu16.9

So, a bit of context…

I want to clarify is that this problem is a couple problems bundled together.

So I made a new storage in LXC, lxc storage create xxxx zfs size=20G.

I also made a new container, lxc launch ubuntu yyyy -s xxxx.

Everything was fine until I wanted to move my server files into another place.

I started copying files into a new directory which then I would’ve zipped.

It was doing that until the container ran out of space.

At that time I didn’t know that when a container from LXC runs out of space it’ll turn off completely and you won’t be able to turn it back on.

Error, when trying to launch the container

lxc info --show-log xxxx didn’t display any logs.

Message displayed after typing the command above

So I thought to increase size in the config of this storage.

Modified container's configuration

Nothing.

I read here that when you are providing storage's size it is actually it’s “starting” size and it should expand automatically. (But it doesn’t seem to do that?)

Later I found this.

So I started doing a copy of the disk’s image from /var/snap/lxd/common/lxd/disks/xxxx.img to /var/snap/lxd/common/lxd/disks/xxxx-copy.img using cp.

After it finished copying, I increased the size of this new image according to the guide and it worked, but when I tried to create a new pool using this new image, zpool create xxxx-copy /var/snap/lxd/common/lxd/xxxx-copy.img.

An error appeared saying that this image was already assigned to the original pool made by LXC.

The error mention above

Though after checking if the original pool didn’t have this new image connected using zpool status xxxx

No image is connected to the pool

So, the only thing I can think that can be happening is that this “connection” is contained only in this pool “manager”, but also in the image itself. Because of this, I also tried detaching the original image from the original pool to “disconnect” them using zpool detach xxxx /var/snap/lxd/common/lxd/disks/xxxx.img.

But then this error appeared.

Another error

But I coulnd’t find information about these image types and the way of changing them.

Yes, I tried Google’ing.

I thought that maybe there exists some kind of file browser or an “unpacker” for these images, but I couldn’t find anything.

The only thing I want to do at this moment is to get these files out of this image, because they are just stuck there and they’re really important to me.

If there is a need for me to test something, to do, or to confirm something. I’ll try to respond ASAP. Like I said this is important to me.

  • To start with, which version of Linux have you installed  (Ubuntu server, Ubuntu desktop, Kubuntu, Lubuntu, Xubuntu, Ubuntu MATE, et al.) , and which release number? I see you provided the kernel, but not the distro, and different releases have different tools for us to recommend. Please click [edit] and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our channel to you. All facts about your system should go in the Question with [edit] – K7AAY May 12 '20 at 15:59
  • 1
    Does these answer your question? [Expanding existing ZFS loop device](https://askubuntu.com/questions/1137726/expanding-existing-zfs-loop-device) or [How do I copy a file/directory from host into a LXD container?](https://askubuntu.com/questions/1048217/how-do-i-copy-a-file-directory-from-host-into-a-lxd-container). If you cannot create a temporary (or permanent) second storage pool, or if you have trouble with `lxc pull`, then please update your question. – user535733 May 12 '20 at 16:07

0 Answers0