[Apt-cacher-ng-users] acngfs

Eduard Bloch edi at gmx.de
Tue Nov 1 18:59:38 UTC 2011


#include <hallo.h>
* Jasper Mackenzie [Sun, Oct 30 2011, 06:48:31PM]:

> of a ~100mb update. Using iftop on the server it is very hard to see what
> is actually being taken from the cache and what is being downloaded
> directly (i.e did the mirror command work). It looked like about half came
> localy (due to speed), and half was downlaoded from an external
> mirror (no doubt via apt-cacher-ng)
>    Independent of whether prechache/mirroring was working or not, there
> should have been something to upgrade using acngfs -- what am I doing
> wrong here???

It's not necessarily you, there are bugs in acngfs(*) and it never got
enough testing. Heck, it has even been broken in a couple of releases
and nobody ever noticed.

(*) I just found something, it returns an IO error after delivering 64k
from .bz2 files. I am no really sure where it comes from but it might
be the cause of your problems because I can reliable reproduce it with
the .nz mirror from your sources.list (maybe some timing issue, not
sure). I decided to solve it by throwing the current downloader code in
acngfs away and replacing it with stable code from the daemon.  This
requires some refactoring but shouldn't take very long.

> PrecacheFor: debrep/dists/unstable/*/source/Sources*
> debrep/dists/unstable/*/binary-amd64/Packages*
> debrep/dists/unstable/*/binary-i386/Packages*
> ubrep/dists/unstable/*/source/Sources*
> ubrep/dists/unstable/*/binary-amd64/Packages*
> ubrep/dists/unstable/*/binary-i386/Packages*
> deb.opera.com/opera*/dists/stable/non-free/*/Packages*
> packages.medibuntu.org/dists/*/free/*/Packages*
> packages.medibuntu.org/dists/*/non-free/*/Packages*
> ppa.launchpad.net/*/ppa/ubuntu/dists/*/main/*/Packages.bz2
> mirror.optus.net/debian-multimedia/dists/*/main/*/Packages.bz2

That's supposed to be one single line.

> /etc/fstab (relating to acngfs)
> 
> # Apt-cacher-ng mounts for fuse filesystem
> http://ftp.nz.debian.org/debian /srv/acngfs/debrep acngfs
> /var/cache/apt-cacher-ng/debrep 0 0

I am confused... is /var/cache/apt-cacher-ng somehow NFS-shared or why
do you want to specify it on the client side?

> http://mirror.optus.net/debian-multimedia /srv/acngfs/multimedia acngfs
> /var/cache/apt-cacher-ng/mirror.optus.net/debian-multimedia 0 0
> http://winswitch.org/           /srv/acngfs/winswitch/          acngfs
> /var/cache/apt-cacher-ng/winswitch.org 0 0
> http://ppa.launchpad.net/deluge-team/ppa/ubuntu /srv/acngfs/launchpad/
> acngfs /var/cache/apt-cacher-ng/ppa.launchpad.net/deluge-team/ppa/ubuntu/
> 0 0
> 
> The mount script, /sbin/mount.acngfs (differs on the clients only by
> hostname)
> #! /bin/bash
> /usr/lib/apt-cacher-ng/acngfs $1 localhost:9999 $4 $2 -o allow_root

That's a nice idea but doesn't work correctly. Have a look at your
process list, third argument becomes something like 
rw,/var/cache/apt-cacher-ng/debrep .

Regards,
Eduard.

-- 
Every great idea is worthless without someone to do the work. --Neil Williams



More information about the Apt-cacher-ng-users mailing list