--tested - the two stats show exactly the same. after reboot TESTFILE is gone from the bad card.jojopi wrote:If the data are only being retained in the kernel's buffer cache and not on the card, just dropping the caches should be sufficient to make recent changes disappear.Conjur wrote:in theory; if the SD card is not retaining data, it will NOT retain data through umounting and mounting.
Code: Select all
touch TESTFILE stat TESTFILE sync echo 3 |sudo tee /proc/sys/vm/drop_caches stat TESTFILE
In that case be sure to have your root file system, the SD card, mounted as read only. If the card can not be written to it cannot be corrupted and cause your system to not reboot after a power failure....I am developing a project on this hardware that will run in the field for many years...
It does seem wise to separate system files from data and everything from any swap when using flash devices. Of course swap shouldn't be needed in a data collecting device that has a half to one gig of RAM.Heater wrote:Write your data to a USB stick.
I had the exact same issue with a Transcend 8GB card from Amazon just like yours after running it 24/7 for ~10 months with Debian 7 on an Odroid U2. All writes looked like they were processed but in fact went into oblivion. I realized it when more and more software segfaulted for no apparent reason. Since then I've switched to a SanDisk 16GB card which is still working fine with an uptime of 466 days.Francois117 wrote:Sooo... Three days later.
I managed to find an older version of my development SD card and cloned it onto the SD card of the system that was showing this weird non-write error. And guess what - after the dd, the SD card still had all the old data! Like the dd did not happen!
Somehow it fools the ubuntu 14 OS the think that the writes are succesful, and comitted to SD card disk. But after a reboot, the SD card is back to the state it was in before any writes!
BEWARE: SD card fail in weird ways!