I'm following a recipe I created a couple of years ago, where at one point I need to use
blkid to obtain a filesystem UUID.
I have this command noted, along with an expected example return value:
blkid -o export -s UUID /dev/mapper/thathost_crypt_md3 UUID=JNbF5T-vhSD-3aVv-intG-1Tk2-IEOZ-ABWXYZ
However, times have moved on and I'm no longer using Debian "wheezy" but instead "jessie". I see that on this more recent version of Debian I now have a different return value for the same command:
blkid -o export -s UUID /dev/mapper/thishost_crypt_sdb DEVNAME=/dev/mapper/thishost_crypt_sdb UUID=bddac63e-3510-4d24-a6fb-4d0a89abcdef
The man page for blkid seems to say that
-s UUID should include only values matching that key, yet there's this extraneous
DEVNAME in there, too.
I have a work-around, in that I can write this in both cases, but it seems strange the output structure should have changed:
echo "UUID=$(blkid -o value -s UUID /path/to/device)" UUID=bddac63e-3510-4d24-a6fb-4d0a89abcdef
util-linux versions are 2.20.1-5.3 and 2.25.2-6, respectively.
- Why the change in UUID shape, and does it matter?
- Why the change in the output format?