Debian with read-only /usr

2001-03-15 Thread Dave Sherohman
I'm looking at NFS-mounting /usr for a largish number of machines, with the
basic idea that then I can just keep the binaries on the central server up-to
date and the workstations will all follow along with (hopefully) a minimum of
effort.  I'm a little concerned about apt, though...  I wouldn't expect it to
be very open-minded about /usr being read-only.  OTOH, I probably wouldn't
need to run apt very often on the workstations unless there's a change to
config file formats or an all-new package is being installed.

Any Debian-specific advice on running a setup like that?

-- 
Linux will do for applications what the Internet did for networks. 
- IBM, Peace, Love, and Linux
Geek Code 3.1:  GCS d? s+: a- C++ UL++$ P+ L+++ E- W--(++) N+ o+
!K w---$ O M- V? PS+ PE Y+ PGP t 5++ X+ R++ tv b+ DI D G e* h+ r y+



Re: Debian with read-only /usr

2001-03-15 Thread Carl Greco
Dave -
You could always mount the `/usr' filesystem on the server as readonly
and use the `remount' option of `mount' to remount `/usr' as writeable
during an apt upgrade.  The other option would be to export `/usr'
readonly, i.e., in the `/etc/exports' on the server.

Dave Sherohman said on March 15, 2001 at 10:22 (-0600) 
I'm looking at NFS-mounting /usr for a largish number of machines, with the
basic idea that then I can just keep the binaries on the central server up-to
date and the workstations will all follow along with (hopefully) a minimum of
effort.  I'm a little concerned about apt, though...  I wouldn't expect it to
be very open-minded about /usr being read-only.  OTOH, I probably wouldn't
need to run apt very often on the workstations unless there's a change to
config file formats or an all-new package is being installed.

Any Debian-specific advice on running a setup like that?

-- 
Linux will do for applications what the Internet did for networks. 
- IBM, Peace, Love, and Linux
Geek Code 3.1:  GCS d? s+: a- C++ UL++$ P+ L+++ E- W--(++) N+ o+
!K w---$ O M- V? PS+ PE Y+ PGP t 5++ X+ R++ tv b+ DI D G e* h+ r y+


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

-- 
Carl Greco
[EMAIL PROTECTED]



Re: Debian with read-only /usr

2001-03-15 Thread Benjamin Pharr

At 10:22 AM 3/15/01 , you wrote:

I'm looking at NFS-mounting /usr for a largish number of machines, with the
basic idea that then I can just keep the binaries on the central server up-to
date and the workstations will all follow along with (hopefully) a minimum of
effort.  I'm a little concerned about apt, though...  I wouldn't expect it to
be very open-minded about /usr being read-only.  OTOH, I probably wouldn't
need to run apt very often on the workstations unless there's a change to
config file formats or an all-new package is being installed.

Any Debian-specific advice on running a setup like that?



Just remount it rw before you run apt.  If you only run it every couple of 
weeks that won't be a problem.


Ben



Re: Debian with read-only /usr

2001-03-15 Thread Dave Sherohman
On Thu, Mar 15, 2001 at 11:07:27AM -0600, Carl Greco wrote:
 You could always mount the `/usr' filesystem on the server as readonly
 and use the `remount' option of `mount' to remount `/usr' as writeable
 during an apt upgrade.  The other option would be to export `/usr'
 readonly, i.e., in the `/etc/exports' on the server.

I was unclear in my question...  I'm definitely planning to do a read-only
export from the server.  My concern is with how apt will behave if/when run
on the workstations, where /usr will be forced to be ro by the ro export.

Many packages include files in /var, /etc, and/or other places besides /usr,
some of which (like /etc) are not well-suited to being mounted off a common
NFS directory.  Running apt seems like the most straightforward way to get
those files installed/updated, but it will also want to change things in
/usr, but be unable to do so.

-- 
Linux will do for applications what the Internet did for networks. 
- IBM, Peace, Love, and Linux
Geek Code 3.1:  GCS d? s+: a- C++ UL++$ P+ L+++ E- W--(++) N+ o+
!K w---$ O M- V? PS+ PE Y+ PGP t 5++ X+ R++ tv b+ DI D G e* h+ r y+



