Re: netbsd-6 BETA2: raid starts after cgd.

David Brownlee <[email protected]> Wed, 11 Jul 2012 16:29:01 +0100
Newsgroups gmane.os.netbsd.devel.general,gmane.os.netbsd.general
Message-ID <CAGN_6pZVAGgC_v+W8efTT50SHiC3kY6E80BpmR5q4NZ6KSop8w@mail.gmail.com>
On 1 July 2012 16:43, David Brownlee <[email protected]> wrote:
> On 28 June 2012 18:02, Jimmy Johansson <[email protected]> wrote:
>> Hi list,
>>
>> I upgraded my old file server/backup server at home today. It runs cgd
>> ontop of two disks running as a raid 1 array. It failed and entered
>> single user with the error "cdconfig: action failed on /etc/cgd/cgd.conf
>> line 1".
>>
>> My /etc/cgd/cgd.conf looks like this:
>>
>> cgd0 /etc/raid1a
>> cgd1 /etc/raid0b
>>
>> cgd0 is where I store my files and cgd1 is my encrypted swap.
>>
>> I noticed that if I manually run "/etc/rc.d/cgd start" in single user
>> and then do "mount -a" and "swapon -a" then everything mounts as it
>> should. Due to this I concluded that this is probably because cgd is
>> started before raidframe...
>>
>> Everything seems to run as expected if I add "# BEFORE: cgd" to
>> /etc/rc.d/raidframe, which seems to support that my problem indeed is
>> that cgd is started before raidframe.
>>
>> Starting raidframe before cgd makes more sense in my opinion, because
>> I'd rather run a cgd ontop of a raid instead of a raid ontop 2 cgds.
>>
>> I'd like to finish off by saying that everything else with NetBSD 6 BETA2
>> has been smooth sailing, except for this little snag.
>
> I could see a use case either way, though I agree cgd-on-raid is
> probably more common than raid-on-cgd.
>
> Would anyone have any objections to changing the default?

Just a thought on this - have you tried setting up your raid to
autoconfigure - that should work and not need the rc.d change (plus
also be more robust as it no longer needs the raid config file)....