$MAXPACKAGES
Toomas Tamm
tt-fai at kky.ttu.ee
Thu Dec 16 12:23:03 CET 2010
> Maybe. AFAIK, the package manager has no way to check if there's
> enough space in /var/cache/apt/archives. Best way is, to ensure that
> /var has enough space for downloading all packages.
You can move the apt cache to a NFS-mounted disk with enough space.
A gigabit ethernet connection is highly recommended.
I have the following (slightly sanitized for this posting) in a
prepareapt hook for certain classes of hosts:
[ ! -d $FAI_ROOT/wrk ] && mkdir $FAI_ROOT/wrk
mount -t nfs -o rw,tcp,noatime,vers=3,hard,intr,nolock,sec=sys disk-server:/wrk/install-cache $FAI_ROOT/wrk/apt-cache
rm -rf $FAI_ROOT/wrk/apt-cache/*
cd $FAI_ROOT/var/cache
cp -a apt/* $FAI_ROOT/wrk/apt-cache
mv apt apt-orig
ln -s /wrk/apt-cache ./apt
Probably some of the mount options are unnecessary: this is a
combination that just happened to work and was sufficiently
efficient as well.
On the disk-server, /wrk/install-cache is exported with write
rights to nobody:nogroup. Can be a security risk in certain
scenarios. Also, only one installation may be in progress at
any given time: the install cache is shared between the hosts.
You may improve the approach by providing host-specific cache
directories on the disk server, playing with permissions, etc.
--
Toomas Tamm e-mail: tt-fai (at) kky.ttu.ee
Chair of Inorganic Chemistry voice: INT+372-620-2810
Tallinn University of Technology fax: INT+372-620-2828
Ehitajate tee 5, EE-19086 Tallinn, Estonia http://www.kk.ttu.ee/toomas/
More information about the linux-fai
mailing list