Re: Problem sharing apt cache through NFS

Panu Matilainen <[email protected]> Tue, 20 Jul 2004 15:57:06 +0300
Newsgroups gmane.linux.conectiva.apt-rpm
Message-ID <[email protected]>
On Tue, 2004-07-20 at 15:54, Andre Costa wrote:
> On Tue, 20 Jul 2004 15:41:12 +0300
> Panu Matilainen <[email protected]> wrote:
> 
> > Hmm, now that I actually tried this myself:
> > - first I didn't have nfslock running at all and it worked just fine,
> > only giving a warning "W: Not using locking for nfs mounted lock file
> > /var/cache/apt/archives/lock" at the end of operation.
> > - once nfslock got started on both .. well, it "just worked"
> > - if the directory is actually locked then you should get "resource
> > temporarily unavailable" instead of "permission denied"
> > 
> > I'd guess this is just one of those nfs quirks.. a "stale lock" or
> > something like that :-/ How to clear the situation .. well, dunno
> > really. Maybe recycle the rpc.statd processes on all hosts or something?
> 
> Thks for spending some time on this. I restarted nfs.statd on both
> client and server, but it didn't help -- problem persists. Either
> there's some subtle problem going on or there's some basic configuration
> missing somewhere...
> 
> Anyway, this is totally unrelated to apt-get AFAICS. Now if I just could
> separate lockfile from archive dir, maybe it would work...

You can't separate the lockfile without patching apt, and even if you
move the lockfile someplace else .. it doesn't make much sense to have
local lockfiles since the locking will be messed up anyway.

As a last resort/temporary workaround you could run apt with
'Debug::NoLocking=true" to completely avoid locking the archive
directory but that might cause some "interesting" effects if two hosts
are trying to simultaneously download the same file :)

	- Panu -