Wednesday, May 17, 2023

Volume Names, Mount Points, and Normalisation

Howard Oakley:

[The] current Data volume, by default named either Macintosh HD - Data (Intel) or simply Data (Apple silicon), isn’t mounted in /Volumes at all, but at /System/Volumes/Data. This article looks at another situation where APFS volumes will appear at mount points that differ from their volume name, when there’s the potential for a name collision, such as one resulting from Unicode normalisation.

[…]

The last time that I looked at the state of normalisation in APFS, almost two years ago, I found there were still issues and bugs, most weirdly with the fact that a volume whose name contains composed forms (Form C) was inaccessible to Spotlight indexing. That wasn’t helped by the fact that, unlike the Finder, Disk Utility doesn’t normalise the names of APFS volumes, and lets you create two volumes in the same container that differ only in their normalisation, and appear identical to the user.

[…]

APFS and Disk Utility are very flexible when it comes to naming volumes. If you want, you can mix cases across volumes that aren’t case-sensitive, and even use exactly the same name for as many volumes as you want, because the file system doesn’t identify volumes by name. What’s most important to APFS is the UUID of the volume: try mounting two volumes with identical UUIDs and you’ll see what I mean.

[…]

What happens is that the volume name is normalised to Unicode Form D, or decomposed, and compared without case-sensitivity to existing mount paths. If there’s any clash, then a number is appended after the normalised name to form the additional mount path.

Previously:

Comments RSS · Twitter · Mastodon

Leave a Comment