How do I get the current subvolid of a mounted btrfs?

1

How do you get the top level subvolid of a mounted btrfs? I want the actual subvolid that is mounted at this moment and not the default subvolid (which could be different.)

goertzenator

Posted 2015-08-10T12:47:05.650

Reputation: 390

Answers

0

Look at /proc/mounts or the output of mount, the subvolid is always listed in the mount options.

/dev/loop0 /mnt/btrfs btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0
                                                    ^^^^^^^^^^

Atemu

Posted 2015-08-10T12:47:05.650

Reputation: 41