> I look for the removable devices that are mounted in > /media. > Devices like FAT32 USB sticks or camera memory cards > are mounted with their UUID because they have no > label and I need to identify them. > > For example: > $ ll /media/ > totale 28K > drwx------. 16 c.cerbo c.cerbo 12K 1 gen 1970 > KINGSTON/ > drwx------. 9 c.cerbo c.cerbo 16K 1 gen 1970 > 1D59-EB48/ > > $ ll /dev/disk/by-uuid/ > totale 0 > lrwxrwxrwx. 1 root root 10 2 dic 20:27 > c827ec3b-487d-4e63-9259-e24892a229a8 -> ../../sda3 > lrwxrwxrwx. 1 root root 10 2 dic 20:27 > 8305427f-bace-42f5-aecd-540a85d1b164 -> ../../sda1 > lrwxrwxrwx. 1 root root 10 2 dic 20:27 > ea452bb1-d2f1-41e4-a129-4497e837439a -> ../../sda2 > lrwxrwxrwx. 1 root root 10 2 dic 20:27 FC48-BF30 -> > ../../sdb1 > lrwxrwxrwx. 1 root root 10 2 dic 21:27 1D59-EB48 -> > ../../sdc1
First, AFAIK there's no such thing in Solaris as pathnames with the UUID in them. Second, I think the UUIDs are not a feature of the device, but are written into the filesystem. I doubt the filesystem tools on Solaris create filesystems with UUIDs, or add them. Some tools, like SVM, do write something like a UUID onto the disks, so that if the system is reconfigured and the devices are enumerated differently, it can still figure out which disks are which. But I don't think that facility is generally available; and usually the value is based on the vendor name and serial number from SCSI inquiry (give or take changes if the serial number obviously isn't unique). Looking at mkfs_pcfs(1m), it can create pcfs (FAT) filesystems with a regular label, which is better than nothing. (I don't know of a tool on Solaris to _add_ a label to an existing pcfs filesystem.) -- This message posted from opensolaris.org
