According to nilfs2 mount behaviour, IMHO good idea to change in "root" init script: mount -n -o remount,rw / to mount -n -o remount,rw / && mount -f -o remount / mount.nilfs2 not start garbage collector daemon in "-n" and recommend (man mount.nilfs2) to do "-f" after it. Also IMHO it must be compatibe with any other fs. If no, sys-fs/nilfs-utils must install own init script (also remind to bump/clone v2.0.20 of nilfs-utils). PS I not use baselayout-2, but FYI for it too. Reproducible: Always
Created attachment 249326 [details, diff] sys-fs/nilfs-utils althernative
Created attachment 249338 [details, diff] sys-fs/nilfs-utils althernative This variant check for "fsck_on_battery" option in /etc/conf.d/fsck & AC power state before forcing nilfs2_cleanerd.
According to last patch/ideas, I want to readdress this bug to "ebuilds" - sys-fs/nilfs-utils only and do not fix /etc/init.d/root.
yes, we're not going to special case any rootfs type in baselayout
(In reply to comment #4) > yes, we're not going to special case any rootfs type in baselayout I would like to note that while adding a special /etc/init.d script to nilfs-utils ebuild might be a right thing to do given the effort, doing mount -f -o remount / is NOT a special treating of an esoteric rootfs and should be done for ANY rootfs and (with appropriate changes) for ANY fs mounted prior to /etc/mtab is made writable. While this is really a minor issue, the wrong thing about /etc/init.d/mtab (which is used instead of mount -f in Gentoo) is that the info otherwise put by mount helpers to /etc/mtab is lost (assuming /etc/mtab is an ordinary file). In case of nilfs2 this is gcpid=, in case of nfs this is user=.
@base-system, what do you think about comment #5? In old baselayout we had something like: # Add the entry for / to mtab mount -f / http://sources.gentoo.org/cgi-bin/viewvc.cgi/baselayout/trunk/init.d/checkroot?diff_format=s&revision=3019&view=markup&pathrev=3019 I guess this should fix this problem, but what do you think? Is it worth to add this hack into /etc/init.d/mtab?
And exactly same discussion in archlinux: https://bugs.archlinux.org/task/22523 What's interesting there, that current solution they are going to implement is to remove '-n' option from mount command line as they "never write to /etc/mtab anyway".
Created attachment 347990 [details] 0001-Start-garbage-collector-for-nilfs2-as-root-fs.patch @openrc: please, review patch. Personally I don't see why can't we use `mount -f /` to add entry into mtab and as a side effect have this bug fixed.
Comment on attachment 347990 [details] 0001-Start-garbage-collector-for-nilfs2-as-root-fs.patch Well I need better test patch. I'll try another time later.
Guys, is this bug reproducible with sys-fs/nilfs-utils-2.1.5-r1? I guess that libmount changes could fix this issue as well.