пятница, 3 апреля 2009 г.

Seven Pounds

Посмотрел тут фильм “Семь жизней” как его на русский перевели. Если знать английское название то суть фильма становится понятно немного раньше в процессе просмотра.

Очень сильный фильм. Очень. Даже сейчас не могу о нём нормально написать – очень большое впечатление оставляет. Такие истории не каждый день узнаёшь. Очень класно сделан фильм сам по себе, музыка вообще супер, пейзажи, погода, да всё – фильм продуман до мелочей. За какие-то жалкие час-полтора рассказывается история которую можно было обсуждать и рассказывать очень долго.

Игра Will Smith-а – просто гениально, после Хенкока (в котором он тоже не плох) это просто супер, читал что именно он сделал главного героя именно таким какой он есть.

Вобщем всем советую – это такой фильм который стоит посмотреть и который наверное никогда не забудется.

понедельник, 30 марта 2009 г.

Converting Fedora 10 single drive installation to RAID1

Look like there is no straight forward instructions regarding the topic. I used two of them

http://togami.com/~warren/guides/remoteraidcrazies/

http://m.linuxjournal.com/article/10217

I already installed mdadm package during the initial system setup, so I went directly to the step of copying partition table to the second (clean) disk (manual #2, Converting a Server to RAID1, 2nd step)

# sfdisk -d /dev/sda | sfdisk /dev/sdb
# fdisk /dev/sdb
> t
> 1
> fd
> t
> 2
> fd
> t
> 3
> fd
> w

I have 3 partitions (root, swap and synchronized with drbd), so I converted them all to raid fs type.

Then I created a raid 1 with single disks for all of my 3 partitions.

 

# mdadm -C /dev/md0 -n2 -l1 missing /dev/sdb1  # root
# mdadm -C /dev/md1 -n2 -l1 missing /dev/sdb2  # swap
# mdadm -C /dev/md2 -n2 -l1 missing /dev/sdb3  # drbd
# cat /proc/mdstat
# mdadm --detail --scan >> /etc/mdadm/mdadm.conf

 

As you can see I do everything like in the second manual. But now the most interesting part of this manipulations begins – you should boot from your newly created raid1.

I did everything like in the next step of the 2nd manual – copied the boot config and specified “root=/dev/md0” and (hd1,0) instead of (hd0,0).

Then the second manual suggests to rebuild initrd image with debian tool. But I don’t have it in fedora. So I followed instructions about creating initrd manually.

Unfortunately they didn’t help – my system couldn’t mount /dev/md0 device (“couldn’t mount /dev/root device” at the boot screen).

So, I googled and found old Russian article about doing the same sort of things, most of step in this article are outdated, but luckily there was a step that saved me

mkinitrd --with=raid1 --preload=raid1 --fstab=/mnt/md0/etc/fstab [image filename] [kernel version]

before that I mounted md0 raid drive to “/mnt/md0”, I also modified fstab on the raid disk – instead of local partitions I mounted raid ones (/dev/md0, /dev/md1).

Don’t forget also to change fstab on your original system – for some reasons grub could load partitions via their IDs after a reboot, so I couldn’t boot to any system.

Then I synchronized content from the /dev/sda1 to /dev/md0. installed grub onto both disks (see article #2) and used solution in the first article to boot into the second option once a time.

It finally did the trick – I stuck with the creation of initrd image – you have to specify new fstab, otherwise mkinitrd won’t know that your root partition is on the raid drive, thus initrd won’t mount raid at the very beginning, so grub won’t be able to load the kernel.

Once I booted from the raid drive I added the original one to the raid array and synchronized the array.

OK, so I will continue with creating of failover cluster, I need to configure drbd and heartbeat. Will let you know if I face any issues.

среда, 11 марта 2009 г.

Наша Раша

Оставил тут машину на выходные на парковке у торгового центра “Купеческий Двор”, сегодня утром приехал забрать.

Перед тем как оставлял – специально проверил – никаких знаков предупреждающих/запрещающих – нет. Сегодня утром парковка была закрыта! :(

Очень сильно было желание открутить болты у цепи которая перекрывает проезд, проехать и прикрутить их обратно (порчи имущества – нет, знаки повесить не потрудились – получайте) – жалко времени было – переезжал через паребрик, но это ещё повезло что лёд намёрз у паребрика и я спуститься смог (машинка то маленька) – в следующий раз (а он обязательно будет раз они знаков не вешают) обязательно откручу болты, заварят – откручу ещё что-нибудь, думаю у меня есть право и на порчу их имущества ибо они без права на то – перекрывают мне выезд. П…сы.

понедельник, 2 марта 2009 г.

Провайдинг

Столкнулся тут с обустройсвом сети одного провайдера в центре города. Оказалось достаточно интересно. За моих два визита удалось немного разгрести биллинговый сервак и настроить резервное подключение к интернету через Корбину – ну и задачка же это.

Выяснилось (ну я то корбиной ни разу не пользовался) что она даёт инет через ВПН (не новость хотя) пришлось настраивать этот ВПН.

Для начала встретил сопротивление от резервной сетевеой карты – что-то очень она сопротивлялась работать с тем процом, дровами и… корбиной. На следующий день поставил новые дрова – и о чудо – сетевуха заработала way more лучше.

Потом беда пришла негаданно – после установки pptp клиента выяснилось что в ядре не хватает поддержки mschap v2 – точнее шифрации для него, пришлось искать модули которые это фиксят – наконец pptp клиент заработал – но впниться активно отказывался.

После небольшого рисёрча выяснилось что этот роутер (ну как ему и следовало) набит файервольными правилами которые блокируют доступ по pptp. Погуглил – выяснил что надо открыть – открыл – инет заработал.

Потом блин так обидно – провёл несколько часов выясняе почему ДНС не работает – оказалось в NAT правилах для файервола я ошибся в номере подсети для внутрених серверов – из-за чего внутренний ДНС сервер не мог вйти наружу.

Ну теперь то вроде заработало.

Работа с этим провайдером оказалось интересной – поработаем, возможно удастся их сеть развить и сделать более надёжной и устойчивой – у меня ктати же давно зреет мысль об провайдинге VoIP телефонии, может и выйдет чего :)

UPDATE:

В момент написания статьи выяснилось что интернет с корбиной падает через час после работы. Погуглил – убрал буфферизацию на ppp устройстве – заработало стабильнее, кроме того добавил автоматический подъём соединения после обрыва. Однако напрягает что очень много потеряных пакетов на ppp соединении – хотя вроде на самом качестве связи это не отражается. В инете пишут что проблема есть с размерами MTU MRU, да и корбина на это в своих конфигах намекает, вобщем посмотрим – думаю удасться с этой проблемой справиться. Другой вариант – юзать l2tp – но там проблемы быдут с установкой – у меня ядро и сама операционка достаточно старая – много чего придётся доставлять и обновлять.

воскресенье, 1 марта 2009 г.

Asterisk + Skype

Recently discovered that it is possible to create an asterisk to skype gateway. Well, I’ve implemented this by doing the following (everything was installed on the asterisk server):

  • Installed jdk
  • installed skype client on asterisk server, in it is a gui applications so I installed Xming on my desktop PC – this allowed me to configure skype without sitting in front of asterisk server. For those who doesn’t know hot to do this, here you are (don’t forget to allow connections to your Xming from external sources)-

export DISPLAY=IP_of_your_desktop_PC:0.0

skype

  • So, I configured Skype on the asterisk server, so that it will be started minimized. Then Skype could be launched by “skype &”
  • Then I installed SipToSis software http://www.mhspot.com/sts/siptosis.html
  • I had to recompile skype4java (but you probably do not need this option). Also I added direct paths for java applications.
  • Once I started SiptoSis software (don’t forget to export DISPLAY again) Skype asked me if I would like to allow access from external program – I allowed this.

Installation is done, now I configured SiptoSis and Asterisk configs:

SipToSis SkypeToSisAuth.props (substitute EXT with a valid asterisk extension):

*,sip:EXT@localhost:5060

SipToSis siptosis.cfg:

host_port=5070

username=skypeusername

passwd=skypepassword

Asterisk sip.conf:

[skype]

type = peer

context = your_asterisk_context

secret = skypepassword

username = skype

host = IP_address_of_asterisk_server

port = 5070

qualify = yes

That’s it, I need to mention that I was only interested in incoming calls from Skype to my Asterisk system, so I didn’t investigate SkypeOut and other features of SipToSis package.

And now – major this in my post – you have to link this SkypeIn line to a certain extension on your asterisk system (conference room or something), because there is no way to dial numbers or input any PINs via Skype client :)

So, the bottom line – It is cool but without interactive dialpad in Skype this thing can’t do much. I have a thought of implementing voice recognition for this line, so that users can say which extension they would like to dial, but this is going to be pretty complicated. I let you know if I make this, deal? :)

 

понедельник, 9 февраля 2009 г.

Mail servers, DNS and SPF records

Today spent some time investigating issues with friend’s mail server. Well, it looks like some of our russian mailing systems began to check for SPF. We added and SPF record for his domain and everything began to work properly. Before that mail.ru, rambler.ru didn’t accept mail from his server.

While doing this I’ve found some interesting tools in the cloud

http://www.politemail.com/check-spf.aspx – a tool to check SPF record for your domain.

http://old.openspf.org/wizard.html – this is very famous resource, as far as I remember they started when SPF was just a small initiative group. This wizard can help you to create a correct SPF record for your domain.

http://www.intodns.com/ – nice tool instead of dnsreport which is now a commercial service.

We also checked his mail server in different blacklists. It looks like after we added an SPF record it did the trick.

Hello world!

My old posts can be found there


Most of my posts are in russian. On this blog I will try to post in english too.

BTW, below is my MS tag, in case you are too lazy to type http://sgoncharenko.blogspot.com in your browser :) 



Don't know how to use this? check out Blackberry tool for that http://gettag.mobi