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 don’t know if it’s just me or if everyone else experiencing
problems with your website. It appears like some
of the text in your content are running off the screen. Can somebody else please provide feedback and
let me know if this is happening to them too? This could be a problem with my browser because I’ve
had this happen previously. Kudos
This website certainly has all of the info I needed concerning this subject
and didn’t know who to ask.
I think that what you wrote made a great deal of sense.
But, what about this? what if you added a little content?
I mean, I don’t want to tell you how to run your website, but suppose you added
something to possibly get a person’s attention? I mean Резервирование с помощью CARP | oioki.ru is kinda
vanilla. You should peek at Yahoo’s home page and watch how they create post titles to grab people to click.
You might add a video or a pic or two to grab people excited about what you’ve got to say.
Just my opinion, it would make your posts a little bit
more interesting.
What’s up, its fastidious piece of writing concerning media print,
we all be aware of media is a impressive source of data.
With havin so much content do you ever run into any problems of plagorism or copyright infringement?
My site has a lot of exclusive content I’ve either written myself or outsourced but it
seems a lot of it is popping it up all over the internet
without my authorization. Do you know any techniques to help stop content
from being ripped off? I’d definitely appreciate it.
Hi to every , for the reason that I am genuinely keen of reading this website’s post to be updated on a
regular basis. It contains nice material.
Asking questions are truly pleasant thing if you are not understanding anything fully, except this post provides good understanding yet.
I am regular reader, how are you everybody? This post posted at this website is genuinely
nice.
It’s remarkable in favor of me to have a site, which is helpful for my know-how.
thanks admin
First of all I would like to say fantastic blog! I had a quick question in which I’d like to ask if you don’t mind.
I was curious to know how you center yourself and clear
your mind prior to writing. I have had trouble clearing my thoughts in getting my thoughts out.
I truly do take pleasure in writing however it just
seems like the first 10 to 15 minutes tend to be lost simply just trying to figure out how to
begin. Any recommendations or tips? Thank you!
Good answers in return of this question with genuine arguments and telling everything
on the topic of that.
Hi there everyone, it’s my first go to see at this site, and post is actually fruitful
for me, keep up posting such content.
If some one wants expert view on the topic of running a
blog after that i suggest him/her to pay a quick visit this
web site, Keep up the good work.
Good replies in return of this difficulty with genuine arguments
and describing the whole thing on the topic of that.
It’s going to be finish of mine day, except before
finish I am reading this fantastic piece
of writing to improve my know-how.
Great article.
Fine way of explaining, and pleasant piece of writing to take information about my presentation subject, which i am going
to convey in college.
I have read so many content about the blogger lovers
however this article is really a good piece of writing, keep
it up.
For most up-to-date information you have to pay a visit the web and on the web I found
this site as a finest web page for newest updates.
It’s enormous that you are getting thoughts from this post as well as from our dialogue
made at this place.
Awesome! Its really remarkable paragraph, I have got much clear idea about from this piece of
writing.
This is my first time pay a visit at here and i am truly happy to read
everthing at alone place.
Pretty element of content. I simply stumbled upon your website and in accession capital to assert that I get actually enjoyed account your
blog posts. Anyway I’ll be subscribing in your feeds or
even I achievement you get right of entry to persistently fast.
Why people still make use of to read news papers
when in this technological globe all is available on net?
This piece of writing is in fact a good one it assists new net
viewers, who are wishing in favor of blogging.
Hmm it looks like your website ate my first comment (it was extremely long) so I guess I’ll just sum it
up what I wrote and say, I’m thoroughly enjoying your blog.
I as well am an aspiring blog writer but I’m still new to everything.
Do you have any helpful hints for beginner blog writers?
I’d definitely appreciate it.
No matter if some one searches for his required thing, so he/she needs to be available that in detail, therefore that thing is maintained over here.
A fascinating discussion is definitely worth comment.
I think that you need to write more about this issue, it may not be a
taboo subject but generally folks don’t speak
about these issues. To the next! Kind regards!!
important review. Aside from that visit the top site which have been enjoyed slot online pulsa.
Great site has received great reputation along with judi slot gaming participants
in Negara sendiri. Truth be told there are usually a great deal
of very helpful promos really should anyone ever previously join in this article.
fantastic put up, very informative. I wonder why the other specialists
of this sector don’t understand this. You must proceed
your writing. I’m confident, you’ve a huge readers’ base already!
Very rapidly this web page will be famous amid all blogging and site-building visitors, due to
it’s nice articles
It’s enormous that you are getting thoughts from this paragraph as well as from
our argument made at this place.
Thanks for finally writing about > Резервирование с помощью CARP | oioki.ru
< Liked it!
Hi there Dear, are you really visiting this web site regularly, if so afterward you will definitely obtain pleasant knowledge.
What’s up everyone, it’s my first go to see at this site, and
piece of writing is in fact fruitful designed for me, keep
up posting these content.
This paragraph provides clear idea designed for the new people of blogging,
that truly how to do blogging.
What i do not realize is in reality how you are no longer actually a lot more neatly-appreciated than you might be
now. You are very intelligent. You know thus considerably in the case of this topic, produced me for
my part believe it from a lot of varied angles. Its
like men and women are not interested until it is one
thing to accomplish with Girl gaga! Your personal stuffs excellent.
Always maintain it up!
I am regular visitor, how are you everybody? This paragraph posted at this web site is truly pleasant.
Thanks for finally writing about > Резервирование с помощью CARP | oioki.ru < Liked it!
What’s up mates, its wonderful article concerning educationand fully explained, keep it up all the time.
What’s Happening i am new to this, I stumbled upon this I’ve discovered It
absolutely useful and it has helped me out loads.
I am hoping to contribute & assist different customers like its
aided me. Great job.
If you are going for finest contents like myself,
only pay a quick visit this web site everyday since it
gives quality contents, thanks
I am really happy to glance at this web site posts which consists of tons of helpful information, thanks for providing these kinds of information.
whoah this weblog is wonderful i love studying your posts.
Keep up the good work! You realize, many people are looking round
for this info, you can aid them greatly.
If some one wishes expert view on the topic of running a blog afterward i suggest him/her to pay a visit this
blog, Keep up the good job.
This piece of writing will help the internet viewers for building up new web
site or even a weblog from start to end.
I think that is one of the so much vital info for me.
And i’m satisfied studying your article. But want to remark on few general issues, The site style is perfect, the
articles is in reality great : D. Just right task, cheers
It’s wonderful that you are getting ideas from this post as well as
from our discussion made at this time.
Hello, of course this piece of writing is in fact fastidious and I
have learned lot of things from it on the topic of blogging.
thanks.
If you are going for finest contents like myself,
simply pay a visit this web page every day as
it provides feature contents, thanks