Bind mount directories appear in Nemo left pane as ejectable volumes

Bug #1831302 reported by Scott Cowles Jacobs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Peppermint
New
Undecided
Unassigned

Bug Description

Despite not being volumes, bind mount directories appear in Nemo's left pane under Devices.

I have a separate partition where I store all of my personal data, so that I can have multiple OS partitions, and go back and forth between them, and install new OSes, and not affect my personal data.
Up until now, I used a personalized user-dirs.dirs file, with the Desktop/Documents/... being set to /data/Desktop, /data/Documents, ... However, this occasionally causes problems, and very few programs apparently read the user-dirs.dirs file, except to locate the Desktop.
Someone suggested bind mounts, which I hadn't heard of, and I decided to test them.
I put lines in my fstab file that effected mounts binding my user dirs in my separate partition to the standard /home/scott/... directories, for all 8 user dirs.
This worked. However, now I have 8 lines added to the Devices section of Nemo's left pane, with just a blurb listing the size of my data partition (tool-tips show the correct directory path, though), and they have the eject disk symbol next to them. I have not been brave enough to try to eject any of my directories, however...!

Searching the internet, I find that I ought to add x-gvfs-hide to my mount options.
I do so. No difference at all.

Here is my fstab file, and the only difference between my two attempts is the presence or absence of the x-gvfs-hide option:

"# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=8db7376a-85d2-4b3e-bfa3-d528434e50be / ext4 errors=remount-ro 0 1
# /Peppermint9 was on /dev/sda3 during installation
UUID=aa222447-38b3-4b12-862d-dd7efcc8a402 /Peppermint9 ext4 defaults 0 2
# /data was on /dev/sda4 during installation
UUID=cc95ba37-809a-4d58-a87e-9a7e100c9eaf /data ext4 defaults 0 2
# swap was on /dev/sda1 during installation
UUID=7f0092a1-f2dd-4f0e-b088-ed09af495236 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
#
/data/Desktop /home/user/Desktop none bind,x-gvfs-hide
/data/Downloads /home/user/Downloads none bind,x-gvfs-hide
/data/Templates /home/user/Templates none bind,x-gvfs-hide
/data/Public /home/user/Public none bind,x-gvfs-hide
/data/Documents /home/user/Documents none bind,x-gvfs-hide
/data/Music /home/user/Music none bind,x-gvfs-hide
/data/Photos /home/user/Pictures none bind,x-gvfs-hide
/data/Videos /home/user/Videos none bind,x-gvfs-hide
"

"mount" shows the bind mounts as merely /dev/sda4, and shows the x-gvfs-hide option
"cat /etc/mtab" is similar, but the x-gvfs-hide is NOT listed.
"gio mount -li" shows :
"can_unmount=1
      can_eject=0
"
Can anyone suggest a solution, or at least verify that this is a bug (and maybe fix it?)
Thank you.
-------------------------------------------
System: Host: user-HP-Compaq-dc5700-Small-Form-Factor Kernel: 4.18.0-20-generic x86_64 bits: 64
           Console: tty 1 Distro: Peppermint Ten
Machine: Device: desktop System: Hewlett-Packard product: HP Compaq dc5700 Small Form Factor serial: MXL8050B2R
           Mobo: Hewlett-Packard model: 0A60h serial: MXL8050B2R
           BIOS: Hewlett-Packard v: 786E2 v02.04 date: 04/13/2007
CPU: Dual core Intel Core2 6300 (-MCP-) cache: 2048 KB
           clock speeds: max: 1867 MHz 1: 1596 MHz 2: 1596 MHz
Memory: Array-1 capacity: 4 GB devices: 1 EC: None
           Device-1: XMM1 size: 1 GB speed: 667 MT/s type: DDR2
           Device-2: XMM2 size: 1 GB speed: 667 MT/s type: DDR2
           Device-3: XMM3 size: 1 GB speed: 667 MT/s type: DDR2
           Device-4: XMM4 size: 1 GB speed: 667 MT/s type: DDR2
           Device-5: N/A size: 1024 kB speed: N/A type: Flash
