How can I add new node to DHT?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2.0.0rc4

>From wiki

Now the question is what about adding a new server? 

Currently hash works based on directory level distribution. Ie, a given
file's parent directory will have information of how the hash numbers are
mapped to subvolumes. So, adding new node doesn't disturb any current setup
as the files/dirs present already have its information preserved. Whatever
new directory gets created, will start considering new volume for scheduling
files. 

But I encounter strange problem: after adding new nodes, old files are
disappeard.
And another problem, I can not use following line to mount a volume
glusterfs  --volfile-server=10.10.123.21 --volfile-server-port=6986
--volume-name=dht0-raw /mnt 

[root@xen-727057 ~]# glusterfs  --volfile=/root/glusterfs.vol
--volume-name=dht0-raw /mnt
[root@xen-727057 ~]# cp * /mnt/
 [root@xen-727057 ~]# ll /mnt/
total 184
-rw-r--r-- 1 root root    78 Mar 15 12:48 112.log
-rw------- 1 root root  1434 Mar 15 12:48 anaconda-ks.cfg
-rwxr-xr-x 1 root root  9506 Mar 15 12:48 a.out
-rw-r--r-- 1 root root  5350 Mar 15 12:48 decode.c
-rw-r--r-- 1 root root  2097 Mar 15 12:48 glusterfs.vol
-rw-r--r-- 1 root root 34517 Mar 15 12:48 install.log
-rw-r--r-- 1 root root  3670 Mar 15 12:48 install.log.syslog
-rw-r--r-- 1 root root  1930 Mar 15 12:48 install.sh
-rw-r--r-- 1 root root 17953 Mar 15 12:48 linux.tgz
-rw-r--r-- 1 root root 29224 Mar 15 12:48 log
-rwxr-xr-x 1 root root  2805 Mar 15 12:48 mksimplerpm.sh
-rwxr-xr-x 1 root root  9955 Mar 15 12:48 nbody
-rw-r--r-- 1 root root  4783 Mar 15 12:48 nbody.cpp
-rwxr-xr-x 1 root root 13119 Mar 15 12:48 redux
-rw-r--r-- 1 root root  7104 Mar 15 12:48 redux.cpp
-rw-r--r-- 1 root root  1517 Mar 15 12:48 teste.cpp
-rw-r--r-- 1 root root   124 Mar 15 12:48 uname.list
[root@xen-727057 ~]# umount /mnt

[root@xen-727057 ~]# vim glusterfs.vol ## I add some extra volumns here.
# goto every node, restart glusterfsd

[root@xen-727057 ~]# glusterfs  --volfile=/root/glusterfs.vol
--volume-name=dht0-raw /mnt
[root@xen-727057 ~]# ll /mnt/
total 48
-rw-r--r-- 1 root root  5350 Mar 15 12:48 decode.c
-rw-r--r-- 1 root root 29224 Mar 15 12:48 log
-rw-r--r-- 1 root root  7104 Mar 15 12:48 redux.cpp
[root@xen-727057 ~]# mkdir /mnt/XXX
[root@xen-727057 ~]# ll /mnt/XXX/
total 0
[root@xen-727057 ~]# ll /mnt/
total 48
-rw-r--r-- 1 root root  5350 Mar 15 12:48 decode.c
-rw-r--r-- 1 root root 29224 Mar 15 12:48 log
-rw-r--r-- 1 root root  7104 Mar 15 12:48 redux.cpp
drwxr-xr-x 2 root root    48 Mar 15 12:48 XXX
[root@xen-727057 ~]#


====Server volumes:
volume brick1-posix
  type storage/posix                   # POSIX FS translator
  option directory /exports/disk1      # Export this directory
end-volume
volume brick1-locks
  type features/locks
  subvolumes brick1-posix
end-volume
volume brick1
  type performance/io-threads
  subvolumes brick1-locks
  option thread-count 16
  option cache-size 256m
end-volume

volume brick2-posix
  type storage/posix                   # POSIX FS translator
  option directory /exports/disk2      # Export this directory
end-volume
volume brick2-locks
  type features/locks
  subvolumes brick2-posix
end-volume
volume brick2
  type performance/io-threads
  subvolumes brick2-locks
  option thread-count 16
  option cache-size 256m
end-volume

#volume brick-ns
#  type storage/posix                   # POSIX FS translator
#  option directory /exports/ns         # Export this directory
#end-volume

### Add network serving capability to above brick.
volume server
  type protocol/server
  option transport-type tcp/server     # For TCP/IP transport
  option listen-port 6986              # Default is 6996
  option client-volume-filename /etc/glusterfs/glusterfs.vol
  subvolumes brick1 brick2 
  option auth.ip.brick1.allow 10.10.*,10.11.*,10.15.*,192.168.*
  option auth.ip.brick2.allow 10.10.*,10.11.*,10.15.*,192.168.*
  option auth.ip.brick-ns.allow 10.10.*,10.11.*,10.15.*,192.168.*
end-volume


====Client volume:
volume 10.10.123.21-brick1
  type protocol/client
  option transport-type tcp/client
  option remote-host 10.10.123.21
  option remote-port 6986
  option transport-timeout 3
  option remote-subvolume brick1
end-volume
volume 10.10.123.21-brick2
  type protocol/client
  option transport-type tcp/client
  option remote-host 10.10.123.21
  option remote-port 6986
  option transport-timeout 3
  option remote-subvolume brick2
end-volume

...

volume dht0-raw
  type cluster/distribute
  #subvolumes 10.10.123.21-brick1 10.10.123.21-brick2 10.10.123.22-brick1
10.10.123.22-brick2
  subvolumes 10.10.123.21-brick1 10.10.123.21-brick2 10.10.123.22-brick1
10.10.123.22-brick2 10.10.123.31-brick1 10.10.123.31-brick2
10.10.123.32-brick1 10.10.123.32-brick2
  option lookup-unhashed yes
end-volume







[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux