1

I've tried to move my Docker's directory from /var/lib/docker to an external hard drive, which is formatted with NTFS. I've followed this guide. However, when I do systemctl start docker I get an error, and in the journal I find these:

Jun 15 11:38:32 lampo.sial kernel: overlayfs: upper fs does not support tmpfile.
Jun 15 11:38:32 lampo.sial kernel: overlayfs: upper fs does not support RENAME_WHITEOUT.
Jun 15 11:38:32 lampo.sial kernel: overlayfs: upper fs missing required features.
Jun 15 11:38:32 lampo.sial dockerd[7728]: time="2023-06-15T11:38:32.910051824+01:00" level=error msg="failed to mount overlay: invalid argument" storage-driver=overlay2
Jun 15 11:38:32 lampo.sial dockerd[7728]: time="2023-06-15T11:38:32.910356041+01:00" level=error msg="[graphdriver] prior storage driver overlay2 failed: driver not supported"
Jun 15 11:38:32 lampo.sial dockerd[7728]: failed to start daemon: error initializing graphdriver: driver not supported

I'm doubting whether I can move that folder to an NTFS filesystem. What can I do?

Simone
  • 1,260
  • 1
  • 16
  • 27
  • did you read the guide's requirements? `Any Linux distro with systemd` and Windows is definitely not Linux. If you run wsl or wsl2 then the fs is in Linux but Windows drives are mounted as network drives and not a native drive either – phuclv Jun 15 '23 at 11:20
  • @phuclv Where did you get the impression that I'm working on Windows? Of course I'm on Linux - a derivative of Debian for RPi, to be precise. The main drive is a microSD card that is definitely smaller than I need, and so I'm trying to move Docker's directory to a 4 TB external hard drive that is already connected to the RPi, and the drive happens to use NTFS. – Simone Jun 15 '23 at 12:12
  • 1
    obviously only on WSL or other POSIX subsystem for Windows you'll get correct POSIX permissions on NTFS by default. The ntfs-3g driver requires users to manually specify a [mapping file while mounting](https://askubuntu.com/a/74851/253474) for correct permission mapping. The [NTFS3 kernel driver](https://www.kernel.org/doc/html/latest/filesystems/ntfs3.html) likely requires `acl=` for individual file permissions. Without that things that rely on POSIX permissions won't work – phuclv Jun 16 '23 at 01:45

1 Answers1

1

It seems your are using a not supported filesystem for the OverlayFS storage driver. Please, have a look of the support filesystem for each storage driver

So, first, retrieve your the filesystem you're using with df -h.

Then, you have 2 options:

  1. change the Docker storage-driver from the file /etc/docker/daemon.json and use a supported one
  2. change the filesystem used in your OS to one that will support OverlayFS as storage-driver
Alez
  • 1,913
  • 3
  • 18
  • 22
  • So basically I'm out of luck if the drive I want to move the folder to is NTFS, right? – Simone Jun 16 '23 at 07:18
  • I think so. As first attempt, try to use a different storage-driver, such as vfs which is a virtual filesystem that abstract real filesystems and where you access every file the same way even if the underlying FS is NTFS. It's a bit inefficient storage-driver from the memory point of view but simplify the usage. If this is ok for you you're done. On the other side, if you absolutely want OverlayFS I think you're forced to change the underlay FS. – Alez Jun 16 '23 at 08:57
  • I will switch to a different drive in a few days. It's not worth the hassle to use VFS. Thank you! – Simone Jun 16 '23 at 10:54