By default, if your fstab
entry is:
UUID=913aedd1... /media/Schijf-2 ext4 rw,relatime 0 2
your partition will not be shown as Schijf-2
in your sidebar, unless it is labelled Schijf-2
. You have two options:
Leave the fstab
entry as is and label your partition (e.g. if sda2
is your partition):
e2label /dev/sda2 Schijf-2
Leave the partition as is and add x-gvfs-name=Schijf-2
1 to your mount options in fstab
:
UUID=913aedd1 /media/Schijf-2 ext4 rw,relatime,x-gvfs-name=Schijf-2 0 2
1
this works even if the partition has a different label and you want it to be shown as Schijf-2
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_SHARED
1 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.
Best Answer
Something is very fishy about that fstab-line:
Normally they have the format:
Basically, what this line does or tries is mounting
/dev/xvdf
onto the directory/dev/xvdb1
. I think you misunderstood how/etc/fstab
works. You most likely want something like this:In particular, note that the mount point (
/mnt
in this example) must be an existing directory, it will not be created for you.