All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Bug#443591: nfs-kernel-server: Unexporting directories no longer working
       [not found] <20070922174231.11200.29119.reportbug@localhost.localdomain>
@ 2007-09-23  0:01 ` Steinar H. Gunderson
  2007-09-24  6:58   ` Neil Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Steinar H. Gunderson @ 2007-09-23  0:01 UTC (permalink / raw)
  To: David Liontooth, 443591; +Cc: nfs

On Sat, Sep 22, 2007 at 10:42:31AM -0700, David Liontooth wrote:
> Package: nfs-kernel-server
> Version: 1:1.1.0-13
> Severity: normal
> 
> 
> The command to unexport a directory appears to no longer have any effect.
> 
> I issue "exportfs -u :/tv01" and "exportfs" shows /tv01 still exported; consequently, I cannot unmount it.
> In contrast, removing /tv01 from /etc/exports and then running exportfs -ra successfully removes the export.
> 
> This used to work fine.

Sending this on to upstream, as I cannot see any good reason offhand why it
should not work.

/* Steinar */
-- 
Homepage: http://www.sesse.net/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* Re: Bug#443591: nfs-kernel-server: Unexporting directories no longer working
  2007-09-23  0:01 ` Bug#443591: nfs-kernel-server: Unexporting directories no longer working Steinar H. Gunderson
@ 2007-09-24  6:58   ` Neil Brown
  2007-09-24 23:29     ` David Liontooth
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Brown @ 2007-09-24  6:58 UTC (permalink / raw)
  To: Steinar H. Gunderson; +Cc: David Liontooth, nfs, 443591

On Sunday September 23, sgunderson@bigfoot.com wrote:
> On Sat, Sep 22, 2007 at 10:42:31AM -0700, David Liontooth wrote:
> > Package: nfs-kernel-server
> > Version: 1:1.1.0-13
> > Severity: normal
> > 
> > 
> > The command to unexport a directory appears to no longer have any effect.
> > 
> > I issue "exportfs -u :/tv01" and "exportfs" shows /tv01 still exported; consequently, I cannot unmount it.
> > In contrast, removing /tv01 from /etc/exports and then running exportfs -ra successfully removes the export.
> > 
> > This used to work fine.
> 
> Sending this on to upstream, as I cannot see any good reason offhand why it
> should not work.

Some simple testing and code review suggests that this works as
expected.  However it is possible that I am expecting something
different to you, or testing something different.

You say you:
    exportfs -u :/tv01

What exactly is in your /etc/exports that this is expected to revert?
The obvious answer would be

    /tv01  (some,flags,here)

however "exportfs" will complain about that, so I suspect not.

Maybe you have:

    /tv01 somehost(someflags)  otherhost(otherflags)

and you expect
    exportfs -u :/tv01

to unexport /tv01 to all hosts?  I would agree that doesn't work.  Did
it ever?  What version?

As an aside, you can always:
   exportfs -f
and then unmount filesystems.  They will be free to be unmounted until
the next NFS access request arrives.  Maybe that will server your
needs?

NeilBrown

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* Re: Bug#443591: nfs-kernel-server: Unexporting directories no longer working
  2007-09-24  6:58   ` Neil Brown
