2008-10-27 13:47:06

by Stephan Windmüller

[permalink] [raw]
Subject: Device or resource busy

Hello!

On our Ubuntu (8.04) machine we mount home directories from a Solaris
server with NFS and autofs. From time to time users complain that they
are unable to delete any directories. The error message is "Device or
resource busy".

When I look with "nfsstat -m", I can see a lot of mount points for each
user, including the directory which cannot be deleted. One user had a
total of 200 mounts!

My question is: Why does NFS mount each directory seperately?

Here is an example output for a user:

/ldaphome/username from host:/export/username
Flags: rw,vers=3,rsize=1048576,wsize=1048576,hard,intr,
proto=tcp,timeo=600,retrans=2,sec=sys,addr=host

TIA
Stephan


Attachments:
(No filename) (668.00 B)
smime.p7s (2.27 kB)
Download all attachments

2008-10-27 14:01:57

by Trond Myklebust

[permalink] [raw]
Subject: Re: Device or resource busy

On Mon, 2008-10-27 at 14:10 +0100, Stephan Windm=C3=BCller wrote:
> Hello!
>=20
> On our Ubuntu (8.04) machine we mount home directories from a Solaris
> server with NFS and autofs. From time to time users complain that the=
y
> are unable to delete any directories. The error message is "Device or
> resource busy".
>=20
> When I look with "nfsstat -m", I can see a lot of mount points for ea=
ch
> user, including the directory which cannot be deleted. One user had a
> total of 200 mounts!
>=20
> My question is: Why does NFS mount each directory seperately?
>=20
> Here is an example output for a user:
>=20
> /ldaphome/username from host:/export/username
> Flags: rw,vers=3D3,rsize=3D1048576,wsize=3D1048576,hard,intr,
> proto=3Dtcp,timeo=3D600,retrans=3D2,sec=3Dsys,addr=3Dhost
>=20
> TIA
> Stephan

If /export/username is on a different volume from /export on the server=
,
then the NFS client has to mount it as being a different volume on the
client. 'cat /proc/fs/nfsfs/volumes' should be able to tell you if your
server is exporting more than one volume.

Cheers
Trond


2008-10-27 14:29:49

by Stephan Windmüller

[permalink] [raw]
Subject: Re: Device or resource busy

On Mon, 27. Oct 2008, Trond Myklebust wrote:

> > When I look with "nfsstat -m", I can see a lot of mount points for each
> > user, including the directory which cannot be deleted. One user had a
> > total of 200 mounts!
> If /export/username is on a different volume from /export on the server,
> then the NFS client has to mount it as being a different volume on the
> client. 'cat /proc/fs/nfsfs/volumes' should be able to tell you if your
> server is exporting more than one volume.

/export and /export/home/username are different volumes, but I only
share /export/home/username. Also it is not only the homedirectory
itself but many subdirectories which cause this error. A sample output
from 'nfsstat -m':

-----

/home/username from fileserver:/export/home/username
Flags: rw,vers=3,rsize=1048576,wsize=1048576,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=fileserver

/home/username/workspace/ls5/da/text/Konzept from
fileserver:/export/home/username/workspace/ls5/da/text/Konzept
Flags: rw,vers=3,rsize=1048576,wsize=1048576,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=fileserver

/home/username/.eclipse/org.eclipse.platform_3.3.0_1148896627 from
fileserver:/export/home/username/.eclipse/org.eclipse.platform_3.3.0_1148896627
Flags: rw,vers=3,rsize=1048576,wsize=1048576,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=fileserver

[...]

-----

The output from /proc/fs/nfsfs/volumes looks like:

NV SERVER PORT DEV FSID
v3 81d91add 801 0:29 1000001009f:0
v3 81d91add 801 0:27 1000001010f:0
v3 81d91ade 801 0:30 100000100f1:0
v3 81d91add 801 0:31 1000001018b:0
v3 81d91add 801 0:26 10000010189:0
v3 81d91ade 801 0:28 100000100ef:0
v3 81d91ade 801 0:32 100000100f6:0
v3 81d91add 801 0:33 10000010192:0

- Stephan


Attachments:
(No filename) (1.74 kB)
smime.p7s (2.27 kB)
Download all attachments

2008-10-27 15:01:56

by Trond Myklebust

[permalink] [raw]
Subject: Re: Device or resource busy