Re: Debian with read-only /usr

2001-03-15 Thread Eric G. Miller
On Thu, Mar 15, 2001 at 10:22:47AM -0600, Dave Sherohman wrote:
 I'm looking at NFS-mounting /usr for a largish number of machines, with the
 basic idea that then I can just keep the binaries on the central server up-to
 date and the workstations will all follow along with (hopefully) a minimum of
 effort.  I'm a little concerned about apt, though...  I wouldn't expect it to
 be very open-minded about /usr being read-only.  OTOH, I probably wouldn't
 need to run apt very often on the workstations unless there's a change to
 config file formats or an all-new package is being installed.
 
 Any Debian-specific advice on running a setup like that?

# cat /etc/apt/apt.conf
DPkg
{
// Auto re-mounting of a readonly /usr
Pre-Invoke {mount -o remount,rw /usr;};
Post-Invoke {mount -o remount,ro /usr;};
}


-- 
Eric G. Miller egm2@jps.net



RE: Debian with read-only /usr

2001-03-15 Thread Josep Ll. Paniagua
UNSUBSCRIBE ME PLEASE!!

 -Mensaje original-
 De: Eric G. Miller [mailto:[EMAIL PROTECTED]
 Enviado el: jueves, 15 de marzo de 2001 17:52
 Para: Debian-User
 CC: Dave Sherohman
 Asunto: Re: Debian with read-only /usr
 
 
 On Thu, Mar 15, 2001 at 10:22:47AM -0600, Dave Sherohman wrote:
  I'm looking at NFS-mounting /usr for a largish number 
 of machines, with the
  basic idea that then I can just keep the binaries on 
 the central server up-to
  date and the workstations will all follow along with 
 (hopefully) a minimum of
  effort.  I'm a little concerned about apt, though...  
 I wouldn't expect it to
  be very open-minded about /usr being read-only.  
 OTOH, I probably wouldn't
  need to run apt very often on the workstations unless 
 there's a change to
  config file formats or an all-new package is being installed.
  
  Any Debian-specific advice on running a setup like that?
 
 # cat /etc/apt/apt.conf
 DPkg
 {
 // Auto re-mounting of a readonly /usr
 Pre-Invoke {mount -o remount,rw /usr;};
 Post-Invoke {mount -o remount,ro /usr;};
 }
 
 
 -- 
 Eric G. Miller egm2@jps.net
 
 
 -- 
 To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
 with a subject of unsubscribe. Trouble? Contact 
 [EMAIL PROTECTED]
 
 



Re: Debian with read-only /usr

2001-03-15 Thread Ethan Benson
On Thu, Mar 15, 2001 at 12:41:23PM -0600, Dave Sherohman wrote:
 
 I was unclear in my question...  I'm definitely planning to do a read-only
 export from the server.  My concern is with how apt will behave if/when run
 on the workstations, where /usr will be forced to be ro by the ro export.
 
 Many packages include files in /var, /etc, and/or other places besides /usr,
 some of which (like /etc) are not well-suited to being mounted off a common
 NFS directory.  Running apt seems like the most straightforward way to get
 those files installed/updated, but it will also want to change things in
 /usr, but be unable to do so.

apt itself doesn't care since it doesn't touch the filesystem except
for /var/cache/apt and /var/state/apt.   the problem comes when apt
asks dpkg to install a package, if the package has any file in /usr
(which it always will even if its only /usr/share/doc/package/*) then
dpkg will fail and the package will be broken.  

newwer versions of dpkg (may only be in CVS) i have heard have an
option to not install files in certain places, say /usr or
/usr/share.  to allow for this very situtation.  

for now pretty much your only option is this kludge:

drop to single user mode
umount /usr
apt-get
rm -rf /usr/*
mount /usr

-- 
Ethan Benson
http://www.alaska.net/~erbenson/


pgpjCaFuz8On7.pgp
Description: PGP signature