2. Create bricks
mkfs.xfs -i size=512 /dev/sdb1
mkdir -p /data/brick1
echo '/dev/sdb1 /data/brick1 xfs defaults 1 2' >> /etc/fstab
mount -a && mount
mkdir -p /data/brick1
echo '/dev/sdb1 /data/brick1 xfs defaults 1 2' >> /etc/fstab
mount -a && mount
3. Install package (both nodes)
yum install glusterfs-server
4. Allow communication (both nodes)
iptables -I INPUT -p all -s -j ACCEPT
5. Configure trusted pool
gluster peer probe server2 # from server1
gluster peer probe server1 # from server2
gluster peer status # both servers
gluster peer probe server1 # from server2
gluster peer status # both servers
6. Create bricks to export (both nodes)
mkdir -p /data/brick1/gv0
7. Create gluster volume (from any single node)
gluster volume create vg0 transport tcp replica 2 server1:/data/brick/gv0 server2:/data/brick/gv0
gluster volume start gv0
gluster volume start gv0
8. Mount the volume inside the servers (both nodes)
mount -t glusterfs $(hostname):/gv0 /mnt
No comments:
Post a Comment