GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… ·...
-
Upload
duongquynh -
Category
Documents
-
view
223 -
download
2
Transcript of GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… ·...
![Page 1: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/1.jpg)
GlusterFSScale-out network-attached storage file system
@strnadj
![Page 2: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/2.jpg)
Základní informace
Open-source DFS (https://github.com/gluster/glusterfs)
RedHat (původně Gluster Inc.)
Community support (IRC, Mailing List)
Základní pojmy - Brick, Volume
Server - Linux
![Page 3: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/3.jpg)
Chování a přípojení k DFS
![Page 4: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/4.jpg)
Autentizace a AutorizaceVe výchozím stavu může kdokoliv přistupovat k úložišti
Toto můžeme omezit pomocí:
NFS - verze 3. - nutné míti v celé síti stejná UID (NFSv4 + KB v plánu, bylo o něm uvažováno již pro aktuální verzi 3.4.1)
LDAP, uid-mapping
Omezení IP
gluster volume set testvol auth.allow 192.168.0.102
(můeme využít wildcard nebo oddělit IP čárkou)
![Page 5: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/5.jpg)
Podporované rozloženíDistributed volume - scalability
Replicated volume - High-Availability
Stripped volume - stripping
Distributed-Stripped volume - D+S
Distributed-Replication volume ( RAID 10 )
Geo-Replication - backup
![Page 6: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/6.jpg)
Podporované rozloženíDistributed volume - scalability
Replicated volume - High-Availability
Stripped volume - stripping
Distributed-Stripped volume - D+S
Distributed-Replication volume ( RAID 10 )
Geo-Replication - backup
![Page 7: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/7.jpg)
Distributed volumeVolume je přes skupinu bricků
![Page 8: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/8.jpg)
Podporované rozloženíDistributed volume - scalability
Replicated volume - High-Availability
Stripped volume - stripping
Distributed-Stripped volume - D+S
Distributed-Replication volume ( RAID 10 )
Geo-Replication - backup
![Page 9: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/9.jpg)
Replicated volumeReplikace - každý soubor na všech bricích (HA)
![Page 10: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/10.jpg)
Podporované rozloženíDistributed volume - scalability
Replicated volume - High-Availability
Stripped volume - stripping
Distributed-Stripped volume - D+S
Distributed-Replication volume ( RAID 10 )
Geo-Replication - backup
![Page 11: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/11.jpg)
Stripped volume
![Page 12: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/12.jpg)
Podporované rozloženíDistributed volume - scalability
Replicated volume - High-Availability
Stripped volume - stripping
Distributed-Stripped volume - D+S
Distributed-Replication volume ( RAID 10 )
Geo-Replication - backup
![Page 13: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/13.jpg)
Distributed-Stripped volume
![Page 14: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/14.jpg)
Podporované rozloženíDistributed volume - scalability
Replicated volume - High-Availability
Stripped volume - stripping
Distributed-Stripped volume - D+S
Distributed-Replication volume ( RAID 10 )
Geo-Replication - backup
![Page 15: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/15.jpg)
Distributed-Replication volumeKombinace Distribuovaný + Replikovaný
![Page 16: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/16.jpg)
Debian 7.2 - požadavkyopenssh-server
flex
wget
nfs-common
bison
automake, gcc, libtool
portmapper (rpcbind)
fuse
![Page 17: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/17.jpg)
Instalace
apt-get install glusterfs-server
/etc/init.d/glusterfs-server restart
netstat -lpn | grep gluster
![Page 18: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/18.jpg)
Vytvoření volume (bricků)
Příkaz: gluster volume create testvol replica 2 transport tcp server1.example.com:/data server2.example.com:/data
Vytvoří sdílený FS s názvem “testvol”
2 repliky (počet serverů)
v adresáři /data
![Page 19: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/19.jpg)
ChybyUmí vytvořit pouze 1 složku /data/testvol neprojde - stačí vytvořit /data
IPtables porty (tcp - 24007:24047, 111, 38465:38467(počet bricků), udp - 111)
“overlapping export directories from the same peer”
Chyba nastává při klonování nodů
Stačí vygenerovat nová UID (uuid-runtime v debianu)
echo "UUID=$(uuidgen)" > /etc/glusterd/glusterd.info
![Page 20: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/20.jpg)
Spuštění
![Page 21: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/21.jpg)
Nastavení klienta (gfs-client, nfs)
apt-get install glusterfs-client
mount.glusterfs server1.example.com:/testvol /mnt/testvol
upravit etc/fstab
mount -v -o mountproto=tcp,nfsvers=3 -t nfs server1.example.com:/testvol /mnt/testvol
![Page 22: GlusterFS - download.zcu.czdownload.zcu.cz/.../seminare_CIV_2013/KIV-PD_JanStrnadek-GlusterF… · apt-get install glusterfs-client mount.glusterfs server1.example.com:/testvol /mnt](https://reader031.fdocument.pub/reader031/viewer/2022021818/5aaab4b67f8b9a9a188e910b/html5/thumbnails/22.jpg)
Děkuji za pozornost