Bug 816293 - btrfs filesystem show UUID shows nothing
btrfs filesystem show UUID shows nothing
Product: Fedora
Classification: Fedora
Component: btrfs-progs (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Josef Bacik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-25 14:01 EDT by Richard W.M. Jones
Modified: 2012-04-25 15:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-25 14:32:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2012-04-25 14:01:01 EDT
Description of problem:

According to the docs, the command 'btrfs filesystem show UUID'
should show a single mountpoint, whereas 'btrfs filesystem show'
shows all mountpoints.

However the former doesn't appear to work:

# btrfs filesystem show 5e8f4c3a-f6f9-4451-a3f1-b80f26a36c03
Btrfs Btrfs v0.19

whereas the latter works ok (displaying all mountpoints):

# btrfs filesystem show  
Label: none  uuid: 5e8f4c3a-f6f9-4451-a3f1-b80f26a36c03
	Total devices 4 FS bytes used 28.00KB
	devid    1 size 1023.00MB used 437.06MB path /dev/vda1
	devid    2 size 1023.00MB used 422.25MB path /dev/vdb1
	devid    3 size 1023.00MB used 524.56MB path /dev/vdc1
	devid    4 size 1023.00MB used 524.56MB path /dev/vdd1

Btrfs Btrfs v0.19

Also the former command exits with code 0, but presumably if
it is failing to find the UUID it should exit with a non-zero

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


How reproducible:


Steps to Reproduce:
1. See above.
Comment 1 Josef Bacik 2012-04-25 14:32:44 EDT
fixed and building a package.

Comment 2 Richard W.M. Jones 2012-04-25 15:30:15 EDT
I have tested this package and it works:

# btrfs filesystem show 4502dcfb-4f47-432f-a443-a7eadd8fb263
Label: none  uuid: 4502dcfb-4f47-432f-a443-a7eadd8fb263
	Total devices 1 FS bytes used 28.00KB
	devid    1 size 1023.00MB used 12.00MB path /dev/vda1

Btrfs Btrfs v0.19

It would be nice if the result of an invalid uuid was a
non-zero exit code, eg:

# btrfs filesystem show 123456                           
Btrfs Btrfs v0.19
# echo $?

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