Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm formatting my SDHC 4GB card before putting an OS on it for my Raspberry Pi.

It says "allocation unit size" 32 KB and gives me options of up to 1024 MB.

What do I do about that?

share|improve this question

2 Answers 2

You need to select a cluster size. The data is not read at the byte level, but rather in blocks. Generally, the smallest unit of storage is a sector (traditionally 512 bytes, 4096 bytes for Advanced Format drives), but even that is not how files are stored in file-systems, but rather sectors are grouped together into clusters.

Raspberry Pi itself doesn’t really have a restriction on cluster size, but the operating system you use may. Usually, any standard size will work, but typically, it depends on what kind of files you will be storing on it.

If you are going to be storing lots of tiny files, then select the smallest cluster size possible (one sector; 512 for memory cards). This way you avoid wasting space by having lots of partially unused clusters. If you are going to be storing lots of giant files, then use the largest clusters size possible (usually 64KB; I’ve never seen 1MB clusters :-o). That way you minimize the file-system’s file-management overhead which frees up a little more space for storage.

When not sure, just use 4KB clusters; that works for most general-purpose usage which is why it is usually the default.

share|improve this answer

For an sdhc card, it's wise to choose a size that matches and is aligned with the size used by the controller on the sd card. You'll get much better performance out of a card where the filesystem is aligned on an erase block boundary, and does it's I.O in internal segment sized units.

The size needed varies from card to card. You can use flashbench to work out what the allocation unit and erase size are.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.