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?
3 Answers
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
- 81
- 1
- 2
-
2Because -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 Dec 19 '17 at 20:53
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!
- 690
- 4
- 7
-
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 Mar 26 '12 at 21:47
-
does not work for me. The disk hangs after typing this and 30 minutes pass, nothing happens. I don't know if it is formatting, but 30 minutes is too much. – Duck May 06 '20 at 11:13
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!
- 153,128
- 77
- 353
- 394
- 11
- 1