LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   My harddisk keeps erasing my files! (https://www.linuxquestions.org/questions/linux-hardware-18/my-harddisk-keeps-erasing-my-files-267070/)

VisitorQ 12-16-2004 11:05 AM

My harddisk keeps erasing my files!
 
I have a 250GB hard disk mounted to my system, it's FAT32 since I often lend it to people who run windows. I can read/write to it just fine, but whenever i write/change anything in a directory other than the top level of the disk it gets deleted automatically after a while.

I renamed a couple of folders, everything seemed fine, all the files in the folders were OK. But when I should use the files later they had been deleted (this was about 5 - 15 minutes later). This wasn't the first time this had happened, I then found out that if the files I created/changed were in the top level of the disk (my disk is mounted at /filmer) /filmer the files wouldn't be deleted, but if they were in some other directory on the disk, for example /filmer/music, they would disappear with no apparent reason. This has become pretty irritating and has resulted in a loss of plenty of files.

Does anybody know why this keeps happening, and how this can be fixed? Would it help to format the disk to ext2 format (though this wouldn't be the optimal solution since I then wouldn't be able to move the disk over to a win. system without a lot of work).

jlangelier 12-16-2004 02:30 PM

Sounds like the 'phantom file' problem I had a while ago. I would copy over files to a new partition, they 'seemed' to be there. I could 'ls' them, manipulate them, etc but when I did a 'df' to see disk space, it only changed on my old partition.

The problem was the partition mount was failing. But I was still able to use the mount point. I didn't know that was possible until I saw it myself.

I think what was going on was that the system was told it had a mount point in iptables or somewhere, but the mount failed (for some dopey mount config reason) and the mount was actually bad. When I was copying data over, the system was actually cacheing it, just waiting for the time when the partition would come back and it could flush the cache.

But the mount point never materialized for the cache, and it could never flush itself. The files I thought I had copied were only 'phantoms'

You could check to see if that is happening by copying over alot of data. If, when you do 'df', it never changes on your windows partition, you have the same problem I did.

Electro 12-16-2004 04:41 PM

Try running sync before you reboot or power down your computer. Also try specify sync option for FAT partitions instead of using the default async.


All times are GMT -5. The time now is 04:08 AM.