GNOME Bugzilla – Bug 597420
Custom fstab causes duplicate entries for partitions in Places
Last modified: 2018-09-21 16:55:06 UTC
Created attachment 144795 [details] Screenshot explaining the "duplicate entries" problem This bug report is pushed upstream from Ubuntu launchpad bug: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/442130 It appears similar to Gnome bug #520851 but according to Sebastien Bacher it is a "new" bug, since the underlying APIs now use devicekit-disks. This bug occurs on Ubuntu 9.10 beta running Gnome 2.28, gvfs 1.4.0. I wanted my disks to automount on startup, but I didnt want to address them directly with device path, since it can change. So instead i use the LABEL directive. Now each partition is listed twice in Nautilus Places (see screenshot). According to a post on ubuntuforums, this issue can also happen if you identify partitions by UUID: * http://ubuntuforums.org/showthread.php?p=8050320 A workaround is to specify the partitions by /dev/sdXXX paths instead # /etc/fstab: static file system information. proc /proc proc defaults 0 0 LABEL=ubuntu / ext3 relatime,errors=remount-ro 0 1 UUID=4c604809-286a-4bf3-afd5-d23ff2e5464c none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0 LABEL=mp3 /media/mp3 ext4 users,noauto,noexec,noatime,rw 0 2 LABEL=tvserier /media/tvserier ext4 users,noauto,noexec,noatime,rw 0 3 LABEL=filmer /media/filmer ext4 users,noauto,noexec,noatime,rw 0 4 LABEL=downloads /media/downloads ext4 users,noauto,noexec,noatime,rw 0 5
Does it work if you specify the device using /dev/disk/by-label/LABELNAME?
David: Yes it works as expected if i specify the devices with the /dev/disk/by-label method and it solves my problem in a good way! So for me I concider this a non-issue now. However, i guess the LABEL=xx and UUID=xx methods should still work, since it is a supported feature in fstab. In my opinion it would be better if /etc/fstab deprecated the LABEL=xx method of use.
Hmm, the code is supposed to handle both LABEL=, UUID= and symlinks in /etc/fstab and I remember this worked when I wrote the code. The code is very simple: http://git.gnome.org/cgit/gvfs/tree/monitor/gdu/ggduvolumemonitor.c?id=1.4.0#n679 so I can't see why it shouldn't work when using LABEL= ... I do remember a random bug where you'd need to kill the gvfs-gdu-volume-monitor process if you just edited /etc/fstab. Can you try again with label and do this? Basically, just 'killall gvfs-gdu-volume-monitor' (this will remove icons from the nautilus sidebar) and then 'killall nautilus' to reload the gdu monitor process (nautilus will respawn).
Well they do work. However it ends up with duplicate entries if you specify using LABEL= or UUID= If fstab_mount_points only contain 1-by-1 copies from /etc/fstab lines i dont see why it wouldnt work also. But it seems they are accounted for twice, some other place maybe. Sorry I never looked on the gnome code before now.
PS regarding your suggested test, I have been doing full reboot after modifying /etc/fstab and then seen the duplicate entries.
Same thing happens to me: I get duplicates of all "non standard" entries in the fstab. This started happening as soon as I upgraded to ubuntu 9.10, and consequently to gnome 2.28. All was fine with ubuntu 9.04 and gnome 2.26 (and I didn't modify fstab). Duplication only happens with mounts that are in the /media directory. The problem is not only with uuid mounts, it happens with sshfs, samba and davfs mounts.
Correction to the above: duplication is not only on /media/subdir mounts. More in general, it seems the side panel shows an entry for each entry in the fstab file. [btw, I think it was not so in 2.26, is it possible to go back to that behavior?] Those entries cannot be mounted by clicking on them in the side panel, even though there is a "users" options in the fstab. Then, whenever an entry in the fstab is actually mounted, a duplicate appears.
Hoping that there is some work going on on this bug and that this may be helpful, here is my fstab, edited for privacy and with relevant comments: # no duplication problem with the following 4 mounts (set up automatically at # installation, and updated as I switched to ext4) UUID=106ad9f3-9f85-41f3-b5d9-873128ce0ef9 / ext4 relatime,errors=remount-ro 0 1 UUID=5b514092-7091-49e1-98c1-26170e48023b /boot/grub ext3 auto,relatime 0 2 UUID=5bb482ce-ff5a-40ee-abc0-58efa3f66f08 /data ext4 relatime 0 2 UUID=76ced9ba-e63e-442b-80b3-b54dd186f55e /home ext4 relatime 0 2 # needed the workaround to avoid duplication on these 2 /dev/disk/by-uuid/44A45C0AA45C00BA /media/WinXP-Data ntfs-3g defaults,users,rw 0 0 /dev/disk/by-uuid/72B082CEB082986D /media/WinXP-Sys ntfs-3g noauto,defaults,users,ro 0 0 # no problems here, of course UUID=9bdedf18-80d4-414e-b8a6-d1c95e37ada0 none swap sw 0 0 # Duplication on ALL of the following mounts. # NB: where the drive is not mounted, one entry is present, whenever the drive # is mounted (automatically or not) duplication occurs: one entry shows up as # not mounted, one entry as mounted //192.168.1.20/OPERATIONS /media/Operations cifs auto,users,credentials=/home/simone/.cifs/xxxx,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=simone,gid=simone 0 0 //192.168.1.20/SIMONE /media/Simone-NAS cifs auto,users,credentials=/home/simone/.cifs/xxxx,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=simone,gid=simone 0 0 sshfs#uname@share.xxxxx.net:/home/homedir /media/Operations-NAS fuse users,noauto,follow_symlinks,idmap=user,allow_other,reconnect https://share.xxxxx.net:6081/dav/o /media/Operations-WebDAV davfs noauto,user,uid=simone,gid=simone sshfs#simone@xxxxxx.homeip.net:/home/simone /media/mount fuse noauto,users,follow_symlinks,idmap=user,allow_other,reconnect # to be honest on this one I need to double check but can't until # I am able to connect to that network 192.168.15.6:/media/public/Ampere99 /media/Ampere99 nfs noauto,users,user,lock,intr,hard,rw,rsize=32768,wsize=32768 0 0
I can confirm this also. Was fine on Ubuntu Jaunty but showed up as soon as I installed Ubuntu Karmic (and with it Gnome 2.28). For me all cifs mounts in fstab show up twice in the places list. My local drives seem OK. Fstab (slightly edited for obvious reasons) is below - # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 # /dev/sda1 UUID=7955f373-b33e-4423-95ff-f3519e80bc6f / ext3 relatime,errors=remount-ro 0 1 # /dev/sda5 UUID=7db082ac-9954-431b-bf60-8a0d597ad2c1 none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0 # duplicates on all partitions below //192.168.0.21/music /home/dave/Music cifs noauto,user,username=xxxx,password=xxxx,gid=users 0 0 //192.168.0.21/podcasts /home/dave/Podcasts cifs noauto,user,username=xxxx,password=xxxx,gid=users 0 0 //192.168.0.21/adults /home/dave/Adults cifs noauto,user,username=xxxx,password=xxxx,gid=users 0 0 //192.168.0.21/torrent /home/dave/Torrent cifs noauto,user,username=xxxx,password=xxxx,gid=users 0 0 //192.168.0.21/video /home/dave/Video cifs noauto,user,username=xxxx,password=xxxx,gid=users 0 0 //192.168.0.21/dave /home/dave/Dave_Share cifs noauto,user,username=xxxx,password=xxxx,gid=users 0 0 //192.168.0.21/fileserver /home/dave/Fileserver cifs noauto,user,username=xxxx,password=xxxx,gid=users 0 0 //192.168.0.21/mythtv /home/dave/Mythtv cifs noauto,user,username=xxxx,password=xxxx,gid=users 0 0 #usbfs seems OK none /proc/bus/usb usbfs devgid=126,devmode=664 0 0
nautilus 2.30.1 gvfs 1.6.1-0ubuntu1build1 ubuntu 10.04 I had an interesting occurance of this. At first, I had: UUID=A66C42F16C42BBB5 /media/DATA ntfs defaults,gid=46,umask=007,group 0 0 And everything was working nicely. Then I: * Did a shrink resize of the NTFS partition * Got some bad errors with it[1] * Rebooted and concluded error was still present * Fixed the error[2] and rebooted And here did this bug crop up. I did not change the fstab in the least between it working before and this point. If I change the fstab to use /dev/by-uuid/* instead this issue goes away. [1] http://gparted-forum.surf4.info/viewtopic.php?id=13777 [2] http://gparted-forum.surf4.info/viewtopic.php?id=13937
From what I can tell, this bug only manifests itself if you reference the disk with UUID= or LABEL= and also specify the "user" option. Removing the "user" option will also remove the duplicate entry in Nautilus. Additionally, if you have both use UUID= and the "user" option, if you attempt to unmount the disk from Nautilus it will throw an error saying that only root can unmount the disk. If you specify "user" with a path to the disk instead of using UUID=, it will allow you to unmount from Nautilus with a password. (is it intentional to require a password on unmount when "user" is specified?).
Same problem with Ubuntu 11.04 (gvfs 1.6.4-0ubuntu1.1) and nfs mount. my part of /etc/fstab with nfs mount: 192.168.0.253:/media/data /media/nfs/data/ nfs nolock,soft,tcp,user,auto,intr 0 0 192.168.0.253:/media/nobackup /media/nfs/nobackup/ nfs nolock,soft,tcp,user,auto,intr 0 0
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/119.