Weird legacy datasets found on ZFS

Hi everyone,

I setup my computer with Manjaro Gnome with ZFS and systemd-boot.
The datasets I originally created looked like this:

sudo zfs create -o canmount=off -o mountpoint=none rpool_$poolUUID/HOME
sudo zfs create -o canmount=off -o mountpoint=none rpool_$poolUUID/ROOT
sudo zfs create -o mountpoint=/ -o canmount=noauto rpool_$poolUUID/ROOT/manjaro
sudo zfs mount rpool_$poolUUID/ROOT/manjaro
sudo zfs create -o mountpoint=/home rpool_$poolUUID/HOME/manjaro
sudo zfs create -o mountpoint=/root rpool_$poolUUID/HOME/manjaro/root
sudo zfs mount -a

Now while deleting some snapshots I have found this:

[user@computer ~]$ sudo zfs list
NAME                                                                                              USED  AVAIL     REFER  MOUNTPOINT
rpool_cfw7pc                                                                                      127G  1.62T      192K  none
rpool_cfw7pc/HOME                                                                                 113G  1.62T      192K  none
rpool_cfw7pc/HOME/manjaro                                                                         113G  1.62T      113G  /home
rpool_cfw7pc/HOME/manjaro/root                                                                   2.32M  1.62T     2.32M  /root
rpool_cfw7pc/ROOT                                                                                14.4G  1.62T      192K  none
rpool_cfw7pc/ROOT/manjaro                                                                        14.4G  1.62T     14.2G  /
rpool_cfw7pc/ROOT/manjaro/1381e16bb9f2c4e9bbcddeaac207a8baaa0b53c2e4473faaa9a956d96e0596a4       5.58M  1.62T     5.57M  legacy
rpool_cfw7pc/ROOT/manjaro/3eea964ff1a8646087edaecbc9676e214cb80f619806a0787ec6f04ccb80f235        408K  1.62T     19.6M  legacy
rpool_cfw7pc/ROOT/manjaro/4b52e4dc1e912aa123e888120d5ae7a93beaf20c222e83616d6da1bd87fa5d0c        388K  1.62T      202M  legacy
rpool_cfw7pc/ROOT/manjaro/9a348db73d6fde9887f6289c47137912f0b1a2b0b123d3c60d63bb6c0f4afafb       14.8M  1.62T     19.6M  legacy
rpool_cfw7pc/ROOT/manjaro/a405b41234cb4b02f8b42b96f95246e67029127dc05cdeb4c9ed082d37d8d98e        184M  1.62T      202M  legacy
rpool_cfw7pc/ROOT/manjaro/dfdf87a94c704fgh17efax7cdf078242367cf21c3a1fgh9a157d6a4ff51c5a25       6.37M  1.62T      204M  legacy
rpool_cfw7pc/ROOT/manjaro/dfdf87a94c704fgh17efax7cdf078242367cf21c3a1fgh9a157d6a4ff51c5a25-init   408K  1.62T      202M  legacy

These are all legacy datasets of which one has -init appended to its name. I do not know if I can delete these or where they are coming from. Has anyone an idea? I looked though my installation log and was unable to identify any kind of software that would do such a thing to my knowledge.

Thank you in advance!

I just mounted one of them and it contains this:

[user@computer mount]$ ls -al
total 205
drwxr-xr-x 23 root root   26 17. Feb 22:05 .
drwxr-xr-x  8 root root    8  5. Mär 12:58 ..
drwxr-xr-x  3 root root    3 16. Feb 20:18 app
drwxr-xr-x  2 root root  289 16. Feb 07:30 bin
drwxr-xr-x  2 root root    2 16. Feb 07:30 config
drwxrwxr-x  2 root root    3 16. Feb 20:15 defaults
drwxr-xr-x  4 root root    5 17. Feb 22:05 dev
-rwxr-xr-x  1 root root    0 17. Feb 22:05 .dockerenv
-rwxrwxr-x  1 root root 3625 16. Feb 07:29 docker-mods
drwxrwxr-x 28 root root   55 17. Feb 22:05 etc
drwxr-xr-x  2 root root    2 16. Feb 07:30 home
-rwxr-xr-x  1 root root  389 13. Mai 2020  init
drwxr-xr-x  6 root root   30 16. Feb 20:18 lib
drwxr-xr-x  2 root root    5 12. Mai 2020  libexec
drwxr-xr-x  5 root root    5 16. Feb 07:30 media
drwxr-xr-x  2 root root    2 16. Feb 07:30 mnt
drwxr-xr-x  2 root root    2 16. Feb 07:30 opt
dr-xr-xr-x  2 root root    2 16. Feb 07:30 proc
drwx------  3 root root    3 16. Feb 20:17 root
drwxr-xr-x  2 root root    2 16. Feb 07:30 run
drwxr-xr-x  2 root root   69 16. Feb 07:30 sbin
drwxr-xr-x  2 root root    2 16. Feb 07:30 srv
drwxr-xr-x  2 root root    2 16. Feb 07:30 sys
drwxrwxrwt  2 root root    2 16. Feb 20:18 tmp
drwxrwxr-x  9 root root    9 16. Feb 20:18 usr
drwxr-xr-x 12 root root   13 16. Feb 07:30 var

The .dockerenv file as well as the fact that some of the files are dated may 2020 let me think that docker my be the culprit. My system has not been running since may and this seems like some imported filesystem.

I think it is docker, just reading up on it and found this:

  • The btrfs and zfs storage drivers are used if they are the backing filesystem (the filesystem of the host on which Docker is installed). These filesystems allow for advanced options, such as creating “snapshots”, but require more maintenance and setup. Each of these relies on the backing filesystem being configured correctly. - docs.docker .com/storage/storagedriver/select-storage-driver/

Edit: Yes it is indeed docker. If you leave it unconfigured it defaults to the zfs driver and just creates new datasets in the same dataset where /var/lib/docker is located at. Since the docker folder was located in my root dataset it started to create it’s own legacy datasets there. I stopped docker, recursivly removed all legacy datasets, created a new dataset with mountpoint set to /var/lib/docker and pulled an image. This is the result:

rpool_cfw7pc/ROOT/manjaro                                                                          15.1G  1.50T     14.8G  /
rpool_cfw7pc/ROOT/manjaro/docker                                                                    244M  1.50T     1.94M  /var/lib/docker
rpool_cfw7pc/ROOT/manjaro/docker/5c6ed244cdb7b84816afbb80e5a745107f5e53ae45cd2cc21eb868fb668a469d   242M  1.50T      242M  legacy
rpool_cfw7pc/ROOT/manjaro/docker/c76c2ad7fa573f32a127d3b6579d7b969fcb4d6b40a4b328c410ba29f9adaf9a   312K  1.50T      242M  legacy
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.