PDA

View Full Version : Formatting/defragging Fat Volumes



notb4dinner
29th July 2005, 08:26 PM
For something I'm currently playing with I need to format a Compact Flash card as either FAT16 or FAT32. Then after copying some files to it I need to defragment it. With the appropriate software this should be relatively simple but I can't seem to find anything. Can anyone point me in the right direction?

EDIT: First problem solved. To format partition <Y> on disk <X> as FAT<Z>:

> sudo umount /dev/disk<X>s<Y>/
> fdisk -e /dev/rdisk<X>

within fdisk:

auto dos
write
quit

then:

> newfs_msdos -F <Z> -v <vol_name> /dev/rdisk2s1

Graham
29th July 2005, 09:35 PM
If you format the card and then copy files across it shouldn&#39;t need defragging as there will be no fragmentation. That&#39;s only required where files have been repeatedly re-written and there is insufficient free space. OS X doesn&#39;t provide utilities for defragging as it automatically does it for file over 20M in size. The only one I&#39;m aware of that does is Norton&#39;s and that is best avoided on a Mac.

WTF would you need to defrag a flash card anyway?

notb4dinner
29th July 2005, 09:59 PM
I&#39;m working with something (http://www.ndshb.com/modules.php?name=Content&pa=showpage&pid=26) that&#39;s running some flakey homebrew firmware that apparently get&#39;s pretty upset if you don&#39;t defrag. Since this has the potential to turn my new toy into an expensive lump of plastic I&#39;d prefer not to risk it.

In most situations though you would be 100% correct.