On Mon, 2008-10-27 at 15:29 +0100, Stephan Windm=C3=BCller wrote:
> On Mon, 27. Oct 2008, Trond Myklebust wrote:
>=20
> > > When I look with "nfsstat -m", I can see a lot of mount points fo=
r each
> > > user, including the directory which cannot be deleted. One user h=
ad a
> > > total of 200 mounts!
> > If /export/username is on a different volume from /export on the se=
rver,
> > then the NFS client has to mount it as being a different volume on =
the
> > client. 'cat /proc/fs/nfsfs/volumes' should be able to tell you if =
your
> > server is exporting more than one volume.
>=20
> /export and /export/home/username are different volumes, but I only
> share /export/home/username. Also it is not only the homedirectory
> itself but many subdirectories which cause this error. A sample outpu=
t
> from 'nfsstat -m':
>=20
> -----
>=20
> /home/username from fileserver:/export/home/username
> Flags: rw,vers=3D3,rsize=3D1048576,wsize=3D1048576,hard,intr,proto=3D=
tcp,timeo=3D600,retrans=3D2,sec=3Dsys,addr=3Dfileserver
>=20
> /home/username/workspace/ls5/da/text/Konzept from
> fileserver:/export/home/username/workspace/ls5/da/text/Konzept
> Flags: rw,vers=3D3,rsize=3D1048576,wsize=3D1048576,hard,intr,proto=3D=
tcp,timeo=3D600,retrans=3D2,sec=3Dsys,addr=3Dfileserver
>=20
> /home/username/.eclipse/org.eclipse.platform_3.3.0_1148896627 from
> fileserver:/export/home/username/.eclipse/org.eclipse.platform_3.3.0_=
1148896627
> Flags: rw,vers=3D3,rsize=3D1048576,wsize=3D1048576,hard,intr,proto=3D=
tcp,timeo=3D600,retrans=3D2,sec=3Dsys,addr=3Dfileserver
>=20
> [...]
>=20
> -----
>=20
> The output from /proc/fs/nfsfs/volumes looks like:
>=20
> NV SERVER PORT DEV FSID
> v3 81d91add 801 0:29 1000001009f:0
> v3 81d91add 801 0:27 1000001010f:0
> v3 81d91ade 801 0:30 100000100f1:0
> v3 81d91add 801 0:31 1000001018b:0
> v3 81d91add 801 0:26 10000010189:0
> v3 81d91ade 801 0:28 100000100ef:0
> v3 81d91ade 801 0:32 100000100f6:0
> v3 81d91add 801 0:33 10000010192:0

Which shows you have at least 5 different volumes mounted from server
129.217.26.221, and 3 different volumes mounted from server
129.217.26.222.
As I said earlier, every time you cross from one volume to another (eve=
n
if it is on the same server), a mountpoint is automatically created.
Otherwise, you would have issues with two different files possibly
sharing the same inode number on the same NFS filesystem.

Cheers
Trond


2008-10-29 15:09:34

by Stephan Windmüller

[permalink] [raw]
Subject: Re: Device or resource busy

On Mon, 27. Oct 2008, Trond Myklebust wrote:

> As I said earlier, every time you cross from one volume to another (even
> if it is on the same server), a mountpoint is automatically created.

How do I "cross from one volume to another"? Is there something I can
test to reproduce this behaviour? It seems that not all users have this
problem.

On the server I shared every single home directory instead of
/export/home. Could this be the cause of the problem?

- Stephan


Attachments:
(No filename) (472.00 B)
smime.p7s (2.27 kB)
Download all attachments

2008-10-29 16:00:03

by Andy Adamson

[permalink] [raw]
Subject: Re: Device or resource busy

Hi

On Wed, 2008-10-29 at 16:09 +0100, Stephan Windm=C3=BCller wrote:
> On Mon, 27. Oct 2008, Trond Myklebust wrote:
>=20
> > As I said earlier, every time you cross from one volume to another =
(even
> > if it is on the same server), a mountpoint is automatically created=
=2E
>=20
> How do I "cross from one volume to another"?=20

When a user traverses the NFS namespace on the client, and crosses from
one server volume to another (fsid change) the NFS client software
automagically does a mount. This is required to avoid inode number
collisions.

> Is there something I can
> test to reproduce this behaviour? It seems that not all users have th=
is
> problem.

That's because all users don't traverse the file system in the same way=
=2E

>=20
> On the server I shared every single home directory instead of
> /export/home. Could this be the cause of the problem?
>=20
> - Stephan