# umount.nfs: Server failed to unmount 192.168.1.2 [SOLVED]

## WebXDev

I don't know why but I get this unmount error every time when I wanna unmount my NFS point. Actually it unmounts successfully.. but with the error  :Smile: 

I have two computers: 192.168.1.2 and 192.168.1.3:

```
-----------------------[ the first computer: 192.168.1.2 ] --------------------------------

localhost ~ # lsof /mnt/media/

localhost ~ # lsof /mnt/media

localhost ~ # umount /mnt/media

umount: /mnt/media: device is busy.

        (In some cases useful info about processes that use

         the device is found by lsof(8) or fuser(1))

localhost ~ # cat /etc/fstab | grep media

/dev/hda7               /mnt/media      reiserfs        noatime         0 1 

localhost ~ # /etc/init.d/portmap stop

 * Stopping NFS mountd ... [ ok ]

 * NFS daemon ... [ ok ]

 * Unexporting NFS directories ... [ ok ]

 * Stopping NFS statd ... [ ok ]

 * Stopping portmap ... [ ok ]

localhost ~ # umount /mnt/media

localhost ~ # mount /mnt/media

localhost ~ # cat /etc/exports 

/mnt/media 192.168.1.3(async,no_subtree_check,ro)

--------------------[ the second computer: 192.168.1.3 ]-----------------------

localhost ~ # mount /media/media-point/

localhost ~ # umount /media/media-point/

umount.nfs: Server failed to unmount '192.168.1.2:/mnt/media'          <---------

localhost ~ # umount /media/media-point/

umount: /media/media-point/: not mounted                               <---------

```

Does anyone have any suggests? (amd64 and all my system is up-to-date).Last edited by WebXDev on Thu Mar 25, 2010 9:15 pm; edited 1 time in total

----------

## linear

Hmmm....

Have you tried using the fuser command to find out what might be using the filesystem?  Something like:

```
 ~ # fuser -muv /mnt/media
```

on the serving box, or:

```
 ~ # fuser -muv /media/media-point/ 
```

on the mounting box?  The output should look something like this:

```
localhost ~ # fuser -muv /media/media-point

                        USER        PID ACCESS COMMAND

/media/media-point:    guest       7862 f.... (guest)eog
```

HTH.  Let us know.

----------

## WebXDev

Ok. It tells me this:

```

localhost ~ # fuser -muv /mnt/media

                     USER    PID ACCESS COMMAND

/mnt/media:          root     kernel mount (root)/mnt/media

localhost ~ # 

```

and:

```

localhost ~ # fuser -muv /media/media-point/

localhost ~ # mount /media/media-point/

mount.nfs: /media/media-point is busy or already mounted

localhost ~ # mount | grep media

192.168.1.2:/mnt/media on /media/media-point type nfs (ro,addr=192.168.1.2,nfsvers=2,proto=tcp,mountproto=udp,mountport=58371)

```

----------

## Hu

 *WebXDev wrote:*   

> 
> 
> ```
> localhost ~ # cat /etc/fstab | grep media
> ```
> ...

 Useless use of cat.

 *WebXDev wrote:*   

> 
> 
> ```
> localhost ~ # /etc/init.d/portmap stop
> 
> ...

 Stopping mountd and unmounting an exported volume while the client has it mounted seems like a bad idea.  Why are you doing things in this order?

----------

## WebXDev

 *Hu wrote:*   

> Stopping mountd and unmounting an exported volume while the client has it mounted seems like a bad idea.  Why are you doing things in this order?

 

just for an experiment. I try to solve my problem.

I do that things in normal order. I have been using NFS about 2 years.. I've upgraded my server-system about a week ago. I didn't meet such error (failed to unmount) before.

----------

## linear

 *WebXDev wrote:*   

> 
> 
> ```
> localhost ~ # mount | grep media
> 
> ...

 

Is there a particular reason you are using NFS version 2 for your mounting?  

Have you tried using NFS version 3 and see if you get the same errors?

