Re: -o remount,ro /

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Mon, 9 May 2016 08:25:48 +0200

On 09/05/2016 08:09, Eric Vidal wrote:
> I have a little trouble for remount the root-filesystem during PID 2
> proccess.Error message is : / is busy. I suspect that error is due of
> s6-rc proccess which have "read/write access".

  No. s6-rc doesn't open anything for writing on the root filesystem.
  Unless, of course, you don't have a separate /run (or otherwise
mounted writable filesystem that is hosting s6-rc's live directory.)

  Make sure your live directory is on a mounted writable filesystem,
typically a tmpfs.


> I can remount / with ro options then make an fsck then remount again
> / with rw options during PID 1 but is not a good solution for me. I
> would like to make it on pid 2.

  You probably mean stage 2, not pid 2. (pid 2 has no special meaning; and
on Linux, it's often kthreadd.)

  You can use lsof to identify what process is keeping a rw fd on your
root filesystem, and configure it not to do that. If you find that the
culprit is indeed s6-rc, then you are not hosting the live directory on a
tmpfs and that's what you should fix.

  Note that booting with / rw, then remounting it ro for a fsck, then
remounting it rw again, is useless and wasteful. You should boot with / ro
directly, and only remount it rw when you really need it rw.

-- 
  Laurent
Received on Mon May 09 2016 - 06:25:48 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC