Gluster is a distributed file system.
Potrzebne będą dwie maszyny wirtualne.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
root@debian-template:~# fdisk /dev/sdb Welcome to fdisk (util-linux 2.25.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0xd6c8071d. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-2097151, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-2097151, default 2097151): +500M Created a new partition 1 of type 'Linux' and of size 500 MiB. Command (m for help): n Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): p Partition number (2-4, default 2): 2 First sector (1026048-2097151, default 1026048): Last sector, +sectors or +size{K,M,G,T,P} (1026048-2097151, default 2097151): Created a new partition 2 of type 'Linux' and of size 19.5 GiB. Command (m for help): t Partition number (1,2, default 2): 1 Hex code (type L to list all codes): 83 Changed type of partition 'Linux' to 'Linux'. Command (m for help): t Partition number (1,2, default 2): 2 Hex code (type L to list all codes): 83 Changed type of partition 'Linux' to 'Linux'. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. root@debian-template:~# |
1 2 |
apt-get install xfsprogs mkfs.xfs -i size=512 /dev/sdb1 |
1 |
mkdir -p /data/brick1 |
1 |
echo "/dev/sdb1 /data/brick1 xfs defaults 1 2" >> /etc/fstab |
1 |
mount -a |
1 |
apt-get install glusterfs-server |
1 2 |
192.168.154.166 server1 192.168.154.177 server2 |
1 |
gluster peer probe server1 |
1 |
gluster peer probe server2 |
1 |
mkdir /data/brick1/gv0 |
1 2 |
gluster volume create gv0 replica 2 server1:/data/brick1/gv0 server2:/data/brick1/gv0 gluster volume start gv0 |
1 2 |
mkdir /mnt/glusterfs-gv0 mount -t glusterfs server1:/gv0 /mnt/glusterfs-gv0 |