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):
Steps to Reproduce:
1. Obtain latest RHEL 6 with btrfs filesystem
2. btrfsctl -a (under user root)
bash-4.1# btrfsctl -a
Scanning for Btrfs filesystems
failed to read /dev/sr0
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.
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
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.