Hide Forgot
Description of problem: ----------------------- * Unlike Debian's version, "mount" doesn't show the "subvolume" option used when mounting a BTRFS subvolume. Version-Release number of selected component (if applicable): -------------------------------------------------------------- * mount from util-linux 2.19.1 (with libblkid and selinux support) How reproducible: ----------------- * When typing "mount" as a normal user or Root, I'm waiting for the list of all mounted filesystem with their options. However, the "subvol" option of a subvolume is not showed. Steps to Reproduce: ------------------- 1. Have a BTRFS Root partition 2. Install the system, home and other in separated subvolumes 3. Assign mount point using FSTAB 3. Type "mount" to list mount point and options Actual results: ------------------ [ root@Jumper ] /home/xakraz └─> # mount | grep btrfs /dev/sda3 on / type btrfs (rw,noatime,seclabel,ssd,space_cache,clear_cache) /dev/sda3 on /home type btrfs (rw,relatime,seclabel,ssd,space_cache,clear_cache) /dev/sda3 on /tmp type btrfs (rw,noatime,seclabel,ssd,space_cache,clear_cache) /dev/sda3 on /var/tmp type btrfs (rw,noatime,seclabel,ssd,space_cache,clear_cache) /dev/sda3 on /home type btrfs (rw,relatime,seclabel,ssd,space_cache,clear_cache) Expected results: ----------------- /dev/sda3 on / type btrfs (rw,subvol=@,noatime,seclabel,ssd,space_cache,clear_cache) /dev/sda3 on /home type btrfs (rw,subvol=@home,relatime,seclabel,ssd,space_cache,clear_cache) .... Additional info: ----------------- ┌[ root@Jumper ] / └─> # btrfs subvolume list / ID 256 top level 5 path @ ID 257 top level 5 path @home /etc/fstab UUID=aa22fa92-6502-4401-8702-5a7f56978ab8 / btrfs defaults,ssd,space_cache,clear_cache,noatime,subvol=@ 0 1 UUID=aa22fa92-6502-4401-8702-5a7f56978ab8 /home btrfs defaults,ssd,space_cache,clear_cache,subvol=@home 0 2
(In reply to comment #0) > Version-Release number of selected component (if applicable): > -------------------------------------------------------------- > * mount from util-linux 2.19.1 (with libblkid and selinux support) I am switching the component to util-linux.
Don't forget that Fedora does not use classic /etc/mtab (we use symlink to /proc/mounts). The subvol= option is not available in the /proc/mounts file. Anyway, the information about filesystem root directory (e.g. "/<subvolume>") is stored in the /proc/self/mountinfo file. You have to use findmnt(8) to see more advanced information about mountpoints: # mount /dev/sdb /mnt/test -o subvol=sub # findmnt /mnt/test TARGET SOURCE FSTYPE OPTIONS /mnt/test /dev/sdb[/sub] btrfs rw,relatime,ssd ^^^^^