Graphics: Card: Intel 82Q963/Q965 Integrated Graphics Controller
           Display Server: X.Org 1.20.1 drivers: modesetting (unloaded: fbdev,vesa) Resolution: 1360x768@60.37hz
           OpenGL: renderer: Mesa DRI Intel 965Q version: 2.1 Mesa 18.2.8
Audio: Card Intel 82801H (ICH8 Family) HD Audio Controller driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.18.0-20-generic
Network: Card: Broadcom and subsidiaries NetXtreme BCM5755 Gigabit Ethernet PCI Express driver: tg3
           IF: enp63s0 state: up speed: 1000 Mbps duplex: full mac: 00:1b:78:81:5b:df
Drives: HDD Total Size: 80.0GB (20.8% used)
           ID-1: /dev/sda model: WDC_WD800JD size: 80.0GB
Partition: ID-1: / size: 15G used: 6.0G (44%) fs: ext4 dev: /dev/sda2
           ID-2: /data size: 41G used: 50M (1%) fs: ext4 dev: /dev/sda4
           ID-3: /Peppermint9 size: 15G used: 5.3G (39%) fs: ext4 dev: /dev/sda3
           ID-4: swap-1 size: 4.72GB used: 0.00GB (0%) fs: swap dev: /dev/sda1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 42.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info: Processes: 165 Uptime: 1:48 Memory: 798.9/3936.9MB Client: Shell (sudo) inxi: 2.3.56
------------------------------------------------
Peppermint 10

user@user-HP-Compaq-dc5700-Small-Form-Factor ~ $ apt-cache policy nemo
nemo:
  Installed: 4.0.6+peppermint0.0.0
  Candidate: 4.0.6+peppermint0.0.0
  Version table:
 *** 4.0.6+peppermint0.0.0 700
        700 http://ppa.launchpad.net/peppermintos/p10-release/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
     3.6.5-1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

-------------------------------------------

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :
Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :
Revision history for this message
Mark-pcnetspec (mark-pcnetspec) wrote :

Wouldn't it be easier to just mount /data then symlink the user directories
https://forum.peppermintos.com/index.php/topic,1835.0.html

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

>Wouldn't it be easier to just mount /data then symlink the user directories
In a bug-report discussion about user-dirs.dirs with Agaida (active with LXDE, LXQt,
and the Linux distro Siduction ("our main dev Alf (agaida)")),
He commented:
"there are a bunch of "solutions" in the wild - linking the needed directories into users home (fugly) - bind mount it into users home (better) - using user mounts (far better) and so on"
Since I have yet to figure out what he means by "user mounts", I went with bind mounts.

Certainly, if one specifies x-gvfs-hide, and the mounts aren't hidden, there is a problem...

Certainly also, listing a directory as a removable drive is also wrong.

I am preparing this old computer to be given away, and wanted to give the user a flexible
setup (two partitions for distros, one for personal data), and wanted something fairly simple to use. Since user-dirs.dirs does not do what I expected it to do, and Agaida recommended bind mounts over symlinks, and many others seem to use bind mounts for the same or similar purposes, it sounded like the way to go...

Revision history for this message
Mark-pcnetspec (mark-pcnetspec) wrote :

Seems it's a known glib2 bug
https://gitlab.gnome.org/GNOME/glib/issues/1271

Apparently it's fixed in later versions, but it's unlikely it'll ever be backported to the 18.04 base

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

>Wouldn't it be easier to just mount /data then symlink the user directories

You'd THINK so.

But symlinking the user directories does not work.

One cannot symlink using an already-existing "LINK_NAME",
and when I try to delete (for example) /home/user/Desktop, something immediately re-creates
the directory. Nemo greys out send_to_trash and delete options, and if I try rm in the terminal, although the terminal reports that it has removed the directory, it is still there (but with a new date).

I tried --force and --directory in the ln command, but it says it "cannot overwrite directory"

sudo ln --verbose --force --directory --symbolic /data/Documents -T /home/user/Documents

(I tried without -T (which I KNEW I needed, but...) and it created /home/user/Documents/Documents, and pointed IT at /data/Documents).

So... I either use bind mounts, and risk my new linux user clicking on "eject" in Nemo's devices, or try symlinks (which isn't possible), or go back to using user-dirs.dirs,
which all apps seem to ignore (except file managers, which ignore all but Desktop... )

