I have a directory and there are two mysterious entries, they don't show inode number nor any other metadata. When I type ls -li in the command line I get:
$ ls -li
ls: no s’ha pogut accedir a 'clementine.db-journal': El fitxer o directori no existeix
ls: no s’ha pogut accedir a 'clementine.db-journal': El fitxer o directori no existeix
total 1356072
# Some normal files
? -????????? ? ? ? ? ? clementine.db-journal
? -????????? ? ? ? ? ? clementine.db-journal
# more normal files
The first ? is in place of the inode, the following group are the permissions, one I don't know, user and group, filesize, and date, finally the filename.
rm -f clementine.db-journal doesn't seem to help.
Are there tools to analyse directories in a lower level than ls? Is the directory broken? Can I fix it? Do I have to replace the whole directory? (with mkdir, cp, rm, rmdir)
Context information:
I use Clementine to listen to music. Clementine uses a sqlite database to store information. The Clementine database is located at ~/.config/Clementine/clementine.db. This entries appeared when I booted after a power loss (I know I need a UPS). The filesystem where this is sitting on is btrfs.
Edit:
As @DopeGhoti mentioned I run a filesystem check (the btrfs equivalent). The output follows:
$ sudo btrfs check /dev/sda6
Checking filesystem on /dev/sda6
UUID: 5ea692ab-c7b1-4618-be39-d82eaf5c6b34
checking extents
checking free space cache
checking fs roots
root 5 inode 2119729 errors 200, dir isize wrong
root 5 inode 2178458 errors 1, no inode item
unresolved ref dir 2119729 index 541 namelen 21 name clementine.db-journal filetype 1 errors 5, no dir item, no inode ref
root 5 inode 2219774 errors 1, no inode item
unresolved ref dir 2119729 index 1822 namelen 21 name clementine.db-journal filetype 1 errors 5, no dir item, no inode ref
root 5591 inode 1491275 errors 200, dir isize wrong
root 5591 inode 2076115 errors 1, no inode item
unresolved ref dir 1491275 index 984 namelen 21 name clementine.db-journal filetype 1 errors 5, no dir item, no inode ref
root 5591 inode 2119729 errors 200, dir isize wrong
root 5591 inode 2178458 errors 1, no inode item
unresolved ref dir 2119729 index 541 namelen 21 name clementine.db-journal filetype 1 errors 5, no dir item, no inode ref
ERROR: errors found in fs roots
found 810099113984 bytes used, error(s) found
total csum bytes: 789379208
total tree bytes: 1426243584
total fs tree bytes: 368427008
total extent tree bytes: 84656128
btree space waste bytes: 283686669
file data blocks allocated: 1116310724608
referenced 821686456320
It's clear this entries are making some issues, they still remain.
fsck?btrfsI think the command isbtrfs check. good advice, thanks.