1

Disclaimer: This is cross-posted on reddit but to no success and as I am quite desperate to get all my services up and running again, I now turn to you...

I had docker installed on my server (running Openmediavault) on a separate zpool/dataset named docker-apps/docker but I really didn't like that it created hundrets of legacy datasets for just a dozen of images. So I re-installed it to a newly created ext4 zvol named and mounted to the same location, i.e. /docker-apps/docker/, but for some reason Docker still uses zfs storage driver.

Right after the reinstall it looked like docker was using overlay2 as the docker dir had the overlay2 folder and no zfs folder. But when I tried to bring up my docker-compose it froze halfway through, so I chose to restart the server only to find that the overlay2 dir was now gone and replaced by a zfs dir.

Further more, some files and folders that I had rsyncet (-aHAX) into the newly created dir had also vanished. You'll find the steps I followed in the end.

When I run #df . from /docker-apps/docker/ I get:

Filesystem     1K-blocks  Used Available Use% Mounted on
/dev/zd0p1     117367920   224 117367696   1% /docker-apps/docker

And when I run #blkid /dev/zd0p1

/dev/zd0p1: UUID="32129cde-7529-4e91-a66e-e0d2d0945788" TYPE="ext4" PARTUUID="bf74c543-01"

But when I run #docker info I get:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.6
 Storage Driver: zfs
  Zpool: docker-apps
  Zpool Health: ONLINE
  Parent Dataset: docker-apps
  Space Used By Parent: 110736957440
  Space Available: 120184643584
  Parent Quota: no
  Compression: lz4
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: active
  NodeID: zo8ri6xuh2b83q8kqapjsykha
  Is Manager: true
  ClusterID: 8vjh79gtws9rusqorrusj2vhm
  Managers: 1
  Nodes: 1
  Default Address Pool: 10.0.0.0/8  
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
  Raft:
   Snapshot Interval: 10000
   Number of Old Snapshots to Retain: 0
   Heartbeat Tick: 1
   Election Tick: 10
  Dispatcher:
   Heartbeat Period: 5 seconds
  CA Configuration:
   Expiry Duration: 3 months
   Force Rotate: 0
  Autolock Managers: false
  Root Rotation In Progress: false
  Node Address: 192.168.24.4
  Manager Addresses:
   192.168.24.4:2377
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc version: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.4.106-1-pve
 Operating System: Debian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: x86_64
 CPUs: 32
 Total Memory: 125.9GiB
 Name: homeserver.lan
 ID: ME3U:ZU7D:YFKZ:N5IG:TLRU:VRWK:CANV:LYQQ:3QEF:SBCA:PNCN:LOKS
 Docker Root Dir: /docker-apps/docker
 Debug Mode: false
 Username: <My Docker Hub User>
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Below are (as far as I remember) the exact steps I took:

  1. Stop all running containers and rsync (-aHAX) my docker-compose.yml, my secret-files and all my appdata folder (mapped volumes) to a backup dir
  2. #docker system prune -all
  3. Stop and uninstall docker from the OVM GUI
  4. #rm -R /docker-apps/docker
  5. #rm /etc/docker/daemon.json
  6. #zfs create -V 100gb docker-apps/docker
  7. #fdisk /dev/zd0 #followed by something like: n enter enter enter enter w
  8. #mkfs.ext4 /dev/zd0p1
  9. #zfs set compression=lz4 docker-apps/docker
  10. #mkdir -p /docker-apps/docker
  11. #printf "UUID=%s /docker-apps/docker auto nodev,nofail 0 0" $(blkid | grep -oP "zd0p1: UUID=\K\"\S+\"") >> /etc/fstab
  12. #mount -a
  13. Reinstalled docker to /docker-apps/docker (from the OVM GUI)
  14. #docker swarm init
  15. rsynced (-aHAX) all the files from step 1 back into the the /docker-apps/docker dir
  16. installed all the relevant docker networks using #docker network create --attachable <name>
  17. #docker-compose up -d

I really need your help, many thanks in advance!

bitflip
  • 31
  • 3

0 Answers0