[CentOS] Reformatting a USB drive

Nifty Cluster Mitch niftycluster at niftyegg.com
Mon Sep 29 05:34:59 UTC 2008


On Thu, Sep 25, 2008 at 05:05:54PM -0400, Robert Moskowitz wrote:
> 
> Found this old message about formatting a USB drive and it leaves a few  
> questions for me:
>
> I am going to format it as ext3 to keep permissions.  I don't need to  
> use this drive on any M$ system.
>
> Do I unmount the drive after inserting it before I issue:
>
> mkfs.ext3 /dev/sda1
>
> BTW, when I do a 'man mkfs.ext3' it takes me to the man pages for mke2fs.
>
> After the format is done, do I have to do anything to make sure  
> everything is 'written' to the drive before pulling it from the system?
>

After the format is finished give it time to push all the bits to the device.
Run fsck on it at least once as a test...  Since mkfs operates on the raw
device there is 'little' risk if you count to 15 after fsck exits and remove...

In use, always.... sync, umount it.
The graphical tools to unmount the volume do this for you.

Also consider asking if ext2 or another FS is a better choice than ext3.  The journal is
a busy place and might be a hot spot on the USB flash memory.  The journal
may also use more blocks than you expect.   Ext3 on spinning disks is
more reliable because of the way spinning disks work but a flash disk
might go goofy with half a flash block write in progress.

There are some flash memory specific filesystems out there... 
web search for stuff like: "JFFS2 · Journaling Flash File System"
'LogFS, "a scalable flash filesystem"' etc...  Some of the issues
do not matter on a $9.00 USB key but the big USB keys are 
more expensive than I like.


-- 
	T o m  M i t c h e l l 
	Found me a new hat, now what?



More information about the CentOS mailing list