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, в следующий раз.
Really when someone doesn’t be aware of after that its up to other people
that they will assist, so here it takes place.
What’s up, every time i used to check blog posts here early in the dawn, because i love to gain knowledge
of more and more.
I don’t even know the way I finished up right here, but I assumed this put up was once
great. I don’t understand who you might be however definitely you’re going to a famous
blogger if you happen to aren’t already. Cheers!
I read this post fully about the comparison of most up-to-date and preceding technologies, it’s awesome article.
I delight in, result in I discovered just what I used to be having a look for.
You’ve ended my 4 day long hunt! God Bless you
man. Have a nice day. Bye
Hi there friends, pleasant article and good urging commented at this place,
I am in fact enjoying by these.
I am actually happy to read this website posts which contains tons of valuable data, thanks for providing these kinds of
statistics.
Do you have a spam issue on this site; I also am a blogger,
and I was wanting to know your situation; many of us have created some nice practices
and we are looking to trade methods with other folks, please
shoot me an e-mail if interested.
What’s up everyone, it’s my first pay a visit at this website, and article is actually fruitful for me,
keep up posting these types of content.
There’s certainly a lot to learn about this topic.
I love all of the points you’ve made.
Hello everyone, it’s my first pay a visit at this web page, and post is really fruitful for
me, keep up posting these types of posts.
Actually when someone doesn’t know after that its up to other people that they will
assist, so here it happens.
naturally like your web site however you have to take a
look at the spelling on several of your posts. A number of them are
rife with spelling problems and I in finding it very troublesome to tell the reality however I will certainly come again again.
Hi there to every one, it’s really a good for me to visit
this web page, it contains valuable Information.
Thanks for sharing your thoughts about https://www.edocr.com/v/kl8mwkvk/bengalselect50/The-Primary-Article-On-Minecraft-Servers. Regards
This paragraph is in fact a nice one it assists new net visitors, who are wishing in favor
of blogging.
Pretty section of content. I just stumbled upon your website and in accession capital to assert that I get actually enjoyed account your blog posts.
Anyway I’ll be subscribing to your augment and even I achievement you access consistently rapidly.
Hi there, I desire to subscribe for this website to get most recent updates, so where can i do it please help out.
For most up-to-date news you have to pay a visit web and on internet
I found this site as a finest site for most up-to-date updates.
Awesome post.
I have read so many content concerning the blogger lovers however this post is really a fastidious paragraph, keep it up.
exciting review. Way too visit typically the site that
will be competed situs slot online. This kind of awesome web page has received detection with judi slot game playing challengers in Negara
sendiri. Truth be told there are many fascinating
promos predicament join now.
First of all I would like to say terrific 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 head prior to writing.
I have had a hard time clearing my mind in getting my ideas out there.
I truly do take pleasure in writing but it just seems like the first 10 to 15 minutes
are wasted simply just trying to figure out how to begin. Any suggestions or tips?
Kudos!
Good way of explaining, and nice article to obtain information about my presentation focus, which i am going to present in institution of higher education.
For newest information you have to go to see web and on web I found this site as a most excellent site
for hottest updates.
There’s certainly a great deal to know about this
issue. I like all of the points you made.
I read this paragraph fully regarding the resemblance of most up-to-date and preceding technologies, it’s remarkable article.
If you want to grow your experience only keep
visiting this website and be updated with the most up-to-date information posted here.
Thanks for sharing such a fastidious thinking, paragraph is pleasant, thats
why i have read it completely
You can certainly see your skills within the article you write.
The world hopes for even more passionate writers such as you who aren’t afraid to say
how they believe. At all times follow your heart.
Hi to all, it’s actually a nice for me to go to see this web page, it contains important Information.
What i do not realize is in reality how you are no longer really a lot more well-liked than you might be
right now. You are very intelligent. You already know
therefore significantly on the subject of this matter, made me individually imagine it from a lot of numerous angles.
Its like women and men don’t seem to be fascinated unless
it’s one thing to accomplish with Lady gaga! Your personal stuffs outstanding.
Always handle it up!
Piece of writing writing is also a fun, if you be acquainted
with then you can write or else it is difficult to write.
Good article. I absolutely appreciate this site. Keep it up!
Very good write-up. I definitely love this site. Thanks!
Good replies in return of this difficulty with genuine arguments and
explaining all about that.
Very nice article. I definitely love this site.
Keep writing!
exciting review. Moreover visit my very own site to realize game
slot online. This great website has received acknowledgement coming
from slot deposit pulsa tanpa potongan video games game enthusiasts in Dalam negri.
Truth be told there are usually a lot of wanted
promos in case you join right now.
This post will help the internet visitors
for building up new web site or even a blog
from start to end.
Hi mates, its great piece of writing regarding teachingand fully explained, keep it up
all the time.
I am in fact delighted to glance at this web site
posts which includes plenty of helpful facts, thanks for providing such data.
It’s remarkable designed for me to have a web page, which is good designed for
my knowledge. thanks admin
What’s up to every body, it’s my first go to see of this
weblog; this website contains remarkable and genuinely excellent
material in support of visitors.
Wow! Finally I got a blog from where I can actually get
useful information concerning my study and knowledge.
Hello, everything is going well here and ofcourse every
one is sharing data, that’s truly excellent, keep up writing.
Hello there! Quick question that’s entirely off
topic. Do you know how to make your site mobile friendly?
My blog looks weird when browsing from my iphone. I’m trying to find a
theme or plugin that might be able to fix this problem.
If you have any recommendations, please share. With thanks!
whoah this blog is fantastic i love reading your articles.
Keep up the great work! You realize, lots of people are looking round
for this info, you could aid them greatly.
I like looking through a post that can make people think.
Also, many thanks for allowing me to comment!
Thanks for finally talking about > Резервирование с помощью CARP | oioki.ru < Loved it!
Hello Dear, are you truly visiting this web
page regularly, if so afterward you will definitely obtain pleasant knowledge.