Re: [Hampshire] FAT32 problems

Top Page

Reply to this message
Author: Roger Munford
Date:  
To: Stephen Pelc, Hampshire LUG Discussion List
Subject: Re: [Hampshire] FAT32 problems


Stephen Pelc wrote:
>> I have written a data logging programme which stores data on an 8GB USB
>> drive and has worked without problem for some time until disk access to
>> the drive became more and more sluggish (files were deleted and so the
>> number at any time was no bigger that 100). The hardware is a National
>> Instruments cRio, VxWorks OS.
>>
>
>
>> The only possible problem that I discovered is a warning in
>> documentation is that the file system is FAT and filenames should be
>> limited to the 8.3 format. I wasn't aware of that and used filenames 14
>> characters long.
>>
>> The problem only shows itself when using FTP to list files. It seems
>> that data transfer is OK from the USB drive. It looks as if the system
>> drive is OK for all FTP operations.
>>
>
> The FTP listing problem suggests that you have a sector read
> issue. If you have residual long file names, you have fewer
> directory entries per sector.
>
> If the directory file is badly fragmented, you will be putting
> pressure on the FAT buffering mechanism. In practice, you
> usually need to buffer at least six 512-byte sectors to avoid
> thrashing.
>
> Try converting all file names to 8.3 format and then defrag the
> drive. You find it more convenient to copy everthing off the
> drive, reformat the drive, and copy everything back. This
> process should repack the directories. Increasing the cluster
> size can also improve directory listing performance for reasons
> I do not fully understand, but it appears to be linked to the
> host O/S buffering.
>
> Stephen
>

Thanks Hugo, Chris and Stephen for your help

Unfortunately I cannot physically get at the drive to remove/replace it
without an awful lot of trouble but I can change the programme remotely.
However I felt that there is a deeper problem and shortening the
filenames will not cure it. I will have ago tomorrow but feel better
prepared with the insights you have provided.

Thanks again

Roger