Cannot unmount a windows network share.

Bug #427896 reported by ian.d.lacy
This bug report is a duplicate of:  Bug #452396: umount.cifs does not update /etc/mtab. Edit Remove
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cifs-utils (Ubuntu)
Triaged
Low
Unassigned

Bug Description

whether you use "smbmount", "mount.cifs", or "mount -t cifs" to mount a windows network share,

you cannot unmount the network share.

I have tried: "smbumount" , "umount.cifs" , and "umount -t cifs "

many other people are having this problem and it seems that they all use the same program to unmount. That program always returns

"This utility only unmounts cifs filesystems."

even though the filesystem was mounted as "cifs"

The only solution I have seen regarding this problem is that some fedora users reported that putting SELinux into permissive mode solves the problem.

http://forums.fedoraforum.org/archive/index.php/t-96243.html

I'm not sure what SELinux does exactly, but if it is in the OS then it is probably there for a good reason. Therefore I would not like to keep it in permissive mode permanently. I am going to try this to see if it solves my problem too.

If you can mount without being super user, you should also be able to unmount. Even if I use the raw "sudo umount -t cifs" it still returns the same thing.

I imagine that the bug is in SELinux configuration. Its like they shut if off to not block "mount.cifs", but forgot to do the same for "umount.cifs"

This is a major problem because after mounting the fs it cannot be unmounted, even by the system on shutdown. This error haults the shutdown, and I have to use the "press and hold the button" technique to shut off the laptop.

I am using Ubuntu 9.04
"Description: Ubuntu 9.04
Release: 9.04"

ZeblodS (forum-zeblods)
affects: ubuntu → samba (Ubuntu)
Revision history for this message
Chuck Short (zulcss) wrote :

So are you using selinux?

Regards
chuck

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
ian.d.lacy (ian-d-lacy) wrote :

i thought i was but i just checked in synaptic and the SElinux package is not installed.

I believe this a bug somewhere in the various packages, because no matter what I try, even if it is direct from someone elses site, it will not unmount, and it crashes my shutdowns.

Revision history for this message
Chuck Short (zulcss) wrote :

Is there a process running that is preventing you from umounting the shares (lsof -p <mnt point>)?

Can you try the following sudo umount -l <mnt point>?

Also can you attach the output of dmesg when then is happening?

Thanks
chuck

Revision history for this message
ian.d.lacy (ian-d-lacy) wrote : Re: [Bug 427896] Re: Cannot unmount a windows network share.

lsof -p /home/name/mountpoint give me an illegal process name message
i tried lsof -d /home/name/mountpoint for the heck of it (not sure if thats
valid) and i get no output, the prompt just comes back up

sudo umount -l mntpt works! but i read into it and thats lazy umount. i
would perfer to do this the right way.

i have no related output in dmesg when i try to umount

the unmount command i'm currently using in my nautilus scripts is smbumount
and it tells me that it only un mounts cifs filesystems. However, I used its
opposite, smbmount to mount them in the first place. My system will
hibernate fine, but halts at shutdown.

-Ian

On Fri, Oct 16, 2009 at 11:26 AM, Chuck Short <email address hidden>wrote:

> Is there a process running that is preventing you from umounting the
> shares (lsof -p <mnt point>)?
>
> Can you try the following sudo umount -l <mnt point>?
>
> Also can you attach the output of dmesg when then is happening?
>
> Thanks
> chuck
>
> --
> Cannot unmount a windows network share.
> https://bugs.launchpad.net/bugs/427896
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “samba” package in Ubuntu: Incomplete
>
> Bug description:
> whether you use "smbmount", "mount.cifs", or "mount -t cifs" to mount a
> windows network share,
>
> you cannot unmount the network share.
>
> I have tried: "smbumount" , "umount.cifs" , and "umount -t cifs "
>
> many other people are having this problem and it seems that they all use
> the same program to unmount. That program always returns
>
> "This utility only unmounts cifs filesystems."
>
> even though the filesystem was mounted as "cifs"
>
> The only solution I have seen regarding this problem is that some fedora
> users reported that putting SELinux into permissive mode solves the problem.
>
> http://forums.fedoraforum.org/archive/index.php/t-96243.html
>
> I'm not sure what SELinux does exactly, but if it is in the OS then it is
> probably there for a good reason. Therefore I would not like to keep it in
> permissive mode permanently. I am going to try this to see if it solves my
> problem too.
>
> If you can mount without being super user, you should also be able to
> unmount. Even if I use the raw "sudo umount -t cifs" it still returns the
> same thing.
>
> I imagine that the bug is in SELinux configuration. Its like they shut if
> off to not block "mount.cifs", but forgot to do the same for "umount.cifs"
>
> This is a major problem because after mounting the fs it cannot be
> unmounted, even by the system on shutdown. This error haults the shutdown,
> and I have to use the "press and hold the button" technique to shut off the
> laptop.
>
> I am using Ubuntu 9.04
> "Description: Ubuntu 9.04
> Release: 9.04"
>

