Subject: Re: cgd: booting unattended (without it)
To: None <port-i386@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: port-i386
Date: 01/23/2007 10:15:24
On Sun, 21 Jan 2007, Anne Bennett wrote:
> *** QUESTION #1: It is a bug that "fsck -p" tries to read /dev/rcgd0a
> when cgd0 is not configured?
How would fsck know that cgd0 is not configured?
It should try to open /dev/rcgd0a, and the open should fail.
(I would probably put a zero in the passno column in fstab to mark the
file system as not to be checked by "fsck -p".)
> *** QUESTION #2: Is the idea of modifying cgdconfig to allow a
> timeout, or of modifying /etc/rc.d/cgd to check
> for user presence before trying cgdconfig, of
> interest? If the consensus is yes, I can submit
> a PR to that effect, but if the consensus is that
> this is not a good idea, I won't bother the good
> folks who receive and process PRs.
Yes, I think so.
> Now, to continue, I have two choices:
>
> (a) Just turn off fsck for the cgd filesystems in fstab, and hope
> for the best, or, as I had originally thought:
>
> (b) Make the relevant filesystem(s) "noauto" in fstab, and add an
> rc script to (fsck and) mount those filesystems only if it can
> be determined that the cgd was configured (not sure yet how
> to do that). [...]
I suggest another option:
Put noauto in the options column in fstab, so "mount -a" doesn't
mount it. Put 0 in the passno column in fstab, so "fsck -p" doesn't
check it. Add your own script to do the whole cgdconfig/fsck/mount
dance.
> *** QUESTION #3: It is a bug that "fsck -p" tries to fsck a filesystem
> which has the "noauto" option?
I don't think so. noauto is for mount, not for fsck.
> Uh-oh; I just tried to "shutdown -r", and saw this:
>
> unmounting filesystems... done
> panic: wdc_exec_command: polled command not done
> Stopped in pid 179.1 (reboot) at netbsd:cpu_Debugger+0x4: leave
> [...]
> Is this because I failed to unmount my "noauto" cgd filesystem?
No, I think it's some other bug.
--apb (Alan Barrett)