I recently purchased a Sandisk Extreme SSD to work with Mac and Android.
- Is it possible to create 2 exFAT partitions of the drive? (Currently, I managed to do a combination of exFAT and HFS/Mac OS Extended (Journaled))
- Is it possible to change the allocation size using Disk Utility on Mac?
Running the command:
diskutil info /Volumes/PartitionName/ | grep "Block Size"
gives the default sector size as:
# For exFAT partition
Device Block Size: 512 Bytes
Allocation Block Size: 131072 Bytes
# For Mac OS Extended partition
Device Block Size: 512 Bytes
Allocation Block Size: 4096 Bytes
However, I didn't get the option to decide the allocation block size while partitioning/erasing the disk on Mac. Am I missing something?
Also, what should be the appropriate allocation size considering I am planning to store photos, documents and backup data? For eg. this review suggests formatting the hard disk before using with appropriate allocation size on Windows (like 128kb).
If we follow the answer provided here, could you please explain how to change allocation size (instead of device block size) with newfs_exfat
Platform: macOS High Sierra
Version 10.13.6
Best Answer
The
diskutil
command is a more reliable than the Disk Utility application when creating two ExFAT partitions on a drive. I do not believe you can specify the Allocation Block Size when ExFAT formatting a partition with either thediskutil
command or Disk Utility application. However, you can with thenewfs_exfat
command.The Allocation Block Size was originally referred to as the cluster size. Microsoft defines the cluster size as follows:
Basically, a larger cluster size results in faster access times, but at a cost of more wasted space. Certainly, if you have a large number of files significantly smaller that the cluster size, then you will find the volume is consuming far more space than the sum of the file sizes. The is no easy way to answer what you should choose for a cluster size. This really depends on the quantity and size of the files themselves.
There are alternatives, if you are using the disk to archive documents. For example, you could create a single file compressed archive of many documents. This eliminates the wasted space that normally occurs at the end of each file. Again, accessing an archive usually take additional time. You can easily create a zip archive by using the Finder Application. However, you can not use the Finder to view the contents of a zip file without first unzipping the file. You can list the contents of a zip file by using commands entered in a Terminal window. Or you can install a third party tool with a GUI. You can also use the Disk Utility to create a compressed dmg file. Here, you can use the Finder to mount and view the contains of a dmg file without first having to extract the contents.
Example
Below is an example where a 1 TB disk is partitioned into two 500 GB ExFAT volumes. Here the legacy Master Boot Record (MBR) partitioning scheme is used. The identifier for this disk is
disk1
. Basically, you specify the size of the first partition and the rest of the space is allocated to the second partition. The names of the volumes areMyExFAT1
andMyExFAT2
.Below is the output from this command.
If you wish to use the GUID Partition Table (GPT) scheme instead of the MBR partition scheme, then you would enter the following.
The output from this command is given below. Note that a small EFI partition is also created.
In either case, the output from the command
diskutil info MyExFAT1 | grep "Block Size"
would be the following.So, if you wanted a Allocation Block Size of 4096 bytes, then you could enter the following commands. Below, the disk identifier is
disk1
and the disk is using the MBR partition scheme.These commands would produce the following output.
The output from this example was produced using High Sierra (macOS 10.13.6).