[SOLVED] - Can't delete folder or file - /bin/ls: cannot access


AceRimmer

Recommended Posts

I have a folder in downloads/incomplete share. Folder was created by Deluge some time ago. I am able to rename the folder but i can't delete it. I have shut down my Deluge docker container. 

 

Folder was originally called "freeman" or something like that. I have renamed the folder to "1" to make typing our commands easier for myself. 

 

I've tried terminal running the below commands but the folder won't delete. Its throwing up this error rmdir: failed to remove '1': Directory not empty

rm -rf 1
rmdir 1
rm -f 1

So i've navigated to each folder "cache, disk1 ,disk2, disk3, disks, user & user0".

 

I found a file within the "1! folder on disk2, so i've ran the below in the terminal. 

 

root@Voyager:~# cd /mnt/disk2/downloads/incomplete/1/
root@Voyager:/mnt/disk2/downloads/incomplete/1# ls
/bin/ls: cannot access 'Feast.of.Love.2007.1080p.BluRay.x264-CULTHD': No such file or directory
Feast.of.Love.2007.1080p.BluRay.x264-CULTHD/
root@Voyager:/mnt/disk2/downloads/incomplete/1# 

So i presume i can't delete the folder called "1" because there is a file or folder in it. I can see the file/folder with Krusader but i can't delete it. When i check the permissions for the file it shows as below.

 

Capture1.PNG.e560fc29f51e396d9e3b625a5c5674ab.PNG

 

I tried to run chmod -f 777 on the file from the terminal and i get...

 

 /bin/ls: cannot access 'Feast.of.Love.2007.1080p.BluRay.x264-CULTHD': No such file or directory

I've ran docker-safe new perms on the share (i think that is the correct step since its inside a folder created by Deluge) and i still can't access or delete.

 

What is my next option to rid this file and folder from my system. 

Edited by CatMilk
adding "solved" title update
Link to comment
14 hours ago, remotevisitor said:

