This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 627833 - get-e2uuid should use blkid instead of "tune2fs -l" to get filesystem UUID
get-e2uuid should use blkid instead of "tune2fs -l" to get filesystem UUID
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.1
All Linux
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On: 597112 613593
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-27 01:16 EDT by Jinxin Zheng
Modified: 2015-09-27 22:19 EDT (History)
5 users (show)

See Also:
Fixed In Version: libguestfs-1.7.17-4.el6
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of: 597112
Environment:
Last Closed: 2011-05-19 07:44:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jinxin Zheng 2010-08-27 01:16:02 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):
><fs> version 
major: 1
minor: 2
release: 7
extra: 


How reproducible:
Always

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.

3.
  
Actual results:


Expected results:
get-e2uuid should return UUID successfully for JBD

Additional info:

--- Additional comment from rjones@redhat.com on 2010-06-01 10:39:07 EDT ---

Patches posted upstream:
https://www.redhat.com/archives/libguestfs/2010-June/msg00006.html

--- Additional comment from rjones@redhat.com 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.
Comment 1 Richard W.M. Jones 2010-10-16 09:32:29 EDT
Bump version to 6.1.  This will be fixed if we rebase
(bug 613593).
Comment 2 Richard W.M. Jones 2011-01-04 09:17:01 EST
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).
Comment 4 Yufang Zhang 2011-02-14 22:09:39 EST
QA verified this bug with libguestfs-1.7.17-12.el6.x86_64 and
guestfish-1.7.17-12.el6.x86_64:

><fs> mke2journal 1024 /dev/vdb
><fs> get-e2uuid /dev/vdb
aebff5f2-f809-40ce-931f-d6a939695255

So change this bug to VERIFIED.
Comment 7 Laura Bailey 2011-04-18 21:51:16 EDT
    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.
    
    New Contents:
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.
Comment 8 Richard W.M. Jones 2011-04-19 03:39:56 EDT
This is OK, thanks.
Comment 9 errata-xmlrpc 2011-05-19 07:44:24 EDT
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.

http://rhn.redhat.com/errata/RHSA-2011-0586.html
Comment 10 errata-xmlrpc 2011-05-19 09:10:30 EDT
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.

http://rhn.redhat.com/errata/RHSA-2011-0586.html

Note You need to log in before you can comment on or make changes to this bug.