CentOS 5.5 に、GlusterFS 3.2 -- インストール

CentOS 5.5 に、GlusterFS 3.2 を、インストールします。

CentOS は、X64です。

Welcome to the Gluster 3.2.0 Documentation

を参考にしました。

CentOS 5.5 にrpmforgeから追加するパッケージ

[root@centos1 rpm]# sudo rpm -ivh glusterfs-geo-replication-3.2.0-1.x86_64.rpm 
エラー: 依存性の欠如:
	python-ctypes は glusterfs-geo-replication-3.2.0-1.x86_64 に必要とされています
	rsync >= 3.0.7 は glusterfs-geo-replication-3.2.0-1.x86_64 に必要とされています

上記、rpmは、rpmforgeにあります。

rpmforgeの準備

http://d.hatena.ne.jp/mizincogrammer/20110325
を、参考にしました。

プライオリティが、つけられるように、します。

[root@centos1 rpm]# sudo yum install yum-priorities
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package yum-priorities.noarch 0:1.1.16-14.el5.centos.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                 Arch                            Version                                         Repository                     Size
=============================================================================================================================================================
Installing:
 yum-priorities                          noarch                          1.1.16-14.el5.centos.1                          base                           14 k

Transaction Summary
=============================================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 14 k
Is this ok [y/N]: y
Downloading Packages:
yum-priorities-1.1.16-14.el5.centos.1.noarch.rpm                                                                                      |  14 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : yum-priorities                                                                                                                        1/1 

Installed:
  yum-priorities.noarch 0:1.1.16-14.el5.centos.1                                                                                                             

Complete!


rpmforgeを、インストールします。

[root@centos1 rpm]# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
--2011-05-11 15:21:57--  http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
packages.sw.be をDNSに問いあわせています... 85.13.226.40
packages.sw.be|85.13.226.40|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 302 Found
場所: http://rpmforge.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm [続く]
--2011-05-11 15:21:58--  http://rpmforge.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpmforge.sw.be をDNSに問いあわせています... 85.13.226.40
packages.sw.be:80 への接続を再利用します。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 12649 (12K) [application/x-rpm]
`rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm' に保存中

100%[===================================================================================================================>] 12,649      25.8K/s 時間 0.5s    

2011-05-11 15:21:59 (25.8 KB/s) - `rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm' へ保存完了 [12649/12649]

[root@centos1 rpm]# sudo rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
警告: rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm: ヘッダ V3 DSA signature: NOKEY, key ID 6b8d79e6
準備中...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]
[root@centos1 rpm]# sudo rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

変更して、rpmforgeから、インストールできるようにします。

[guutara@centos1 ~]$ cat /etc/yum.repos.d/CentOS-Base.repo 
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/addons/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1
[guutara@centos1 ~]$ cat /etc/yum.repos.d/rpmforge.repo 
### Name: RPMforge RPM Repository for RHEL 5 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 10
# add
priority=1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
#add
priority=1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
priority=10
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1


足りない、rpmを、インストールします。

[root@centos1 rpm]# sudo yum install --enablerepo=rpmforge-extras rsync
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * rpmforge: fr2.rpmfind.net
 * rpmforge-extras: fr2.rpmfind.net
addons                                                                                                                                |  951 B     00:00     
base                                                                                                                                  | 2.1 kB     00:00     
extras                                                                                                                                | 2.1 kB     00:00     
updates                                                                                                                               | 1.9 kB     00:00     
34 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rsync.x86_64 0:3.0.8-1.el5.rfx set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                         Arch                             Version                                    Repository                                 Size
=============================================================================================================================================================
Updating:
 rsync                           x86_64                           3.0.8-1.el5.rfx                            rpmforge-extras                           380 k

Transaction Summary
=============================================================================================================================================================
Install       0 Package(s)
Upgrade       1 Package(s)

Total download size: 380 k
Is this ok [y/N]: y
Downloading Packages:
rsync-3.0.8-1.el5.rfx.x86_64.rpm                                                                                                      | 380 kB     00:01     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : rsync                                                                                                                                 1/2 
  Cleanup        : rsync                                                                                                                                 2/2 

