btrfs: unable to delete empty directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
When trying to delete an empty directory on a btrfs partition I'm getting the following error:
root@ceph-mds:~# rm -rf /data/old/
rm: cannot remove `/data/old/broken': Directory not empty
However:
root@ceph-mds:~# ls -la /data/old/broken/
total 0
drwxr-xr-x 1 root root 0 2010-08-26 07:29 .
drwxr-xr-x 1 root root 12 2010-08-26 22:10 ..
Also, I don't fully understand why rm -rf would care about non-empty directories.
I've since upgraded the kernel twice with the maverick updates, so I also rebooted twice, no change. So it's not some file that was deleted but is still opened by some process. I've tried btrfsck, but that didn't complain either.
Currently trying if I can reproduce this on another machine. Unfortunately /data simply is part of the / partition, so reformatting would be a bit annoying. Can do if needed, of course.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: linux-image-
Regression: No
Reproducible: No
ProcVersionSign
Uname: Linux 2.6.35-19-server x86_64
AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
AplayDevices: Error: [Errno 2] No such file or directory
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
CurrentDmesg:
Date: Thu Aug 26 21:56:04 2010
Frequency: This has only happened once.
InstallationMedia: Ubuntu-Server 10.10 "Maverick Meerkat" - Alpha amd64 (20100804.3)
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: innotek GmbH VirtualBox
PciMultimedia:
ProcCmdLine: BOOT_IMAGE=
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: linux
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.modalias: dmi:bvninnotekG
dmi.product.name: VirtualBox
dmi.product.
dmi.sys.vendor: innotek GmbH
Ok, this is reproduceable with the latest ceph git tree.
If you build the ceph sources, and then call mkcephfs -c ceph.conf with the osd configuration pointing to /data/osd0, you'll end up with /data/osd0/current, which can't be deleted.
It can be renamed, making it end up with the filename the previous post shows. I was using the same series of commands before.