Carlsbad Cubes Wolf Paulus

hardware

Formatting a USB Flash-Drive for OS X
By Wolf Paulus <wolf@wolfpaulus.com>

Posted Saturday, March 31st, 2007

Since a while back, I'm using a tool to store all my passwords, website logins, program serial numbers etc. all RC4-encrypted and password-protected. Currently, the password tool (Pastor) and the data file are located on my Power Mac G5, which of course is a problem when I need to lookup a password when away from the G5, like at work for instance. Putting everything on a USB Flash Drives may be a good solution but I'm just exploring the possibility while I'm writing this, so let's see how it goes. When formatting a USB Flash Drive (or any drive for that matter) OS X offers the following 7 choices: and the best format to chose really depends on the intended use of the drive. If the flash drive needs to be used on a Windows PC as well, then MS-DOS FAT32 File System is the one and only option available. The same is true for UNIX, which makes UNIX-FS the obvious, best choice.

But how do all these formats compare and which one should be used, if Macs running OS X are the only computers the Flash-Drive will ever be used with?

Mac OS Extended a.k.a. HFS Plus a.k.a. HFS+ seems to have a lot of advantages over MAC OS Standard a.k.a HFS.

What about Journaling?

1.0 GB DataTraveler If journaling is turned on for a disk, Mac OS X maintains a continuous record of changes to files on the disk. If your computer stops because of a power failure or some other issue, Mac OS X uses the journal to recover the hard disk to the last acceptable state before it stopped. However, flash memory has a limit when it comes to how often a memory location can be changed and therefore, Journaling doesn't seem to be the first choice when it comes to Flash-Drives.

Storage Efficiency and Write Speed.

We used a Kingston 1 GB Data-Traveler Flash Drive and performed the following tests with every available format:
Kingston 1 GB Data-Traveler / Transfer-Write Speed with different Formatting Options
Test UNIX FS MS-DOS FAT32 Mac OS Std. Mac OS Ext.Case-sens. Mac OS Ext.Case-sens./Journal. Mac OS Ext. Mac OS Ext.Journaling
Available Memory 877.7 MByte 960.5 MByte 960.1 MByte 947.2 MByte 938.3 MByte 947.1 MByte 938.2 MByte
Write-Speed large files 2.45 MByte/s 4.35 MByte/s 4.62 MByte/s 4.60 MByte/s 4.46 MByte/s 4.48 MByte/s 4.17 MByte/s
Memory Used 628 MByte 581.2 MByte 586 MByte 596.6 MByte 604.6 MByte 596.6 MByte 604.6 MByte

Format Conclusion

Considering Storage Efficiency, MS-DOS File System is the clear winner. Not only does the Flash-Drive when formatted in MS-DOS FS provide the biggest storage capacity (960.5 MByte), the stored files also occupy the least amount of storage space (581.2 MByte).
However, writing the 203 smaller files took over a minute on the MS-DOS formatted drive, a task that was performed in less then 5 seconds on any other format. The UNIX file system performed worse when we looked at the transfer speed for larger files (2.45 MByte/s). MS-DOS was with 4.35 MByte/s close to the transfer speed winner, Mac OS Standard: 4.62 MByte/s.
Since I'm going to use the Flash Drive only on a Mac, my favorite format for the Flash Drive is going to be Mac OS Extended (Case-sensitive).

Different Flash Drives ...

Now that the formatting question has been resolved, let's have a brief look at how the different Flash Memories perform that I can find around the house.
Besides 1, 2, and 4 GByte models of the Kingston DataTraveler, I have a 1 GByte SD-Card, which I have hooked up with a Hi-Speed ZiO Portable Secure Digital & MultiMediaCard USB 2.0 Reader/Writer, and also a 1 GByte first-generation iPod Shuffle that will be put to the test:

Hi-Speed ZiO Portable Secure Digital MultiMediaCard USB Reader Writer 1.0 GB SD Card
Different Flash Memories / Transfer-Write Speed
Test Kingston SD/1GB 1st gen. iPod Shuffle DataTraveler 1 GB DataTraveler 2 GB DataTraveler 4 GB
Write-Speed large files 3.91 MByte/s 2.74 MByte/s 4.60 MByte/s 3.12 MByte/s 3.90 MByte/s

Flash Mem. Write Speed Compared

Not unexpectedly, the lowest capacity DataTraveler performed the best. The iPod Shuffle's slow write speed on the other hand was a little surprising. Fortunately, Pastor, the Password storage tool, requires fully deployed only 8.6 MByte storage. The password file is tiny and therefore, the 1 GB DataTraveler will work just fine.

Final Steps

As an additional level of security, the Pastor application and the data-file can be put into an encrypted disk image. OS X's disk utility application allow us to create AES-128 encrypted disk images like so:
Secure Disk Image with Disk Utility
After opening the secure dmg the application and data-file can be added by simply dragging the files into the drive. Ejecting the drive will unmount it and every future attmept to mount / access the disk image will require to enter the prevously specified password.
Secure Disk Image



Disclosure: This blog is written and edited by me, it contains my words and my opinions only, and does not contain any content which might present a conflict of interest.
I am not compensated to provide opinion on products, services, websites and various other topics. This blog does not accept any form of cash advertising, sponsorship, or paid topic insertions. However, I will and do accept and keep free products, services, and other forms of compensation from companies and organizations. All advertising is in the form of advertisements generated by a third party ad network and identified as such.
I will only endorse products or services that I believe, based on my expertise, are worthy of such endorsement. Any product claim, statistic, quote or other representation about a product or service should be verified with the manufacturer or provider.

Published on: Saturday, March 31st, 2007  •  Category: [hardware]

Article URL : http://wolfpaulus.com/journal/hardware/flashdrives.html