Re: btrfs filesystem show confused when label is same as mountpoint

David Sterba
2015-06-25T16:37:49Z

On Sat, Jun 13, 2015 at 09:51:41AM +0000, Duncan wrote:
> Sjoerd posted on Sat, 13 Jun 2015 09:20:12 +0200 as excerpted:
>
> > versus for label:
> > btrfs fi show MULTIMEDIA
> > Label: 'MULTIMEDIA' uuid: ce5d23cd-73a4-4f7c-83cd-2c40d12f6697
>
> Hmm... I wasn't even aware that you could /use/ label! But sure enough,
> it works here, too:
>
> btrfs fi show rt0238gcnx+35l0
> Label: 'rt0238gcnx+35l0' uuid: 8f8d79ef-a86f-4306-a255-e0519e0f6132
> Total devices 2 FS bytes used 1.94GiB
> devid 1 size 8.00GiB used 3.78GiB path /dev/sda5
> devid 2 size 8.00GiB used 3.78GiB path /dev/sdb5
>
> btrfs-progs v4.0.1
>
>
> It works for UUID as well...
>
> btrfs fi show 8f8d79ef-a86f-4306-a255-e0519e0f6132
> Label: 'rt0238gcnx+35l0' uuid: 8f8d79ef-a86f-4306-a255-e0519e0f6132
> Total devices 2 FS bytes used 1.94GiB
> devid 1 size 8.00GiB used 3.78GiB path /dev/sda5
> devid 2 size 8.00GiB used 3.78GiB path /dev/sdb5
>
> btrfs-progs v4.0.1
>
> ... but that's a lot of arbitrary typing.
>
> Doesn't work with partlabel or id (see /dev/disk/by-*), however. =:^(

The commandline tries to guess if it's label/uuid/path. If we want to
add support for partlabel and/or partuuid, we can't use the bare string,
but possibly the blkid tags, like

$ btrfs fi show PARTUUID="8f8d79ef-a86f-4306-a255-e0519e0f6132"