Custom fstab causes duplicate entries for partitions in Places

Bug #442130 reported by Martin Lindhe
304
This bug affects 66 people
Affects Status Importance Assigned to Milestone
gvfs
Expired
Medium
gvfs (Ubuntu)
Confirmed
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: nautilus

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

ProblemType: Bug
Architecture: amd64
Date: Sun Oct 4 13:07:08 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/nautilus
NonfreeKernelModules: fglrx
Package: nautilus 1:2.28.0-0ubuntu4
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
SourcePackage: nautilus
Uname: Linux 2.6.31-11-generic x86_64

Revision history for this message
Martin Lindhe (martinlindhe) wrote :
Doug McMahon (mc3man)
Changed in nautilus (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

affects: nautilus (Ubuntu) → gvfs (Ubuntu)
Changed in gvfs (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
milestone: none → ubuntu-9.10
Revision history for this message
Martin Lindhe (martinlindhe) wrote :

Hello Sebastien. I have looked through the gnome bugzilla.

I found this bug: https://bugzilla.gnome.org/show_bug.cgi?id=520851 which may be the same issue I am having. However it is closed as fixed about 1.5 years ago.

So what next: should I report a new bug, or try to get some response by posting on the bug i found?

Revision history for this message
Sebastien Bacher (seb128) wrote :

it would be better to open a new bug since gvfs uses devicekit-disks now which is a new technology

Revision history for this message
Martin Lindhe (martinlindhe) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for sending the bug to GNOME

Changed in gvfs (Ubuntu):
status: Confirmed → Triaged
Changed in gvfs:
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
Martin Lindhe (martinlindhe) wrote :

Upstream suggested a working work-around:

Instead of using LABEL=xx, specify disk with /dev/disk/by-label/xx
For UUID=xx it is /dev/disk/by-uuid/xx

This works great and it solves my reported problem, so this bug report may be invalid now.
However since /etc/fstab supports specifying disks by LABEL=xx or UUID=xx and various howto show this method, I think that this should still be supported.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The bug should probably still be kept open as a request to have other syntax to work too

Revision history for this message
sim909 (srizzi) wrote :

I suffer from the same bug, and it shows up with any type of mount in the fstab file, i.e. including sshfs, davfs and samba

Changed in gvfs (Ubuntu):
milestone: ubuntu-9.10 → ubuntu-10.04
milestone: ubuntu-10.04 → none
Revision history for this message
Sifr Moja (simplexion) wrote :

I'm guessing this bug should be easy to reproduce by anyone. I have the same bug and can confirm that using /dev/disk/by-* works perfectly. Bit annoying that I had to search for this in the first place though.

Revision history for this message
sim909 (srizzi) wrote :

The /dev/disk/by-* is a workaround that only works on local partitions, not on network mounts of any type.
May I ask what the double change in milestone means?

Revision history for this message
Sebastien Bacher (seb128) wrote :

it means that the bug was pondering to be milestoned but is not

Revision history for this message
Laurent (l-perlat) wrote :

Hello,
I am also affected by this bug since my upgrade to ubuntu karmic.
As noted by others, the workaround using /dev/disk/by-* only works for local disks.
All my auto-mounted NFS mounts now appear twice in nautilus, and one of the two entries is not usable (Error message "Impossible to mount xx ; mount.nfs: /media/xx is busy or already mounted") which is very disturbing.

Revision history for this message
Artships (ubuntubugs-johndouglass-deactivatedaccount) wrote :

I have the same problem, but only using nautilus. pcmanfm works fine, just like nautilus used to in 9.04.

bash > uname -a
Linux serenity 2.6.31-16-generic #52-Ubuntu SMP Thu Dec 3 22:07:16 UTC 2009 x86_64 GNU/Linux

bash > gvfs-mount -oi
Monitoring events. Press Ctrl+C to quit.

(execute "nautlius --no-desktop", click on a partition, get popup saying "Unable to mount Pictures. Authentication is required". Close nautilus)

(execute pcmanfm, click on partition. It mounts! The log shows:)

Volume changed: 'Pictures'
  Volume(0): Pictures
    Type: GProxyVolume (GProxyVolumeMonitorGdu)
    ids:
     uuid: 'e7b03d12-913d-479e-a5a3-561e8624a6ce'
     unix-device: '/dev/sda5'
     label: 'Pictures'
    themed icons: [drive-harddisk-ata] [drive-harddisk] [drive]
    can_mount=1
    can_eject=0
    should_automount=0

Mount added: 'Pictures'
  Mount(0): Pictures -> file:///media/Pictures
    Type: GProxyMount (GProxyVolumeMonitorGdu)
    themed icons: [drive-harddisk-ata] [drive-harddisk] [drive]
    can_unmount=1
    can_eject=0
    is_shadowed=0

Just like in 9.04, I have no entry for this partition in /etc/fstab. I upgraded to 9.10, did not do a clean install.

Revision history for this message
Diego Fraga (diego-fc) wrote :

Like Martin Lindhe said, this option:

    Instead of using LABEL=xx, specify disk with /dev/disk/by-label/xx
    For UUID=xx it is /dev/disk/by-uuid/xx

solves my problem. But only in local places bcause I'm mounting sshfs systems on my server and them appears dupplicated.

Revision history for this message
Alecz20 (alexguzu) wrote :

I have the same problem using samba shares.

How do I use the workaround with the UUID for the samba shares?

Revision history for this message
MartinP (bircoe) wrote :

I have the same issue as Alecz20, I have 4 samba shares mounted via fstab, 2 of them appear twice (NAS-Software and Movies) in the nautilus sidebar, one gives an error when it's clicked on (Unable to mount Movies) the other works perfectly, I'm not sure if it's a fstab config error, or something else, but I've had the issue since I upgraded from 8.10 to 9.04, same issue stayed after upgrade to 9.10 and now it's still here in 10.04...

//000.000.000.50/Movies /media/Movies cifs auto,dir_mode=0777,file_mode=0777,user 0 0
//000.000.000.50/TV /media/TV cifs auto,dir_mode=0777,file_mode=0777,user 0 0
//000.000.000.10/Software /media/NAS-Software cifs auto,dir_mode=0777,file_mode=0777,user 0 0
//000.000.000.60/Music /media/Music cifs auto,dir_mode=0777,file_mode=0777,user 0 0

If I remove the entries from fstab and reboot none of them are listed in places, as soon as I add them (even if it's one by one) then mount them, I get doubles of the Movies and NAS-Software share.

It really is frustrating, however I'm not willing to do a clean install just to fix a small issue like this, surely there is a way to fix it.

Revision history for this message
MartinP (bircoe) wrote :

Nevermind, I seem to have resolved it with a revised fstab line.

Alecz20 try this link https://wiki.ubuntu.com/MountWindowsSharesPermanently

Revision history for this message
sim909 (srizzi) wrote :

MartinP: could you please tell us what revision of the fstab line resolved the problem for you?

This has been bugging me for a long time as well, haven't yet upgraded to 10.04, but from your comment I see the upgrade alone will not fix the issue.

Revision history for this message
Xoby (xoby) wrote :

Same problem with lucid lynx : duplicated NFS entries ...

Revision history for this message
Martin Fisher (yusuf-martin) wrote :

I have this problem with Ubuntu 10.4 and Nautilus (but note that on the same machine I have Dolphin installed, and that does not have duplicate entries). Playing around (and guessing...) a little I replaced the options with 'defaults' so that, for example, one of my usb drives is mounted from /etc/fstab as

UUID=1d06af2d-0908-4ac1-a8c0-f895adfab8e9 /media/littleblack ext4 defaults 1 0

and my network drives as

XXX.XXX.1.2:/nfs/martin /media/martin nfs defaults 0 0

and with these settings I do not have duplicate entries, hurrah! I do not see any problem with using defaults (I am the only user on this machine) but if anybody knows better, please kindly let me know.

Changed in gvfs:
status: Unknown → New
Revision history for this message
Andras Muranyi (muranyia) wrote :

My EXT3, SWAP, and XFS volumes work fine with 'UUID='.

NTFS volumes don't work with 'UUID=' and need '/dev/disk/by-uuid/' instead.

Revision history for this message
Dana Goyette (danagoyette) wrote :

I have the same issue when making udev auto-mount things by label -- I'm using the following script, tweaked to use blkid instead of vol_id: http://superuser.com/questions/53978/ubuntu-automatically-mount-external-drives-to-media-label-on-boot-without-a-us

I've also tweaked the script to use /dev/disk/by-uuid/ instead of /dev/sdX, and it still gives me duplicate volume entries in Nautilus. Clicking on those entries selects them, but does nothing more.

Changed in gvfs:
importance: Unknown → Medium
Revision history for this message
eldon (dr-e-tyrell) wrote :

i can confirm that the bug is still present in lucid and modifying fstab mount options gets the device, local or network, listed twice.

i use UUID= in fstab and a line having only "defaults" as options will get the device listed only once, changing the options to something else, for example "defaults,users,exec" will get the device listed twice.

When listed twice, the mountpoint name (ex: "hd500" for a /media/hd500 mountpoint path) is not accessible whereas the filesystem type name ("500 GB Filesystem") can be browsed.

Revision history for this message
Maxim Kalinin (kalinin-maxim) wrote :

I'm not sure if this is the same issue, but here's what I had.
I had the following entry in /etc/fstab:
UUID=B634D59634D55A47 /media/VIDEO ntfs rw,users 0 2

Now apparently ntfs-3g ignores some mount options, since in /etc/mtab it was displayed like this:
/dev/sdb1 /media/VIDEO fuseblk rw,noexec,nosuid,nodev,allow_other,blksize=4096 0 0

And I had two entries in the Places menu: one for the fstab entry, another one for mtab. After I changed the fstab entry to this one:
UUID=B634D59634D55A47 /media/VIDEO ntfs rw,allow_other 0 2

and remounted the disk everything was fixed.

Revision history for this message
Magnes (magnesus2) wrote :

The bug is still there in Ubuntu 10.10. :| I hate it. I consider dumping nautilus because of it.

Revision history for this message
Ian Eldred (ian-fantasyformula1) wrote :

I had this bug after I set up auto mounting of my NTFS drives. I fixed it by editing /etc/fstab as shown below:

#UUID=24482A274829F866 /media/General ntfs-3g rw,auto,user,fmask=0111,dmask=0000 0 0
/dev/disk/by-uuid/24482A274829F866 /media/General ntfs-3g rw,auto,user,fmask=0111,dmask=0000 0 0
#UUID=0064339B64339280 /media/Photos ntfs-3g rw,auto,user,fmask=0111,dmask=0000 0 0
/dev/disk/by-uuid/0064339B64339280 /media/Photos ntfs-3g rw,auto,user,fmask=0111,dmask=0000 0 0
#UUID=C4747EFD747EF192 /media/Video ntfs-3g rw,auto,user,fmask=0111,dmask=0000 0 0
/dev/disk/by-uuid/C4747EFD747EF192 /media/Video ntfs-3g rw,auto,user,fmask=0111,dmask=0000 0 0

The original lines have been commented out with #.

So the fix was simply replacing 'UUID=' with '/dev/disk/by-uuid/' on each line as suggested by Andras Muranyi in #22.

Revision history for this message
Mtt.Castelli (mtt.castelli) wrote :

I confirm this bug is still present in maverick 10.10.

The partition affected is the same as before (with previuos ubuntu releases), it is an ext3 logical partition,
labeled and identifies winthout uuid. This is, in fstab:

/dev/sda5 /media/DADA ext3 errors=remount-ro,users 0 0

By the way, the NTFS primary partition, same HD drive, where WinXP reside,

/dev/sda1 /media/C2punti ntfs nls=iso8859-1,users,umask=000 0 0

 is NOT affected.

I can't understand why using UUID this bug disappear, however, until fstab will support the both ways, IT IS a bug.

Revision history for this message
Belyaev Nikolay (werru82) wrote :

unfortunatly, if mount samba share i can't write /dev/disk/by-uuid/
bugs still with me

Revision history for this message
Alecz20 (alexguzu) wrote :

@ artinP (bircoe):

Thanks for the link, but it did not address the issue of duplicated entries for samba shares.
It did, however, contain other useful piece of information: mounting protected samba shares without a credentials file.

Regarding the duplicated issue, I think the problem has to do with /etc/fstab, /etc/mtab, and the way nautilus reads those files.

Once an entry in /etc/fstab is mounted, it appears in /etc/mtab, but for some reason (usually when not using default options), the mtab entry is different from the fstab entry. When nautilus reads the two files, it gets confused, and shows both the fstab entry and the mtab entry.

gaudin (gaudin)
Changed in gvfs (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
lambassadeur (marcloehe) wrote :

I can confirm that this bug with the UUID still exists in Ubuntu 11.04 Natty Narwhal.

The Workaround with using "/dev/disk/by-uuid/" instead of "UUID=" does the trick.

Revision history for this message
Jim (jimvernon) wrote :

Bug still exists in Ubuntu 12.04.

Revision history for this message
Dixon Xavier (dixoncx) wrote :

Have same problem in Ubuntu 12.04
"/dev/disk/by-uuid" fixed issue for local drives.

Revision history for this message
DAVID (gron-h) wrote :

Same here with 3.2.0-25-generic #40-Ubuntu SMP Wed May 23 20:30:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
"/dev/disk/by-uuid" fixed also the issue for local drives for me. But can't umount the partitions...

Revision history for this message
Vancouverite (sethgilchrist) wrote :

For those mounting an nfs and having this issue, as per comment 21 (https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/442130/comments/21) I changed the following line:

XXX.XXX.XXX.XXX:/nfs/Public /media/BigToaster nfs rw,user,rsize=8192,wsize=8192,timeo=14,intr,nfsvers=3 0 0

to

XXX.XXX.XXX.XXX:/nfs/Public /media/BigToaster nfs defaults,rsize=8192,wsize=8192,timeo=14,intr,nfsvers=3 0 0

Basically changed "rw,user" to "defaults" and my problems are fixed.

Changed in gvfs:
status: New → Confirmed
Changed in gvfs:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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