Bug 1164765 - [RFE] Add a new API to scan devices for a btrfs filesystem
Summary: [RFE] Add a new API to scan devices for a btrfs filesystem
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
Depends On: 1359086
Blocks: 1164766 1288337 1301891
TreeView+ depends on / blocked
Reported: 2014-11-17 11:35 UTC by Lingfei Kong
Modified: 2017-08-01 22:08 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.36.1-1.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1164766 (view as bug list)
Last Closed: 2017-08-01 22:08:55 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2023 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2017-08-01 19:32:01 UTC

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):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 3 Pino Toscano 2016-05-13 15:19:34 UTC
Added with
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:

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

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.


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