Automount of 2 cdroms broken

Bug #28920 reported by Emilian Bold
14
Affects Status Importance Assigned to Milestone
pmount (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Hy,

On Ubuntu 5.10 with the latest updates I have 2 cdrom drives.

If I insert 2 cds at the same time the following things happen:

- 2 file browser windows pop-up for "cdrom0"
- in the tree view I see the different titles of the 2 cdroms _but_ when I click on them I always see the contents of cdrom0 (ie. the files of cdrom1 are hidden by cdrom0 but not title).

- after I eject one or the other of the cds I have proper access to the files.

Normally I should be able to view both cds in the same time.

Emmet Hikory (persia)
Changed in gnome-desktop:
status: Unconfirmed → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. Could you get a gnome-volume-manager log when that happens. For that open a command line run "killall gnome-volume-manage; gnome-volume-manager" and copy to a comment what happens when you insert the CDs? Do they have to be exactly loaded to the same time or does it happen if they like 1 second of difference?

Emmet thanks for triaging bugs. What did you confirm that one. If you get the issue putting a comment when confirming would be nice.

gnome-desktop is a library and the "about GNOME" dialog, that bug is probably due to gnome-volume-manager, reassiging.

Martin, do you know about that?

Changed in gnome-desktop:
assignee: nobody → desktop-bugs
status: Confirmed → Needs Info
Revision history for this message
Emilian Bold (emilianb) wrote :

I don't have to insert the CD-s in the exact same time. A 1sec difference seems to do the same. I guess it has to happen before the file browser is launched for the first one.

BTW, the sistem is a 1.7ghz with 700MB ram so it shouldn't be a delay issue or something.

Bellow you have the gnome-volume-manager messages.

It seems to execute the same command.

Ok, after noticing that warning I commented /dev/hdc from /etc/fstab and _it works_ ! That is, both cd-s show up, and the 2 File managers are ok.

/dev/hdc was set up for /media/cdrom0 and aparently the other cdrom was stealing the location.

Maybe the gnome-volume-manager should show a visual warning about this ?? Ask me if I want to use another mountpoint _or_ stop the other cdrom drive from using a "reserved" path ?

(I stil get some umount error sometimes but I guess is due to the file manager accessing some file. It works if I close the file manager and reopen).

manager.c/1619: New Device: /org/freedesktop/Hal/devices/volume_label_
manager.c/1686: Changed: /dev/hdd
manager.c/1258: mounting /org/freedesktop/Hal/devices/volume_label_...
manager.c/696: executing command: /usr/bin/pmount-hal /org/freedesktop/Hal/devices/volume_label_
manager.c/1878: Mounted: /org/freedesktop/Hal/devices/volume_label_
manager.c/696: executing command: nautilus -n --no-desktop '/media/cdrom0'
manager.c/1619: New Device: /org/freedesktop/Hal/devices/volume_label__0
manager.c/1686: Changed: /dev/hdc
manager.c/1258: mounting /org/freedesktop/Hal/devices/volume_label__0...
manager.c/696: executing command: /usr/bin/pmount-hal /org/freedesktop/Hal/devices/volume_label__0
Warning: device /dev/hdc is already handled by /etc/fstab, supplied label is ignored
manager.c/1878: Mounted: /org/freedesktop/Hal/devices/volume_label__0
manager.c/696: executing command: nautilus -n --no-desktop '/media/cdrom0'

Revision history for this message
Emmet Hikory (persia) wrote :

    In my case, g-v-m attempts to mount both drives with /dev/hda, although my second drive is /dev/hdb. As long as one drive is empty, I have no problems reading the drives, and with both full, I can access both drives using a fully specified mount command.

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

Does your /etc/fstab countains entries about the 2 CD drives you have?

Martin, that's either a gnome-volume-manager or a pmount issue, they should not use the mountpoint defined for an another drive to /etc/fstab

Changed in gnome-volume-manager:
assignee: desktop-bugs → pitti
status: Needs Info → Confirmed
Revision history for this message
Emilian Bold (emilianb) wrote :

No, I only had one of the cd drives in /etc/fstab.

Aparently the other one came first, and received the exact same mountpoint as the second. The second had a mountpoint set in fstab.

I think that if both had enties in fstab or both had no enties at all, this bug wouldn't have happened.

Revision history for this message
Emmet Hikory (persia) wrote :

My /etc/fstab is bare of entries regarding the cdroms. I found a workaround: if I boot with discs present in both drives, it seems to work, but if I leave one empty I can only access them one at a time.

Revision history for this message
Martin Pitt (pitti) wrote :

Hi Emilian!

gnome-volume-manager output: it tries to mount both drives (/dev/hdc and /dev/hdc) and gives apparently correct pmount-hal commands, but then it opens nautilus windows for the same drive. I have a certain idea what went wrong, but I need more information from you: after this has happened, please do

  lshal > hal.txt

and attach hal.txt to this bug. Also, I need the output of

  mount

after this has happened. Thanks!

Changed in gnome-volume-manager:
status: Confirmed → Needs Info
Revision history for this message
Martin Pitt (pitti) wrote :

Hah, there we are:
<entry name="automount_drives" mtime="1144921709" type="bool" value="false">
        </entry>
<entry name="automount_media" mtime="1144921708" type="bool" value="false">
        </entry>

So you disabled automounting. Please just re-enable it in System -> Settings -> Removable Devices.

Revision history for this message
Martin Pitt (pitti) wrote :

I'm closing this bug, since it looks like it exactly does what is expected.

Changed in gnome-volume-manager:
status: Needs Info → Rejected
Revision history for this message
Emilian Bold (emilianb) wrote :

I think at some point people lost track _what_ this bug is about. I don't know how Martin Pitt reached the conclusion that automount was disabled, but in my case the cause was quite simple:

 With automount enabled, when the first CD was inserted it was assigned a mountpoint that conflicted with /etc/fstab (and was reserved for the _other_ cdrom drive).

I don't actually care anymore since it's fixed on my system but I still consider this a bug, unless it's been fixed in the following ubuntu release.

Revision history for this message
Martin Pitt (pitti) wrote :

Reopening

Changed in gnome-volume-manager:
status: Rejected → Unconfirmed
Revision history for this message
Emmet Hikory (persia) wrote : Summarised description of bug

This system has two CD-ROM drives, which lshw reports as:
_NEC DVD_RW ND-3530A [IDE DVD ROM]
CD-ROM 52X/AKH [IDE CDRW]

The /etc/fstab only has entries for /dev/sd*

When booting with no media in the drives, inserting the first disc (in either drive) will work as expected, mounting as cdrom0 Inserting the second disc will open a new window of cdrom0, showing the first disc. The contents of the second disc are inaccessible.

When booting with media in both drives, everything works as expected.

Revision history for this message
Emmet Hikory (persia) wrote :

Nevermind. I just failed to replicate it (last try was a while back). I think this was fixed in passing with 1.5.15-0ubuntu6. I've not modified my system beyond updates since the last replication.

Revision history for this message
Martin Pitt (pitti) wrote :

After thinking about this issue very hard, I now think I know what's wrong: after determining a suitable label, pmount does not check if that mount point is already in the fstab. Thus you saw both CD-ROMs mounted at the same mount point (on top of each other).

Changed in gnome-volume-manager:
status: Unconfirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in pmount 0.9.11, will be synced to Ubuntu shortly.

Changed in pmount:
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

 pmount (0.9.11-1) unstable; urgency=low
 .
   * New upstream bugfix release:
     - pmount: Refuse to mount devices to a mount point that is already in
       /etc/fstab.
     - pmount-hal: Do not try mount non-fstab devices to fstab mountpoints.
       (https://launchpad.net/bugs/28920)
     - Update translations from Launchpad Rosetta.

Changed in pmount:
status: Fix Committed → Fix Released
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.