CARP – протокол, позволяющий задействовать один IP-адрес для нескольких машин в сети. Таким образом можно реализовать отказоустойчивость (избыточность) и масштабирование (увеличение нагрузки). Пусть у нас имеется два сервера с собственными ip-адресами – 10.0.0.2 и 10.0.0.3, и хочется дополнительно настроить общий адрес 10.0.0.1, который предоставляет какой-либо сервис пользователям (к примеру, маршрутизация или DNS). Инструкция по использованию технологии CARP под катом.
Ядро
Первым делом собираем свое ядро. Скачиваем исходники
sysinstall
Выбираем Configure – Distributions – src, отмечаем галочкой base и src.
Настраиваем конфиг ядра, кладем его в /root/kernels и компилируем. Проделываем эти действия на обоих серверах.
# cd /usr/src/sys/i386/conf # mkdir -p /root/kernels # cp GENERIC /root/kernels/CARP # ln -s /root/kernels/CARP # vim CARP device carp # cd /usr/src # make buildkernel KERNCONF=CARP # make installkernel KERNCONF=CARP # vim /etc/sysctl.conf net.inet.carp.preempt=1
Настраиваем carp-интерфейс на основном сервере:
# vim /etc/rc.conf cloned_interfaces="carp0" ifconfig_carp0="vhid 1 pass secretpassword advskew 0 10.0.0.1/24"
На запасном сервере:
# vim /etc/rc.conf cloned_interfaces="carp0" ifconfig_carp0="vhid 1 pass secretpassword advskew 100 10.0.0.1/24"
Объединяемые интерфейсы должны обладать одинаковыми параметрами vhid и pass. Параметр advskew отвечает за приоритет. Чем меньше – тем “главнее” будет интерфейс. Когда интерфейс с наименьшим advskew упадет, главным (т.е. MASTER) станет интерфейс со вторым по значению параметром advskew.
Перезагружаемся. Пробуем вытащить кабель из основного сервера. Радуемся, если все продолжает работать.
Также с помощью CARP можно создавать высокопроизводительные кластеры. Об этом, а также о том, как запускать сервисы по подъему CARP, в следующий раз.
I know this web site presents quality dependent content and extra material, is there any other
site which presents such things in quality?
Piece of writing writing is also a fun, if you be familiar with
then you can write otherwise it is complex to write.
It’s going to be ending of mine day, except before ending I am reading this enormous article to improve my
experience.
What’s up, everything is going sound here and ofcourse every
one is sharing facts, that’s really fine, keep up writing.
Every weekend i used to visit this site, for the reason that i
wish for enjoyment, since this this site conations in fact pleasant funny data too.
Excellent blog right here! Also your site so much up fast!
What web host are you using? Can I am getting your
affiliate link to your host? I desire my website
loaded up as quickly as yours lol
You could definitely see your enthusiasm in the work you write.
The world hopes for more passionate writers such as you who aren’t afraid to mention how they believe.
All the time go after your heart.
You could definitely see your enthusiasm within the article you write.
The world hopes for even more passionate writers like you who are not afraid to mention how they believe.
All the time follow your heart.
Every weekend i used to visit this website, because i wish for enjoyment, as this this website
conations genuinely pleasant funny material too.
Hi there to every body, it’s my first pay a quick visit of this
webpage; this web site consists of remarkable and actually excellent data for visitors.
It’s an remarkable paragraph in favor of all the online people; they will take benefit from it I
am sure.
If some one desires to be updated with most recent technologies
then he must be visit this web page and be up to date daily.
really interesting review. At the same time visit the complete site that could be gamed game slot.
These pages has received identification from agen slot
deposit pulsa casino males and females in Dalam negeri. Certainly, there are
usually numerous attractive promos if you happen to join at the moment.
Yes! Finally something about https://www.pinterest.com/sizeowner57/.
I believe that is one of the so much important information for
me. And i’m glad studying your article. However should commentary on few common things, The
site style is perfect, the articles is in reality excellent : D.
Just right activity, cheers
I am truly glad to glance at this weblog posts which
includes lots of useful data, thanks for providing these
kinds of data.
I do not know whether it’s just me or if everybody else encountering
problems with your blog. It seems like some of the written text within your posts are running off the screen. Can somebody else please comment and let me know if this is happening to them as well?
This may be a problem with my web browser because I’ve had this happen before.
Cheers
I read this article completely about the difference of
newest and preceding technologies, it’s remarkable article.
I am regular visitor, how are you everybody?
This paragraph posted at this web page is in fact fastidious.
Hi, after reading this remarkable piece of writing i am too cheerful to share my experience here with colleagues.
It’s an remarkable piece of writing designed for all the online viewers;
they will get benefit from it I am sure.
really interesting review. Furthermore visit my own, personal, personal site to understand slot via pulsa.
The following incredible web page has received track record by using slot pulsa gambling house levels of competition in Dalam negeri.
There are actually plenty of handy promos in the event you join lately.
I really like looking through a post that can make people
think. Also, thanks for allowing for me to comment!
Its not my first time to visit this website, i am browsing this site
dailly and take pleasant data from here everyday.
whoah this weblog is excellent i like reading your posts.
Keep up the good work! You already know, many people are hunting around for
this information, you can help them greatly.
Hi there everyone, it’s my first pay a visit at this web site, and article is in fact fruitful in support of me, keep up posting these content.
necessary review. Also visit this site which might be played out slot deposit pulsa tanpa
potongan. This website has received status out of slot on line
casino customers in Negara sendiri. Truth be told there are actually many appealing promos because you join nowadays.
This is my first time pay a quick visit at here and i am genuinely impressed to read all at alone place.
It’s an awesome post designed for all the internet visitors;
they will take benefit from it I am sure.
Hi, its good piece of writing about media print, we all understand media is
a impressive source of information.
great post, very informative. I’m wondering why the other experts of this sector don’t understand this.
You must continue your writing. I am sure, you’ve a huge readers’ base already!
Please let me know if you’re looking for a writer for your site.
You have some really great articles and I believe I would be a
good asset. If you ever want to take some of the load off, I’d absolutely love to write some
articles for your blog in exchange for a link back to
mine. Please blast me an e-mail if interested. Thank you!
For newest information you have to go to see internet and on world-wide-web I found this
web page as a best web site for most recent updates.
really interesting review. Additionally visit typically
the site to appreciate situs slot online. This great
web page has received fine reputation by using agen slot deposit pulsa gaming people in Dalam negri.
Generally there are usually plenty of desired promos should you ever join currently.
fascinating review. Moreover visit typically
the site to apply slot. This particular web site has received detection having
slot deposit pulsa tanpa potongan gambling house people
in Dalam negeri. At this time there tend to be numerous amazing promos if
you ever join at this point.
Hey this is somewhat of off topic but I was wondering
if blogs use WYSIWYG editors or if you have to
manually code with HTML. I’m starting a blog soon but have no coding know-how so I wanted to get
guidance from someone with experience. Any help would be enormously appreciated!
Hello There. I discovered your blog using msn. This is a
really smartly written article. I’ll make sure to bookmark it and come back to read more of your
helpful info. Thanks for the post. I will definitely return.
Every weekend i used to pay a visit this web site, as i
want enjoyment, as this this site conations actually nice funny
information too.
For most up-to-date information you have to visit world wide web and on web
I found this website as a finest site for most up-to-date updates.
Thanks , I have just been looking for information approximately this topic for a while and yours is the best I have found out till now.
However, what in regards to the bottom line? Are you certain about the supply?
Very shortly this web page will be famous amid all blog people, due to it’s good articles
Wow! At last I got a weblog from where I can in fact get valuable facts concerning
my study and knowledge.
Hello, I desire to subscribe for this website to take newest updates,
so where can i do it please help out.
What i do not understood is if truth be told how you’re
not really a lot more neatly-appreciated than you might be now.
You’re so intelligent. You know thus considerably relating
to this subject, made me personally imagine it from so many numerous
angles. Its like women and men don’t seem to be involved until it’s one thing to accomplish with Girl gaga!
Your own stuffs outstanding. At all times handle
it up!
Thanks for every other wonderful article. Where else could anybody get that kind of info in such an ideal manner of writing?
I’ve a presentation subsequent week, and I’m on the look for such info.
Asking questions are really nice thing if you are not understanding
something completely, however this post gives nice understanding yet.