0

I have a SD card exfat formatted, I can mount it and write on it: delete files, copy files on it, I can see the change applied, the LED on the card reader blinks when writing, but if I unmount and remount the card, all my changes are gone! The SD card has the same content as before.

An idea as to why it happens and how I can fix it?

I have exfat-fuse 1.1.0-2 (also tried 1.2.2 from sources) on Ubuntu 15.10.

10
  • That is not possible. Please give more information about how you "mount and remount".
    – Pilot6
    Nov 14, 2015 at 16:45
  • I tried mounting it with sudo mount /dev/sdb1 sd and unmounting with sudo umount sd. It has always worked fine with ext4 or FAT32 partitions.
    – Jazz
    Nov 14, 2015 at 16:50
  • It looks like you did not mount it and you just made changes to a local directory.
    – Pilot6
    Nov 14, 2015 at 17:51
  • And the command looks weird without an absolute path to sd.
    – Pilot6
    Nov 14, 2015 at 18:11
  • It may seem weird, but it works. After mounting to sd, it appears in findmnt and I see the files on the sd (with ls for example), and after unmounting, sd is empty as before, and the mountpoint does not appear anymore from findmnt.
    – Jazz
    Nov 14, 2015 at 18:21

1 Answer 1

-1

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.

4
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. - From Review Nov 17, 2015 at 21:07
  • made an edit :)
    – dudus
    Nov 18, 2015 at 7:46
  • Please log in to your original account to edit your own posts, so the edits don't have to go through review. Nov 18, 2015 at 9:06
  • @dudus I have exactly the same issue, but from an Android phone or from Windows, everything works fine! I don't really see why it would work fine on Android and Windows, but not on Linux!
    – Jazz
    Nov 22, 2015 at 20:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .