I have exactly the same issue with my micro-sd card!
I believe your SD-card is defected and you should get a new one.
I used mine in my Raspberry as main boot/root drive. At some point after a few months, I noticed that movies and episodes that got added to my Couchpotato and Sickrage, got deleted from the list again, as if they were never there.
After a while I found out that no matter what I wrote to the sd, I would initially see the file with the ls command, but as soon as I rebooted, al changes were rolled back.
I also tried cleaning the entire card in Windows, remove all partitions and create a new one. I got no errors what so ever, but after the change a scan of the card revealed the original partition layout.
I just got a new card.
EDIT: Ok, just tested my card again and copied everything for you to see. Check this out.
First I'll show my SD-card with fdisk and will mount one partition.
pi@RasPI / $ sudo fdisk -l /dev/sdd
Disk /dev/sdd: 16.0 GB, 16021192704 bytes
4 heads, 16 sectors/track, 488928 cylinders, total 31291392 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002483
Device Boot Start End Blocks Id System
/dev/sdd1 2048 1673828 835890+ e W95 FAT16 (LBA)
/dev/sdd2 1679360 31225855 14773248 85 Linux extended
/dev/sdd3 31225856 31291391 32768 83 Linux
/dev/sdd5 1687552 2736127 524288 83 Linux
/dev/sdd6 2744320 2867199 61440 c W95 FAT32 (LBA)
/dev/sdd7 2875392 31225855 14175232 83 Linux
pi@RasPI / $ sudo mount /dev/sdd7 /sd
Lets see what's on it
pi@RasPI / $ ls /sd
bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var
Now I'm going to delete the home folder on the card and copy some text file from my own home folder onto the card.
pi@RasPI / $ sudo rm -R /sd/home
pi@RasPI / $ sudo cp /home/pi/autoexec.sh /sd
So now let's look for the obvious:
pi@RasPI / $ ls /sd
autoexec.sh bin boot dev etc lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var
Well, home is gone and my script file is visible.
Now I'm going to umount the drive, then re-mount the drive and then check the content
pi@RasPI / $ sudo umount /sd
pi@RasPI / $ sudo mount /dev/sdd7 /sd
pi@RasPI / $ ls /sd
bin boot dev etc home lib lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var
Well dress me up and call me Sally! The file is gone and my home folder re-appeared! Really, I tried tons of things to erase this bad-ass, but nothing sticks. After all I tried I even got some files off of it I actually forgot to salvage earlier.
It's really weird, but I can't think of anything but a corrupted card.
sudo mount /dev/sdb1 sd
and unmounting withsudo umount sd
. It has always worked fine with ext4 or FAT32 partitions.sd
.sd
, it appears infindmnt
and I see the files on the sd (withls
for example), and after unmounting,sd
is empty as before, and the mountpoint does not appear anymore fromfindmnt
.