Bug 816293 - btrfs filesystem show UUID shows nothing
Summary: btrfs filesystem show UUID shows nothing
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: btrfs-progs
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josef Bacik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-25 18:01 UTC by Richard W.M. Jones
Modified: 2012-04-25 19:30 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-04-25 18:32:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2012-04-25 18:01:01 UTC
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
code.

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

btrfs-progs-0.19-17.fc17.x86_64

How reproducible:

100%

Steps to Reproduce:
1. See above.

Comment 1 Josef Bacik 2012-04-25 18:32:44 UTC
fixed and building a package.

http://koji.fedoraproject.org/koji/taskinfo?taskID=4022881

Comment 2 Richard W.M. Jones 2012-04-25 19:30:15 UTC
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 $?
0


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