You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
overlayfs: Can't delete file moved from base layer to newly created dir even on ext4 #9572
changed the title [-]overlayfs: Can't delete file moved from upper layer to newly created dir even on ext4[/-][+]overlayfs: Can't delete file moved from base layer to newly created dir even on ext4[/+]on Dec 8, 2014
I can reproduce this bug on Fedora 21.
Docker version: docker-io-1.4.1-8.fc21.x86_64
Kernel version: Linux xxxxx 3.18.3-201.fc21.x86_64 #1 SMP Mon Jan 19 15:59:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
I am not able to reproduce this issue on Ubuntu with older "overlayfs" driver and docker 1.4.1.
3.13.0-44-generic 73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Can someone paste the output for following?
ls -lah /var/lib/docker/overlay//upper/
ls -lah /var/lib/docker/overlay//upper/foo/
ls -lah /var/lib/docker/overlay//upper/bin/
(Maybe with latest "overlay" driver, last directory might be in /work/)
Just trying to understand if this is overlay issue or chroot. Most likely will be overlay driver. Sorry I do not have the latest kernel version to try.
As an additional piece of potentially useful info, I'm seeing this same issue when using pure lxc with an overlayfs filesystem.
If I delete a file from the lower filesystem, the file is not removed but becomes highlighted as if it's a broken symlink. Trying to read the file results in a "No such file or directory" error.
Current versions:
Linux testcontainer 3.13.0-52-generic #85-Ubuntu SMP Wed Apr 29 16:44:17 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
LXC versions 1.0.7 & 1.1.2
After doing some testing on a couple of different machines, I discovered that this problem occurs on one box I have where the host filesystem is formatted to xfs, but does not occur on my local machine here the / filesystem is formatted to ext4
EDIT: FWIW, on Fedora 22 (kernel 4.0.4-303.fc22.x86_64), I CAN reproduce this bug using overlay and chroot. (I'm not running lxc or docker.) ls -la /foo shows:
ls: cannot access foo/false: No such file or directory
total 0
c????????? ? ? ? ? ? false
And rmdir foo shows: "rmdir: failed to remove 'foo': Directory not empty"
I've experienced the same problem on Debian 4.3.3-7~bpo8+1 (2016-01-19) kernel with xfs storage backstore for overlay FS. Re-formatting it to ext4 with extra-high i-nodes number seems, solved the problem.
I came across a similar but different problem with overlay+xfs on kernel 4.5.3
After deleting a file in the merged directory, ls the file in the merged directory showing all the file attributes as question mark. The file in the upper directory turn out to be a character device.
@mountkin (I haven't found your ticket in bugzilla so I leave it here)
linux 4.6 fails to mount overlayfs if upperdir points to xfs created without ftype=1 and prints this "overlayfs: upper fs needs to support d_type.". I guess your xfs was created without this feature.
Activity
[-]overlayfs: Can't delete file moved from upper layer to newly created dir even on ext4[/-][+]overlayfs: Can't delete file moved from base layer to newly created dir even on ext4[/+]jessfraz commentedon Dec 9, 2014
Trying this now
On Monday, December 8, 2014, Denis Orlikhin [email protected]
wrote:
snnn commentedon Feb 5, 2015
I can reproduce this bug on Fedora 21.
Docker version: docker-io-1.4.1-8.fc21.x86_64
Kernel version: Linux xxxxx 3.18.3-201.fc21.x86_64 #1 SMP Mon Jan 19 15:59:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
ctapan commentedon Mar 24, 2015
I am not able to reproduce this issue on Ubuntu with older "overlayfs" driver and docker 1.4.1.
3.13.0-44-generic 73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Can someone paste the output for following?
ls -lah /var/lib/docker/overlay//upper/
ls -lah /var/lib/docker/overlay//upper/foo/
ls -lah /var/lib/docker/overlay//upper/bin/
(Maybe with latest "overlay" driver, last directory might be in /work/)
Just trying to understand if this is overlay issue or chroot. Most likely will be overlay driver. Sorry I do not have the latest kernel version to try.
sgirones commentedon Apr 14, 2015
Reproduced:
sgirones commentedon Apr 14, 2015
Reproduced even with 4.0.0. But behavior was slightly different:
sgirones commentedon Apr 14, 2015
For reference: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1410480
davebirch commentedon May 26, 2015
As an additional piece of potentially useful info, I'm seeing this same issue when using pure lxc with an overlayfs filesystem.
If I delete a file from the lower filesystem, the file is not removed but becomes highlighted as if it's a broken symlink. Trying to read the file results in a "No such file or directory" error.
Current versions:
Linux testcontainer 3.13.0-52-generic #85-Ubuntu SMP Wed Apr 29 16:44:17 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
LXC versions 1.0.7 & 1.1.2
After doing some testing on a couple of different machines, I discovered that this problem occurs on one box I have where the host filesystem is formatted to xfs, but does not occur on my local machine here the / filesystem is formatted to ext4
darlingm commentedon Jun 8, 2015
EDIT: FWIW, on Fedora 22 (kernel 4.0.4-303.fc22.x86_64), I CAN reproduce this bug using overlay and chroot. (I'm not running lxc or docker.)
ls -la /fooshows:And
rmdir fooshows: "rmdir: failed to remove 'foo': Directory not empty"8 remaining items
mishak87 commentedon Jan 7, 2016
I have same issue on
Linux 1568a0a4bee9 4.2.0-23-generic #28-Ubuntuusingext4.rhvgoyal commentedon Jan 11, 2016
Proposed a fix upstream.
http://marc.info/?l=linux-fsdevel&m=145252052703010&w=2
In Docker containers with the overlayfs backend, when a
b-a-t commentedon Feb 2, 2016
I've experienced the same problem on Debian 4.3.3-7~bpo8+1 (2016-01-19) kernel with
xfsstorage backstore for overlay FS. Re-formatting it toext4with extra-high i-nodes number seems, solved the problem.koct9i commentedon Mar 14, 2016
Fixed in linux 4.5 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=45d11738969633ec07ca35d75d486bf2d8918df6 going to be backported into next 4.4.y and other stable brances. Simple test sequence in commit message.
thaJeztah commentedon Mar 14, 2016
Thanks for the heads up @koct9i
mountkin commentedon May 9, 2016
I came across a similar but different problem with overlay+xfs on kernel 4.5.3
After deleting a file in the merged directory,
lsthe file in the merged directory showing all the file attributes as question mark. The file in the upper directory turn out to be a character device.runcom commentedon May 9, 2016
@mountkin http://article.gmane.org/gmane.linux.file-systems.union/496 there's an attempt to fix that but didn't receive any comments yet
koct9i commentedon May 9, 2016
@runcom Nope, this is different bug. That you're linked was fixed in 4.5 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=45d11738969633ec07ca35d75d486bf2d8918df6 see my comments above
@mountkin this is completely wrong place for reporting linux kernel bugs
Please submit this into https://bugzilla.kernel.org and/or lkml and related mailing list.
I cannot reproduce this right now in 4.4.8+ext4, I'll try exact setup later.
mountkin commentedon May 9, 2016
Thanks a lot @runcom
The difference between my report and http://article.gmane.org/gmane.linux.file-systems.union/496 is that I don't need to move the file to a sub directory.
@koct9i I'm testing with
xfs, notext4. Let me make some noise on the kernel bugzilla then 😇Edit: After searching the kernel bugzilla I got this one https://bugzilla.kernel.org/show_bug.cgi?id=108811 , which is exactly the problem I encountered.
koct9i commentedon May 10, 2016
@mountkin (I haven't found your ticket in bugzilla so I leave it here)
linux 4.6 fails to mount overlayfs if upperdir points to xfs created without ftype=1 and prints this "overlayfs: upper fs needs to support d_type.". I guess your xfs was created without this feature.
related commit https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=45aebeaf4f67468f76bedf62923a576a519a9b68
dmcgowan commentedon May 10, 2016
@koct9i thanks for pointing this out. The fix has also been release in 4.4.6 (changelog https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.6). Going to close this issue now.
reordered rm -rf to overcome bug: moby/moby#9572
[#81] Updates docker install instructions.