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 curious as to where OSX stores the names of mounted volumes. For example, if I connect my external USB hard drive, mount it and change the name to something else, how does OSX remember the name the next time I mount it? It seems like this should be stored on the volume itself, but I don't see any file that might contain this name. The only file that's created is the ".DS_Store" file, but this does not contain the volume name as far as I can tell.

If it's not store on the volume then how does the OS realize it's the same device being connected?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

This information is stored outside the file systems in the device's partition table (or equivalent data structure). That's why you don't have to mount volumes to e.g. see their names in Disk Utility.

It depends on how the disks are formatted, modern OS X uses GPT by default.

Internally, OS X also uses GUIDs/UUIDs (128 bit numbers) to identify volumes.

Use /usr/sbin/diskutil to access metadata about disks and volumes.

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.