Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nested autofs, portage + distfiles (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tipp98
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2007
Posts: 113

PostPosted: Sat Nov 03, 2012 6:30 pm    Post subject: nested autofs, portage + distfiles (SOLVED) Reply with quote

I am trying to share portage over nfs using autofs. Recursive nfs mounts are not working, so I am trying to have autofs mount them individually. But, all I get with ls /usr/portage is the distfiles subfolder (i.e. no portage tree from the first mount). Any suggestions?

/etc/exports:
Code:
/usr/portage/ 192.168.1.0/255.255.255.0(rw,no_root_squash,subtree_check,sync,nohide)
/mnt/repo/distfiles/ 192.168.1.0/255.255.255.0(rw,no_root_squash,subtree_check,sync,nohide)

auto.master:
Code:
/-              /etc/autofs/auto.portage
/-              /etc/autofs/auto.distfiles

auto.portage:
Code:
/usr/portage            -fstype=nfs,rw,nodev    falcon:/usr/portage

auto.distfiles:
Code:
/usr/portage/distfiles  -fstype=nfs,rw,nodev        falcon:/mnt/repo/distfiles


Last edited by tipp98 on Sun Nov 04, 2012 9:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3264
Location: Canada

PostPosted: Sat Nov 03, 2012 9:45 pm    Post subject: Reply with quote

I am just learning,

so how is it supposed to work ? Let us say you first mount /usr/portage . Now /usr/portage perhaps does not contain distfiles subdirectory, because it points to remote system which does not have it (if you had /usr/portage/distfiles on the local system, it will not be visible, because you mount over another file system at /usr/portage). So where does the next instance, /mnt/repo/distfiles is supposed to be mounted on ?
Back to top
View user's profile Send private message
tipp98
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2007
Posts: 113

PostPosted: Sun Nov 04, 2012 3:24 pm    Post subject: Reply with quote

Well, I am just learning too, but direct mounts, as indicated by "/-" in auto.master allows for defining a mount within a filesystem. The standard method is to give autofs a folder (e.g. /mnt/auto) and it creates a folder for each mount.

/usr/portage is part of the root file system on the nfs server. It contains an empty ./distfiles directory where /mnt/repo/distfiles is always mounted. My first hope was that /usr/portage/distfiles would be mounted recursively when /usr/portage is mounted, which I may look into if I cannot find a solution with autofs. My second hope was that when I run emerge, /usr/portage is mounted. Then when the distfiles are needed, that folder is mounted just like it is on the nfs server. But, it shotcuts to mounting /usr/portage/distfiles only. Seems like it should work, but considering direct mounts are just an extension to the system, maybe there are internal design restrictions that prevents it from working.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3264
Location: Canada

PostPosted: Sun Nov 04, 2012 3:27 pm    Post subject: Reply with quote

Perhaps we could take it one step at a time. If you take out distfiles mounting completely (just comment out the line in master), will /usr/portage be mounted ?
Back to top
View user's profile Send private message
tipp98
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2007
Posts: 113

PostPosted: Sun Nov 04, 2012 6:00 pm    Post subject: Reply with quote

Quote:
Perhaps we could take it one step at a time. If you take out distfiles mounting completely (just comment out the line in master), will /usr/portage be mounted ?

Yes, with that line commented out /usr/portage mounts like expected.

I built autofs without mount-locking,
automount -V:
Code:
Linux automount version 5.0.6

Directories:
        config dir:     /etc/conf.d
        maps dir:       /etc/autofs
        modules dir:    /usr/lib64/autofs

Compile options:
  DISABLE_MOUNT_LOCKING ENABLE_IGNORE_BUSY_MOUNTS WITH_LDAP LIBXML2_WORKAROUND


/proc/mounts:
Code:
/etc/autofs/auto.portage /usr/portage autofs rw,relatime,fd=6,pgrp=4194,timeout=300,minproto=5,maxproto=5,direct 0 0
/etc/autofs/auto.distfiles /usr/portage/distfiles autofs rw,relatime,fd=6,pgrp=4194,timeout=300,minproto=5,maxproto=5,direct 0 0

no change, which means my condition isn't related to https://bugs.gentoo.org/show_bug.cgi?id=395523

Something else that is puzzling, there is no /usr/portage/distfiles folder locally, just /usr/portage. So, it sees distfiles from the first mount, but does not show anything else from that mount, like the entire portage tree.
Back to top
View user's profile Send private message
tipp98
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jan 2007
Posts: 113

PostPosted: Sun Nov 04, 2012 9:14 pm    Post subject: Reply with quote

Ok, I've got this egg cracked. man autofs, by default returns autofs(8), which is junk. autofs(5) is where it's at. It's all in how the key file is written, and subsequently parsed.

auto.master:
Code:
/-      /etc/autofs/auto.portage

auto.portage:
Code:
/usr/portage    -fstype=nfs,rw,hard,intr  /               falcon:/usr/portage \
                                          /distfiles      falcon:/mnt/repo/distfiles
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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