Description of problem:
If you create a GFS2 partition and then try to add it to '/etc/fstab' using it's 'UUID=...', it fails to find the underlying device path. Same if you try to find it with 'findfs'.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a GFS2 partition
2. Run 'gfs2_edit -p sb /dev/drbd_vg0/xen_store | grep sb_uuid'
3. Run 'findfs UUID=<uuid returned in step 2>
# gfs2_edit -p sb /dev/drbd_vg0/xen_store | grep sb_uuid
# findfs UUID=A1487063-2A3F-43B1-3A36-44936B0B4D1E
findfs: unable to resolve 'UUID=A1487063-2A3F-43B1-3A36-44936B0B4D1E'
That 'findfs' it would return the device path. In turn, that gfs2 could find the device path when /etc/fstab has a 'UUID=A1487063-2A3F-43B1-3A36-44936B0B4D1E' device entry (using the UUID from the above example).
I did a little more investigation. It turns out that findfs (and likely mount) simply expects lower case lettering for hexadecimal UUIDs:
[root@snap ~]# findfs UUID=5CFE530C-E298-EF20-711B-48AA5039B62D
findfs: unable to resolve 'UUID=5CFE530C-E298-EF20-711B-48AA5039B62D'
[root@snap ~]# findfs UUID=`echo 5CFE530C-E298-EF20-711B-48AA5039B62D | tr A-Z a-z`
According to http://www.ietf.org/rfc/rfc4122.txt - UUID inputs are not supposed to be case sensitive.
(In reply to comment #1)
> According to http://www.ietf.org/rfc/rfc4122.txt - UUID inputs are not supposed
> to be case sensitive.
More precisely: The hexadecimal values "a" through "f" are output as lower case characters and are case insensitive on input.
The libblkid uses conversion from internal binary UUID representation to lower-case string when it reads uuid from a filesystem superblock.
All the others operations are based on these strings. So mount, fsck and findfs use tags (e.g. UUID= or LABEL=) as strings. It does not convert UUID= from fstab or command line to the binary representation
It seems that this behaviour is not properly documented. I'll update mount and fstab man pages. Thanks for your report.
Shouldn't findfs, mount, etc. should be simply lower-casing things when it gets UUID= then?
There is not a lot of magic required to make this work correctly.
Updating the docs is good, but as Lon mentioned, it shouldn't be hard to implement case insensitive input strings. This would be in-line with the RFC and solve the problem of us pesky users who don't read the fine manuals in close detail. :)
(In reply to comment #3)
> Shouldn't findfs, mount, etc. should be simply lower-casing things when it
> gets UUID= then?
Some filesystem (exfat, vfat, hpfs, ntfs, ...) use convention that the ID is upper-case string...
(In reply to comment #4)
> Updating the docs is good, but as Lon mentioned, it shouldn't be hard to
> implement case insensitive input strings. This would be in-line with the RFC
The problem is that UUID= tag does not mean the standard (DCE) UUIDs. Some filesystems use non-standard IDs or store the ID in superblock as a string.
> and solve the problem of us pesky users who don't read the fine manuals in
> close detail. :)
I understand your point of view... and I'll think about it ;-)