Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176843 - sys-fs/quota makes the boot sequence freeze when RC_PARALLEL_STARTUP="yes" and optional quotacheck is enabled
Summary: sys-fs/quota makes the boot sequence freeze when RC_PARALLEL_STARTUP="yes" an...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-02 18:50 UTC by Lénaïc Huard
Modified: 2007-10-15 11:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lénaïc Huard 2007-05-02 18:50:53 UTC
Hello,

I've activated quota on /var and put quota in the boot runlevel.

When the Gentoo boots, the /etc/init.d/quota script starts quotacheck which scans my /var partition. But before scaning, quotacheck remounts the partition /var in read-only mode.
As I have set RC_PARALLEL_STARTUP="yes" in /etc/conf.d/rc, the init scripts process tries to start some other init scripts and some other init scripts might finish while quotacheck is running.
And it seems that some logistic files (like locks for ex. or /var/run/*.pid files) must be written in /var when an init script is started/finished.
And as my /var had been remounted in read-only mode by quotacheck, it failed.
It totally frozzen the boot sequence and even Ctrl-Alt-Suppr didn't work.

A solution might be telling quotacheck not to remount the filesystem read-only with the -m parameter. But the manpage tells to use this option only when we are sure that no write access will be done during the scan.

Maybe the cleanest way of solving that issue would be to add a new 'exclusive' keyword in the depend section of an ebuild which would force that script to be run alone which no concurrent script running even when the parallel startup feature has been enabled.

PS: This issue is similar to the bug report #148485

BRgds.

Reproducible: Always

Steps to Reproduce:
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-07-09 22:30:07 UTC
Sounds like the dependecy in /etc/init.d/quota needs to be changed from "need localmount" to "before localmount".

That will probably only work for baselayout-2.
I don't have any quota stuff myself, so care to try this out?
Comment 2 Lénaïc Huard 2007-07-10 22:27:48 UTC
Hello,

I tried to replace "need localmount" by "before localmount" in /etc/init.d/quota. But it didn't help.

The system still freezes with following error messages:
ln: creating symbolic link `/var/lib/init.d/started/net.lo': Read-only file system
rm: cannot remove `/var/lib/init.d/starting/net.lo': Read-only file system
/lib/rcscripts/sh/rc-services.sh: line 342: /var/lib/init.d/exitcodes/net.lo: Read-only file system
etc.

But I'm not using baselayout-2.
I'm still in baselayout-1.12.9-r2.

But, as the problem comes from the fact that quotacheck remounts my /var in read-only mode and that rc scripts require write access in /var/lib/init.d, I found a solution:
I can activate RC_PARALLEL_STARTUP="yes" while quotacheck is enabled at startup by setting svcmount="yes".
The consequence is that /var/lib/init.d remains writable while quotacheck is running on /var !
So I haven't any freeze of the rc scripts any more.
But there still might be a problem if a script try to write a /var/run/*.pid file for example while quotacheck is running.
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-07-10 22:39:14 UTC
(In reply to comment #2)
> But I'm not using baselayout-2.
> I'm still in baselayout-1.12.9-r2.

Yeah, you'll need baselayout-2 for that to work.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-10-15 11:32:22 UTC
Closing, use baselayout-2.