-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Docker Run Error with –storage-opt and Overlay2 on XFS with pquota #46823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reporting; from your
Project quotas are currently only supported on
We should also look if we want to implement this as part of the graph-drivers, because we're transitioning to he containerd image-store and snapshotters, so it would be better to implement there (if not implemented yet) I'll close this ticket because of the above, but feel free to continue the conversation |
Hi @thaJeztah I have tried with both file backing systems but did'nt work you check the conversion here https://forums.docker.com/t/docker-run-error-with-storage-opt-and-overlay2-on-xfs-with-pquota/138489 |
I know there's been some corner-cases around feature-detection for the overlay driver, and there's some work (but unfinished) to improve (see #45890), although I don't know if feature-detection for quotas is part of that /cc @neersighted Feature detection for the overlay driver is initiated in moby/daemon/graphdriver/overlay2/overlay.go Lines 189 to 196 in 75324c4
Which uses code from the Lines 107 to 132 in 75324c4
That code involves CGO though, and depends on some headers; Lines 1 to 19 in 75324c4
I also seem to recall that feature detection may happen on From the output of your
That may not be relevant, but we know that distro-maintainers tend to make modifications in the build-process (including different versions of the Go toolchain and build-time dependencies), which has resulted in (sometimes subtly) broken packages; if you have a system to test on, do you also see the same issue when installing packages from download.docker.com? (instructions for installing in https://docs.docker.com/engine/install/ubuntu/). |
I need this on extfs I also have this problem |
Dear @thaJeztah |
@tung06021992 it's not supported on extfs currently; see #29364 |
I've been using storage-opts for 2 years (pquota worked just fine and well), now upgraded docker and the fight is on. Docker fails: docker run --rm --storage-opt size=1g alpine id
docker: Error response from daemon: --storage-opt is supported only for overlay over xfs with 'pquota' mount option.
See 'docker run --help'. Backing FS and Root-Dir is correct # docker info | grep -E '(Root|Back)'
Backing Filesystem: xfs
Docker Root Dir: /sf/docker Mount points and options are correct: # grep xfs /etc/fstab
UUID=ea522e3a-e9a9-4f28-8553-d0157029364a /sf xfs defaults,nofail,noatime,usrquota,pquota 1 2
# mount | grep xfs
/dev/mapper/vg0-sf on /sf type xfs (rw,noatime,attr2,inode64,logbufs=8,logbsize=32k,sunit=1024,swidth=2048,usrquota,prjquota) Other:
|
Docker 20.10 reached EOL in this project; based on the version output ( |
thanks for your reply. The problem remains even when upgrading to the latest docker version.
|
I had a quick peek at the code; it looks like detection for quota support is handled during initialization of the graphdriver; moby/daemon/graphdriver/overlay2/overlay.go Lines 192 to 202 in 96ea6e0
The Lines 125 to 127 in 96ea6e0
But could also return an error for other reasons; Lines 139 to 142 in 96ea6e0
However, those errors are discarded unless the daemon is started with moby/daemon/graphdriver/overlay2/overlay.go Lines 196 to 197 in 96ea6e0
In that last case, no error is produced during daemon startup, and when trying to create a container with a size set, a fixed error is returned, which assumes it's not supported because moby/daemon/graphdriver/overlay2/overlay.go Lines 331 to 333 in 96ea6e0
Based on the above, at least some improvements could be made;
As to the cause of this issue on your machine (more so because you indicated this was after upgrading your host), I wonder if there's some change in newer kernel versions; I see there's some CGO code involved, and wondering if there's some incompatibility with newer kernel versions. Unfortunately, due to the error potentially being swallowed, that information is missing in this ticket currently; Lines 14 to 22 in 96ea6e0
|
@SkyperTHC if you have an environment that reproduces this issue, and if that environment can be used for testing; would you be able to try starting the daemon with the First start the docker service so that the daemon isn't running; systemctl stop docker Then manually start the daemon with the storage-option set ( dockerd --storage-opt size=1g |
sorry for the late reply. No Luck. dockerd --storage-opt overlay2.size=1g
failed to start daemon: error initializing graphdriver: Storage option overlay2.size not supported. Filesystem does not support Project Quota: failed to open dir: /sf/docker/overlay2/3aaae444b60d9904ab43e83c2d04a015ff0f8495bde588ffdb76?69318b548ae FYI, no prj-flag is set (and that's correct): lsattr -dp /sf/docker/overlay2/
0 ---------------------- /sf/docker/overlay2/ whereas the XFS quota is certainly working and works well when I use xfs_quota -x -c "limit -p bhard=128T 31337"
xfs_quota -x -c "report" | grep 31337
#31337 164690436 0 137438953472 00 [--------] I set a dummy project-id on xfs_quota -x -c "project -s -p /sf/docker/overlay2 31337"
lsattr -dp /sf/docker/overlay2
31337 -------------------P-- /sf/docker/overlay2 The error message changed to: dockerd --storage-opt overlay2.size=1g
failed to start daemon: error initializing graphdriver: driver not supported Removing the prj-id from
I dont have access to an env to reproduce this (unless I find more spare time) but happy to help as much as I can. |
dockerd --storage-opt overlay2.size=1g
failed to start daemon: error initializing graphdriver: Storage option overlay2.size not supported. Filesystem does not support Project Quota: failed to open dir: /sf/docker/overlay2/3aaae444b60d9904ab43e83c2d04a015ff0f8495bde588ffdb76?69318b548ae Hm; interesting; so that error looks to originate from some CGO code here; Lines 382 to 388 in c7e42d8
At least that slightly narrows down where to look. |
Hi @thaJeztah , Due to all this, I am using devicemapper, but it does not support Docker Engine versions above 24.0.9. It worked fine for a long time, but now, with a fresh installation, when I pull any image, I get the following error:
|
I was currently investigating the same issue on a setup, turns out |
Description
According to the documentation at docker run | Docker Docs, --storage-opt should work with overlay2, and the backing filesystem is XFS mounted with pquota. I’ve been trying for a while, but I keep encountering this error.
Reproduce
docker run -d it --storage-opt size=10G ubuntu
Expected behavior
No response
docker version
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: