Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS portage and distfiles NOT working?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sun Apr 26, 2015 4:47 am    Post subject: NFS portage and distfiles NOT working? Reply with quote

Okay, this is truly odd. My setup is that my 'server' has no direct internet access or portage tree. It doesn't need it for its function of running programs in the background.


In order to keep it up to date and avoid over-syncing it shares my desktop's /usr/portage over NFS.

This is where the problem is. I want to emerge sys-apps/portage-2.2.18 before anything else. I emerge it like normal, but it insists it must download the package. However, the package exists in /usr/portage/distfiles/portage-2.2.18.tar.bz2, exactly where it is supposed to. The current portage is sys-apps/portage-2.2.8-r2. Clearly, it shouldn't do this. I can see the file, I can touch the file, but I can't emerge the package.

It looks like it has the right permissions -rw-rw-r-- 1 portage portage 942561 Apr 25 21:37 /usr/portage/distfiles/portage-2.2.18.tar.bz2

And I can emerge some other packages, eudev for example, which just confuses me more.

My exports file
Code:
# /etc/exports: NFS file systems being exported.  See exports(5).
/export                 192.168.2.0/24(rw,fsid=0,no_subtree_check)
/export/portage         192.168.2.0/24(rw,nohide,insecure,no_subtree_check,no_root_squash)


I'd be happy to post anything else that is needed.

EDIT: Looks like a clock sync problem between the two boxes.

EDIT2: Nope, must be something else.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.


Last edited by The Doctor on Mon Apr 27, 2015 9:06 pm; edited 2 times in total
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Sun Apr 26, 2015 7:57 am    Post subject: Reply with quote

It works fine for me. I'm using a tiny raspberry pi as a gigantic fileserver :)
All other systems share distfiles, portage, linux-source.
On "server":
/etc/exports/
Code:
# /etc/exports: NFS file systems being exported.  See exports(5).
/export                 *(rw,fsid=0,no_subtree_check)
/export/distfiles       *(rw,nohide,insecure,no_subtree_check,no_root_squash)
/export/portage         *(rw,nohide,insecure,no_subtree_check,no_root_squash)
/export/linux-src       *(rw,nohide,insecure,no_subtree_check,no_root_squash)
/export/transfer        *(rw,nohide,insecure,no_subtree_check,no_root_squash)

/etc/fstab
Code:
/sda2/linux-src         /export/linux-src auto          bind            0 0
/sda2/distfiles         /export/distfiles auto          bind            0 0
/sda2/portage           /export/portage   auto          bind            0 0
/sda2/transfer          /export/transfer auto           bind            0 0

On "clients":
/etc/fstab
Code:
192.168.1.2:/ /sdb2 nfs4 rw,noatime 0 0
/sdb2/linux-src         /usr/src        nfs             bind            0 0

/etc/portage/make.conf
Code:
DISTDIR="/sdb2/distfiles"
PORTDIR="/sdb2/portage"
PKGDIR="/sdb2/transfer/bindist64"

Server's vixie-cron runs "emerge --sync" every morning for me, but it can also be run from any client.
Test on server:
Code:
rm  /sdb2/distfiles/portage-2.2.18.tar.bz2
emerge portage
 ls -l  /sdb2/distfiles/portage-2.2.18.tar.bz2
-rw-rw-r-- 1 portage portage 942561 Mar  4 21:13 /sdb2/distfiles/portage-2.2.18.tar.bz2
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sun Apr 26, 2015 8:08 am    Post subject: Re: NFS portage and distfiles NOT working? Reply with quote

The Doctor wrote:
but I can't emerge the package.
error message ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Sun Apr 26, 2015 8:35 am    Post subject: Reply with quote

The Doctor,

Permissions on the file?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sun Apr 26, 2015 10:58 am    Post subject: Reply with quote

Or wrong digest sum
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3134

PostPosted: Sun Apr 26, 2015 4:19 pm    Post subject: Reply with quote

