How can I get UUID of a volume that contains the
The best thing for that I've found to date is
blkid -o list. But this output is human readable and hard to parse. Maybe there is a better way?
I need that to parameterize configuration management with system-specific templates.
blkid gotcha for those who may reuse outcomes of my question in future:
blkid caches results of previous runs at
/etc/blkid.tab . That means that running
blkid as non-root user first time will not return any data. Also, running
blkid as non-root user after root run will return stale (possibly incorrect) data.