I cannot win.

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

I decided to do a screen recording of weird things that happen in Nemo, because (?) of this situation with bind mounts.

The audio volume is quite low in the first video, and non-existent in the second (because I turned the volume up (!) ), but what I wished to show is the following:

1) Of the eight bind mounts, seven appear under devices under their folder title, the last (Desktop) appears only as the size of the partition holding the folder.

2) All seven mounts listed in 1) refuse to be ejected. The last one asks for a password, and then supposedly ejects the folder, and one line disappears from the Devices.

3) At some point, all of the entries take on the title of the last entry described above (partition size).
The last entry in the list still says (Tooltip) Desktop.
In the past, I believe that as soon as the other entries display the partition size, the system allows them to be ejected (with password).
For the video, and still now as I write, it is still the case that all but the last refuse ejection. Every time I eject one of the directories, there is one less in the devices list, but the last always still says (Tooltip) Desktop.

4) Each "Device", and its corresponding user folder, when clicked upon, work just fine, whether "ejected" or not.

Second video

5) There is some strange disconnect between what is clicked upon in the left pane, and what the status bar states is "selected". After I viewed the first video, even if I clicked on one of the user directories, it still said the filename I had viewed was selected. At some point, after some more clicking on user directories, the text changed to that directory, and remained stuck on the new one after again clicking on other user directories.

6) The notification of the last ejection is still displayed now (10-15 min. later).
I note that it says "Disconnecting from filesystem", as if it was only in the process of ejection, not having finished.
I suppose that the notification, and the disappearance of a line in the Devices list, happens prior to the system finding that it actually cannot "eject" the directory, but no notification or error
message is ever displayed.
Say, I think I will start Nemo up from the terminal, and see if anything useful is printed there,
to supplement what information I have already given.
I will stop here and attach the videos.

Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :
Revision history for this message
Scott Cowles Jacobs (scott092707) wrote :

Nothing significant printed in the terminal when Nemo was invoked from there, when something was ejected from the Devices list.
"Gtk-Message: 20:19:27.501: GtkDialog mapped without a transient parent. This is discouraged."
appears either when the "cannot unmount" message or the password dialog appears (different times, of course...)

The "Unmounting 44 GB Volume / Disconnecting from filesystem" notification appears the instant the last entry in the Devices list of bind-mounted directories has "eject" clicked on it, and thereafter remains (even after Nemo is closed - obviously a system notification).

If Nemo is closed and restarted, or if I log out and log back in and invoke Nemo,
I do not get all my "Devices" back;

I currently have only 3 "Devices" shown - tooltipped "/home/user/Videos", "/home/user/Documents", and (as usual, the much longer) "/home/user/Desktop /dev/sda4) Free Space 40.7 GB"

mount and /etc/mtab both show just the three:
/dev/sda4 on /home/user/Desktop type ext4 (rw,relatime,x-gvfs-hide)
/dev/sda4 on /home/user/Videos type ext4 (rw,relatime,x-gvfs-hide)
/dev/sda4 on /home/user/Documents type ext4 (rw,relatime,x-gvfs-hide)

/dev/sda4 /home/user/Desktop ext4 rw,relatime 0 0
/dev/sda4 /home/user/Videos ext4 rw,relatime 0 0
/dev/sda4 /home/user/Documents ext4 rw,relatime 0 0

I imagine that I would only get all 8 listed again if I rebooted.

Weird thing: If I click eject on the Device tooltipped "/home/user/Videos", it refuses to remove it
from the list, saying it cannot unmount it.
BUT, if I click on the last entry, and enter my password, the Device tooltipped "/home/user/Videos" IS unmounted, and removed from the list.
The last item in the list is always tooltipped "/home/user/Desktop /dev/sda4) Free Space 40.7 GB",
yet Desktop is NOT the mount unmounted when I eject from that item.

Now I am down to one Device - Desktop of course. I will see what happens when I try to eject that...

Well, THAT did it - the /home/user/* user directories now show nothing in them.
The directories to which they were bound are still accessible, through File System -> /data -> *
but otherwise, I will have to reboot.... I think rebooting right now would probably be a good idea, anyway...

Hope this was useful.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.