ネットワーク管理者の憂鬱な日常

とある組織でネットワーク管理に携わる管理者の憂鬱な日常を書いてみたりするブログ

Sheepdog(1)

分散ストレージのSheepdogを入れてみる.
KVMな環境で共有ストレージを用意しないといけないのだが,iSCSIで作るののもありきたりなのでw
ちなみに,これまでの経緯はこれ(1)とか,これ(2)とか,これ(3)を参照されたし.

で,構成としてはこんな感じ(再掲).

これらのKVMホスト(sv1〜sv4)にSheepdog入れて,ストレージとしてはNSPOFな環境とする.

とはいえ,当然ながら先人の知恵がこちらにまとめられているので,この流れに沿ってインストール(苦笑).

sv1〜sv4に下記パッケージを導入(gcc makeは既に導入済みの前提).
# aptitude -y install pkg-config
# aptitude -y install libnss3-dev
# aptitude -y install groff
# aptitude -y install git-cvs
# aptitude -y install zlib1g-dev
# aptitude -y install libpci-dev
# aptitude -y install ncurses-dev

次に,corosyncをインストール.corosyncは配布元からtarballを取得し,configure,make.
# wget ftp://ftp:downloads@corosync.org/downloads/corosync-1.4.2/corosync-1.4.2.tar.gz
# tar xzvf corosync-1.4.2.tar.gz
# cd corosync-1.4.2
# ./configure
# make install |& tee install.log

って感じで,すんなりインストール.とりあえずはman corosyncを見るw

qemu-kvmソースの取得.
# git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
Cloning into qemu-kvm...
remote: Counting objects: 136902, done.
remote: Compressing objects: 100% (32036/32036), done.
remote: Total 136902 (delta 107327), reused 132435 (delta 103095)
Receiving objects: 100% (136902/136902), 48.61 MiB | 483 KiB/s, done.
Resolving deltas: 100% (107327/107327), done.


で,configure.
# cd qemu-kvm
# ./configure


ちなみにここで,glib-2.0 required to compile QEMU
と出れば,Glib2.0を入れる.
# aptitude -y install libglib2.0-dev

で,再びconfigure実行.

で,引き続きmakeすると・・・

CC libcacard/vcard_emul_nss.o
cc1: warnings being treated as errors
vcard_emul_nss.c:528: error: left-hand operand of comma expression has no effect
(途中略)
vcard_emul_nss.c:528: error: left-hand operand of comma expression has no effect
vcard_emul_nss.c:528: error: initializer element is not constant
vcard_emul_nss.c:528: error: (near initialization for 'nss_atr[0]')
make[1]: *** [vcard_emul_nss.o] Error 1
make: *** [subdir-libcacard] Error 2

って感じでエラー発生w.

これはknown issueらしく,こちらのパッチを適用.
http://patchwork.ozlabs.org/patch/144276/

で,めでたくmake install完了.
とはいえ,qemu-kvm自体はパッケージで導入しているのだがw

続いて,Sheepdogソースの取得.
# git clone git://sheepdog.git.sourceforge.net/gitroot/sheepdog/sheepdog
Cloning into sheepdog...
remote: Counting objects: 1994, done.
remote: Compressing objects: 100% (1795/1795), done.
remote: Total 1994 (delta 1459), reused 251 (delta 195)
Receiving objects: 100% (1994/1994), 463.40 KiB | 218 KiB/s, done.
Resolving deltas: 100% (1459/1459), done.

って感じでソース取得.

で,コンパイル.
# cd sheepdog
# make install
make: *** No rule to make target `install'. Stop.


んー,INSTALL読むと,GNU Autotoolsが必要なのね.ってことで,
# aptitude -y install autotools-dev

で,改めて.
# ./autogen.sh
Building configuration system...
./autogen.sh: 5: autoreconf: not found


今度はautoreconfが必要なのね,ってことで,
# aptitude -y install dh-autoreconf

で,やっと,
# ./autogen.sh
Building configuration system...
configure.ac:27: installing `./config.guess'
configure.ac:27: installing `./config.sub'
configure.ac:22: installing `./install-sh'
configure.ac:22: installing `./missing'
collie/Makefile.am: installing `./depcomp'
Now run ./configure and make

# ./configure
# make install


で,/usr/sbin/sheepなどが導入された.これをsv1〜sv4でそれぞれ実行
次は設定w.まずはman sheepを読もう.orz

スポンサーリンク