On Thu, May 9, 2013 at 11:25 PM, Bruce Dubbs <[email protected]> wrote:

> Arthur Radley wrote:
> > On Thu, May 9, 2013 at 5:18 PM, Markku Pesonen <[email protected]>
> wrote:
> >
> >>
> >> I think this is caused by some change in util-linux-2.22 umount code (if
> >> I remember correctly). In /etc/rc.d/init.d/mountfs there is the
> >> following line:
> >> umount -a -d -r -t notmpfs,nosysfs,nodevtmpfs,noproc >/dev/null
> >> Despite using the -r option, umount does not remount the root filesystem
> >> in read-only mode during shutdown like it used to. Adding this command
> >> after that line fixed things for me:
> >> mount -n -o remount,ro /
> >>
> >>
> > Okay. I added that line to /etc/rc.d/init/mountfs. Recapping, the boot
> > messages before I did that...
> >
> > [    3.412320] EXT4-fs (sda1): INFO: recovery required on readonly
> > filesystem
> > [    3.412385] EXT4-fs (sda1): write access will be enabled during
> recovery
> > [    3.688323] EXT4-fs (sda1): recovery complete
> > [    3.704672] EXT4-fs (sda1): mounted filesystem with ordered data mode.
> > Opts: (null)
> > [    3.704774] VFS: Mounted root (ext4 filesystem) readonly on device
> 8:1.
> >
> > And afterwards, no spew about recovery being required, completed, or
> write
> > access during recovery. Only...
> >
> > [    3.429281] EXT4-fs (sda1): mounted filesystem with ordered data mode.
> > Opts: (null)
> > [    3.429378] VFS: Mounted root (ext4 filesystem) readonly on device
> 8:1.
> >
> > I think I like that better.
> >
> > But a small amount of additional explanation of what was and is now
> > happening would be appreciated. I accept out-of-hand the explanation that
> > before, my root filesystem was not being remounted read-only during
> > shutdown or reboot. It's just that I still wonder what state or condition
> > required recovery before, what was being done about it, and why it is no
> > longer required after adding the command to remount the root filesystem
> ro
> > at shutdown and reboot.
>
> OK, I'll look at adding that line to the stop portion of mountfs.
>
> What happens after the umount is running the localnet and halt scripts
> which amounts to
>
> ip link set lo down
> halt -d -f -i -p
>
> but localnet are does:
> log_info_msg "Bringing down the loopback interface..."
>
> which writes to /run/var/bootlog (a tmpfs that is not umounted).  One
> thing I can think of that would 'corrupt' the root fs is the system
> trying to update an access time for the files used.
>
> The only other thing is that the umount is just not syncing status
> properly and just not working.  The explicit remount read-only should
> ensure the disk is clean at shutdown.
>
>    -- Bruce
>
>
Sort of for the record and FWIW, I still have a minimal LFS 7.2 system that
I use for off-line maintenance, backing up, etc. It has util-linux-2.21.2.
None of this stuff is going on with that system.
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to