Updated:
  rsync.x86_64 0:3.0.8-1.el5.rfx                                                                                                                             

Complete!

[root@centos1 rpm]# sudo yum install --enablerepo=rpmforge-extras python-ctypes
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * rpmforge: ftp-stud.fht-esslingen.de
 * rpmforge-extras: ftp-stud.fht-esslingen.de
34 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-ctypes.x86_64 0:1.0.0-2.el5.rf set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                 Arch                             Version                                   Repository                          Size
=============================================================================================================================================================
Installing:
 python-ctypes                           x86_64                           1.0.0-2.el5.rf                            rpmforge                           289 k

Transaction Summary
=============================================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 289 k
Is this ok [y/N]: y
Downloading Packages:
python-ctypes-1.0.0-2.el5.rf.x86_64.rpm                                                                                               | 289 kB     00:01     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : python-ctypes                                                                                                                         1/1 

Installed:
  python-ctypes.x86_64 0:1.0.0-2.el5.rf                                                                                                                      

Complete!

GlusterFSのインストール

Gluster 3.2: Installing GlusterFS on Red Hat Package Manager (RPM) Distributions

[root@centos1 yum.repos.d]# sudo yum -y install wget fuse fuse-libs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
addons                                                                                                                                |  951 B     00:00     
addons/primary                                                                                                                        |  204 B     00:00     
base                                                                                                                                  | 2.1 kB     00:00     
base/primary_db                                                                                                                       | 2.2 MB     00:00     
extras                                                                                                                                | 2.1 kB     00:00     
extras/primary_db                                                                                                                     | 241 kB     00:00     
ps_yumrepo                                                                                                                            |  951 B     00:00     
updates                                                                                                                               | 1.9 kB     00:00     
updates/primary_db                                                                                                                    | 508 kB     00:00     
Setting up Install Process
Package wget-1.11.4-2.el5_4.1.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package fuse.x86_64 0:2.7.4-8.el5 set to be updated
---> Package fuse-libs.i386 0:2.7.4-8.el5 set to be updated
---> Package fuse-libs.x86_64 0:2.7.4-8.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                Arch                                Version                                  Repository                         Size
=============================================================================================================================================================
Installing:
 fuse                                   x86_64                              2.7.4-8.el5                              base                               83 k
 fuse-libs                              i386                                2.7.4-8.el5                              base                               72 k
 fuse-libs                              x86_64                              2.7.4-8.el5                              base                               71 k

Transaction Summary
=============================================================================================================================================================
Install       3 Package(s)
Upgrade       0 Package(s)

Total download size: 227 k
Downloading Packages:
(1/3): fuse-libs-2.7.4-8.el5.x86_64.rpm                                                                                               |  71 kB     00:00     
(2/3): fuse-libs-2.7.4-8.el5.i386.rpm                                                                                                 |  72 kB     00:00     
(3/3): fuse-2.7.4-8.el5.x86_64.rpm                                                                                                    |  83 kB     00:00     
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        710 kB/s | 227 kB     00:00     
警告: rpmts_HdrFromFdno: ヘッダ V3 DSA signature: NOKEY, key ID e8562897
base/gpgkey                                                                                                                           | 1.5 kB     00:00     
Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : fuse-libs                                                                                                                             1/3 
  Installing     : fuse                                                                                                                                  2/3 
  Installing     : fuse-libs                                                                                                                             3/3 

Installed:
  fuse.x86_64 0:2.7.4-8.el5                        fuse-libs.i386 0:2.7.4-8.el5                        fuse-libs.x86_64 0:2.7.4-8.el5                       

Complete!

[root@centos1 yum.repos.d]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

