Hiding wrong rootfs volume based on fstab entry
Submitted by Tomas Bzatek
Assigned to gvf..@..e.bugs
Link to original bug (#796310)
Description
I got hit by this pretty bizzare issue today. One of my partitions didn't show up as a volume while other volumes from the same disk did. The problem here is rather philosophical.
I tracked this down to the gvfsudisks2volumemonitor.c:should_include_volume_check_configuration() filter. This filter prevents the evaluated volume from showing up if a record exists in /etc/fstab.
This is properly parsed out and indicated in the org.freedesktop.UDisks2.Block.Configuration property. Remember this is a static configuration, not a runtime state.
In my case the affected volume got its record in fstab as a root filesystem ("/" mountpoint). However my system was booted with different root and as such the OS basically ignores this fstab record, including mount options. This is perfectly normal and the real state is reflected e.g. in /proc/mounts.
This was also properly reflected in UDisks runtime state (on D-Bus) - the real root got its mountpoint structures (org.freedesktop.UDisks2.Filesystem interface) associated as well as the /dev/root symlink got properly assigned. The device with the old fstab record did not have such information, except of the parsed fstab entry.
--
So this is a special-case issue, the GVfs UDisks2 volume monitor should exclude rootfs volume only when both the fstab and runtime state match.
Version: git master