Get files out of ZFS or unpack an image

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.

Unfortunately, due to restrictions of maximum amount of links and images, I decided to make a list of links in Pastebin and I’ll refer to them as (Link #x),

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

dpkg -s zfsutils-linux (Tylko wersja)
Version: 0.7.5-1ubuntu16.9

So, a bit of context…
The most important thing I want to clarify is that this problem is a couple problems bundled together and I may know this might be a more ZFS orientated problem, but I figured why not ask here first.
Also I use LXD, but most of the commands I’ve been using come from LXC. Don’t know if that makes a difference

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.

(Link #1)
lxc info --show-log xxxx didn’t display any logs.

(Link #2)
So I thought to increase size in the config of this storage.

(Link #3)
I read here (Link #4) 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 (Link #5).
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.

(Link #6)
Though after checking if the original pool didn’t have this new image connected using
zpool status xxxx

(Link #7)
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.

(Link #8)
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.

Refer this:

lxc publish cn1 --alias deskmate
lxc image list
lxc image export deskmate1
lxc image import deskmate1.tar.gz --deskmate1
lxc launch deskmate1 cn2

the exported image is as tar.gz in root/ folder just do ls. You can then export this tar.gz file to your drive or email :slight_smile: or whatever you want