@ 2007-09-24 23:29     ` David Liontooth
  2007-10-12 19:59       ` Bug#443591: " Steinar H. Gunderson
  2007-10-15  0:02       ` Neil Brown
  0 siblings, 2 replies; 6+ messages in thread
From: David Liontooth @ 2007-09-24 23:29 UTC (permalink / raw)
  To: Neil Brown; +Cc: 443591, nfs


Hi Neil,

Thanks for looking.

Neil Brown wrote:
> On Sunday September 23, sgunderson@bigfoot.com wrote:
>   
>> On Sat, Sep 22, 2007 at 10:42:31AM -0700, David Liontooth wrote:
>>     
>>> Package: nfs-kernel-server
>>> Version: 1:1.1.0-13
>>> Severity: normal
>>>
>>>
>>> The command to unexport a directory appears to no longer have any effect.
>>>
>>> I issue "exportfs -u :/tv01" and "exportfs" shows /tv01 still exported; consequently, I cannot unmount it.
>>> In contrast, removing /tv01 from /etc/exports and then running exportfs -ra successfully removes the export.
>>>
>>> This used to work fine.
>>>       
>> Sending this on to upstream, as I cannot see any good reason offhand why it
>> should not work.
>>     
>
> Some simple testing and code review suggests that this works as
> expected.  However it is possible that I am expecting something
> different to you, or testing something different.
>
> You say you:
>     exportfs -u :/tv01
>
> What exactly is in your /etc/exports that this is expected to revert?
>   

/tv01 \
        134.32.443.30(ro,no_subtree_check,async) \
        134.32.443.32(ro,no_subtree_check,async) \
        134.32.443.33(ro,no_subtree_check,async) \
        134.32.443.34(ro,no_subtree_check,async) \
        134.32.443.35(ro,no_subtree_check,async) \
        134.32.443.36(ro,no_subtree_check,async) \
        134.32.443.37(ro,no_subtree_check,async)

Several other drives have similar entries.
> The obvious answer would be
>
>     /tv01  (some,flags,here)
>
> however "exportfs" will complain about that, so I suspect not.
>
> Maybe you have:
>
>     /tv01 somehost(someflags)  otherhost(otherflags)
>
> and you expect
>     exportfs -u :/tv01
>
> to unexport /tv01 to all hosts?  I would agree that doesn't work.  Did
> it ever?  What version?
>   

I see. So that would unexport only the first one?

Can I unexport only /tv01 to all hosts?
(If it's just a matter of my being uninformed, let's close the bug --
but I'd appreciate an answer!)

> As an aside, you can always:
>    exportfs -f
> and then unmount filesystems.  They will be free to be unmounted until
> the next NFS access request arrives.  Maybe that will serve your
> needs?
>   
I see -- that may be helpful -- but what if someone is accessing one of
the drives right then?
I would prefer to have individual control; I export a dozen other drives
to several different machines, and they should not be unexported.

Dave





-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* Re: Bug#443591: Bug#443591: nfs-kernel-server: Unexporting directories no longer working
  2007-09-24 23:29     ` David Liontooth
@ 2007-10-12 19:59       ` Steinar H. Gunderson
  2007-10-24  0:09         ` David Liontooth
  2007-10-15  0:02       ` Neil Brown
  1 sibling, 1 reply; 6+ messages in thread
From: Steinar H. Gunderson @ 2007-10-12 19:59 UTC (permalink / raw)
  To: David Liontooth, 443591; +Cc: Neil Brown, nfs

On Mon, Sep 24, 2007 at 04:29:02PM -0700, David Liontooth wrote:
> Hi Neil,
> 
> Thanks for looking.

I didn't see an answer to this mail; was the problem forgotten, or was it
resolved?

/* Steinar */
-- 
Homepage: http://www.sesse.net/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* Re: Bug#443591: nfs-kernel-server: Unexporting directories no longer working
  2007-09-24 23:29     ` David Liontooth
  2007-10-12 19:59       ` Bug#443591: " Steinar H. Gunderson
@ 2007-10-15  0:02       ` Neil Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Neil Brown @ 2007-10-15  0:02 UTC (permalink / raw)
  To: David Liontooth; +Cc: 443591, nfs

On Monday September 24, liontooth@cogweb.net wrote:
> 
> Hi Neil,
> 
> Thanks for looking.
> 
> Neil Brown wrote:
> > On Sunday September 23, sgunderson@bigfoot.com wrote:
> >   
> >> On Sat, Sep 22, 2007 at 10:42:31AM -0700, David Liontooth wrote:
> >>     
> >>> Package: nfs-kernel-server
> >>> Version: 1:1.1.0-13
> >>> Severity: normal
> >>>
> >>>
> >>> The command to unexport a directory appears to no longer have any effect.
> >>>
> >>> I issue "exportfs -u :/tv01" and "exportfs" shows /tv01 still exported; consequently, I cannot unmount it.
> >>> In contrast, removing /tv01 from /etc/exports and then running exportfs -ra successfully removes the export.
> >>>
> >>> This used to work fine.
> >>>       
> >> Sending this on to upstream, as I cannot see any good reason offhand why it
> >> should not work.
> >>     
> >
> > Some simple testing and code review suggests that this works as
> > expected.  However it is possible that I am expecting something
> > different to you, or testing something different.
> >
> > You say you:
> >     exportfs -u :/tv01
> >
> > What exactly is in your /etc/exports that this is expected to revert?
> >   
> 
> /tv01 \
>         134.32.443.30(ro,no_subtree_check,async) \
>         134.32.443.32(ro,no_subtree_check,async) \
>         134.32.443.33(ro,no_subtree_check,async) \
>         134.32.443.34(ro,no_subtree_check,async) \
>         134.32.443.35(ro,no_subtree_check,async) \
>         134.32.443.36(ro,no_subtree_check,async) \
>         134.32.443.37(ro,no_subtree_check,async)

To unexport /tv01, you would need to individually unexport each of
those export.  Or edit /etc/exports to remove those lines and
   exportfs -r

