Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1164765

Summary: [RFE] Add a new API to scan devices for a btrfs filesystem
Product: Red Hat Enterprise Linux 7 Reporter: Lingfei Kong <lkong>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.1CC: leiwang, linl, mbooth, ptoscano, wshi, yoguo
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.36.1-1.el7 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1164766 (view as bug list) Environment:
Last Closed: 2017-08-01 22:08:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1359086    
Bug Blocks: 1164766, 1288337, 1301891    

Description Lingfei Kong 2014-11-17 11:35:20 UTC
Description of problem:
Currently if we want to find the devices which is added to a btrfs filesystem, the only way is use blkid and compare the UUID. It is helpful if there is a API used to show the relationship between btrfs filesystem and devices.


Version-Release number of selected component (if applicable):
libguestfs-1.28.1-1.10.el7


How reproducible:
100%


Steps to Reproduce:
1.
2.


Actual results:


Expected results:


Additional info:

Comment 3 Pino Toscano 2016-05-13 15:19:34 UTC
Added with
https://github.com/libguestfs/libguestfs/commit/e3d429d37d882d06f25991ea0076d0c3bef44e80
which is in libguestfs >= 1.33.29.

Comment 4 Richard W.M. Jones 2016-06-27 17:43:56 UTC
Fixed upstream, thanks Pino.  However new APIs for speculative
non-customer features are not RHEL 7.3 material, so I have
kicked this to RHEL 7.4 when undoubtedly we'll want to do yet
another rebase, and that will pick up this fix.

Comment 6 YongkuiGuo 2017-03-30 10:05:31 UTC
Verified with package:
libguestfs-1.36.3-1.el7.x86_64

Steps:
1. $ guestfish
><fs> scratch 1G
><fs> run
><fs> part-init /dev/sda gpt
><fs> part-add /dev/sda p 34 600000
><fs> part-add /dev/sda p 600001 1200000
><fs> part-add /dev/sda p 1200001 2097118
><fs> mkfs ext4 /dev/sda2
><fs> mkfs-btrfs "/dev/sda1 /dev/sda3"
><fs> list-filesystems
/dev/sda1: btrfs
/dev/sda2: ext4
/dev/sda3: btrfs
><fs> btrfs-filesystem-show /dev/sda1
/dev/sda1
/dev/sda3

Actual results:
The API lists all the associated devices of a btrfs filesystem. So Verified.

Additional info:
Pino provided the test steps. Thanks.

Comment 7 errata-xmlrpc 2017-08-01 22:08:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2023