HTH.  Let us know.

----------

## WebXDev

linear

hm.. I just install it on both systems:

```
localhost ~ # eix nfs-u

[I] net-fs/nfs-utils

     Available versions:  1.1.4-r1 ~1.1.5 ~1.1.6 ~1.1.6-r1 ~1.2.0 ~1.2.1 {ipv6 kerberos nfsv3 nfsv4 nonfsv4 tcpd}

     Installed versions:  1.1.4-r1(05:09:41 06.12.2009)(tcpd -kerberos -nonfsv4)

     Homepage:            http://linux-nfs.org/

     Description:         NFS client and server daemons
```

But.. how I can install nfs version 3? I have to reemerge nfs-utils with the nfsv3 flag?

----------

## linear

No,

Just add "nfsvers=3" to the options section of the entry in the fstab for that mount on the client machine.  Then try the mount and unmount and see what results you get.

HTH.  Let us know.   :Smile: 

----------

## WebXDev

Oops.. it tells me:

```

localhost ~ # mount /media/media-point/

mount.nfs: mount to NFS server '192.168.1.2:/mnt/media' failed: RPC Error: Program/version mismatch

```

i think i need to emerge something?  :Smile: 

----------

## linear

Hmmm...  

Okay, there are two possible locations to check the following:

 If the file exists, less /proc/config.gz.  While in there, do a search for NFS ("/NFS" forwardslash + NFS ) and see if it looks like the following:

```
CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

CONFIG_NFS_V3_ACL=y

CONFIG_NFS_V4=y
```

 If /proc/config.gz does not exist, look in /boot/ for the config file that matches your running kernel.  And look for the above section.

If you see something like:

```
# CONFIG_NFS_V3 is not set 
```

then you may need a new kernel config and recompile.

HTH.  Let us know.

----------

## WebXDev

No, I have:

```
localhost ~ # grep NFS_ /usr/src/linux/.config

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

CONFIG_NFS_V3_ACL=y

CONFIG_NFS_V4=y

# CONFIG_NFS_V4_1 is not set

CONFIG_NFS_ACL_SUPPORT=y

CONFIG_NFS_COMMON=y

localhost ~ # 

```

on both systems..

----------

## WebXDev

By the way.. I've found a little difference between the client and the server nfs  :Smile: 

client:

```
localhost ~ # eix nfs-u

[I] net-fs/nfs-utils

     Available versions:  1.1.4-r1 ~1.1.5 ~1.1.6 ~1.1.6-r1 ~1.2.0 ~1.2.1 {ipv6 kerberos nfsv3 nfsv4 nonfsv4 tcpd}
```

server:

```
localhost ~ # eix nfs-u

[I] net-fs/nfs-utils

     Available versions:  1.1.4-r1 ~1.1.5 ~1.1.6 ~1.1.6-r1 ~1.2.0 ~1.2.1 {ipv6 kerberos +nfsv3 +nfsv4 nonfsv4 tcpd}
```

Why I have +nfsv3 and +nfsv4 flags on the server?

----------

## linear

Not being too familiar with 'eix', I'm not absolutely certain, but I would guesstimate that it means that they are now available for building with the package, but were *not* built with that package the last time the package was built and if the package is rebuilt, they will be built in.

Can someone confirm that please?

If my guesstimate is correct, that could very well be your issue.  That version mismatch error you got above when trying 'nfsvers=3' means the server couldn't come up with a version 3 connection for the client.

HTH.

----------

## WebXDev

hm.. but i don't know how to turn on nfs3 support.. I think it's already is...  :Smile: 

I've just reemerged nfs-utils on both systems but it didn't solve my problem  :Sad: 

----------

## WebXDev

Here: https://bugzilla.redhat.com/show_bug.cgi?id=486751

I found that: "This has been fixed in nfs-utils-1.2.0-3". So I've added nfs-utils to the portage-keywords-file and the problem now is gone!  :Smile: 

I'm happy now  :Very Happy: 

linear,

thanks for the help!

----------

