Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] local distfiles, rsync mirror setup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 243
Location: Dresden

PostPosted: Tue Oct 15, 2013 7:18 am    Post subject: [solved] local distfiles, rsync mirror setup Reply with quote

Hi there, I need some help for:

set up an local distfiles and rsync mirror in my LAN because aliens from Pluto will go offline and asked me. All clients in LAN should sync and get distfiles from this machine. I have a complete rsync'ed copy of a gentoo mirror (~250GB) on a seperate machine named "server", IP=192.168.1.100. The server will be updated from time to time with:

Code:

server gentoo-mirror # rsync -ahvn --delete-after --progress ftp.ussg.iu.edu::gentoo-distfiles/ /mnt/c2/gentoo-mirror/

mirrored files location:
Code:

#ls -lah /mnt/c2/gentoo-mirror/
total 3.4M
drwxr-xr-x  6 1030  1030 4.0K Oct 15 08:10 .
drwxr-x--x 18 mega mega  4.0K Oct 11 11:57 ..
drwxr-xr-x  2 1030  1030 3.3M Oct 12 12:00 distfiles
drwxr-xr-x 16 1005 10016 4.0K Oct 12 05:45 experimental
drwxr-xr-x 15 1005 10016 4.0K Nov  9  2012 releases
drwxrwxr-x  3 1005 10016 4.0K Oct 12 02:57 snapshots


I followed this guide to set up an rsync server.
Code:

# cat /etc/rsyncd.conf

pid file = /var/run/rsyncd.pid
max connections = 5
use chroot = yes
uid = nobody
gid = nobody

[gentoo-portage]
path=/mnt/c2/gentoo-mirror
comment=Gentoo Portage
exclude=distfiles/ packages/

On my client I tested the mirror with:
Code:
# rsync 192.168.1.100::
gentoo-portage  Gentoo Portage

# rsync 192.168.1.100::gentoo-portage
drwxr-xr-x        4096 2013/10/15 08:10:09 .
drwxr-xr-x        4096 2013/10/12 05:45:01 experimental
drwxr-xr-x        4096 2012/11/09 14:10:49 releases
drwxrwxr-x        4096 2013/10/12 02:57:10 snapshots


Setting the client to sync with local mirror:

Code:

/etc/portage/make.conf:
...
SYNC="rsync://192.168.1.100/gentoo-portage"
...


Now trying to sync the client gives this error:
Code:
# emerge -av --sync
>>> Synchronization of repository 'gentoo' located in '/usr/portage'...
Do you want to sync your Portage tree with the mirror at
rsync://192.168.1.100/gentoo-portage? [Yes/No]
>>> Starting rsync with rsync://192.168.1.100/gentoo-portage...
>>> Checking server timestamp ...
receiving incremental file list
rsync: change_dir "/metadata" (in gentoo-portage) failed: No such file or directory (2)

Number of files: 0
Number of files transferred: 0
Total file size: 0 bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 3
Total bytes sent: 47
Total bytes received: 8

sent 47 bytes  received 8 bytes  110.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1518) [Receiver=3.0.9]
>>> Retrying...
!!! Exhausted addresses for 192.168.1.100

Why does it ask for a "metadata directory"?


Last edited by dasPaul on Tue Oct 15, 2013 8:38 am; edited 1 time in total
Back to top
View user's profile Send private message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 243
Location: Dresden

PostPosted: Tue Oct 15, 2013 7:50 am    Post subject: Reply with quote

Ok I found the error. After reading the guide again my scenario would be a community rsync mirror.

So I did:

Code:

# mkdir /mnt/c2/rsync
# rsync -ahv --delete --timeout=300 --progress rsync://rsync.de.gentoo.org/gentoo-portage /mnt/c2/rsync/


changed rsyncd.conf the line to:
Code:
...
path=/mnt/c2/rsync
...

restarted rsyncd and now I can "emerge --sync" from my local machine.

But now how is the distfiles download managed? Is it the "GENTOO_MIRRORS" var in make.conf? This is not rsync. Are distfiles downloaded by html? If so, do I have to set up a httpd service?
Back to top
View user's profile Send private message
dasPaul
Apprentice
Apprentice


Joined: 14 Feb 2012
Posts: 243
Location: Dresden

PostPosted: Tue Oct 15, 2013 8:38 am    Post subject: Reply with quote

solved by reading this Post
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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