Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Mysterious silent remount / ro
Date: Mon, 18 Mar 2019 14:54:58
Message-Id: 1584382.z8MYkOrYAY@peak
In Reply to: Re: [gentoo-user] Mysterious silent remount / ro by Mick
1 On Sunday, 17 March 2019 17:15:26 GMT Mick wrote:
2 > On Sunday, 17 March 2019 17:05:58 GMT Grant Taylor wrote:
3 > > On 3/17/19 10:48 AM, Peter Humphrey wrote:
4 > > > My little Atom box has a small rescue system which I boot once a week
5 > > > to back up the main system. The backup script is a simple list of bash
6 > > > commands to mount partitions and tar them to a USB disk.
7 > >
8 > > Please share a copy of the backup script.
9
10 I've found the problem. I wrote the script many years ago, before cgroups were
11 invented, and more recently my script was unmounting /sys/fs/cgroup/ along
12 with the real partitions. I can't begin to imagine what chaos that would
13 cause, but having squashed the bug I don't see the self-unmounting any more.
14
15 The script starts with everything but the root filesystem unmounted, then
16 mounts one partition at a time to tar it to a USB disk. The problem was a
17 side-effect of the way I was first unmounting everything (don't ask).
18
19 Sorry about the noise. It did cause me to look more carefully though.
20
21 > > > While the backup is running I run another script to clean up after
22 > > > any recent update, which involves removing surplus packages, running
23 > > > eclean etc.
24 > >
25 > > Please share a copy of your cleanup script.
26 > >
27 > > > But! At least once per session I have to remount the root filesystem
28 > > > read-
29 > > > write because something, presumably tar, has caused it to be remounted
30 > > > read- only.
31 > >
32 > > "tar" itself shouldn't alter mounts at all.
33 > >
34 > > It is possible that there could be a mount option that causes the file
35 > > system to be remounted read-only if there is a problem accessing the
36 > > file system.
37 > >
38 > > > Where do I start tracking this down? This behaviour was a factor in
39 > > > my suspecting an SSD failure, but I've replaced that and still get the
40 > > > same remounting.
41 > >
42 > > But such remounting is not likely on a new SSD.
43 >
44 > Yes, it would be unlikely.
45 >
46 > > I'd need to see the scripts to even hazard a guess as to what might be
47 > > happening.
48 >
49 > Also, in your previous thread you mentioned you were about to run memtest to
50 > discard the possibility of a faulty RAM. Did you run it overnight and what
51 > did you get?
52
53 After fixing my backup script I did run memtest through a few cycles, but it
54 didn't find anything wrong.
55
56 --
57 Regards,
58 Peter.