john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Glusterfs simple and raid1

apt-get install glusterfs-server

NOTE: 3.0.1 is from apt-get , yet Gluster-FS is up to 3.2 with more features...

glusterfsd = daemon for servers


SIMPLE SERVER-CLIENT SETUP

glusterfs --version (OR glusterfs -V = glusterfs 3.0.2)

mkdir /data/ mkdir /data/export mkdir /data/export-ns

cp /etc/glusterfs/glusterfsd.vol /etc/glusterfs/glusterfsd.vol.old vi /etc/glusterfs/glusterfsd.vol

Export volume "brick" with the contents of "/home/export" directory.

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

Add network serving capability to above brick.

volume server type protocol/server option transport-type tcp subvolumes brick option auth.addr.brick.allow * # Allow access to "brick" volume end-volume


/etc/init.d/glusterfs-server start

netstat -an ... tcp 0 0 0.0.0.0:6996


apt-get install glusterfs-server glusterfs-client

/etc/glusterfs/glusterfs.vol

volume client type protocol/client option transport-type tcp option remote-host 10.10.10.72 option remote-subvolume brick end-volume

mount -t glusterfs /etc/glusterfs/glusterfs.vol /mnt/glusterfs/


fstab for the mount?

update-rc.d glusterd defaults ?



SERVER CLUSTER (using glusterfs-volgen autogenerating config files)

glusterfs-volgen --name repstore1 --raid 1 hostname1:/export/sdb1 hostname2:/export/sdb1

glusterfs-volgen --name repstore1 --raid 1 10.10.10.72:/data/export 10.10.10.87:/data/export

(hostname*.vol files are the server volume files and store1-tcp.vol is the client volume file)

/etc/init.d/glustefs-server start (do this for each server/host above)

mv 10.10.10.72-repstore1-export.vol /etc/glusterfs/glusterfsd.vol (Actually the config file is the same for every server)

mount -t glusterfs /etc/glusterfs/glusterfs.vol /mnt/glusterfs/

netstat -an tcp 0 0 10.10.10.45:1022 10.10.10.72:6996 ESTABLISHED tcp 0 0 10.10.10.45:1020 10.10.10.87:6996 ESTABLISHED tcp 0 0 10.10.10.45:1021 10.10.10.87:6996 ESTABLISHED tcp 0 0 10.10.10.45:1023 10.10.10.72:6996 ESTABLISHED

touch /mnt/glusterfs ll /mnt/glusterfs (will show you the files... does it requires a list to show files?)


SERVER

volume posix1 type storage/posix option directory /data/export end-volume

volume locks1 type features/locks subvolumes posix1 end-volume

volume brick1 type performance/io-threads option thread-count 8 subvolumes locks1 end-volume

volume server-tcp type protocol/server option transport-type tcp option auth.addr.brick1.allow * option transport.socket.listen-port 6996 option transport.socket.nodelay on subvolumes brick1 end-volume


RAID 1

TRANSPORT-TYPE tcp

volume 10.10.10.72-1 type protocol/client option transport-type tcp option remote-host 10.10.10.72 option transport.socket.nodelay on option transport.remote-port 6996 option remote-subvolume brick1 end-volume

volume 10.10.10.87-1 type protocol/client option transport-type tcp option remote-host 10.10.10.87 option transport.socket.nodelay on option transport.remote-port 6996 option remote-subvolume brick1 end-volume

volume mirror-0 type cluster/replicate subvolumes 10.10.10.72-1 10.10.10.87-1 end-volume

volume readahead type performance/read-ahead option page-count 4 subvolumes writebehind end-volume

volume iocache type performance/io-cache option cache-size grep 'MemTotal' /proc/meminfo | awk '{print $2 * 0.2 / 1024}' | cut -f1 -d.MB option cache-timeout 1 subvolumes readahead end-volume

volume quickread type performance/quick-read option cache-timeout 1 option max-file-size 64kB subvolumes iocache end-volume

volume statprefetch type performance/stat-prefetch subvolumes quickread end-volume


  • « Fix udev ubuntu vm nic hostname
  • Ubuntu 11 auto login wifi keyring »

Published

May 6, 2011

Category

linux

~381 words

Tags

  • and 29
  • glusterfs 1
  • linux 249
  • raid1 1
  • simple 11