Right click unmount (umount) of loop device fails

Bug #84201 reported by Daniel Harvey
4
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: nautilus

I have the following loop based filesystem in /etc/fstab

/media/usbdisk/.fs.ext3 /media/usbdisk/fs ext2 defaults,noauto,loop=/dev/loop4,user,exec 0 0

Once mounted, this appears on my desktop and within nautilus "Computer".

When I right click on the volume and select "Unmount Volume", the operation fails with the message

    "Unable to unmount the selected volume."

with the details

    "umount: /dev/loop4 not mounted"
    "Error: umount failed"

Note that the graphical icon in nautilus is correctly labelled "fs", but the umount appears to attempt to unmount the loop device.

Note that the command "umount /media/usbdisk/fs" works.

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

Thank you for your bug. What version of Ubuntu do you use?

Changed in nautilus:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Unconfirmed → Needs Info
Revision history for this message
Daniel Harvey (daniel.harvey) wrote :

Apologies, I've upgraded to edgy. The install was up to date when the bug was reported.

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

Could you gives extra details on the configuration you use? What is /media/usbdisk? a mounted device?

Revision history for this message
Daniel Harvey (daniel.harvey) wrote :

Yes, /media/usbdisk is a mounted USB device, and the mount point is a directory 'fs' within this.

I've done some more checking and I don't believe this is related to the problem. The problem appears to be related to mount/umount and the use of loop devices.

My mount line represents the following:

/media/usbdisk/.fs.ext3 --> /dev/loop4 --> /media/usbdisk/fs ext2
file containing EXT3 filesystem --> loop device --> mounted EXT3 filesystem

The problem is that in the past, "umount /dev/loop4" worked, and this is the command that the Gnome interface is executing.

My setup is as follows:

daniel@elvandar:~$ dpkg -S /bin/umount
diversion by loop-aes-utils from: /bin/umount
diversion by loop-aes-utils to: /bin/umount.orig
mount, loop-aes-utils: /bin/umount

daniel@elvandar:~$ dpkg -l mount loop-aes-utils

||/ Name Version Description
+++-==============-==============-============================================
ii loop-aes-utils 2.12r-11 Tools for mounting and manipulating filesyst
ii mount 2.12r-11ubuntu Tools for mounting and manipulating filesyst

So, perhaps the problem is loop-aes-utils?

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

Does "umounrt /dev/loop4" work correctly now then?

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

No reply, closing. Feel free to reopen with the asked informations if you still get the bug

Changed in nautilus:
status: Needs Info → Rejected
Revision history for this message
Daniel Harvey (daniel.harvey) wrote :

Still a problem. Re-opening, see updated comments.

Changed in nautilus:
status: Rejected → Needs Info
Revision history for this message
Daniel Harvey (daniel.harvey) wrote :

I passed this over the linux crypto list as it may have related to the loop-aes code. Comment received from Jari Ruusu <email address hidden> detailed below. I think that the problem can be confirmed that umount parameter needs to match mount.

In this case, option (3) below is used in which case the loop device is set up by the mount command. This means that "/dev/loop4" was *not* mounted and should not be un-mounted. Specifically, nautilus should executed "umount /media/usbdisk/fs" not "umount /dev/loop4".

--

> My fstab mount line represents the following:
>
> /media/usbdisk/.fs.ext3 --> /dev/loop4 --> /media/usbdisk/fs ext2
> file containing EXT3 filesystem --> loop device --> mounted EXT3
> filesystem

That is journaling file system on file backed loop.
loop-AES README section 2.2.

> The problem is that in the past, "umount /dev/loop4" worked, but NOT any
> more.

There are three ways to mount loop devices:

1) Do loop setup/teardown manually:

   losetup -e AES128 -K foo.gpg /dev/loop4 /dev/hda999
   mount -t ext3 /dev/loop4 /mnt
   umount /mnt (or umount /dev/loop4 )
   losetup -d /dev/loop4

2) Let mount/umount do loop setup/teardown for you:

   mount -t ext3 /dev/hda999 /mnt -o loop=/dev/loop4,encryption=AES128,gpgkey=foo.gpg
   umount /mnt (or umount /dev/hda999 )

3) The fstab way, mount/umount do loop setup/teardown for you:

   /etc/fstab line:
    /dev/hda999 /mnt ext3 defaults,noauto,loop=/dev/loop4,encryption=AES128,gpgkey=foo.gpg,user=daniel 0 0

   mount /mnt
   umount /mnt (or umount /dev/hda999 )

> However mount shows:
>
> /media/usbdisk/.fs.ext3 on /media/usbdisk/fs type ext2
> (rw,nosuid,nodev,loop=/dev/loop4,user=daniel)

Looks like you used method (1) earlier and are now using method (3). umount
needs mountpoint directory or backing device that was used at mount time. If
you didn't mount /dev/loop4 device directly, then you should not expect
"umount /dev/loop4" to work either.

Try "umount /media/usbdisk/fs" or "umount /media/usbdisk/.fs.ext3"

Changed in nautilus:
status: Needs Info → Unconfirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

likely an upstream bug, would be nice to send it on bugzilla.gnome.org, the desktop team is overworked and not likely to work soon on this one

Revision history for this message
Daniel Harvey (daniel.harvey) wrote :

This problem no longer occurs in Gutsy Tribe 5. Suggest closing.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

I'm closing this report per the last comment. Thanks.

Changed in nautilus:
status: New → Fix Released
Revision history for this message
Zippex Linux Developer (zippex) wrote :

Really me, and a lot of my co workers have this problem in Hardy

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.