Am Sat, 16 Sep 2017 13:43:23 +0300 schrieb Marat Khalili <m...@rqc.ru>:
> On 16/09/17 13:19, Ulli Horlacher wrote: > > How do I know the btrfs filesystem for a given subvolume? > > Do I really have to manually test the diretory path upwards? > > It was discussed recently: the answer is, unfortunately, yes, until > someone patches df to do it for us. You can do it more or less > efficiently by analyzing /proc/mounts . Or you do "btrfs device stats .", it shows the associated device(s). You can put any path instead of "." in the command. Next, look at "lsblk <devicepath>". The problem is that the root subvolume id may not be mounted anywhere, so /proc/mounts may not help. On my system: $ sudo btrfs device stats . [/dev/bcache16].write_io_errs 0 [/dev/bcache16].read_io_errs 0 [/dev/bcache16].flush_io_errs 0 [/dev/bcache16].corruption_errs 0 [/dev/bcache16].generation_errs 0 [/dev/bcache48].write_io_errs 0 [/dev/bcache48].read_io_errs 0 [/dev/bcache48].flush_io_errs 0 [/dev/bcache48].corruption_errs 0 [/dev/bcache48].generation_errs 0 [/dev/bcache32].write_io_errs 0 [/dev/bcache32].read_io_errs 0 [/dev/bcache32].flush_io_errs 0 [/dev/bcache32].corruption_errs 0 [/dev/bcache32].generation_errs 0 $ lsblk /dev/bcache16 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT bcache16 254:16 0 925,5G 0 disk /mnt/btrfs-pool -- Regards, Kai Replies to list-only preferred. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html