0

I had recently changed my partitions (reducing Windows partition to give more storage for Linux), and I used fstab to have convenient access to my file system.

I have not problem using these partitions from the command line, or by the symbolic links and rbinded mountings I created, when navigating with Nautilus.

However both Nautilus and Unity show entries in the sidebar for each partition, but I am not able to get to the respective partitions using them. In the Nautilus sidebar I get an error: mount: according to mtab, /mnt/bis is already mounted in /media/part mount failed. In the Unity sidebar, I get no error, but nothing happens either.

My fstab looks like this:

UUID=c01f8baf-xxxxx /mnt/bis             ext4  nosuid,nodev,nofail                                                                               0 2
/mnt/bis            /media/part          auto  rbind,gid=1004,umask=0002,x-gvfs-show,x-gvfs-name=Partition                                       0 0
/mnt/bis/myuser     /home/myuser/mydocs  auto  rbind,user,rw,nodev,noexec,auto,async,gid=1000,uid=1000,umask=0002,x-gvfs-show,x-gvfs-name=Source 0 0

There is a similar configuration for the NTFS partition. Which reports the same problem.

mount failed error message

Note that the name on the Nautilus sidebar (as well as in the Unity sidebar) is the name given in fstab.

I have no problem double-clicking the mydocs folder from Nautilus in my home directory, nor navigating through /media/part/ either through command line or by clicking folders in Nautilus.

I had posted a related question here: Removable HDD defined in fstab causing problems at startup when not present (edited).

  • 1
    Once you mount a partition using fstab it will appear as a normal folder in Nautilus. You will not be able to access it from Nautilus or Unity sidebars. This is normal. – user68186 Nov 26 '14 at 16:47
  • Then, they should not appear on the sidebars. I know I can create a .desktop file to still get the desired folder from Unity sidebar, but the non-working icons should be gone. – Carlos Eugenio Thompson Pinzón Nov 26 '14 at 16:57

1 Answers1

1

Unless I'm mistaken, the format for you /etc/fstab is wrong. The first entry is OK, but the next two should be similar. You can always check it by entering the command sudo mount -a, which will mount all entries, but then you will see any errors at the commandline output.

Why would you even want to mount a partition to a mountpoint, then change that mountpoint to a different mountpoint? That seems to be what you are trying to do.

It's much simpler, I think, to use symbolic links, and one mount command. Once mounted, you can create a symbolic link from /mnt/bis/myuser to /home/myuser/mydocs You can easily do this with Nautilus by creating the link in /mnt/bis/myuser after it's mounted, then moving it to /home/myuser, and renaming it to mydocs. I actually use this method for all my home's data directories (Documents, Downloads, Pictures, etc). It ends up looking like the normal directories, but can be shared with other OS's)

Marty Fried
  • 18,466
  • One of the reasons for mounting directories is that programs such as rsync treat differently symbolic links than mounted dirs. I am testing on eliminating the double entries, though. – Carlos Eugenio Thompson Pinzón Nov 27 '14 at 00:42
  • Okay, I left just one line for /mnt/bis with the gid, umask and x-gvfs parameters. Just by saving the /etc/fstab file it automatically fixed the entries in the sidebars of Unity and Nautilus. – Carlos Eugenio Thompson Pinzón Nov 27 '14 at 01:03
  • @CarlosEugenioThompsonPinzón: Most apps, rsync included, have options for how to treat symbolic links. rsync has many options for symbolic links. For me, it's an advantage, because I often want to skip them. Anyway, I hope I at least helped solve your problems. – Marty Fried Nov 27 '14 at 02:20