This is documented (at least for gnome-shell/nautilus) in gvfs-udisks2-volume-monitor:
The gvfs-udisks2-volume-monitor process is responsible for the disks,
media, mounts and fstab entries shown in the desktop user interface.
..........................................
A device is either mounted (in which case its directory is known) or
it's not. If the device is not mounted, then its directory is known
only if it's referenced in the /etc/fstab file.
Further down comes the explanation:
If the directory for a device is known and outside /media, $HOME
(typically /home/foo) or /run/media/$USER then the device is not shown
in the user interface. Additionally, if any of component directories
in its directory starts with a dot ("."), the device is not shown
either. This policy may be overriden by use of the options x-gvfs-show
and x-gvfs-hide.
To sum up:
Partitions listed in /etc/fstab would (by default) only show up if they're mounted under /media, $HOME or /run/media/$USER. If you want a partition to be automatically mounted at system startup and also listed in the file manager sidebar, the easiest way is to mount it via /etc/fstab under one of those three locations.
If you want the partition to be mounted under a different directory (e.g. /mnt) and still be shown in the sidebar, you can override the default behaviour by adding x-gvfs-show to your mount options in fstab:
UUID=5a1615ca-cffd3124917a /mnt/storage ext4 rw,noatime,discard,x-gvfs-show 0 2
Partitions not listed in /etc/fstab are handled by udisks2 and will be mounted under /run/media/$USER/VolumeName or /media/VolumeName depending on the value of UDISKS_FILESYSTEM_SHARED1 hence they will be shown under Devices in the sidebar. However, they are not automatically mounted. A user could automatically mount them at session startup with udisksctl, e.g. adding:
udisksctl mount -b /dev/sdb2 -t ext4
to the session startup scripts.
1
man udisks:
UDISKS_FILESYSTEM_SHARED
If set to 1, the filesystem on the device will be mounted in a shared directory e.g. /media/VolumeName)
instead of a private directory (e.g. /run/media/$USER/VolumeName) when the Filesystem.Mount() method is handled.
fstabis still shown as a device in these file managers./var/wwwas a separate partition (among others) in/etc/fstab- it doesn't show up under "Devices". If I comment it out in/etc/fstaband then unmount it then it does show up (after restarting the file-manager). If it's in/etc/fstabit doesn't show under "Devices"; if I comment it out, it reappears. That's on Fedora 21 withGnome Files,thunarandnemo.