2975
Comment:
|
← Revision 66 as of 2021-03-26 21:17:29 ⇥
764
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
Line 5: | Line 4: |
For the sport of it, we will configure 4 GlusterFS servers. | For the sport of it, we will configure 3 GlusterFS servers. |
Line 7: | Line 6: |
== Network == | Configure the [[GlusterFS Server|servers]], then the [[GlusterFS Client|client]]. Once completed continue by setting up [[GlusterFS Encryption|encryption]]. |
Line 9: | Line 8: |
The GlusterFS servers will have fixed IP-addresses. That is configured in the DHCP servers list of statically assigned IP-adresses by using the Domains MAC address. * 192.168.1.40 gluster01 * 192.168.1.41 gluster02 * 192.168.1.42 gluster03 * 192.168.1.43 gluster04 == Disk == We will add an additional disk to the system. This disk will be used for file storage. == Software == {{{ apt-get install glusterfs-server }}} from gluster01 connect with the other gluster servers {{{ gluster peer probe gluster02 gluster peer probe gluster03 gluster peer probe gluster04 }}} check server status {{{ gluster peer status Number of Peers: 3 Hostname: gluster02 Uuid: 031573c2-3b1f-4946-bd78-421563249db6 State: Peer in Cluster (Connected) Hostname: gluster03 Uuid: ff5cec1c-6d7f-4db7-8676-08deff06b4d0 State: Peer in Cluster (Connected) Hostname: gluster04 Uuid: 65fc398a-52e9-4292-9bbb-884becfbf5d6 State: Peer in Cluster (Connected) }}} on the kvm host add a 16GiB harddisk for each of the servers {{{ lvcreate --size 16G --name kvm_gluster01_vdb vg2 lvcreate --size 16G --name kvm_gluster02_vdb vg2 lvcreate --size 16G --name kvm_gluster03_vdb vg2 lvcreate --size 16G --name kvm_gluster04_vdb vg2 }}} hotadd those disks {{{ virsh attach-disk gluster01 --source /dev/vg2/kvm_gluster01_vdb --target vdb virsh attach-disk gluster02 --source /dev/vg2/kvm_gluster02_vdb --target vdb virsh attach-disk gluster03 --source /dev/vg2/kvm_gluster03_vdb --target vdb virsh attach-disk gluster04 --source /dev/vg2/kvm_gluster04_vdb --target vdb }}} in the guest create one large partition on vdb with partition type linux lvm set up a new physical volume and volume group {{{ pvcreate /dev/vdb1 vgcreate vg2 /dev/vdb1 }}} create the volumes {{{ lvcreate --size 4G --name gluster_www vg2 lvcreate --size 4G --name gluster_mail vg2 }}} create the mountpoints {{{ mkdir /srv/mail mkdir /srv/www }}} format the volumes {{{ mkfs.btrfs /dev/vg2/gluster_www mkfs.btrfs /dev/vg2/gluster_mail }}} add the volumes to /etc/fstab {{{ /dev/vg2/gluster_www /srv/www btrfs defaults 0 0 /dev/vg2/gluster_mail /srv/mail btrfs defaults 0 0 }}} create the gluster volume. the force option is needed because we are creating the volume on a mountpoint. {{{ gluster volume create www replica 4 transport tcp gluster01:/srv/www gluster02:/srv/www gluster03:/srv/www gluster04:/srv/www force }}} |
If you only want to run 2 GlusterFS servers then setup [[GlusterFS Server with Arbiter|servers with arbiter]] and [[GlusterFS Client with Arbiter|client with arbiter]] instead. |
GlusterFS
GlusterFS is a distributed filesystem. It has built in redundancy, so it is possible to run two servers which automatically replicate files between the servers. If one server goes down, the other just takes over. Once it comes up again, files are automatically replicated. Here we will use GlusterFS as a redundant network mounted file storage.
For the sport of it, we will configure 3 GlusterFS servers.
Configure the servers, then the client. Once completed continue by setting up encryption.
If you only want to run 2 GlusterFS servers then setup servers with arbiter and client with arbiter instead.