Gentoo Archives: gentoo-user

From: Michael Morak <michael.morak@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ro /
Date: Thu, 12 Jan 2017 09:07:30
Message-Id: CAPrF67DQcB2=OSpv_mY57qiRrvdX7AJQZq3mgKgTwWdqKZjedg@mail.gmail.com
In Reply to: [gentoo-user] ro / by Jorge Almeida
1 Hi,
2
3 I have a similar setup. The problem is that some of your services may still
4 have open handles on files that no longer exist after updating (i.e. the
5 service, when originally started, opened an .so library file that it needs
6 to run, but the file then gets deleted or replaced during the emerge -u).
7 Simply restart all services (and other running programs) that have locks on
8 files that were updated.
9
10 The reason those files do not show up in your lsof command is that they may
11 not be open for writing but only for reading. A read lock on a file may
12 still give you the "/ is busy" message, since the open-for-read file cannot
13 be (fully) deleted while a running application still has a lock on it. You
14 have to get the process to release the read lock on the file (which, for
15 libraries, is usually done by a restart).
16
17 Hope this helps.
18
19 Cheers,
20 Michael
21
22 On 11 January 2017 at 22:54, Jorge Almeida <jjalmeida@×××××.com> wrote:
23
24 > I have my / partition mounted read-only. It works fine, /var is in a
25 > different partition, as well as /usr/portage. Of course, I have to
26 > remount / rw when emerging packages.
27 >
28 > The problem is that, more often than not, I cannot remount ro after
29 > emerging ("/ is busy").
30 > I tried "lsof / | awk '$4 ~ /[0-9].*w/'" and the only files that are
31 > open for writing are FIFOs, which are associated with services I put
32 > there myself and should be there ( and were there before emerging,
33 > anyway...) IOW, no file is unexpectedely open for writing in /.
34 >
35 > I suspect something related with updated libraries (old versions kept?).
36 > I tried logging out. The problem persists after logging in in a getty,
37 > with no X process active.
38 >
39 > I'm updating the system with
40 > emerge -NDu world
41 >
42 > and then
43 > emerge @preserved-rebuild
44 >
45 > Maybe I'm missing something obvious re updating?
46 >
47 > Ideas, similar experiences?
48 >
49 > Thanks
50 >
51 > Jorge Almeida
52 >
53 >

Replies

Subject Author
Re: [gentoo-user] ro / Dale <rdalek1967@×××××.com>
Re: [gentoo-user] ro / Jorge Almeida <jjalmeida@×××××.com>