Download - Glusterfs: un filesystem altamente versatile
![Page 2: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/2.jpg)
Ferrara LUG, Linuxday 2013
2013
Mi presento
BioDec S.r.l. è una società di informatica che, fin dalla fondazione (2003), ha scelto di usare esclusivamente software libero o open-source. ● Tutte le attività aziendali sono gestite senza usare
prodotti proprietari – Desktop e portatili– Private cloud– Networking & intranet– Filesystem distribuito.
● Dettagli: http://www.biodec.com
![Page 3: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/3.jpg)
2013
La richiesta
“Ivan, ci serve una cartella condivisa …
(Tutto qua? Perchè mi chiami? Usa ... )
...da 40 Terabytes”
(Vabbé, allora è meglio se ci penso un attimo)
![Page 4: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/4.jpg)
2013
La soluzione canonica
Un SAN “PVnRT” ● I dischi costano molto
– una cifra ridicola
● Cinque anni di vita– la migrazione dati ...
● Quante licenze???● Un monolite ● Si è (già) rotto pure luiMolte valgono anche per un NAS “Sibilla” basato su “ZeFinalFS”
![Page 5: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/5.jpg)
2013
La soluzione eretica
Uno storage cluster(software-defined storage*)
● Aggregando diversi server con un filesystem distribuito posso creare un NAS virtuale
– Componenti standard e/o non proprietari (ndt. costa meno)
– Scalabile– Maggiore resistenza
all'obsolescenza
*buzzword compliance
![Page 6: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/6.jpg)
2013
La reazione
L'hanno presa beneL'hanno presa bene
a)a) Ma cos'è questa strana roba?Ma cos'è questa strana roba?
b)b) Te sei matto!! Sta roba qui non la usa nessuno!!!Te sei matto!! Sta roba qui non la usa nessuno!!!
● AziendeAziende– Google, Yahoo, Amazon … (le solite)
● Ricerca– CERN, NCAR, EMBL, EBI … (li hanno inventati)
● Altri pericolosi sovversivi– Biblioteca Nazionale, Banca d'Italia
![Page 7: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/7.jpg)
Ferrara LUG, Linuxday 2013
2013
GlusterFS● un file system distribuito
– TCP/IP (10 GbE rocks!) o Infiniband– Alternative:
● Ceph, Lustre, XtreemFS, MooseFS
● scalabile ed elastico – esistono installazioni multi-petabytes– è possibile sia espandere che ridurre un
filesystem GlusterFS, ● (è molto più semplice espandere)
● Software libero– Supporto commerciale: RedHat (RHAS)
Il candidato
http://gluster.orghttp://gluster.org
![Page 8: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/8.jpg)
Ferrara LUG, Linuxday 2013
2013
GlusterFS features
● File system Posix● Supporto ACL e quota● Esportabile nativamente, NFSv3, CIFS (con samba)● Peer-to-peer● Fault-tolerance (opportunamente configurato)● High availability (export nativo, CTDB)● Self-healing ● Installazione molto semplice e veloce
– Poi quando vuoi ottimizzare il tutto, un pò meno
![Page 9: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/9.jpg)
Ferrara LUG, Linuxday 2013
2013
Alcuni dettagli
● Architettura a plugins● Componenti
– Peers: componenti del cluster (glusterfs-server)– Brick: filesystem locale su cui opera GlusterFS– Translator: componente sw che opera su brick o
subvolume, e genera un subvolume con particolari proprietà.
– Distribute, replicate, stripe: speciali translator che generano configurazioni simil-RAID
– Volume: il risultato finale, uno share glusterfs
![Page 10: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/10.jpg)
Ferrara LUG, Linuxday 2013
2013
Semplice da installare
● Procurarsi un paio di “server”– installarci glusterfs-server e far partire glusterfsd
● Usate i pacchetti di gluster.org (no distribuzioni)– Preparare filesystems per i brick (XFS)
● Creare un “trusted pool” dei server – gluster peer probe (numero.ip.del.server)
● Creare un volume gluster– gluster volume create gv1 srv1.my.net:/export/brick1
srv2.my.net:/export/brick1– gluster volume start gv1; gluster volume info
● Montare il filesystem distribuito– Usando NFS o il client nativo
![Page 11: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/11.jpg)
Ferrara LUG, Linuxday 2013
2013
RAID-like
● gluster volume create (vol) replica (n) stripe (m) transport (tcp,rdma) server1:brick1 server2:brick2 …
● Distribute– Il default (replica 0 stripe 0)– I files creati vengono scritti interamente su uno dei brick– Nessuna forma di ridondanza (JBOD ma “bilanciato”)
● Replicate– I files vengono replicati interamente su diversi bricks
● simile a un RAID1 (un insieme di RAID1 “bilanciati”)
● Stripe– I files venfono spezzati in m stripes su m bricks
![Page 12: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/12.jpg)
2013
Elasticità
● Espandere un volume– gluster peer probe (server)– gluster volume add-brick (vol) (server:nuovobrick)– gluster volume rebalance (vol) fix-layout start
● Ridurre un volume1. gluster volume remove-brick (vol) (srv:brick) start
2. gluster volume remove-brick (vol) (srv:brick) status;
3. ...aspettare... ; repeat 2 until ready
4. gluster volume remove-brick (vol) (srv:brick) commit
5. gluster volume rebalance (vol) fix-layout start
![Page 13: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/13.jpg)
Ferrara LUG, Linuxday 2013
2013
Peer-to-Peer
● Nessun metadata server– I metadati sono immagazzinati negli extended
attributes del file system (xfs -i 512 raccomandato)– Localizzazione files deterministica (hashing)– Uso intensivo di caching lato client
● Tutti i peer sono server Gluster & NFSv3– Non solo i peer che forniscono i bricks– Previsto anche CIFS nativo (v3.5?)
● Accesso client– Il client nativo fornisce fault-tolerance e load-balancing– Il client NFS no, se non si usano sistemi esterni.
![Page 14: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/14.jpg)
Ferrara LUG, Linuxday 2013
2013
NFS server disponibile e bilanciato: CTDB
● CTDB (Cluster temporary DB) è un progetto Samba– Andrew Tridgell (samba, rsync)
● CTDB assicua la consistenza di dati e locks TDB – Molto veloce e leggero
● CTDB dispone di High-Aavilability features – node monitoring, – node failover, – IP takeover
Accoppiato con un rrDNS ci permette di bilanciare e rendere fault-tolerant le connessioni NFS ai peers
http://ctdb.samba.orghttp://ctdb.samba.org
![Page 15: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/15.jpg)
2013
Una nota di realismo
● Con hardware scadente non si va fortissimo– La velocità sarà funzione del componente più scadente
(come sempre!) che è il networking nel 90% dei casi.
● Le performance degradano molto con grandi numeri di files piccoli
– Anche una directory con 10.00 files flat è un problema– traffico metadati
● Peak performance richiede ottimizzazioni al kernel– Soprattutto con client nativo e replica
● Deadline scheduler, TCP stacks– Nondimeno su 10 GbE, c'è chi ha fatto 800 MB/sec
![Page 16: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/16.jpg)
2013
L'area “scratch”
● Elaborazione dati (grossi data set bioinformatici)– In produzione da 4 anni– Evoluta nel tempo– Mai perso dei dati, nonostante il progetto
● Il sistema– 2x server Xeon (4 core) di 4 anni fa
● 2x GbE bonding● 6x 2 TB HD (Raid-6)
– GlusterFS 3.2● Semplice distribute (16 TB)● Accesso via client nativo
![Page 17: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/17.jpg)
2013
La cartella condivisa
● Due server – 12 core Xeon E5– 16x HD 3 TB (RAID)– 2x GbE NIC bonding (user's clients)– 1x 10 GbE NIC (data + KVM clients)
● GlusterFS– Versione 3.4.x– Distribute + replica 2– Bricks su LVM
● Acceduto via NFS (TCDB + round-robin DNS)
![Page 18: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/18.jpg)
2013
Qualche numero
● Accesso da macchina virtuale KVM – NFS su connessione 10 GbE– Test: Bonnie++
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
KVM gl-nfs 8G 1495 98 247834 38 4661 2 3473 99 447219 35 1476 186
Latency 10098us 178ms 600s 60477us 11641us 4547ms
![Page 19: Glusterfs: un filesystem altamente versatile](https://reader033.vdocuments.mx/reader033/viewer/2022060120/55916a3b1a28ab39228b4670/html5/thumbnails/19.jpg)
Ferrara LUG, Linuxday 2013
2013
GRAZIE PER L'ATTENZIONE
Gluster community
http://gluster.org
Domande?