[root@centos1 rpm]# wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm
--2011-05-11 14:56:05--  http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm
download.gluster.com をDNSに問いあわせています... 70.38.57.57
download.gluster.com|70.38.57.57|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 2198697 (2.1M) [application/x-redhat-package-manager]
`glusterfs-core-3.2.0-1.x86_64.rpm' に保存中

100%[===================================================================================================================>] 2,198,697    900K/s 時間 2.4s    

2011-05-11 14:56:08 (900 KB/s) - `glusterfs-core-3.2.0-1.x86_64.rpm' へ保存完了 [2198697/2198697]

[root@centos1 rpm]# wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-fuse-3.2.0-1.x86_64.rpm
--2011-05-11 14:56:26--  http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-fuse-3.2.0-1.x86_64.rpm
download.gluster.com をDNSに問いあわせています... 70.38.57.57
download.gluster.com|70.38.57.57|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 55652 (54K) [application/x-redhat-package-manager]
`glusterfs-fuse-3.2.0-1.x86_64.rpm' に保存中

100%[===================================================================================================================>] 55,652      90.9K/s 時間 0.6s    

2011-05-11 14:56:27 (90.9 KB/s) - `glusterfs-fuse-3.2.0-1.x86_64.rpm' へ保存完了 [55652/55652]

[root@centos1 rpm]# glusterfs-geo-replication-3.2.0-1.x86_64.rpm
-bash: glusterfs-geo-replication-3.2.0-1.x86_64.rpm: command not found
[root@centos1 rpm]# wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-geo-replication-3.2.0-1.x86_64.rpm
--2011-05-11 14:57:19--  http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-geo-replication-3.2.0-1.x86_64.rpm
download.gluster.com をDNSに問いあわせています... 70.38.57.57
download.gluster.com|70.38.57.57|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 54813 (54K) [application/x-redhat-package-manager]
`glusterfs-geo-replication-3.2.0-1.x86_64.rpm' に保存中

100%[===================================================================================================================>] 54,813      89.9K/s 時間 0.6s    

2011-05-11 14:57:20 (89.9 KB/s) - `glusterfs-geo-replication-3.2.0-1.x86_64.rpm' へ保存完了 [54813/54813]

[root@centos1 rpm]# sudo rpm -Uvh glusterfs-core-3.2.0-1.x86_64.rpm 
準備中...                ########################################### [100%]
   1:glusterfs-core         ########################################### [100%]
[root@centos1 rpm]# sudo rpm -Uvh glusterfs-fuse-3.2.0-1.x86_64.rpm 
準備中...                ########################################### [100%]
   1:glusterfs-fuse         ########################################### [100%]

[root@centos1 rpm]# sudo rpm -ivh glusterfs-geo-replication-3.2.0-1.x86_64.rpm 
準備中...                ########################################### [100%]
   1:glusterfs-geo-replicati########################################### [100%]

FUSEの組み込み

 [root@centos1 ~]# modprobe fuse

 [root@centos1 ~]#dmsg | grep -i fuse
   fuse init (API version 7.10)

起動の確認

[guutara@centos1 ~]$ sudo /etc/init.d/glusterd status 
glusterd は停止しています
[guutara@centos1 ~]$ sudo /etc/init.d/glusterd start
Starting glusterd:                                         [  OK  ]
[guutara@centos1 ~]$ ps -ax | grep glusterd
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
27571 ?        Ssl    0:00 /opt/glusterfs/3.2.0/sbin/glusterd
27618 pts/0    S+     0:00 grep glusterd
[guutara@centos1 ~]$ sudo /etc/init.d/glusterd stop
Stopping glusterd:                                         [  OK  ]
[guutara@centos1 ~]$ ps -ax | grep glusterd
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
27631 pts/0    S+     0:00 grep glusterd
[guutara@centos1 ~]$ sudo /etc/init.d/glusterd status
glusterd は停止しています

チェック

[guutara@centos1 ~]$ /usr/sbin/glusterfs -V
glusterfs 3.2.0 built on Apr 22 2011 18:35:40
Repository revision: v3.2.0
Copyright (c) 2006-2010 Gluster Inc. <http://www.gluster.com>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU Affero General Public License.