On Tue, Dec 05, 2000 at 03:23:23PM +0100, Simon Richter wrote: > Package: general > Severity: wishlist > > Hi, > > My usual setup is to have /usr mounted readonly and have apt remount it > r/w when it calls dpkg. This saves me about 20 minutes of fsck time, as > /usr has many small files on it. > > However, this approach only works as long as no postinst script starts a > daemon on /usr. After that, the filesystem is marked busy and cannot be > properly remounted read-only. i don't think this is true. i also keep a read-only /usr and the only time i have problems remounting it ro again after installing/upgrading packages is if i upgrade a running daemon. and the reason that happens is the daemon's file is deleted while its in use, in unix this is allowed but inode is not actually freed until the last process holding a file descriptor terminates. i think this is what you are experiencing. i have many times installed new daemons and /usr remounted ro without error, postinst script or not. you can usually find the culprit by running lsof +L1 that will show you a list of files which are open but have no links in the filesystem. note that will not tend to show anything if the file in question was a shared library, i am not entirely sure why. there is really not much debian can do to fix this, for daemons they are usually restarted in the postinst and are thus not a problem, but not always. (X for example, it would be rather rude to kill some user's X session unexpectedly) in the case of libraries it is not reasonable/possible to kill every process that was using the old library. -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgpF6UFM8VbDE.pgp
Description: PGP signature