public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* Issue with stalled NFS
@ 2009-11-01 22:00 Warpme
       [not found] ` <4AEE04F2.2070400-h7QdYz1kt/Q@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Warpme @ 2009-11-01 22:00 UTC (permalink / raw)
  To: linux-nfs

[-- Attachment #1: Type: text/plain, Size: 3020 bytes --]

Hi *

I'm looking solution for following problem:

I have file server sharing files to diskless clients via NFS.

My /etc/export looks following:

[CODE]myth                 
192.168.1.0/24(rw,crossmnt,no_subtree_check,no_root_squash)
/tftpboot/PXEclient   
192.168.1.0/24(rw,no_subtree_check,no_root_squash)[/CODE]
 

I want  have setup, where plugging ext. USB HDD will be dynamically 
visible on clients as new <subdir> with plugged HDD contents.
So if user plug USB HD on server, diskless clients should see plugged 
HDD contents in dynamically created <subdirectory> with name equal to HD 
label and HD contents inside it.

I already wrote udev script which auto creates subdir=<label> in NFS 
server shared dir, and automounts USB HD in this subdir.
Udev script calls exportfs -r on add/remove operations.

My issue is that sometimes, after longer period of time (hours), in 
diskless clients, access to dir having HSB HD <subdir> causes stall.
In such case, cat /proc/fs/nfs/exports on NFS server gives:   

[CODE][root@mythtv ~]# cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/tftpboot/PXEclient     
192.168.1.0/24(rw,no_root_squash,sync,wdelay,no_subtree_check,uuid=61c03e7b:9b7b4650:98dd78b4:18dc5ea6)
/       
192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=82aa90c3:2cb44663:b912a340:38f73b56)
/myth/video/DVD_Rip     
192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=cc740348:740334ac:00000000:00000000)
/myth   
192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=fd3104ea:d5c04a8f:beba8ab6:9115b192)
/myth/video/HD  
192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=c8c0a856:b8a54c08:9e4a4d48:58a37778)[/CODE]

In above listing, DVD_Rip is <subdir> created by udev script. In this 
<subdir> udev script mounts USB HDD.
I don't have clue why NFS server shares "/". Also I'm afraid about 
security, as for me it looks like server is sharing root dir...

Access to dir in diskless client become non-stalled when I remove USB HD 
(and udev scrip issue exportfs -r).
After such operation  /proc/fs/nfs/exports looks following:

[CODE][root@mythtv ~]# cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/tftpboot/PXEclient     
192.168.1.0/24(rw,no_root_squash,sync,wdelay,no_subtree_check,uuid=61c03e7b:9b7b4650:98dd78b4:18dc5ea6)
/       
192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=82aa90c3:2cb44663:b912a340:38f73b56)
/       
192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=cc740348:740334ac:00000000:00000000)
/myth   
192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=fd3104ea:d5c04a8f:beba8ab6:9115b192)
/myth/video/HD  
192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=c8c0a856:b8a54c08:9e4a4d48:58a37778)
[root@mythtv ~]#[/CODE]

Here we have 2 "/" shares.
Whats going on here ?
Has somebody idea how I can resolve stall issue ?


Thx in advance

[-- Attachment #2: warpme.vcf --]
[-- Type: text/x-vcard, Size: 106 bytes --]

begin:vcard
fn:Warpme
n:;Warpme
email;internet:warpme-h7QdYz1kt/Q@public.gmane.org
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Issue with stalled NFS
       [not found] ` <4AEE04F2.2070400-h7QdYz1kt/Q@public.gmane.org>
@ 2009-11-02 18:35   ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2009-11-02 18:35 UTC (permalink / raw)
  To: Warpme; +Cc: linux-nfs

On Sun, Nov 01, 2009 at 11:00:18PM +0100, Warpme wrote:
> Hi *
>
> I'm looking solution for following problem:
>
> I have file server sharing files to diskless clients via NFS.
>
> My /etc/export looks following:
>
> [CODE]myth                  
> 192.168.1.0/24(rw,crossmnt,no_subtree_check,no_root_squash)
> /tftpboot/PXEclient    
> 192.168.1.0/24(rw,no_subtree_check,no_root_squash)[/CODE]
>
>
> I want  have setup, where plugging ext. USB HDD will be dynamically  
> visible on clients as new <subdir> with plugged HDD contents.
> So if user plug USB HD on server, diskless clients should see plugged  
> HDD contents in dynamically created <subdirectory> with name equal to HD  
> label and HD contents inside it.
>
> I already wrote udev script which auto creates subdir=<label> in NFS  
> server shared dir, and automounts USB HD in this subdir.
> Udev script calls exportfs -r on add/remove operations.
>
> My issue is that sometimes, after longer period of time (hours), in  
> diskless clients, access to dir having HSB HD <subdir> causes stall.

Is it possible that this is the first time those clients attempted to
access the drive, or do they succesfully accessed the new export of the
drive after it was mounted, and only fail much later?

Next time the problem happens, it might be interesting to turn on mountd
debugging (by adding "-d all" to the mountd commandline), then run
exportfs -f, then try to access the directory from a client.

> In such case, cat /proc/fs/nfs/exports on NFS server gives:   
>
> [CODE][root@mythtv ~]# cat /proc/fs/nfs/exports
> # Version 1.1
> # Path Client(Flags) # IPs
> /tftpboot/PXEclient      
> 192.168.1.0/24(rw,no_root_squash,sync,wdelay,no_subtree_check,uuid=61c03e7b:9b7b4650:98dd78b4:18dc5ea6)
> /        
> 192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=82aa90c3:2cb44663:b912a340:38f73b56)
> /myth/video/DVD_Rip      
> 192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=cc740348:740334ac:00000000:00000000)
> /myth    
> 192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=fd3104ea:d5c04a8f:beba8ab6:9115b192)
> /myth/video/HD   
> 192.168.1.0/24(rw,no_root_squash,sync,wdelay,crossmnt,no_subtree_check,uuid=c8c0a856:b8a54c08:9e4a4d48:58a37778)[/CODE]
>
> In above listing, DVD_Rip is <subdir> created by udev script. In this  
> <subdir> udev script mounts USB HDD.
> I don't have clue why NFS server shares "/". Also I'm afraid about  
> security, as for me it looks like server is sharing root dir...

Is this recent Fedora?

Recent Fedora may do an export of /, but it should allow access only to
directory entries on the path to other exports.  (And it should be
marked read-only, so something's wrong in the above.)

--b.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-02 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-01 22:00 Issue with stalled NFS Warpme
     [not found] ` <4AEE04F2.2070400-h7QdYz1kt/Q@public.gmane.org>
2009-11-02 18:35   ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox