Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

For example, when I plug in an external hard drive disk enclosure via USB, sometimes the disk is automatically mounted in /media/.

For example, the disk might be mounted to

/media/13f35f59-f023-4d98-b06f-9dfaebefd6c1

or

/media/4668484A68483B47

What are those long IDs?

share|improve this question
    
Presumably these are the same identifiers as blkid shows? –  Faheem Mitha Aug 6 at 18:59

2 Answers 2

up vote 4 down vote accepted

The longer number is called a Universally Unique Identifier (UUID). It is specified by the filesystem. There is a good Wikipedia article that gives more information on why and how it is used.

FAT filesystems are identified with a shorter ID (the "Volume serial number"). Wikipedia suggests it's actually a timestamp.

share|improve this answer

It was probably mounted by udisksd. Look in syslog. On my system, inserting a USB stick results in this:

Aug  6 15:17:08 ubuntu udisksd[2856]: Mounted /dev/sdb1 at /media/mp/A88B-3652

udisks tries to provide a unique name for each drive or partition. It searches through all the symlinks that udev creates under /dev/disk. For removable media, it looks at the symlinks in /dev/disk/by-uuid and /dev/disk/by-label. For nonremovable media, it looks in /dev/disk/by-id.

The entries in the by-uuid directory are often, but not always, UUIDs. In your example, the UUID 13f35f59-f023-4d98-b06f-9dfaebefd6c1 was likely generated by a command like mke2fs, which creates filesystems. In the case of my USB stick, A88B-3652 is actually the volume serial number of its fat32 partition.

The entries in the by-label directory are Volume Labels on CD or DVD discs, for example "Ubuntu 14.04 LTS amd64", or filesystem labels created with the -L option to mke2fs or tune2fs.

The entries in the by-id directory are often of the form bustype-manufacturer_device_serialnumber, with a -partn appended for each partition.

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.