Quote:
And I can emerge some other packages, eudev for example, which just confuses me more.
is that portage tree over NFS actually mounted over local /usr/portage?
You surely have some older version.
Also, do you keep distfiles on the same filesystem that stores your /usr/portage? NFS ignores mountpoints, so separating those requires another line in exports.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sun Apr 26, 2015 7:28 pm    Post subject: Reply with quote

Thanks for the thoughts.

@toralf

No error message. It just tries to download the package without a working internet connection. It shouldn't because the right package is there with the right permissions.

My desktop sees the file as being perfectly valid.

@NeddySeagoon

portage portage, as I believe it should be. I checked and my desktop and server both see the file as having the same permissions and it works from the desktop.

Code:
ls -l /usr/portage/distfiles/portage-2.2.18.tar.bz2
-rw-rw-r-- 1 portage portage 942561 Apr 25 21:37 /usr/portage/distfiles/portage-2.2.18.tar.bz


@szatox

The server doesn't have anything at /usr/portage, just a mount point. My desktop exports the entire contents of /usr/portage which includes the portage tree, distfiles, and packages.

Which actually lead to an interesting conclusion. I could emerge the binary version of portage and a few other packages, but that seems to have broken sshd...
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Apr 26, 2015 7:32 pm    Post subject: Reply with quote

You better keep binpackages local, unless you have identical nodes.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sun Apr 26, 2015 8:08 pm    Post subject: Reply with quote

and DISTDIR points to the right location (and you have only one of those location, right ?)
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sun Apr 26, 2015 8:33 pm    Post subject: Reply with quote

@Jaglover Yes, you are quite right. Normally I would have, but tired and not thinking leads to mistakes. Fortunetly, the two cpus are almost identical. I don't think it did any real harm.

@toralf

Yes, the DISTDIR points to the right place. Like I said, I could emerge eudev (which was an old file) but the newly downloaded portage didn't work.

Thinking on that, is it possible that clock skew is to blame here? I would have thought that if that was the case touching the file would solve that problem.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Apr 26, 2015 9:32 pm    Post subject: Reply with quote

Out of sync clock can cause all kind of issues (that's why I run a NTP server in my router).
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Sun Apr 26, 2015 10:52 pm    Post subject: Reply with quote

It looks like a clock problem. The dates match within a minute, but still no joy with new packages, but the older ones are working. I'll get openntpd working and hopefully that will get this gremlin. I'll mark this as solved.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
WWWW
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2014
Posts: 143

PostPosted: Mon Apr 27, 2015 11:31 am    Post subject: Reply with quote

hello,

anybody know whether NFS can have different root folders?

It make sense to have a root folder for something specific fsid=0.

But what if some different to share such as torrents? Can it be used fsid=1?

The fsid=0 concept is confusing.

thanks
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Mon Apr 27, 2015 9:20 pm    Post subject: Reply with quote

It doesn't seem to be a clock problem. I have the times within a few seconds but portage still won't use the newer packages in the distfiles. It just tries to download them over again.

I let the packages sit for over 12 hours. This is getting really annoying.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Tue Apr 28, 2015 4:51 pm    Post subject: Reply with quote

The Doctor

If old files work and new ones don't it has to be permissions.
Do you have FEATURES=userfetch now and didn't before?

Is portage the same userID on both boxes. Its IDs that matter over NFS, not usernames.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Tue Apr 28, 2015 5:45 pm    Post subject: Reply with quote

I wish it where that simple. On my desktop
Code:
ls -l /usr/portage/distfiles/openntpd-5.7p3.tar.gz && id portage
-rw-rw-r-- 1 portage portage 409734 Apr 27 13:32 /usr/portage/distfiles/openntpd-5.7p3.tar.gz
uid=250(portage) gid=250(portage) groups=250(portage)
On my server
Code:
ls -l /usr/portage/distfiles/openntpd-5.7p3.tar.gz && id portage
-rw-rw-r-- 1 portage portage 409734 Apr 27 13:32 /usr/portage/distfiles/openntpd-5.7p3.tar.gz
uid=250(portage) gid=250(portage) groups=250(portage)


I have never had FEATURES=userfetch

EDIT:corrected partial info
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum