GlusterFSでボリュームを作るテスト

ビルドできたのでボリュームを作ってみる。
とりあえず冗長性のことは無視したけど、特に問題なくできた模様。

まずはデーモンを起動。NFSを使ってマウントするので、あらかじめrpcbindを起こしておくこと。
rc scriptはあとで作ろう。(その気になったらね)

# service rpcbind onestart
# /usr/local/sbin/glusterfsd --volfile=/usr/local/etc/glusterfs/glusterd.vol

とりあえず適当に作ってみる。

# mdconfig -a -s 256M
# newfs /dev/md0
# mkdir /glusterfs-data
# mount -t ufs /dev/md0 /glusterfs-data
# gluster volume create gv0 10.0.0.1:/glusterfs-data/brick             
volume create: gv0: success: please start the volume to access data
# gluster volume start gv0
volume start: gv0: success
# gluster vol status
Status of volume: gv0
Gluster process                                         Port    Online  Pid
------------------------------------------------------------------------------
Brick 10.0.0.1:/glusterfs-data/brick                    49152   Y       88912
NFS Server on localhost                                 2049    Y       88913
 
Task Status of Volume gv0
------------------------------------------------------------------------------
There are no active volume tasks

問題なさそうなのでマウントしてみよう。

# mount -t nfs -o tcp 10.0.0.1:/gv0 /mnt
# dd if=/dev/random of=/test.dat bs=1024 count=65536
# dd if=/test.dat of=/mnt/test.dat                                                     
131072+0 records in
131072+0 records out
67108864 bytes transferred in 1.554989 secs (43157128 bytes/sec)
# du -d 0 -h /glusterfs-data
 64M    /glusterfs-data

ちゃんと書けてるみたい。
でもmdに書いてることを考えると遅いような……。