On Sat, Jul 06, 2024 at 04:17:30AM GMT, lukaro wrote: > Hi everyone, > > in lsblk, I'm used to seeing the mount point for all devices in an mdadm raid, like so: > > sdb 8:16 0 16.4T 0 disk > └─sdb1 8:17 0 16.4T 0 part > └─md127 9:127 0 32.8T 0 raid5 /store/RAID_A > sdc 8:32 0 16.4T 0 disk > └─sdc1 8:33 0 16.4T 0 part > └─md127 9:127 0 32.8T 0 raid5 /store/RAID_A > sdd 8:48 0 16.4T 0 disk > └─sdd1 8:49 0 16.4T 0 part > └─md127 9:127 0 32.8T 0 raid5 /store/RAID_A > > However, with btrfs raid, the mount point is only shown for the first device: > > sdf 8:80 1 7,3T 0 disk > ├─sdf1 8:81 1 7,3T 0 part > │ └─video_4b0 254:4 0 7,2T 0 crypt /mnt/video > └─sdf2 8:82 1 28G 0 part > sdg 8:96 1 7,3T 0 disk > ├─sdg1 8:97 1 7,3T 0 part > │ └─video_5f2 254:5 0 7,2T 0 crypt > └─sdg2 8:98 1 28G 0 part > sdh 8:112 1 7,3T 0 disk > ├─sdh1 8:113 1 7,3T 0 part > │ └─video_666 254:6 0 7,2T 0 crypt > └─sdh2 8:114 1 28G 0 part > sdi 8:128 1 7,3T 0 disk > ├─sdi1 8:129 1 7,3T 0 part > │ └─video_9b1 254:7 0 7,2T 0 crypt > └─sdi2 8:130 1 28G 0 part > > Where in the sysfs does lsblk obtain the mount point information? > > Is it possible that the btrfs module is lacking this information? I > would like to understand why lsblk is lacking this information for > btrfs. The list of mount points can be found in /proc/self/mountinfo. When searching for a mount point, lsblk uses the device number (major and minor) or the device path. The /proc/self/mountinfo contains a list of unique mount nodes. This means that the Virtual File System (VFS) of Linux does not have knowledge of how the filesystems internally implement the RAID. The mdadm RAID maps all the disks to one virtual device, which is visible to the system as a normal block device. However, for btrfs, there is no such thing and all operations are handled internally within the filesystem. It would probably be possible to add additional support for btrfs to lsblk in order to request more details from the filesystem, but this feature has not been implemented. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com