I suggest checking the file system on that disk to see if the issue is caused by a file system issue: https://wiki.unraid.net/UnRAID_6/Storage_Management#Checking_a_File_System

 Below is my result from the check. No idea what it means. 

Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan (but don't clear) agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
imap claims a free inode 10766498123 is in use, would correct imap and clear inode
imap claims a free inode 10766498166 is in use, would correct imap and clear inode
imap claims a free inode 10766498167 is in use, would correct imap and clear inode
imap claims a free inode 10766498168 is in use, would correct imap and clear inode
imap claims a free inode 10766498169 is in use, would correct imap and clear inode
imap claims a free inode 10766498170 is in use, would correct imap and clear inode
imap claims a free inode 10766498171 is in use, would correct imap and clear inode
imap claims a free inode 10766498172 is in use, would correct imap and clear inode
imap claims a free inode 10766498173 is in use, would correct imap and clear inode
imap claims a free inode 10766498174 is in use, would correct imap and clear inode
imap claims a free inode 10766498175 is in use, would correct imap and clear inode
        - agno = 6
        - agno = 7
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 3
        - agno = 1
        - agno = 0
        - agno = 5
        - agno = 6
        - agno = 2
        - agno = 7
        - agno = 4
entry "Feast.of.Love.2007.1080p.BluRay.x264-CULTHD" in shortform directory 4331559720 references free inode 10766498123
would have junked entry "Feast.of.Love.2007.1080p.BluRay.x264-CULTHD" in directory inode 4331559720
would have corrected i8 count in directory 4331559720 from 1 to 0
No modify flag set, skipping phase 5
Phase 6 - check inode connectivity...
        - traversing filesystem ...
entry "Feast.of.Love.2007.1080p.BluRay.x264-CULTHD" in shortform directory inode 4331559720 points to free inode 10766498123
would junk entry
would fix i8count in inode 4331559720
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
disconnected inode 10766478848, would move to lost+found
disconnected inode 10766478849, would move to lost+found
disconnected inode 10766478850, would move to lost+found
disconnected inode 10766478851, would move to lost+found
disconnected inode 10766478852, would move to lost+found
disconnected inode 10766478853, would move to lost+found
disconnected inode 10766478854, would move to lost+found
disconnected inode 10766478855, would move to lost+found
disconnected inode 10766478856, would move to lost+found
disconnected inode 10766478857, would move to lost+found
disconnected inode 10766478858, would move to lost+found
disconnected inode 10766478859, would move to lost+found
disconnected inode 10766478860, would move to lost+found
disconnected inode 10766478861, would move to lost+found
disconnected inode 10766478862, would move to lost+found
disconnected inode 10766478863, would move to lost+found
disconnected inode 10766478864, would move to lost+found
disconnected inode 10766478865, would move to lost+found
disconnected inode 10766478866, would move to lost+found
disconnected inode 10766478867, would move to lost+found
disconnected inode 10766478868, would move to lost+found
disconnected inode 10766478869, would move to lost+found
disconnected inode 10766478870, would move to lost+found
disconnected inode 10766478871, would move to lost+found
disconnected inode 10766478872, would move to lost+found
disconnected inode 10766478873, would move to lost+found
disconnected inode 10766478874, would move to lost+found
disconnected inode 10766478875, would move to lost+found
disconnected inode 10766478876, would move to lost+found
disconnected inode 10766478877, would move to lost+found
disconnected inode 10766498124, would move to lost+found
disconnected inode 10766498125, would move to lost+found
disconnected inode 10766498126, would move to lost+found
disconnected inode 10766498127, would move to lost+found
disconnected inode 10766498128, would move to lost+found
disconnected inode 10766498129, would move to lost+found
disconnected inode 10766498130, would move to lost+found
disconnected inode 10766498131, would move to lost+found
disconnected inode 10766498132, would move to lost+found
disconnected inode 10766498133, would move to lost+found
disconnected inode 10766498134, would move to lost+found
disconnected inode 10766498135, would move to lost+found
disconnected inode 10766498136, would move to lost+found
disconnected inode 10766498137, would move to lost+found
disconnected inode 10766498138, would move to lost+found
disconnected inode 10766498139, would move to lost+found
disconnected inode 10766498140, would move to lost+found
disconnected inode 10766498141, would move to lost+found
disconnected inode 10766498142, would move to lost+found
disconnected inode 10766498143, would move to lost+found
disconnected inode 10766498144, would move to lost+found
disconnected inode 10766498145, would move to lost+found
disconnected inode 10766498146, would move to lost+found
disconnected inode 10766498147, would move to lost+found
disconnected inode 10766498148, would move to lost+found
disconnected inode 10766498149, would move to lost+found
disconnected inode 10766498150, would move to lost+found
disconnected inode 10766498151, would move to lost+found
disconnected inode 10766498152, would move to lost+found
disconnected inode 10766498153, would move to lost+found
disconnected inode 10766498154, would move to lost+found
disconnected inode 10766498155, would move to lost+found
disconnected inode 10766498156, would move to lost+found
disconnected inode 10766498157, would move to lost+found
disconnected inode 10766498158, would move to lost+found
disconnected inode 10766498159, would move to lost+found
disconnected inode 10766498160, would move to lost+found
disconnected inode 10766498161, would move to lost+found
disconnected inode 10766498162, would move to lost+found
disconnected inode 10766498163, would move to lost+found
disconnected inode 10766498164, would move to lost+found
disconnected inode 10766498165, would move to lost+found
Phase 7 - verify link counts...
would have reset inode 4331559720 nlinks from 3 to 2
No modify flag set, skipping filesystem flush and exiting

 

Link to comment
1 hour ago, Squid said:

Remove the -n flag from the command options and re-run


Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
imap claims a free inode 10766498123 is in use, correcting imap and clearing inode
cleared inode 10766498123
imap claims a free inode 10766498166 is in use, correcting imap and clearing inode
cleared inode 10766498166
imap claims a free inode 10766498167 is in use, correcting imap and clearing inode
cleared inode 10766498167
imap claims a free inode 10766498168 is in use, correcting imap and clearing inode
cleared inode 10766498168
imap claims a free inode 10766498169 is in use, correcting imap and clearing inode
cleared inode 10766498169
imap claims a free inode 10766498170 is in use, correcting imap and clearing inode
cleared inode 10766498170
imap claims a free inode 10766498171 is in use, correcting imap and clearing inode
cleared inode 10766498171
imap claims a free inode 10766498172 is in use, correcting imap and clearing inode
cleared inode 10766498172
imap claims a free inode 10766498173 is in use, correcting imap and clearing inode
cleared inode 10766498173
imap claims a free inode 10766498174 is in use, correcting imap and clearing inode
cleared inode 10766498174
imap claims a free inode 10766498175 is in use, correcting imap and clearing inode
cleared inode 10766498175
        - agno = 6
        - agno = 7
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 2
        - agno = 1
        - agno = 3
        - agno = 6
        - agno = 7
        - agno = 5
        - agno = 4
entry "Feast.of.Love.2007.1080p.BluRay.x264-CULTHD" in shortform directory 4331559720 references free inode 10766498123
junking entry "Feast.of.Love.2007.1080p.BluRay.x264-CULTHD" in directory inode 4331559720
corrected i8 count in directory 4331559720, was 1, now 0
corrected directory 4331559720 size, was 10, now 6
bogus .. inode number (0) in directory inode 4331559720, clearing inode number
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
entry "1" in dir ino 2147483776 doesn't have a .. entry, will set it in ino 4331559720.
setting .. in sf dir inode 4331559720 to 2147483776
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
disconnected inode 10766478848, moving to lost+found
disconnected inode 10766478849, moving to lost+found
disconnected inode 10766478850, moving to lost+found
disconnected inode 10766478851, moving to lost+found
disconnected inode 10766478852, moving to lost+found
disconnected inode 10766478853, moving to lost+found
disconnected inode 10766478854, moving to lost+found
disconnected inode 10766478855, moving to lost+found
disconnected inode 10766478856, moving to lost+found
disconnected inode 10766478857, moving to lost+found
disconnected inode 10766478858, moving to lost+found
disconnected inode 10766478859, moving to lost+found
disconnected inode 10766478860, moving to lost+found
disconnected inode 10766478861, moving to lost+found
disconnected inode 10766478862, moving to lost+found
disconnected inode 10766478863, moving to lost+found
disconnected inode 10766478864, moving to lost+found
disconnected inode 10766478865, moving to lost+found
disconnected inode 10766478866, moving to lost+found
disconnected inode 10766478867, moving to lost+found
disconnected inode 10766478868, moving to lost+found
disconnected inode 10766478869, moving to lost+found
disconnected inode 10766478870, moving to lost+found
disconnected inode 10766478871, moving to lost+found
disconnected inode 10766478872, moving to lost+found
disconnected inode 10766478873, moving to lost+found
disconnected inode 10766478874, moving to lost+found
disconnected inode 10766478875, moving to lost+found
disconnected inode 10766478876, moving to lost+found
disconnected inode 10766478877, moving to lost+found
disconnected inode 10766498124, moving to lost+found
disconnected inode 10766498125, moving to lost+found
disconnected inode 10766498126, moving to lost+found
disconnected inode 10766498127, moving to lost+found
disconnected inode 10766498128, moving to lost+found
disconnected inode 10766498129, moving to lost+found
disconnected inode 10766498130, moving to lost+found
disconnected inode 10766498131, moving to lost+found
disconnected inode 10766498132, moving to lost+found
disconnected inode 10766498133, moving to lost+found
disconnected inode 10766498134, moving to lost+found
disconnected inode 10766498135, moving to lost+found
disconnected inode 10766498136, moving to lost+found
disconnected inode 10766498137, moving to lost+found
disconnected inode 10766498138, moving to lost+found
disconnected inode 10766498139, moving to lost+found
disconnected inode 10766498140, moving to lost+found
disconnected inode 10766498141, moving to lost+found
disconnected inode 10766498142, moving to lost+found
disconnected inode 10766498143, moving to lost+found
disconnected inode 10766498144, moving to lost+found
disconnected inode 10766498145, moving to lost+found
disconnected inode 10766498146, moving to lost+found
disconnected inode 10766498147, moving to lost+found
disconnected inode 10766498148, moving to lost+found
disconnected inode 10766498149, moving to lost+found
disconnected inode 10766498150, moving to lost+found
disconnected inode 10766498151, moving to lost+found
disconnected inode 10766498152, moving to lost+found
disconnected inode 10766498153, moving to lost+found
disconnected inode 10766498154, moving to lost+found
disconnected inode 10766498155, moving to lost+found
disconnected inode 10766498156, moving to lost+found
disconnected inode 10766498157, moving to lost+found
disconnected inode 10766498158, moving to lost+found
disconnected inode 10766498159, moving to lost+found
disconnected inode 10766498160, moving to lost+found
disconnected inode 10766498161, moving to lost+found
disconnected inode 10766498162, moving to lost+found
disconnected inode 10766498163, moving to lost+found
disconnected inode 10766498164, moving to lost+found
disconnected inode 10766498165, moving to lost+found
Phase 7 - verify and correct link counts...
resetting inode 4331559720 nlinks from 3 to 2
done

 

Link to comment

You did have file system corruption and the last run should have fixed it.

 

if you start the array, does the problem directory/file still exist, and if so can you now successfully delete it.

 

It looks like a bunch of files have been recovered into the lost+found directory.   Unfortunately they will not have sensible names, so unless you can identify them by their content there isn’t much you can do with them.

 

The question is what caused the file system corruption .... has your system lost power or been force powered off without shutting down in the past?   That could possibly cause corruption if it was writing to the disk at the time.   Otherwise I suspect you will not know what caused the problem.

Link to comment
58 minutes ago, remotevisitor said:

You did have file system corruption and the last run should have fixed it.

 

if you start the array, does the problem directory/file still exist, and if so can you now successfully delete it.

 

It looks like a bunch of files have been recovered into the lost+found directory.   Unfortunately they will not have sensible names, so unless you can identify them by their content there isn’t much you can do with them.

 

The question is what caused the file system corruption .... has your system lost power or been force powered off without shutting down in the past?   That could possibly cause corruption if it was writing to the disk at the time.   Otherwise I suspect you will not know what caused the problem.

Yes i have managed to successfully delete the directory/file & i've checked "cache, disk1 ,disk2, disk3, disks, user & user0" and it doesn't appear to be present in any of those dir's. Thank you remotevisitor & Squid.

 

I've deleted the lost+found data. I couldn't identify the data. I did have some issues with my build so there was some file system corruption.

 

My motherboard and CPU died and had to go for RMA (post here) & then one of my lesser important drives (i was using it to store some of my Deluge seeds) slid out of my case during the rebuild and bounced off the ground (post here). I managed to recover some data from the drive but not all.

 

The last few months of my "new build" have not gone very well for me. I think its all ironed out now 

 

 

Edited by CatMilk
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.