Format USB Drive with FAT on Mac with different Allocation Unit Size

5

1

I've been asked to format a USB Drive with a larger Allocation Unit Size than the default. I'm using a Mac, Snow Leopard. In Disk Utility, I am unable to see anything to do with Allocation Unit Size. A bit of Googling suggests it might be called Cluster Size, but I can't see anything for that, either. Does anyone know if it's possible to format a drive with FAT and use a larger than default Allocation Unit Size / Cluster Size?

Kenny

Posted 2012-03-26T18:53:36.560

Reputation: 238

Answers

5

You should be able to do this from a command line using the newfs_msdos command. For example:

#> newfs_msdos -F 32 -V somevolumename /dev/youdiskdevice

The command takes many arguments that you may want to explore.. -c cluster-size for example.

I am sure you could google around for newfs_msdos for some usage examples and also man newfs_msdos

Hope this helps!

InChargeOfIT

Posted 2012-03-26T18:53:36.560

Reputation: 570

1Yep, that does appear to have the answer, thanks. The -c option says "Sectors per cluster. Acceptable values are powers of 2 in the range 1 through 128", and I had been expecting a size in bytes... so if I was to want 32KB (the value that I've been told to use), what value do I choose? 15, since 2^15 is 32,768...? – Kenny – 2012-03-26T21:47:36.940

6

For example to format FAT32 with 64kb allocation unit size:

sudo newfs_msdos -F 32 -c 128 -v VOLUMEID /dev/yourdiskdevice

with 32kb allocation unit size should be use 64 cluster size:

sudo newfs_msdos -F 32 -c 64 -v VOLUMEID /dev/yourdiskdevice

Liudas Šumskas

Posted 2012-03-26T18:53:36.560

Reputation: 61

1Because -c option means "number of sectors per cluster" with a 512bytes sector size you need 128 sectors to have 64kb allocation unit size. (just explaining the result ) – iGranDav – 2017-12-19T20:53:02.310

1

I didn't know that I had to unmount the disk in order to format the card. So I looked around to find an answer for the different errors, when all I actually needed to do was

diskutil unmount /dev/disk(the ident number)

I had to format my micro SD for a sports cam and the "cluster" size was wrong. I tried the -c 32 first, no joy. -c 64 Bingo!

Karl Harris

Posted 2012-03-26T18:53:36.560

Reputation: 11