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 611563 - btrfsctl -a does not show any valid device
Summary: btrfsctl -a does not show any valid device
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: btrfs-progs
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Josef Bacik
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-05 16:39 UTC by Lubos Kocman
Modified: 2010-07-06 14:46 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-06 14:46:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
strace output of btrfsctl -a (52.61 KB, text/x-log)
2010-07-05 16:39 UTC, Lubos Kocman
no flags Details

Description Lubos Kocman 2010-07-05 16:39:59 UTC
Created attachment 429562 [details]
strace output of btrfsctl -a

Description of problem:

btrfsctl -a does not show any device. Except of that it throws an error message:
failed to read /dev/sr0.

Version-Release number of selected component (if applicable):

kernel-2.6.32-37.el6pcmring2.x86_64
btrfs-progs-0.19-11.el6.x86_64

How reproducible:


Steps to Reproduce:

1. Obtain latest RHEL 6 with btrfs filesystem
2. btrfsctl -a (under user root)
  
Actual results:

bash-4.1# btrfsctl -a
Scanning for Btrfs filesystems
failed to read /dev/sr0


Expected results:

I'm using btrfs on two LVs (first for root second for home)

bash-4.1# cat /etc/fstab | grep btrfs
/dev/mapper/rootvg-lv_root /                       btrfs   defaults        1 1
/dev/mapper/luks-ce6367a0-54ca-46a6-bfbb-0cd490e0b969 /home                   btrfs   defaults        1 2

so these two LVs should be listed.


Additional info:

Home is luks based volume with btrfs.

bash-4.1# ls -lad /dev/sr0 
brw-rw----+ 1 root cdrom 11, 0 Jul  5 16:04 /dev/sr0

Comment 1 Josef Bacik 2010-07-06 14:46:10 UTC
Thats not what btrfsctl -a is supposed to do.  It just probes all the devices and loads them into btrfs's volume cache so it can put together volumes when you mount something.  For example, if you have a two disk volume, and you just do mount /dev/disk0 /mnt/somwhere it will fail, because btrfs doesn't know about the second device.  So doing a btrfsctl -a will make btrfs aware that /dev/disk0 and /dev/disk1 are both btrfs volumes, so when you do a mount /dev/disk0 /mnt/somwhere it finds the uuid's for all the disks in the volume and mounts.  It's not meant to spit out the disks its found.


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