sheepdog 0.6.0

[sheepdog] Sheepdog 0.6.0 released

Overview of sheepdog

sheepdog 0.6.0 on CentOS 6.4

sheepdog → make rpm でインストール

インストール
(-> userspace-rcu-devel)
# rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

# yum -y install make gcc tar autoconf automake rpm-build
# yum -y install nss-devel
# yum -y install corosynclib-devel
# yum -y install userspace-rcu-devel
(-> sheepfs)
# yum -y install fuse-devel

# cd /usr/local/src
# wget -O sheepdog-0.6.0.zip https://github.com/collie/sheepdog/archive/v0.6.0.zip
# unzip sheepdog-0.6.0.zip
# cd sheepdog-0.6.0

(make rpmでのエラー回避)
collie/Makefile.am
27c27
< 			  farm/trunk.c farm/farm.c \
    • -
> farm/trunk.c farm/farm.c farm/farm.h \ sheepdog.spec.in 65a66 > %{_sbindir}/shepherd # export LANG=en_US.UTF-8 # ./autogen.sh # ./configure # make rpm # rpm -ivh x86_64/sheepdog-0.*

sheepdog 0.5.6

2013/02/06
[sheepdog] [ANNOUNCE] Sheepdog 0.5.6 released

コミッター 2名 (NTT, Taobao)


ElasticHosts
http://www.elastichosts.com/
イギリスのパブリッククラウドを提供する会社
実サービスでSheepdogを利用している


Taobao
http://www.taobao.com/
中国最大のECサイトを提供する会社
1000台規模のSheepdog検証を行っている
現在のSheepdog開発の中心


VMから見ると rawディスクを直接使う場合に比べて8割強の性能が得られる


2012/07/20 分散ブロックストレージ Sheepdog 〜プロダクト品質に向けて〜
http://www.viops.jp/ntt-viops07-20120720-new.pdf

sheepdog 0.5.6 on Fedora 18

Fedora 18 → Minimal Install
sheepdog → rpm でインストール

インストール
# yum -y install gcc tar autoconf automake rpm-build
# yum -y install nss-devel
# yum -y install corosynclib-devel
# yum -y install userspace-rcu-devel
(sheepfs)
# yum -y install fuse-devel

# cd /usr/local/src
# wget -O sheepdog-0.5.6.zip https://github.com/collie/sheepdog/archive/v0.5.6.zip
# unzip sheepdog-0.5.6.zip
# cd sheepdog-0.5.6
# export LANG=en_US.UTF-8
# ./autogen.sh
# ./configure
# make rpm

# rpm -ivh x86_64/sheepdog-0.*

性能評価

大規模ストレージソフトウェアの評価 2012-2-16
http://member.wide.ad.jp/tr/wide-tr-cloud-distributed-storage-measurement-00.pdf

仮想計算機イメージ格納領域としての分散ファイルシステム/ ストレージシステムの性能比較 IC2012
http://www.internetconference.org/ic2012/PDF/ic2012-poster-paper3.pdf

VM image の操作

Getting Started · sheepdog/sheepdog Wiki · GitHub

イメージの作成

qemu-img create sheepdog:Alice 256G

スナップショットをコンバート

(スナップショット作成) name はタグ名

$ qemu-img snapshot -c name sheepdog:Alice
$ collie vdi list
name id size used shared creation time object id

                                                                                                                                      • -

Bob 0 2.0 GB 1.6 GB 0.0 MB 2010-03-23 16:16 80000
Alice 0 256 GB 0.0 MB 0.0 MB 2010-03-23 16:21 c0000
s Alice 1 256 GB 0.0 MB 0.0 MB 2010-03-23 16:16 40000

(コンバート) ファイルに書き出し
$ qemu-img convert -f sheepdog -O raw Alice:1 Alice.raw

(スナップショットから新しいイメージを作成)
$ qemu-img create -b sheepdog:Alice:1 sheepdog:Charlie

イメージを削除

collie vdi delete Bob

(スナップショット削除)
collie vdi delete -s name Alice

Re: [Sheepdog] Sheepdog performance

イメージのサイズ変更

collie vdi resize Alice 500G

スパースファイル

スパースファイル ls -s でサイズを確認
ls -lhs

Sparse File (スパースファイル/穴空きファイル) - うまいぼうぶろぐ

Sheepdog Requirements 動作環境

One or more x86-64 machines.
Linux kernel 2.6.27 or later
glibc 2.9 or later
The corosync and corosync lib package.
QEMU 0.13 or later

Getting Started · sheepdog/sheepdog Wiki · GitHub

コンパイルには以下が必要

GNU Autotools
pkg-config
corosync devel package
git (when compiling from source repo)
liburcu
optional:fuse-devel (for sheepfs)

QEMU

エミュレータ

QEMU 0.13 以降で sheepdog サポート

QEMU 0.13 provides built-in support for sheepdog devices. Some distributions provide pre-built versions of this newer version of QEMU. If your distribution has an older version of QEMU or you prefer to compile from source, retrieve the latest QEMU and compile:

