#983869 lsblk does not report mount point for all members of btrfs filesystems

Package:
util-linux
Source:
util-linux
Description:
miscellaneous system utilities
Submitter:
vasilis g
Date:
2021-12-24 12:36:03 UTC
Severity:
normal
Tags:
#983869#5
Date:
2021-03-02 12:58:26 UTC
From:
To:
Version: 2.33.1-0.1

lsblk --version:   lsblk from util-linux 2.33.1

Kernel: 4.19.0-14-cloud-amd64

Debian: 10.8


With BTRFS filesystems with multiple devices (e.g.  a single topology of
a filesystem consisting 2 devices) lsblk does not populate the
MOUNTPOINT field (as it does for LVM multiple device filesystems). This
can cause confusion (lsblk tends to be one of the most important
commands to examine a system's block device topology). While on the more
traditional LVM stack one gets the mount point, for the newer btrfs we
don't get the same information.


Example on a system with a multi device btrfs filesystem

# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
...
vdb    254:16   0    2T  0 disk
└─vdb1 254:17   0    2T  0 part /data
vdc    254:32   0    2T  0 disk
└─vdc1 254:33   0    2T  0 part


# lsblk -f

vdb
└─vdb1 btrfs        be86d428-b3f2-4fb7-ac07-a4b41f92a4ac 2,1T    47% /data
vdc
└─vdc1 btrfs be86d428-b3f2-4fb7-ac07-a4b41f92a4ac

while examining btrfs commands we can see the relationship

# btrfs device usage /data
/dev/vdb1, ID: 1
    Device size:             2.00TiB
...
/dev/vdc1, ID: 2
    Device size:             2.00TiB
...


For comparison here is a listing from another system (also debian 10.8
and same lsblk version) with LVM formatted filesystem

# lsblk

vdb              254:16   0    2T  0 disk
└─vdb1           254:17   0    2T  0 part
   └─vg-data 253:0    0    3T  0 lvm  /data
vdc              254:32   0    2T  0 disk
└─vdc1           254:33   0    2T  0 part
   └─vg-data 253:0    0    3T  0 lvm  /data


Kind Regards

V.G.

#983869#10
Date:
2021-12-24 12:31:58 UTC
From:
To:
Hi,

thanks for the report. Given lsblk mostly just prints out
information provided by the kernel, I would imagine that information
is incomplete. Please strace and/or gdb your way through lsblk and
see what you can find. (Or provide exact info on how to setup a
reproduction system.)

If you agree this is a kernel problem, please reassign to the
kernel.

BR,
Chris