Formatting a USB Flash-Drive for OS X

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:

  • UNIX File System
  • MS-DOS File System
  • MAC OS Standard
  • MAC OS Extended (Case-sensitive)
  • MAC OS Extended (Case-sensitive, Journaled)
  • MAC OS Extended
  • MAC OS Extended (Journaled)

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.

  • Mac OS Extended format is a hard disk format that increases the number of allocation blocks on the disk and also allows more than 65,000 files on the hard disk. However, Mac OS Extended format optimizes the storage capacity of large hard disks by decreasing the minimum size of a single file.
  • MAC OS Standard a.k.a HFS on the other hand does not support file names > 31 chars, it does not support additional meta-information used by Mac OS X, has as limit of 65k allocation blocks, and is more error-prone than HFS+.
  • Since the storage efficiency of Mac OS Extended format typically applies to 1 GB or larger volumes, Flash Drives with a capacity below 1 GB may still benefit from the MAC OS Standard format.

What about Journaling?

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:

  • Check available storage capacity after formating
  • Copy 5 large files (total 580.4 MB) and 203 small files (total 812 KB) to the flash drive
  • Measure transfer speed while coping the large files
  • Check used storage after all files were transferred
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.62MByte/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:

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

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:

  • Open Disk Utility in the Applications/Utilties folder
  • Click “New Image”
  • In the “Encryption” menu, select AES-128
  • Select the size of the disk image: 10 MByte seems to be more than enough to store application and data-file
  • Enter the name and location of the image file
  • Click Create to finish
  • Final step, come up with a password (this will be needed everytime you want to open the disk image) and enter it twice

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.

Share this post:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.