viernes, 30 de agosto de 2013

GlusterFS 3.2.x On Ubuntu 12.04 with ext4 encrypted with dmcrypt


Follow are my history steps, these steps were created from :
http://www.gluster.org/category/encryption/

and

 http://www.howtoforge.com/high-availability-storage-with-glusterfs-3.2.x-on-ubuntu-12.04-automatic-file-replication-across-two-storage-servers

and

 https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s1-filesystem-ext4-create.html

Only difference is that I used ext4 instead of xfs.

Configure every gluster server with follow steps:

# losetup /dev/loop1 storage_space2
# cryptsetup luksFormat /dev/loop1
# cryptsetup isLuks /dev/loop1 && echo success
# cryptsetup luksDump /dev/loop1
# dmsetup info bricks
# mkfs.ext4 /dev/mapper/bricks
# mkdir /bricks
# mount /dev/mapper/bricks /bricks/
# vi /etc/crypttab
# vi /etc/fstab
# mount -a
# mount -l
# blkid -o full

Create at only once server the gluster volume:

# gluster vol create dmvolume replica 2 192.168.1.91:/bricks/dmvolume 192.168.1.92:/bricks/dmvolume2
# volume group info
# gluster volume  info
# echo "Hola" > /bricks/File1
# cat /bricks/File1
# gluster volume set dmvolume auth.allow 192.168.1.93
# gluster volume stop dmvolume
# gluster volume start dmvolume

Now go to yor gluster client and mount gluster volume:

# mkdir /mnt/dm
# mount -t glusterfs gluster1:/dmvolume /mnt/dm
# mount -l
# ls /mnt/dm
# vi /mnt/dm/File_to_break
# cat /mnt/dm/File_to_break

Go back to your Server and list the created file

  # ls /bricks/dmvolume
  # cat /bricks/dmvolume/File_to_break


Enjoy!
P.S. Have you seen your country round flag?

No hay comentarios:

Publicar un comentario