Revision history for this message
anthony (antho2984) wrote :

Hi,
I'm getting the same issue.
I just ran lsof +D /tmp/mountpoint and it returns nothing.

# umount -l --verbose /tmp/mountpoint
optind 3 unmount dir /tmp/mountpoint
This utility only unmounts cifs filesystems.
optind 3 unmount dir /tmp/mountpoint
This utility only unmounts cifs filesystems.
optind 3 unmount dir /tmp/mountpoint
This utility only unmounts cifs filesystems.
optind 3 unmount dir /tmp/mountpoint
This utility only unmounts cifs filesystems.

#mount
...
//192.168.10.6/resources on /tmp/mountpoint type cifs (rw,mand)

Has apparmor something to do with the issue, as it seems to be related to SELinux ?

Regards
antho

Revision history for this message
Chuck Short (zulcss) wrote :

@anthony:

Which version of samba are you using?

Thanks
chuck

Changed in samba (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
ian.d.lacy (ian-d-lacy) wrote :

I'm using 2:3.3.2-1ubuntu3.2 (jaunty-updates)

On Mon, Nov 23, 2009 at 9:11 AM, Chuck Short <email address hidden>wrote:

> @anthony:
>
> Which version of samba are you using?
>
> Thanks
> chuck
>
> ** Changed in: samba (Ubuntu)
> Status: Incomplete => Confirmed
>
> --
> Cannot unmount a windows network share.
> https://bugs.launchpad.net/bugs/427896
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “samba” package in Ubuntu: Confirmed
>
> Bug description:
> whether you use "smbmount", "mount.cifs", or "mount -t cifs" to mount a
> windows network share,
>
> you cannot unmount the network share.
>
> I have tried: "smbumount" , "umount.cifs" , and "umount -t cifs "
>
> many other people are having this problem and it seems that they all use
> the same program to unmount. That program always returns
>
> "This utility only unmounts cifs filesystems."
>
> even though the filesystem was mounted as "cifs"
>
> The only solution I have seen regarding this problem is that some fedora
> users reported that putting SELinux into permissive mode solves the problem.
>
> http://forums.fedoraforum.org/archive/index.php/t-96243.html
>
> I'm not sure what SELinux does exactly, but if it is in the OS then it is
> probably there for a good reason. Therefore I would not like to keep it in
> permissive mode permanently. I am going to try this to see if it solves my
> problem too.
>
> If you can mount without being super user, you should also be able to
> unmount. Even if I use the raw "sudo umount -t cifs" it still returns the
> same thing.
>
> I imagine that the bug is in SELinux configuration. Its like they shut if
> off to not block "mount.cifs", but forgot to do the same for "umount.cifs"
>
> This is a major problem because after mounting the fs it cannot be
> unmounted, even by the system on shutdown. This error haults the shutdown,
> and I have to use the "press and hold the button" technique to shut off the
> laptop.
>
> I am using Ubuntu 9.04
> "Description: Ubuntu 9.04
> Release: 9.04"
>

Chuck Short (zulcss)
Changed in samba (Ubuntu):
status: Confirmed → Triaged
Thierry Carrez (ttx)
Changed in samba (Ubuntu):
importance: Undecided → Low
Revision history for this message
Graham Klyne (gk-launchpad) wrote :

I'm seeing this problem in Ubuntu 8.10 (LTS).

I see that /proc/mounts and /etc/mtab are out of sync with regard to CIFS mounts.

I'm running mount.cifs and umount.cifs from a non-root user, but /sbin/mount.cifs and /sbin/umount.cifs have been modified using "chmod +s ..."

Googling indicates a problem in umount.cifs that is known to the Debian and Samba communities: that the umount is succceeding, but failing to update /etc/mtab. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461048. That report also refers to https://bugzilla.samba.org/show_bug.cgi?id=4370 - apparently this is fixed in the Samba master codebase.

I'd like to know if this is fixed in a later Ubuntu version; i.e. will upgrading fix the problem for me?

Revision history for this message
Graham Klyne (gk-launchpad) wrote :

I lied about being LTS in my last post, but I guess y'all know that. Sorry.

I also found this: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/452396.

Which I think answers my question (yes, it is fixed in a later Ubuntu release).

Jelmer Vernooij (jelmer)
affects: samba (Ubuntu) → cifs-utils (Ubuntu)
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.