This is a discussion on /usr busy after aptitude operations? within the Debian Linux Users forum forums, part of the Debian Linux category; --> On Sat, May 10, 2008 at 09:59:09AM +0200, Sven Joachim wrote: > The filesystem has to be written to ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Sat, May 10, 2008 at 09:59:09AM +0200, Sven Joachim wrote: > The filesystem has to be written to after the inodes are freed, i.e. > the offending process that kept them open has exited. You would end > up with inodes that have a link count of 0, i.e. lost space on the > device, if the system would not do that. Turns out you're right on the money: http://lists.debian.org/debian-devel...ads.html#00212 http://www.debian.org/doc/manuals/se...to/ch4.en.html so I decided to go with this: Dpkg::Pre-Invoke { "/bin/mount -o remount,rw /usr"; "/bin/mount -o remount,rw /boot"; "/bin/mount -o remount,exec /tmp"; }; Dpkg::Post-Invoke { "/bin/mount -o remount,ro /usr || echo 'Warning: /usr is busy: try killing X'"; "/bin/mount -o remount,ro /boot"; "/bin/mount -o remount,noexec /tmp"; }; At least now it attempts to remount ro, and gives a sensible error if it can't without causing apt to stop processing. -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks" -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
| |||
| On Sun, May 11, 2008 at 11:03:26AM -0700, Todd A. Jacobs wrote: > On Sat, May 10, 2008 at 07:36:34PM -0400, Douglas A. Tutty wrote: > > > When you mount the filesystem, are all the standard options active or > > do you mount it noatime? I don't know if it matters. > > I'm mounting it with relatime. Mount says: > > /usr type xfs (rw,relatime,barrier,logbufs=8) > > I'm not sure why that should matter, though. > > > What happens if you do the remounting pre/post manually instead? > > $ sudo mount -o remount,ro /usr > mount: /usr is busy > > Since I can't do it manually, I'm not surprised it can't be done by apt, > but some of the questions people are asking make me wonder if it's an > interaction between XFS and apt, or if it's a problem with ext3 as well. > I have no way to test it; maybe someone else can chime in on that. > > > I used to have /usr and /boot mounted ro routinely in Sarge with no > > problem. > > Me, too, which is why this is annoying me tremendously. I just su - , and ran: # mount -o,ro,remount /usr then ran # mount and saw that /usr was mounted ro, then ran # mount -o,rw,remount /usr and had it remounted rw, no problem. Doug. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
| |||
| On Sun, May 11, 2008 at 08:53:06PM -0400, Douglas A. Tutty wrote: > On Sun, May 11, 2008 at 11:03:26AM -0700, Todd A. Jacobs wrote: > > On Sat, May 10, 2008 at 07:36:34PM -0400, Douglas A. Tutty wrote: > > > > > When you mount the filesystem, are all the standard options active or > > > do you mount it noatime? I don't know if it matters. > > > > I'm mounting it with relatime. Mount says: > > > > /usr type xfs (rw,relatime,barrier,logbufs=8) > > [snip] seeing as the original question was about running apt (aptitude), why not set up an alias for apt or aptitude like so TMP=/var/tmp aptitude or find some other sutable location which has exec or rw access' I realise this doesn't help with remounting /usr or /... as rw > > Doug. > > > -- > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org > > -- "We're working with Chancellor Schröder on what's called 10-plus-10-over-10: $10 billion from the U.S.,$10 billion from other members of the G7 overa 10-year period, to help Russia securitize the dismantling -- the dismantled nuclear warheads." - George W. Bush 05/23/2002 Berlin, Germany -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIJ7e2kZz88chpJ2MRAgp9AJ0SH+INyaARBHN54wniwx +9y4BIfwCg8Sef 04QwxSzW/QNyGqallpFTMBI= =fNY1 -----END PGP SIGNATURE----- |
| ||||
| On Sun, May 11, 2008 at 08:53:06PM -0400, Douglas A. Tutty wrote: > and had it remounted rw, no problem. Right. It only locks when unlinked files are in use do to a running application during an upgrade. This is mostly a userland problem, I think, since most daemons are restarted by their installation scripts during upgrades. -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks" -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |