Friday, April 16, 2010

Multiple portage SYNC servers

My home server died, and it will be down until I figure out what is the problem.
The server is syncing portage everyday and share the portage tree in the local network. This lets me sync my laptop against my local server. Faster and no double rsync on remote rsync servers.
This setup is pretty simple. You can learn how to do it here.
The important thing is to define the SYNC variable in make.conf as:
SYNC="rsync://LOCAL_SERVER_IP/gentoo-portage"
After my server died, I just added a real server to SYNC line:
SYNC="rsync://LOCAL_SERVER_IP/gentoo-portage rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage/"
Exactly as we use GENTOO_MIRRORS variable. 
Nope, it doesn't work. I have asked in Gentoo forums here why there is no multiple sync servers supported.
I have solved it like this in a standalone script:
SYNC_SERVERS="rsync://LOCALSERVER/gentoo-portage rsync://linux.rz.ruhr-uni-bochum.de/gentoo-portage/ rsync://mirror.isoc.org.il/gentoo-portage/"
for server in $SYNC_SERVERS
do
        SYNC="$server" eix-sync -q && break
done
This behaviour of SYNC variable in make.conf should be corected to support multiple rsync servers.

Regards,
Kfir

1 comment:

  1. Maybe it's even more efficient to share it other nfs ?
    I share portage tree and distfiles other nfs, thus, I use less disk space (on my computers) and less bandwitch from the gentoo-servers...

    ReplyDelete