Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52804 - Can't export /usr/portage via NFS
Summary: Can't export /usr/portage via NFS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-02 12:09 UTC by Philippe Lafoucrière
Modified: 2004-07-29 10:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Lafoucrière 2004-06-02 12:09:34 UTC
When putting /usr/portage in my /etc/exports, I got an error while nfs starting.

Reproducible: Always
Steps to Reproduce:
1. put /usr/portage    192.168.0.0/24(rw,no_root_squash,sync) in /etc/exports
2. /etc/init.d/nfs restart (or start)
3.

Actual Results:  
 $ sudo /etc/init.d/nfs restart
 * Stopping NFS mountd...                                                 [ ok ]
 * Stopping NFS daemon...                                                 [ ok ]
 * Stopping NFS statd...                                                  [ ok ]
 * Starting NFS statd...                                                  [ ok ]
 * Exporting NFS directories...
/sbin/runscript.sh: line 529:  8223 Killed                  $exportfs -r 1>&2
 * Error exporting NFS directories                                        [ !! ]

 * Starting NFS daemon...                                                 [ ok ]
 * Starting NFS mountd...                                                 [ ok ]

Expected Results:  
 $ sudo /etc/init.d/nfs restart
 * Stopping NFS mountd...                                                 [ ok ]
 * Stopping NFS daemon...                                                 [ ok ]
 * Stopping NFS statd...                                                  [ ok ]
 * Starting NFS statd...                                                  [ ok ]
 * Exporting NFS directories...                                           [ ok ]
 * Starting NFS daemon...                                                 [ ok ]
 * Starting NFS mountd...                                                 [ ok ]

in /var/log/syslog:

Jun  2 21:07:16 biproc rc-scripts: Error exporting NFS directories
Jun  2 21:07:18 biproc kernel: svc: bad direction 65536, dropping request

I have other exports in my file, but the problem only appear when /usr/portage
is not commented :(
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2004-06-02 16:33:53 UTC
you shouldn't share /usr/portage via nfs anyway -- it screws with the metadata on other machines.  best to have a local rsync mirror instead.  It's quite alright, though, to share /usr/portage/disftiles.
Comment 2 Philippe Lafoucrière 2004-06-02 19:57:37 UTC
Thanx for the quick answer. I didn't know there was some metadata in /usr/portage (why aren't they in /var/portage instead ?). Btw, is there a way to tell portage to  remove unused archives (like apt) ? I don't want to do a find -mtime +30 because some packages like games-ftps/quake3-nsco need ~400 MB of files, and the first big archive (300 MB) is way too old (recent versions are just extension patches). I'll ask that on the forum.

Since /usr/portage shouldn't be shared by nfs (for my purpose), I think we can close this ticket.

Thanks again.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-06-02 20:15:52 UTC
Nah, it's ok to put $PORTDIR on NFS, just makes things slower if you forgot to update the cache on the clients with `emerge --metadata`.
Seems to be a kernel issue, noting portage related here.
Comment 4 Philippe Lafoucrière 2004-06-02 20:36:41 UTC
It might be: I changed my kernel a couple of weeks ago from development-sources (2.6.5) to gentoo-development-sources (2.6.5-gentoo-r1).
Since I use this nfs share to update a couple of laptops, I don't use it every day , and didn't detect the problem before.

kind regards
Comment 5 Philippe Lafoucrière 2004-06-04 14:10:01 UTC
is this ok to have :

#uid = nobody
#gid = nobody
use chroot = no
max connections = 20
pid file = /var/run/rsyncd.pid
motd file = /etc/rsync/rsyncd.motd
transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300

[gentoo-x86-portage]
#this entry is for compatibility
path = /usr/portage
comment = Gentoo Linux Portage tree

[gentoo-portage]
#modern versions of portage use this entry
path = /usr/portage
comment = Gentoo Linux Portage tree mirror
exclude = distfiles


in /etc/rsyncd/rsyncd.conf as a replacement ?
Comment 6 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-06-21 14:00:18 UTC
Hm, not a kernel bug I see...
Comment 7 MAL 2004-07-29 10:15:33 UTC
Could this help?

http://groups.google.com/groups?q=svc:+bad+direction&hl=en&lr=&ie=UTF-8&oe=UTF-8&scoring=d&selm=1rINI-3dU-23%40gated-at.bofh.it&rnum=1

From the few answers I have found out there, it does seem to be something to do with nfsd not liking some network traffic it's recieving.

I was told to add:

net.ipv4.ip_local_port_range = 49152 61000

to /etc/sysctl.conf

But it didn't help in my case.