> 
> Several other drives have similar entries.
> > The obvious answer would be
> >
> >     /tv01  (some,flags,here)
> >
> > however "exportfs" will complain about that, so I suspect not.
> >
> > Maybe you have:
> >
> >     /tv01 somehost(someflags)  otherhost(otherflags)
> >
> > and you expect
> >     exportfs -u :/tv01
> >
> > to unexport /tv01 to all hosts?  I would agree that doesn't work.  Did
> > it ever?  What version?
> >   
> 
> I see. So that would unexport only the first one?

No, it would not export anything as that is asking to stop exporting
it to the wildcard host (matches anything) and it is not currently
exported to the wildcard host.

> 
> Can I unexport only /tv01 to all hosts?
> (If it's just a matter of my being uninformed, let's close the bug --
> but I'd appreciate an answer!)

No.  You cannot currently export a filesystem.  You can only unexport
an 'export' which is a host:filesystem combination.

> 
> > As an aside, you can always:
> >    exportfs -f
> > and then unmount filesystems.  They will be free to be unmounted until
> > the next NFS access request arrives.  Maybe that will serve your
> > needs?
> >   
> I see -- that may be helpful -- but what if someone is accessing one of
> the drives right then?

If you 
  exportfs -f ; umount /tv01
there is a chance that a request will arrive between the two, so the
umount will fail.
You could instead
   umount -l /tv01 ; exportfs -f

which will avoid the race and be just as effective.


> I would prefer to have individual control; I export a dozen other drives
> to several different machines, and they should not be unexported.

"exportfs -f" will not exactly unexport them.  It just removes cached
information from the kernel so that it has to ask mountd again.
So the most you will notice is a slight pause, and you probably won't
notice that unless the system is very busy and there are lots of
mounts - or hostname/netgroup lookup is very slow.

NeilBrown

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* Bug#443591: nfs-kernel-server: Unexporting directories no longer working
  2007-10-12 19:59       ` Bug#443591: " Steinar H. Gunderson
@ 2007-10-24  0:09         ` David Liontooth
  0 siblings, 0 replies; 6+ messages in thread
From: David Liontooth @ 2007-10-24  0:09 UTC (permalink / raw)
  To: Steinar H. Gunderson; +Cc: Neil Brown, 443591, nfs

Steinar H. Gunderson wrote:
> On Mon, Sep 24, 2007 at 04:29:02PM -0700, David Liontooth wrote:
>   
>> Hi Neil,
>>
>> Thanks for looking.
>>     
>
> I didn't see an answer to this mail; was the problem forgotten, or was it
> resolved?
>
> /* Steinar */
>   
I didn't hear back from Neil, but the issue should be considered
resolved. I mistakenly believed it was possible to unexport a particular
resource to several hosts, without unexporting other resources.

For instance, I have 

/tv01 \
        134.32.443.30(ro,no_subtree_check,async) \
        134.32.443.32(ro,no_subtree_check,async) \
        134.32.443.33(ro,no_subtree_check,async) \
        134.32.443.34(ro,no_subtree_check,async) \
        134.32.443.35(ro,no_subtree_check,async) \
        134.32.443.36(ro,no_subtree_check,async) \
        134.32.443.37(ro,no_subtree_check,async)

Several other drives have similar entries.

If I understand Neil correctly, it's not possible to unexport /tv01 to
all of these hosts by issuing

	exportfs -u :/tv01

man exportfs says, "To  remove individual export entries, one can
specify a host:/path pair. This deletes the specified entry from xtab
and removes the corresponding kernel entry (if any)."  The man page may
be assuming the resource has only been exported to one host, but it
doesn't state that limitation. Apparently there's no command for
unexporting a resource to all or a subset of hosts; the command works
only if there's a single host.

We could leave the report in place but downgrade it to wishlist. If I've
described the situation correctly, the man page could do with a
revision, for instance using this language:

To remove an export to a host, specify a host:/path pair. This deletes
the specified entry from xtab and removes the corresponding kernel entry
(if any). To remove one or more exports to several hosts, use exportfs -ua.

David

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

end of thread, other threads:[~2007-10-24  0:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070922174231.11200.29119.reportbug@localhost.localdomain>
2007-09-23  0:01 ` Bug#443591: nfs-kernel-server: Unexporting directories no longer working Steinar H. Gunderson
2007-09-24  6:58   ` Neil Brown
2007-09-24 23:29     ` David Liontooth
2007-10-12 19:59       ` Bug#443591: " Steinar H. Gunderson
2007-10-24  0:09         ` David Liontooth
2007-10-15  0:02       ` Neil Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.