Red Hat Bugzilla – Bug 627833
get-e2uuid should use blkid instead of "tune2fs -l" to get filesystem UUID
Last modified: 2015-09-27 22:19:55 EDT
Clone to RHEL 6 to ensure it will get fixed in 6.1.
+++ This bug was initially created as a clone of Bug #597112 +++
Description of problem:
Currently, get-e2uuid gets filesystem UUID via "tune2fs -l". However, this doesn't work for JBD(journaling block device): whenever you try to get uuid of a JBD, you get a error that tells "Filesystem has unsupported feature(s)". In another way, UUID could be gotten via blkid, for both JBD or filesystems such as ext2/3/4. So it would be better to replace "tune2fs -l" with "blkid" in the implementation of get-e2uuid.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. ><fs> mke2journal 1024 /dev/VG/jounal
2. ><fs> get-e2uuid /dev/VG/jounal
libguestfs: error: get_e2uuid: tune2fs: Filesystem has unsupported feature(s) while trying to open /dev/VG/jounal
Couldn't find valid filesystem superblock.
get-e2uuid should return UUID successfully for JBD
--- Additional comment from email@example.com on 2010-06-01 10:39:07 EDT ---
Patches posted upstream:
--- Additional comment from firstname.lastname@example.org on 2010-06-02 17:32:50 EDT ---
This patch has been pushed upstream.
If this needs to be fixed for RHEL 5 / 6, please clone
this bug and adjust the Product accordingly.
Bump version to 6.1. This will be fixed if we rebase
Fixed by the rebase.
In this case note that get-e2uuid is now deprecated, and
callers can use vfs-uuid instead (which uses blkid and
works for any filesystem type).
QA verified this bug with libguestfs-1.7.17-12.el6.x86_64 and
><fs> mke2journal 1024 /dev/vdb
><fs> get-e2uuid /dev/vdb
So change this bug to VERIFIED.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
The get-e2uuid command retrieved file system UUIDs via "tune2fs -l". This failed on journaling block devices (JBDs) and other devices that were not second, third or fourth extended file systems (ext2, ext3 or ext4). get-e2uuid has been reimplemented so that it retrieves UUIDs via "blkid" instead of "tune2fs -l", resolving this issue. However, since the get-e2uuid command has been deprecated, customers should retrieve UUIDs with the vfs-uuid command instead.
This is OK, thanks.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.