Cannot remove directory on btrfs

Al Berger

There is an object on btrfs file system called "????????? ??????" which probably some improperly deleted or copied temporary file or directory. And which can't be removed with common commands: rm, rm -d:

[root@localhost sessions]# rm -d \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
rm: cannot remove ‘????????? ??????/’: Directory not empty
[root@localhost sessions]# rm -dr \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
rm: descend into directory ‘????????? ??????/’? y
rm: remove directory ‘????????? ??????/’? y
rm: cannot remove ‘????????? ??????/’: No such file or directory
[root@localhost sessions]# rm \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
rm: cannot remove ‘????????? ??????/’: Is a directory
[root@localhost sessions]# file \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
????????? ??????/: directory

How such objects should be deleted?

UPDATE: OS and shell:

Linux 4.0.4-2-ARCH #1 SMP PREEMPT Fri May 22 03:19:32 UTC 2015 i686 GNU/Linux

GNU bash, version 4.3.39(1)-release (i686-pc-linux-gnu)

UPDATE2:

[root@localhost sessions]# rm -fr \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
[root@localhost sessions]# ls
????????? ??????   backup-9.session
[root@localhost sessions]# lsattr \?\?\?\?\?\?\?\?\?\ \?\?\?\?\?\?/
[root@localhost sessions]# 

UPDATE3:

[root@localhost sessions]# echo $LANG
en_US.UTF-8
[root@localhost sessions]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

UPDATE4:

[root@localhost sessions]# ls -la
ls: ????????? ??????: No such file or directory
total 23760
drwxr-xr-x 1 al users       0 Aug 13  2014 ????????? ??????
drwxr-xr-x 1 al users       0 Jun  7 05:53 .
drwx------ 1 al users       0 Jun  8 05:06 ..
-rw-r--r-- 1 al users  274557 May 24 18:58 backup-11.session

UPDATE5:

[root@localhost sessions]# find . -exec rm -fr {} \;
rm: refusing to remove ‘.’ or ‘..’ directory: skipping ‘.’
[root@localhost sessions]# ls -la
ls: ????????? ??????: No such file or directory
total 0
drwxr-xr-x 1 al users 0 Aug 13  2014 ????????? ??????
drwxr-xr-x 1 al users 0 Jun  8 17:03 .
drwx------ 1 al users 0 Jun  8 05:06 ..
[root@localhost sessions]# 
Al Berger

After rebuilding checksums for the whole partition, running scrub and --repair one more time - the garbage filesystem entries are at last gone.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

bash: cannot remove directory

rm: cannot remove directory: `.'

Cannot remove <file>: No such file or directory

Cannot remove .git/: Directory not empty

Cannot remove symbolic link to directory

"cannot remove 'some_directory': Directory not empty"

mv: cannot remove directory: Directory not empty

btrfs restore specific directory

Cannot remove item. The directory is not empty

Cannot (force) remove directory in Docker build

Canceled SSHFS (fuse) mount - cannot remove directory

Cannot remove file from working directory

rm: cannot remove 'file': No such file or directory

Cannot remove directory from Git history

rm: cannot remove directory/: Permission denied

Ignore 'cannot remove `dir`: Is a directory message

Is it possible to create BTRFS snapshot for a directory?

Cannot create a btrfs on 2 disks

Cannot delete encrypted btrfs snapshot

rm succeed but it prints out rm: cannot remove '': No such file or directory

Cannot remove /snap directory even after removing snapd

"/bin/rm: cannot remove files .. No such file or directory " though they exist

rm: cannot remove `/run/user/root/gvfs': Is a directory

Cannot remove JDK – /usr/sbin/alternatives: No such file or directory

sudo rm -rf returns "cannot remove directory" on empty directory owned by root

Ubuntu btrfs snapshot cannot mv into /home

file manager cannot mount btrfs usb disk

/boot file system cannot be of type btrfs subvolume

Remove all files in a directory but not the subdirectories without getting the display "cannot remove directories