Disk on Key slowly getting smaller

Seakat seakat at orange.fr
Sun Mar 9 14:58:21 UTC 2008


Subject:
Re: Disk on Key slowly getting smaller
From:
Gene Heskett <gene.heskett at verizon.net>
Date:
Sun, 09 Mar 2008 04:48:34 -0400

To:
Kubuntu Help and User Discussions <kubuntu-users at lists.ubuntu.com>


On Sunday 09 March 2008, Dotan Cohen wrote:

> >On 08/03/2008, Gene Heskett <gene.heskett at verizon.net> wrote:
>   
>> >> On Saturday 08 March 2008, D. Michael McIntyre wrote:
>> >>  >On Saturday 08 March 2008, Dotan Cohen wrote:
>> >>  >> I thought that maybe parts of it were going bad, and the bad sectors
>> >>  >> were not being used, but a Windows reformat restores the space.
>> >>  >
>> >>  >I'll have to watch more closely.  I've seen the .Trash or whatever
>> >>  > directory eat up space when I thought I was deleting stuff, but wasn't.
>> >>  >  I don't think I've ever noticed any missing space after taking care of
>> >>  > this issue.
>> >>  >
>> >>  >I would have suspected something like you did, about bad sectors.
>> >>  >
>> >>  >Who knows.  It's very possible there's some insidious bug with vfat that
>> >>  >causes this problem.
>> >>  >
>> >>  >--
>> >>  >D. Michael McIntyre
>> >>
>> >> There is one bug that I ran into in my camera, which is a vfat file
>> >> system, and it duplicates the actual messydos bug in fact.
>> >>
>> >>  When deleting files, ALWAYS start at the end of the directory listing. 
>> >> Why? Well, if you have 40 pix on the card, and you do an mv starting at
>> >> the top of the list, and you clear out a full 'sector', vfat uses that as
>> >> an end of directory indicator.  The rest of your pix will disappear and
>> >> become in-accessable, but the space is still allocated.  The only fix is
>> >> to take your lumps and format the card, and don't do that again.  Someone
>> >> suggested taking another pix, but I've only been able to make that work
>> >> once, the next time the card was trashed.  It was too small anyway.
>>     
> >
> >Interesting. Are you suggesting deleting the pics one at a time? What
> >if the drive contains files, not chronologically identifiable
> >pictures? How should one know in what order to delete?
> >
>   
>From the bottom of the listing I believe, because I don't think vfat sorts the 
list before showing it to you.  Of course since the camera dates the files, 
and they are in ascending order, maybe it is and I'm just not aware of the 
sort because its still the 'natural order' in this case.

FWIW, I heard once many years ago, that this bug was like the cartographers 
dummy roads or towns, a method to identify copyright violations.  To me, its 
interesting that Olympus would pay for, and use, a filesystem that to me is 
fundamentally broken.  I've since tested the theory on a regular 1.44 
megabyte fat formatted disk and its as real as can be.  Messydos's directory 
format uses a sector of the disk for the directory for every 8 files on the 
disk. Delete the first 8 files so that that sector of the disk is marked 
deleted, and the rest of the disks contents disappeared.  So I looked at it 
with a disk editor on an os9 system and found everything was still there, so 
I manually & half assedly undeleted a filename and the rest of the disk then 
showed up again on the dosbox.  Messydos is not IMNSHO, a very good 
filesystem regardless of the size of its FAT tables.


> >This sounds related to _another_ bug that I've seen with cheap
> >flash-based mp3 players. They play the songs in the order that they
> >were copied to the device, not the alphabetical order or anything
> >logical like ID3 tag track order. So like you suggest, write order can
> >affect future disk operations.
>   

That is just a cheap player, without enough memory to hold a sorted filelist.


Gene and other Kubuntu'ers
The only good reason for using a FAT partition with Linux is that you sometimes use Windows, right (or perhaps your camera gives you no choice)?
So for anyone who has lost data on a FAT or other Windows partition (like me!), there is a good free Windows application for undeleting files, called Handy Recovery http://www.handyrecovery.com/ . As soon as you notice the problem, try very hard to avoid writing anything to the partition until you've run the application.

Cheers, seakat
-- 






More information about the kubuntu-users mailing list