Unable to delete files on USB hard disk

aLinuxUser

New Member
Joined
Feb 21, 2021
Messages
5
Reaction score
2
Credits
63
I use FreeFileSync in one direction to backup my data files from my Fedora 33 computer onto a USB hard disk.

It has worked well on thousands of files for years. However, a bit ago, FreeFileSync could not update five files on the USB hard disk. They do NOT have unusual characters in their filenames.

When FreeFileSync updates a file, it appears to delete the previous version at the target location, then copies the new version across. It could not do that. I get this message:
Unable to move "/run/media/u/My Passport/FedoraBoxMirror/Documents/quotes.odt" to the recycle bin.
G_IO_ERROR_NOT_FOUND: Unable to trash file /run/media/u/My Passport/FedoraBoxMirror/Documents/quotes.odt: No such file or directory [g_file_trash]

The five target files can be seen on the Fedora 33 Files Manager, they open in LibreOffice, but can not be deleted because supposedly I do not have permission. But, looking at permissions for the files, I do.

So, I tried to use terminal. I changed to root user. I CD'ed to the directory on the USB hard disk, the files come up on "ls", but when I try "rm", the system says there is "No such file or directory".

Does anyone have any ideas how to resolve this?
 

Attachments

  • DifficultyDeletingFilesInBackupHardDisk.png
    DifficultyDeletingFilesInBackupHardDisk.png
    102.2 KB · Views: 233
Last edited:


Tolkem

Well-Known Member
Joined
Jan 6, 2019
Messages
1,400
Reaction score
1,141
Credits
10,108
I use FreeFileSync in one direction to backup my data files from my Fedora 33 computer onto a USB hard disk.
What format is the USB drive? NTFS? EXT4? FAT32?
 
OP
A

aLinuxUser

New Member
Joined
Feb 21, 2021
Messages
5
Reaction score
2
Credits
63
Sounds like a good candidate for some corruption of the filesystem. Have you tried running fsck on it?
I tried to run fsck, but it did not work.
It seemed to want an ext2 or ext3 or ext4 file system. But the USB hard disk is a fuse filesystem.

The full text is:
[[email protected] /]$ fsck /run/media/u/'My Passport' -a
fsck from util-linux 2.36.1
fsck.ext2: Is a directory while trying to open /run/media/u/My Passport
/run/media/u/My Passport:
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
4,515
Reaction score
3,941
Credits
25,369

stan

Well-Known Member
Joined
Mar 19, 2018
Messages
1,004
Reaction score
1,134
Credits
9,370
It is a USB hard disk, NOT a USB memory stick.
The propeties panel says it is a "fuse" filesystem.
(I am totally unfamiliar with that.)
Both USB hard drive or USB flash drive can be FAT32, NTFS, EXT2/3/4, or other filesystem. It should normally have an ID like /dev/sdc, /dev/sdd, etc. Your internal Linux drive is normally /dev/sda. I'm not familiar with "fuse" either, but @Condobloke's link describes it as a "software interface"... so this may be peculiar to your backup software.

So let's try to go back to basics. If you can, make a bootable Linux USB flash drive. Any Linux should be okay, but most of us are more familiar with Linux Mint or other Debian/Ubuntu based distros.

After booting on a Live Linux USB, try these:

1. su or sudo su to become root. (Live version won't need a password.)

2. fdisk -l (That's lower-case -L) and show us the output.

3. Also lsblk (That's lower-case LSBLK) and show us the output.

4. Don't run fsck again for now. The outputs from #2 and #3 above will tell us more.

[EDIT] If you wonder why a bootable Live Linux USB, it is to be sure that your backup software is not running any background daemon or other process that might interfere with the regular Linux tools and troubleshooting. FUSE interfaces directly with the kernel, and that might cause confusion. Please let us know what Live Linux you decide to use... which distro, version, and desktop. Thanks.
 
Last edited:

stan

Well-Known Member
Joined
Mar 19, 2018
Messages
1,004
Reaction score
1,134
Credits
9,370
According to the Development Status on the FUSE GitHub site, this application lacks active contributors and the maintainer is only putting out fires and not expanding further development.

@aLinuxUser, this might be a good time to consider other backup solutions as you go forward from here. But let's see if we can help you get out of the current jam first.

Another question: Does FreeFileSync provide you any troubleshooting or diagnostic tools?
 
OP
A

aLinuxUser

New Member
Joined
Feb 21, 2021
Messages
5
Reaction score
2
Credits
63
FreeFileSync is being updated.
I am not aware of any troubleshooting or diagnostic tools provided by FreeFileSync.

I think this is a "bigger" problem than FreeFileSync.
The reason I say this is that I can not delete the files nor the directories they are in using terminal, either as user or as root.
I can open the files using OpenOffice.
The files appear when using the "ls" command.
But the files are supposedly not there when using the "unlink" and "rm" commands. See below:

[[email protected] shares]$ cd ..
[[email protected] Documents]$ rm -rf shares
rm: cannot remove 'shares': Directory not empty
[[email protected] Documents]$ cd shares
[[email protected] shares]$ ls
SharesUnrealisedProfits.ods
[[email protected] shares]$ unlink Shares*
unlink: cannot unlink 'SharesUnrealisedProfits.ods': No such file or directory
[[email protected] shares]$

I am dubbing these "Schrodinger files".
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top