ngrepとか
tcpdumpで-Xとかつけてパケットみてたんですが、
ながれてくるデータをもう少しみたいなーとおもい探してみたところ
あったんだなぁ
ngrep
もしかしたら、いまさらですが、
これは便利だなぁ
ngrep -W byline -q port 3306 -d eth1|grep SELECT
こんな感じで、クエリーもみれたりする
まじすげぇ
- 2012.05.22 Tuesday
- -
- 19:21
- comments(1)
- trackbacks(0)
- -
- -
- by orz
glusterfsを使ってみる
分散ファイルシステムで、よさそうなのがあったので早速導入メモ
なお、環境は下記のとおり
サーバ1:os:CentOS release 5.6 (Final) 64bit
サーバ2:os:CentOS release 5.6 (Final) 64bit
なお、導入にはこちらを参考にした
必要なパッケージを取得
mkdir /root/pkg
cd /root/pkg
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.6-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-debuginfo-3.2.6-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-fuse-3.2.6-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-geo-replication-3.2.6-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-rdma-3.2.6-1.x86_64.rpm
wget http://pkgs.repoforge.org/rsync/rsync-3.0.7-1.el5.rfx.x86_64.rpm
#サーバ1,2でやってみた
rsync3系が必要なので、標準の2系を削除
rpm -e rsync
シコシコpkgをいれていく
yum -y install python-ctypes
yum -y install wget fuse fuse-libs
cd /root/pkg
rpm -ivh rsync-3.0.7-1.el5.rfx.x86_64.rpm
rpm -ivh glusterfs-core-3.2.6-1.x86_64.rpm
rpm -ivh glusterfs-fuse-3.2.6-1.x86_64.rpm
rpm -ivh glusterfs-geo-replication-3.2.6-1.x86_64.rpm
rpm -ivh glusterfs-geo-replication-3.2.6-1.x86_64.rpm
#サーバ1で
gluster peer probe サーバ2
mkdir /data
mkdir /glmnt
mkdir /gmnt2
#サーバ2で
mkdir /data
ちゃんとうまくいってるとCONNECTになる
gluster peer status
--------------------------------------------------------------------
Number of Peers:1
Hostname: サーバ2
Uuid: 9dd3fd6c-4a63-4aca-8b6d-21f58d6cdbc4
State: Peer in Cluster (Connected)
--------------------------------------------------------------------
で、volumeの作成
今回は、replica2で作成してみる
gluster volume create gluster_vol replica 2 サーバ1:/data サーバ2:/data
マウントしてみる
mount サーバ1:gluster_vol /glmnt
mount サーバ2:gluster_vol /glmnt2
ファイルをtouchしてみる
touch /glmnt/aaa
/glmnt2にもできていることを確認してみる
ls -l /glmnt2
total 4
-rw-r--r-- 1 root root 0 May 9 02:41 aaa
なお、sshの鍵を通さないといけないようだ。。。
なお、環境は下記のとおり
サーバ1:os:CentOS release 5.6 (Final) 64bit
サーバ2:os:CentOS release 5.6 (Final) 64bit
なお、導入にはこちらを参考にした
必要なパッケージを取得
mkdir /root/pkg
cd /root/pkg
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.6-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-debuginfo-3.2.6-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-fuse-3.2.6-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-geo-replication-3.2.6-1.x86_64.rpm
wget http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-rdma-3.2.6-1.x86_64.rpm
wget http://pkgs.repoforge.org/rsync/rsync-3.0.7-1.el5.rfx.x86_64.rpm
#サーバ1,2でやってみた
rsync3系が必要なので、標準の2系を削除
rpm -e rsync
シコシコpkgをいれていく
yum -y install python-ctypes
yum -y install wget fuse fuse-libs
cd /root/pkg
rpm -ivh rsync-3.0.7-1.el5.rfx.x86_64.rpm
rpm -ivh glusterfs-core-3.2.6-1.x86_64.rpm
rpm -ivh glusterfs-fuse-3.2.6-1.x86_64.rpm
rpm -ivh glusterfs-geo-replication-3.2.6-1.x86_64.rpm
rpm -ivh glusterfs-geo-replication-3.2.6-1.x86_64.rpm
#サーバ1で
gluster peer probe サーバ2
mkdir /data
mkdir /glmnt
mkdir /gmnt2
#サーバ2で
mkdir /data
ちゃんとうまくいってるとCONNECTになる
gluster peer status
--------------------------------------------------------------------
Number of Peers:1
Hostname: サーバ2
Uuid: 9dd3fd6c-4a63-4aca-8b6d-21f58d6cdbc4
State: Peer in Cluster (Connected)
--------------------------------------------------------------------
で、volumeの作成
今回は、replica2で作成してみる
gluster volume create gluster_vol replica 2 サーバ1:/data サーバ2:/data
マウントしてみる
mount サーバ1:gluster_vol /glmnt
mount サーバ2:gluster_vol /glmnt2
ファイルをtouchしてみる
touch /glmnt/aaa
/glmnt2にもできていることを確認してみる
ls -l /glmnt2
total 4
-rw-r--r-- 1 root root 0 May 9 02:41 aaa
なお、sshの鍵を通さないといけないようだ。。。
- 2012.05.09 Wednesday
- -
- 11:25
- comments(0)
- trackbacks(0)
- -
- -
- by orz
1
calendar
selected entries
- 2012年05月30日のつぶやき (05/31)
- うまそう (05/30)
- 2012年05月22日のつぶやき (05/23)
- ngrepとか (05/22)
- 2012年05月09日のつぶやき (05/10)
- glusterfsを使ってみる (05/09)
categories
- varnish (1)
archives
recent comment
recent trackback
- mysqlを別ポートで立ち上げるメモ
⇒ My First JUGEM
recommend
links
profile
書いた記事数:219
最後に更新した日:2022/09/09