USB stick's 3 "undeletable" directories.

Hi. This irritating little problem has persisted for a few months. I’m now bringing it to the forum for assistance pls as i’ve run out of ideas.

The 3 bold-red directories need to be deleted, but all attempts to do so in Dolphin, as normal user or as root, fail. Today i tried in Konsole, but still cannot delete them.


gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> **ls**
**20170910-144843-847**  20170926-132318-261  20171008-122125-653  20171029-150642-591  20171112-162638-581
**20170916-130426-963**  20170927-151309-585  20171009-210219-896  20171103-103941-508  20171118-162101-633
**20170924-130926-174**  20170928-224137-598  20171021-104931-318  20171106-011244-786  last_snapshot

Using the first one as example:


gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> **rm -f -r 20170910-144843-847/**

rm: cannot remove '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files/jquery.bi.queue.js': Input/output error

gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> **sudo rm -f -r 20170910-144843-847/**
[sudo] password for root: 
rm: cannot remove '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files/jquery.bi.queue.js': Input/output error
gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> 

So the mysterious file “jquery.bi.queue.js” [which is invisible in Dolphin, despite showing hidden files] seems to be the problem.

The directories’ Permissions seem ok ?]:

gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> **ls -l
**total 57
drwx------ 1 gooeygirl users 4096 Nov  3 10:47 **20170910-144843-847**
drwx------ 1 gooeygirl users 4096 Nov  6 01:19 **20170916-130426-963**
drwx------ 1 gooeygirl users 4096 Nov 18 16:28 **20170924-130926-174**
drwx------ 1 gooeygirl users 4096 Sep 26 13:29 20170926-132318-261
drwx------ 1 gooeygirl users 4096 Sep 27 15:19 20170927-151309-585
drwx------ 1 gooeygirl users 4096 Sep 28 22:48 20170928-224137-598
drwx------ 1 gooeygirl users 4096 Oct  8 12:28 20171008-122125-653
drwx------ 1 gooeygirl users 4096 Oct  9 21:09 20171009-210219-896
drwx------ 1 gooeygirl users 4096 Oct 21 10:55 20171021-104931-318
drwx------ 1 gooeygirl users 4096 Oct 29 15:13 20171029-150642-591
drwx------ 1 gooeygirl users 4096 Nov  3 10:45 20171103-103941-508
drwx------ 1 gooeygirl users 4096 Nov  6 01:18 20171106-011244-786
drwx------ 1 gooeygirl users 4096 Nov 12 16:31 20171112-162638-581
drwx------ 1 gooeygirl users 4096 Nov 18 16:26 20171118-162101-633
lrwxrwxrwx 1 gooeygirl users   46 Nov 18 16:28 last_snapshot -> 20171118-162101-633
gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> 

After changing to the specific subdirectory holding this mysterious file, & trying directly therein to delete it… another failure:

gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2/20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files> **ls**
ls: cannot access 'jquery.bi.queue.js': Input/output error
jquery.bi.queue.js


gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2/20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files> **sudo rm -f -r jquery.bi.queue.js**
[sudo] password for root: 
rm: cannot remove 'jquery.bi.queue.js': Input/output errorgooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2/20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files> 

Hmmm, ok, so what are the permissions on this strange file itself?

gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2/20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files> **ls -l
**ls: cannot access 'jquery.bi.queue.js': Input/output error
total 0
-**????????? ? ? ? ?**            ? jquery.bi.queue.js
gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2/20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files>

Oh my goodness, what does this mean?

Le 18/11/2017 à 11:26, GooeyGirl a écrit :

> Oh my goodness, what does this mean?
>
>

may be the file is open in some application? try lsof.

snapshot? is that a btrfs file system?

jdd

First of all, never use usb sticks for holding the only copy of files. Sticks are much too unreliable for this. I knew a guy who had his PhD thesis on a stick (and only there) and the stick failed with only days to go until handing in the paper. Same happened to another guy and his master thesis, though that was on floppy disk at the time.

That said, input/output error ususally means that either the filesystem is borked or the device has sectors gone bad.

  • run a filesystem check for the fs used on the stick
  • dd the whole stick to file (or /dev/null, we are only interested in errors showing when accessing source sectors) while watching dmesg output

On 11/18/2017 05:26 AM, GooeyGirl wrote:
>
> Hi. This irritating little problem has persisted for a few months. I’m
> now bringing it to the forum for assistance pls as i’ve run out of
> ideas.
>
> The 3 bold-red directories need to be deleted, but all attempts to do so
> in Dolphin, as normal user or as root, fail. Today i tried in Konsole,
> but still cannot delete them.
>
> Code:
> --------------------
>
> gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> ls
> 20170910-144843-847 20170926-132318-261 20171008-122125-653 20171029-150642-591 20171112-162638-581
> 20170916-130426-963 20170927-151309-585 20171009-210219-896 20171103-103941-508 20171118-162101-633
> 20170924-130926-174 20170928-224137-598 20171021-104931-318 20171106-011244-786 last_snapshot
>
> --------------------
>
>
> Using the first one as example:
>
> Code:
> --------------------
>
> gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> rm -f -r 20170910-144843-847/
>
> rm: cannot remove ‘20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files/jquery.bi.queue.js’: Input/output error

You might try using Code:


rm -ri *


This will invoke an interactive rm dialog asking for confirmation on
each file. It may provide some further clues.


Ken
linux since 1984
S.u.S.E./openSUSE since 1996

My way of “fixing” the problem would be:

Step 1: Make a backup of everything important.
Step 2: Reformat the USB.
Step 3: Restore from the backup.

The old fashioned way of fixing such problems was with “clri”. You would use “clri” to clear the inode (zero it out). And then you use use “fsck” to fix the problem created by “clri”. And then all would be good.

The “clri” command is not longer there. Apparently it is now a subcommand of “debugfs”. And whether it would be useful, depends on the file system. It wouldn’t work with NTFS or FAT. It might not work with “btrfs”.

On Sat, 18 Nov 2017 10:26:02 +0000, GooeyGirl wrote:

> rm: cannot remove
> ‘20170910-144843-847/backup/home/gooeygirl/Documents/1.
> Home/Computer/Microsoft/Excel Stuff/How to open Excel files in
> separate windows in Windows 7_files/jquery.bi.queue.js’: Input/output
> error

This tells me that there’s likely a problem with the media that’s causing
the issue. I’d concur with the idea of backing the device up, reformat,
and then test it (maybe using dd to write data to it and see if it throws
any additional i/o errors).


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Thank you all for these helpful replies. Temporarily this matter is on hold, til i resolve a lovely new problem that arose yesterday, https://forums.opensuse.org/showthread.php/528173-Laptop-cpu-suddenly-went-to-99-now-can-boot-but-not-login . Once that mess is fixed i’ll be able to work again on this USB stick issue, using the collective advice i’ve received here. I’ll post back later with pertinent developments. .

Having acquired over time a number of USB sticks with similar problems, I resorted to

dd if=/dev/zero of=/dev/sd?

In some cases, I got a fully working USB stick back; in some, it had gone too far to be recovered. The main indicator of failure was how long, relatively, the code took to execute.

Is there more than one partition on the stick?

What file system is in use?

Is there any encryption?

Did you create those directories/files from MS Windows?

Regards

susejunky

Thanks for yr reply, sorry for my delay [been fighting other crocodiles for several days]. No the files can’t still be open; as i said this status has existed for months, across multiple reboots, + the stick is only inserted into the port ~weekly. My root is btrfs whist my home is xfs. However in the context of this thread, that “snapshot” is part of the BackInTime [a backup pgm] file structure [ie, unrelated to btrfs which just happens to use the same word for a very different purpose]. That’s what this stick is used for; my weekly data backups via BiT pgm.

Yep, i don’t & did not say so, above, thus am unsure why the lecture].

Good ideas, thanks… will do so once i get some time.

Thanks Ken, cool command. Sadly it revealed essentially the same info as already posted, ie,

gooeygirl@linux-Tower:/media/veracrypt2/backintime/GA-Z97-HD3/gooeygirl/2> **rm -ri ***
rm: descend into directory '20170910-144843-847'? y
rm: descend into directory '20170910-144843-847/backup'? y
rm: descend into directory '20170910-144843-847/backup/home'? y
rm: descend into directory '20170910-144843-847/backup/home/gooeygirl'? y
rm: descend into directory '20170910-144843-847/backup/home/gooeygirl/Documents'? y
rm: descend into directory '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home'? y
rm: descend into directory '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer'? y
rm: descend into directory '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft'? y
rm: descend into directory '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff'? y
rm: descend into directory '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files'? y
rm: cannot remove '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files/jquery.bi.queue.js': Input/output error
rm: remove directory '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files'? y
rm: cannot remove '20170910-144843-847/backup/home/gooeygirl/Documents/1. Home/Computer/Microsoft/Excel Stuff/How to open Excel files in separate windows in Windows 7_files': Directory not empty
rm: descend into directory '20170916-130426-963'? 

Thanks. Yes, i am pretty much at the point of

Step 2: Reformat the USB.

as you rightly suggest.

Thanks Jim. Yes, i’d probably have just done this many days ago, but for the major distraction of dealing with the unbootable Lappy, per recent post link. Probably tomorrow i’ll finally get onto this stick again.

Thanks John, i’m keen to try this not only in case it fixes the stick, but equally as i’m curious to observe a new-to-me command in action. I hope you’re sitting down, as i have a noob question. I assume that your intention is that i use your command verbatim, except that i substitute the specific device letter for your “?” in “/dev/sd?”?

Thanks SJ. It’s a 128 GB USB3 stick that i originally bought & began using when i still used Win7 & was beginning to learn about Linux, prior to fully converting to it in 2014. Most of this stick is allocated to a VeraCrypt volume, which holds my weekly data backups done with BackInTime.

gooeygirl@linux-Tower:~> **sudo blkid**
[sudo] password for root: 
<<snipped for brevity; these were just my internal SSD & HDD>>
/dev/sdc1: LABEL="SanDisk_ExtremePro" UUID="3690848A13C24128" TYPE="ntfs" PARTUUID="0008e9e6-01"
/dev/mapper/veracrypt2: UUID="389896A298965DE6" TYPE="ntfs"
gooeygirl@linux-Tower:~> 

Yes i did. But don’t worry now, as per my preceding replies, i’m pretty much resigned now to just reformatting this stick.

Flash sticks have very limited life compared to other media. SSD use more or less the same flash tech but are smarter and do ware leveling where as Sticks are cheap and don’t. Flash has a limited amount of write endurance. Each change in a block (about 100K typical) causes a block to be moved to a special address space to be later erased. At some point the stick runs out of spare space and more or less freezes up or completely stops working. IMO it is time for a new stick or change backup to a removable spinning rust drive.

Long ago I did a program for a company. The lady there assured me she had backup of the data from the old program. When I went to retrieve the data from tape backup, which she religiously backed up to daily, the data was unreadable. Turns out she had been writing to the same tape for years and it simply wore out. So the moral of the store is to replace your backup media periodically

Yes, I wouldn’t advise using sd?. You might get ‘Device not found’ but I couldn’t guaranteed that!

It all went pear-shaped once we left the storage pinnacle of punch-cards… :slight_smile:

But yes, it appears that this stick is now exhibiting your prognosis & explanation. Thanks.

Last night i kicked off with your suggestion, but [out of pure curiosity] i chose to initially perform the command in the ~128 GB stick’s 100 GB VeraCrypt volume. For a couple of hours i could not specifically understand if anything was happening, but decided it was, when i noticed the cpu usage was unnaturally high & all my other ongoing usual stuff i was doing does not do that]. After another couple of hours when i checked Konsole again, i discovered this:

gooeygirl@linux-Tower:/media/veracrypt2> **sudo blkid**
[sudo] password for root: 

/dev/sdc1: LABEL="SanDisk_ExtremePro" UUID="3690848A13C24128" TYPE="ntfs" PARTUUID="0008e9e6-01"
/dev/mapper/veracrypt2: UUID="389896A298965DE6" TYPE="ntfs"

gooeygirl@linux-Tower:/media/veracrypt2> **sudo dd if=/dev/zero of=/dev/mapper/veracrypt2**
[sudo] password for root: 
dd: writing to '/dev/mapper/veracrypt2': No space left on device
209714689+0 records in
209714688+0 records out
107373920256 bytes (107 GB, 100 GiB) copied, 12813.3 s, 8.4 MB/s
gooeygirl@linux-Tower:/media/veracrypt2> 

So, still in the spirit of idle curiosity, i’m tossing up now whether to repeat the command on the actual stick itself [ie, [i]/dev/sdc1], or alternatively try to format it, then inspect the wreckage afterwards to see what is left. I also acknowledge that i don’t understand the proper interpretation of that command output above. Is the fact of the records count differing by [only?] 1 evidence of a catastrophically damaged device, or instead of a device that still is in fair condition?