Thumb Drive failure?

Status
Not open for further replies.
Location
NE (9.06 miles @5.9 Degrees from Winged Horses)
Occupation
EC - retired
I have data saved to a Thumb Drive at one of my projects. This one happens to have a 4G capacity. I stopped receiving daily reports a couple days ago and checked it out this morning. The HMI displayed, IIRC, that the memory buffer was full. I expected a full TD but not so, once I moved it to the laptop to transfer files. 3.12 G space available of 3.8.


What happens to the files if it does go full? Are the existing erased, replaced, or ??


All I got transferred was a very small file. I'll take a different TD back later today in case that one just failed for whatever reason.
 

GoldDigger

Moderator
Staff member
Location
Placerville, CA, USA
Occupation
Retired PV System Designer
If the application doing the writing does not do active file management, then each attempt to write a new file would fail and the existing files would be undisturbed.
Some applications cannot handle a single file which is beyond the application size limit, even if the file system on the storage device can handle it.
There can also be problems if there are too many files in one directory. But it does not sound like either of these applies to you.
 
If the thumb drive's (TD) file system, usually FAT32, gets full, it's full and nothing should try to write anything else to it. However, if the writer starts to write a huge file and runs out of space, it might not be able to close the file (can't write to the directory), thus all the info about where the data for that file is will be lost. This can happen when the writer doesn't (a) break the data into smaller files/chunks or (b) doesn't check the available space before writing.

Sometimes it's possible to find the data anyway, but that's not for the faint of heart.

On complete speculation, whatever is writing to the TD doesn't do either A or B above. Some embedded systems' USB drive FAT implementations are rather stupid in this area.

BTW, use good quality drives and don't leave them in a drawer for a year at a time. While not everyone agrees on this, powering up the drive once in a while is supposed to help preserve the data.
 

petersonra

Senior Member
Location
Northern illinois
Occupation
engineer
a lot of the file handling routines on HMIs are not well done. they are added as an afterthought and often don't work well around the edges.

some HMIs use temporary files that eat up space but are deleted after they are used so they don't show up in a folder listing, but still take up space while they exist.

as for what happens when the drive fills up, that also varies widely.

I have run into issues with cheap thumb drives crashing, and reverting to a blank drive. Every time I have had this happen it was a cheap promo drive given out as a marketing gimmick.
 

Fulthrotl

~Autocorrect is My Worst Enema.~
A different TD cleared the problem.

well..... my thought is.... when you can buy 4 gig thumb drives for about
$5 each, retail, you aren't getting much room for quality control in that.

i'd not put anything critical on that drive without having it somewhere else.

"bulletproof" thumb drives, when priced...... cost a lot. and they are slow
to read and write. failsafe data is usually only promised in the DOD grade
encrypted, mirrored thumbs.... which most likely will cost as much or more
than the laptop you plug them into.
 
Location
NE (9.06 miles @5.9 Degrees from Winged Horses)
Occupation
EC - retired
well..... my thought is.... when you can buy 4 gig thumb drives for about
$5 each, retail, you aren't getting much room for quality control in that.

i'd not put anything critical on that drive without having it somewhere else.

"bulletproof" thumb drives, when priced...... cost a lot. and they are slow
to read and write. failsafe data is usually only promised in the DOD grade
encrypted, mirrored thumbs.... which most likely will cost as much or more
than the laptop you plug them into.

There is nothing critical on these. I use it to track operator performance, and if need be, suggest or make changes.
 

kwired

Electron manager
Location
NE Nebraska
BTW, use good quality drives and don't leave them in a drawer for a year at a time. While not everyone agrees on this, powering up the drive once in a while is supposed to help preserve the data.

Just my speculation here but they probably use capacitor as the power supply when not externally powered. If never externally powered they will use up the charge in that capacitor at some point. Lose power and you are going to lose stored data, because it essentially is more of a memory device then it is a true storage device it is just designed to act like a storage device.
 

GoldDigger

Moderator
Staff member
Location
Placerville, CA, USA
Occupation
Retired PV System Designer
Just my speculation here but they probably use capacitor as the power supply when not externally powered. If never externally powered they will use up the charge in that capacitor at some point. Lose power and you are going to lose stored data, because it essentially is more of a memory device then it is a true storage device it is just designed to act like a storage device.
Flash memory, unlike static or dynamic RAM, is non volatile and does not need any power to preserve the data
There may be volatile memory in the write buffer though. That, plus caching in the OS, is why you need to unmount the flash drive before unplugging it.
 

kwired

Electron manager
Location
NE Nebraska
Flash memory, unlike static or dynamic RAM, is non volatile and does not need any power to preserve the data
There may be volatile memory in the write buffer though. That, plus caching in the OS, is why you need to unmount the flash drive before unplugging it.
Maybe I should learn more about these things before making comments. How do they store information and what are the vulnerabilities outside of obvious physical destruction? Magnetic media worked well but was vulnerable to magnetic fields and is still used in hard drives people just kind of tend to forget that since the use of floppy disks and tapes has pretty much ended.
 

dfmischler

Senior Member
Location
Western NY
Occupation
Facilities Manager
How do they store information and what are the vulnerabilities outside of obvious physical destruction?

Thumb drives use flash memory. They are vulnerable to many physical and electrical hazards (e.g. ESD), as well as software hazards (malware, bugs), and operator errors (being pulled before completion of writes).
 

kwired

Electron manager
Location
NE Nebraska
I see that so much. People just yank the thumb drive without "ejecting" it from the computer first.

How often do you see lost data from doing that though? Especially with more recent plug and play equipment. Years ago any addition of storage device had to have reboot of operating system before the device would even be recognized, and a loss of such a device could possibly have crashed the whole system.
 

sparkyrick

Senior Member
Location
Appleton, Wi
How often do you see lost data from doing that though? Especially with more recent plug and play equipment. Years ago any addition of storage device had to have reboot of operating system before the device would even be recognized, and a loss of such a device could possibly have crashed the whole system.

I don't know
dunno.gif
always eject the thumb drive first
smiley-with-glasses12.gif
 

Electric-Light

Senior Member
What's been discussed here are all theoretical. Memory cards and flash drives aren't that reliable. They don't work like paper notebooks. If you rip out a page or rip the index page off your notebook, the remaining information is easily accessible. If you rip a picture in half, you can tape it back together to usable conditions.

The index page gets re-written every time you use it and this is where things usually go wrong. For all practical purposes, if the index page gets ruined, your data is useless and it will cost you some serious time or money to recover the data. Unless the data is worth more than the recovery effort, its considered lost.

Look at the high lighted word. When you delete them, they're just struck out and flagged as it's ok to over-write them and spaces consumed by those words are marked as available. When you try to fill something that's bigger than those spaces, the new file is split up and scattered throughout and the where about is indexed in the indexing table. If you lose the table, you won't be able to (easily) combine them together.

If they're in plain text in clusters, you can stitch them together to reconstruct the phrase, but data files like pictures are very difficult to reconstruct like this.
 
Last edited:

GoldDigger

Moderator
Staff member
Location
Placerville, CA, USA
Occupation
Retired PV System Designer

Some file systems keep note than one copy of that index page, but if you unplug the drive while they are being updated you can effectively lose both. Same as the drive deteriorates, since it may not bother to tell you that one copy is corrupt. :(.
There are even file systems that store the linking information redundantly with the data itself. But they are seldom used because of the overhead involved.
 

Electric-Light

Senior Member

Some file systems keep note than one copy of that index page, but if you unplug the drive while they are being updated you can effectively lose both. Same as the drive deteriorates, since it may not bother to tell you that one copy is corrupt. :(.
There are even file systems that store the linking information redundantly with the data itself. But they are seldom used because of the overhead involved.

What I said above is only speaking in real world.
 

sparkyrick

Senior Member
Location
Appleton, Wi
When in doubt, back your data up. I have network attached storage at home with two mirrored images and I use Google Drive for non personal stuff.
 
Status
Not open for further replies.
Top