qemu-kvm.x86_64

CentOS 6.0 0.12 2:0.12.1.2-2.113.el6_0.8
CentOS 6.4 0.12 2:0.12.1.2-2.355.0.1.el6.centos.6
Fedora 15 0.14 2:0.14.0-7.fc15
Fedora 16 0.15
Fedora 18 1.2.2 2:1.2.2-13.fc18
Ubuntu 12.04.2 LTS 1.0 1.0+noroms-0ubuntu14.10
Ubuntu 12.04.2 LTS + cloud-archive-grizzly 1.0 1.0+noroms-0ubuntu14.10
Ubuntu 12.04.2 LTS + cloud-archive-havana 1.5.0 1.5.0+dfsg-3ubuntu2~cloud0

CentOS 6系は0.12

http://pkgs.org/download/qemu

Object Cache使用時に1.0だと以下のエラーが出た。

local_release_vdi(368) Some VDI failed to release the object cache. Probably you are running old QEMU.

→1.5.0では解消

user_xattr

user_xattrをサポートしている必要あり

The /var/lib/sheepdog will be where sheepdog will store objects. The directory must be on a filesystem with an xattr support. In case of ext3 or ext4, you need to add 'user_xattr' to the mount options.

$ sudo mount -o remount,user_xattr /var/lib/sheepdog

Sheepdog

インストール ( CentOS 6.0 )

CentOS は epel リポジトリから

# yum --enablerepo=epel install sheepdog 

インストール ( Fedora 15 )

yumでインストール
# yum install sheepdog 
git からインストール
# yum -y install corosync
# yum -y install git autoconf automake make gcc corosynclib-devel rpm-build

# cd /usr/local/src
# git clone git://github.com/collie/sheepdog.git
# cd sheepdog
# ./autogen.sh
# ./configure

バージョンに '-' が入っている場合
rpmbuild の Illegal char 回避のため '-' を '_' に修正
error: line 3: Illegal char '-' in: Version: 0.2.3-88-g20bb9a7

# vi Makefile
 ====
VERSION = 0.2.3-88-g20bb9a7
↓
VERSION = 0.2.3_88_g20bb9a7
 ====

# make rpm
# rpm -ivh x86_64/sheepdog-0.*

corosync

bindnetaddr は ネットワークアドレスも可

http://www.corosync.org/doku.php?id=faq:configure_openais

The bindnetaddr is the network address to bind to. For the purpose of sharing configuration files across the cluster, openais uses network interface netmask to mask only the address bits that are used for routing the network.

http://manpages.ubuntu.com/manpages/jaunty/man5/corosync.conf.5.html

bindnetaddr
This specifies the address which the corosync executive should
bind. This address should always end in zero. If the totem
traffic should be routed over 192.168.5.92, set bindnetaddr to
192.168.5.0.

Fedora

Gmane Loom

http://www.sawanoboly.net/wp/2011/03/15/229.html
libvirt: Domain XML format

その他

sheepdog -D, --directio use direct IO
Re: [Sheepdog] Sheepdog performance

collie vm コマンドはなくなった
Re: [Sheepdog] Collie vm command

削除
Sheepdog Design · sheepdog/sheepdog Wiki · GitHub

TODO: currently, reclaiming of unused data objects is not invoked until all relevant VDI objects (all relative snapshot VDIs and cloned VDIs) are deleted.

After all relevant VDIs are deleted, Sheepdog deletes all data objects of the VDIs, and set the null string to the name of the vdi objects.

ライブマイグレーション

対応している

インターフェース

ポート 7000 を使用

http://www.mail-archive.com/sheepdog@lists.wpkg.org/msg01025.html

But sheep still binds to `0.0.0.0:7000` and accessible from my
external interface.

sheep/lib/net.c

int create_listen_ports(int port, int (*callback)(int fd, void *), void *data)
{
...
       ret = getaddrinfo(NULL, servname, &hints, &res0);
...

NULL なので 0.0.0.0

→ 外部インターフェースからのアクセス拒否は iptables で行う

log level

デフォルトはINFO

http://www.mail-archive.com/sheepdog@lists.wpkg.org/msg00246.html

SDOG_EMERG 0
SDOG_ALERT 1
SDOG_CRIT 2
SDOG_ERR 3
SDOG_WARNING 4
SDOG_NOTICE 5
SDOG_INFO 6
SDOG_DEBUG 7
...
By default, collie prints messages that are more important than
INFO. You can change the default log level with "loglevel" boot
option.
...

$ collie cluster format --help
cluster format - create a Sheepdog storage

Usage:
collie cluster format [-c copies] [-H] [-a address] [-p port] [-h]

Command parameters:
-c, --copies set the number of data redundancy
-H, --nohalt serve the IO rquests even lack of enough redundant nodes
-a, --address specify the daemon address (default: localhost)
-p, --port specify the daemon port
-h, --help display this help and exit