Skip to content

Margus Roo –

If you're inventing and pioneering, you have to be willing to be misunderstood for long periods of time

  • Cloudbreak Autoscale fix
  • Endast

Glusterfs

Posted on October 26, 2010 - October 28, 2010 by margusja

Oli ka aeg. Kes see ikka tänapäeval ühe serveriga storaget peab. Igaljuhul olen ma oma esimese glusterfs instantsi käivitamise üle nii uhke, et lausa panen siia. Mine tea ehk lisan endale ka hiljem väikese how-to

Download

Docs

storage1 masinas peab käima glasterfs-server

[root@storage1 ~]# /etc/init.d/glusterfsd status
glusterfsd (pid 23029 4386) is running...
[root@storage1 ~]#

loome esialgu kahest storagest koosneva volume (seda võib teha suvalises masinas kus glusterd käib kus on gluster CLI olemas)

[root@storage2 ~]# gluster volume create storage transport tcp 192.168.1.202:/mnt/storage 192.168.1.203:/mnt/storage
Creation of volume storage has been successful
[root@storage2 ~]# gluster volume info storage

Volume Name: storage
Type: Distribute
Status: Created
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 192.168.1.202:/mnt/storage
Brick2: 192.168.1.203:/mnt/storage
[root@storage2 ~]#

Käivitame

[root@storage2 ~]# gluster volume start storage
Starting volume storage has been successful

Klient masinas mount-me glusterfs-i.

[root@client ~]# mount
/dev/xvda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/xvda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@client ~]# mount -t glusterfs 192.168.1.203:storage /mnt/glusterfs/
[root@client ~]# mount
/dev/xvda2 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/xvda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
glusterfs#192.168.1.203:storage on /mnt/glusterfs type fuse (rw,allow_other,default_permissions,max_read=131072)
[root@client ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 1.9G 1.3G 524M 71% /
/dev/xvda1 99M 13M 81M 14% /boot
tmpfs 250M 0 250M 0% /dev/shm
glusterfs#192.168.1.203:storage
942M 21M 873M 3% /mnt/glusterfs

lisame uue node

[root@storage2 ~]# gluster volume add-brick storage 192.168.1.201:/mnt/storage
Add Brick successful
[root@storage2 ~]# gluster volume info storage

Volume Name: storage
Type: Distribute
Status: Started
Number of Bricks: 3
Transport-type: tcp
Bricks:
Brick1: 192.168.1.202:/mnt/storage
Brick2: 192.168.1.203:/mnt/storage
Brick3: 192.168.1.201:/mnt/storage

Kliendi masinas peale mõninga aja möödumist

[root@client ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda2 1.9G 1.3G 524M 71% /
/dev/xvda1 99M 13M 81M 14% /boot
tmpfs 250M 0 250M 0% /dev/shm
glusterfs#192.168.1.203:storage
1.2G 25M 1.1G 3% /mnt/glusterfs

host1:

Vajalikud pakid repost:

[root@host3 ~]# yum install libibverbs-devel fuse-devel fuse

Posted in Linux

Post navigation

php ja socketi avatud aja kontrollimine (curl)
Postgres pgpool-II

Leave a Reply

You must be logged in to post a comment.

The Master

Categories

  • Apache
  • Apple
  • Assembler
  • Audi
  • BigData
  • BMW
  • C
  • Elektroonika
  • Fun
  • Hadoop
  • help
  • Infotehnoloogia koolis
  • IOT
  • IT
  • IT eetilised
  • Java
  • Langevarjundus
  • Lapsed
  • lastekodu
  • Linux
  • M-401
  • Mac
  • Machine Learning
  • Matemaatika
  • Math
  • MSP430
  • Muusika
  • neo4j
  • openCL
  • Õpetaja identiteet ja tegevusvõimekus
  • oracle
  • PHP
  • PostgreSql
  • ProM
  • R
  • Turvalisus
  • Varia
  • Windows
Proudly powered by WordPress | Theme: micro, developed by DevriX.