Re: CARP on -CURRENT
On Fri, Feb 3, 2012 at 1:35 AM, Andrew Hobbs <andrew.hobbs@ai.net> wrote:
>> On 2 February 2012 04:26, Andrew Hobbs <andrew.hobbs@ai.net> wrote:
>> > I much appreciate the responses and I was able to get CARP functioning
>> > using the new ifconfig syntax under -CURRENT. Having done that, CARP
>> > is now acting as it should, though now I have a new challenge with
>> > devd and automatic firing of scripts during CARP failover. It appears
>> > that the documented method of doing this at
>> > http://www.freebsd.org/doc/handbook/disks-hast.html no longer works
>> > with the suggested devd.conf setup; notify 30 {
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" "IFNET";
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" "carp0";
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "type" "LINK_UP";
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0action "/usr/local/sbin/carp-hast-switch ma=
ster"; };
>> >
>> > notify 30 {
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" "IFNET";
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" "carp0";
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0match "type" "LINK_DOWN";
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0action "/usr/local/sbin/carp-hast-switch sl=
ave";
>> >
>> > Is it likely that the triggers associated with CARP for devd have chan=
ged due to the recent new CARP overhaul? Does anyone know what the new trig=
gers may be?
>> >
>>
>> You will need to change this to something like (as taken from man carp):
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "system" =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0"CARP";
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "subsystem" =C2=A0 =C2=A0 =C2=A0=
"[0-9]+@";
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match "type" =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0"(MASTER|BACKUP)";
>>
>> The subsystem now is generated as
>> snprintf(subsys, IFNAMSIZ+5, "%u@%s", sc->sc_vhid, sc->sc_carpdev->if_xn=
ame);
> Thanks for the info. I was able to get the triggers firing from devd. I a=
lso noticed that the man page on 'carp' references a "carpcontrol.sh" scrip=
t as an action. Has this script been prototyped anywhere yet?
Mind posting the devd.conf entries you are using? Maybe submitting a
docs PR with them included, to update the HAST page?
Thanks. I haven't played with HAST and the new CARP code yet.
--=20
Freddie Cash
fjwcash@gmail.com
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 5 之 6 篇):