Skip to content

emka.web.id

menulis pengetahuan – merekam peradaban

Menu
  • Home
  • Tutorial
  • Search
Menu

Membuat High-Availability Storage Server dengan GlusterFS

Posted on October 8, 2010

Tutorial kali ini berangkat dari apa yang saya coba bangun kemarin, saya mencoba membuat 2 server storage dengan kemampuan tinggi menggunakan GlusterFS di Ubuntu Server 10.04. Skenarionya, setiap server storage akan menjadi cermin/mirror dari server storage yang lain dan file akan otomatis saling direplikasi diantara kedua server tersebut.

GlusterFS memang file sistem cluster yang luar biasa, GlusterFS mampu menangani storage sampai dengan akhiran petabyte!. Hal ini wajar karena Gluster sendiri dikembangkan dengan mengkombinasikan beberapa teknologi seperti Infiniband RDMA atau interkoneksi TCP/IP pada jaringan file sistem besar.

Sekadar catatan, IP Address yang saya gunakan adalah 192.168.0.100 untuk server1, 192.168.0.101 untuk server2 dan sebuah client dengan IP 192.168.0.102. Semua komputer tersebut harus sudah mempunyai hostname yang jelas (silakan oprek /etc/hosts/ anda).

Langkah Instalasi Server GlusterFS

1. masuk sebagai root pada terminal,
2. jalankan instalasi glusterfs-server dengan aptitude
[sourcecode language=”bash”]aptitude install glusterfs-server[/sourcecode]

setelah selesai kita dapat mengecek versi keberapa GlusterFS yang kita pakai dengan command [code]glusterfs –version[/code]
contohnya:
[code]
root@server1:~# glusterfs –version
glusterfs 3.0.2 built on Mar 23 2010 00:24:16
Repository revision: v3.0.2
Copyright (c) 2006-2009 Gluster Inc. <http://www.gluster.com>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
root@server1:~#
[/code]

3. buat beberapa direktori penting:
[code]mkdir /data/
mkdir /data/export
mkdir /data/export-ns[/code]

4. buat konfigruasi untuk glusterfs server di [code]/etc/glusterfs/gluesterfsd.vol[/code] dengan mencadangkan file asli dan melakukan pengubahan seperti mendefisikan kembali direktori yang akan diekspor (misalnya /data/export) dan client mana yang diperbolehkan (misalnya 192.168.0.102) dll.
[sourcecode]
cp /etc/glusterfs/glusterfsd.vol /etc/glusterfs/glusterfsd.vol_orig
cat /dev/null > /etc/glusterfs/glusterfsd.vol
vi /etc/glusterfs/glusterfsd.vol
[/sourcecode]

berikut konfigurasi milik saya:
[sourcecode]
volume posix
type storage/posix
option directory /data/export
end-volume

volume locks
type features/locks
subvolumes posix
end-volume

volume brick
type performance/io-threads
option thread-count 8
subvolumes locks
end-volume

volume server
type protocol/server
option transport-type tcp
option auth.addr.brick.allow 192.168.0.102
subvolumes brick
end-volume
[/sourcecode]
Oh ya, selain anda menetapkan IP address secara statik, anda bisa juga menggunakan wildcard seperti 192.168.* serta menaruh banyak IP pada baris yang sama dengan dipisah tanda koma.

5. restart daemon glusterfs server
[code]/etc/init.d/glusterfs-server start[/code]

Konfigurasi Client GlusterFS

Client dari sistem GlusterFS ini juga harus dikonfigurasi. Untuk tiap klien harus diinstall glusterfs-client dan glusterfs-server.

1. instalasi glusterfs-client dan glusterfs-server
[code]aptitude install glusterfs-client glusterfs-server[/code]

2. buat direktori untuk mounting sistem glusterfs
[code]mkdir /mnt/glusterfs[/code]

3. buat konfigurasi glusterfs.vol dengan langkah serupa (salin dan ubah).
[sourcecode]
cp /etc/glusterfs/glusterfs.vol /etc/glusterfs/glusterfs.vol_orig
cat /dev/null > /etc/glusterfs/glusterfs.vol
vi /etc/glusterfs/glusterfs.vol
[/sourcecode]

berikut contoh konfigurasi saya:
[code]
volume remote1
type protocol/client
option transport-type tcp
option remote-host server1.example.com
option remote-subvolume brick
end-volume

volume remote2
type protocol/client
option transport-type tcp
option remote-host server2.example.com
option remote-subvolume brick
end-volume

volume replicate
type cluster/replicate
subvolumes remote1 remote2
end-volume

volume writebehind
type performance/write-behind
option window-size 1MB
subvolumes replicate
end-volume

volume cache
type performance/io-cache
option cache-size 512MB
subvolumes writebehind
end-volume
[/code]

Catt. Pastikan anda mencantumkan hostname atau IP address yang benar pada baris-baris option remote-host!

Penggunaan

Untuk menggunakan storage besar ini, anda harus melakukan mounting dulu dengan perintah sebagai berikut:
[code]
glusterfs -f /etc/glusterfs/glusterfs.vol /mnt/glusterfs
[/code]
atau
[code]
mount -t glusterfs /etc/glusterfs/glusterfs.vol /mnt/glusterfs
[/code]

berikut adalah contoh apa yang terjadi ketika saya menjalankan command mount:

root@client1:~# mount
 /dev/mapper/server3-root on / type ext4 (rw,errors=remount-ro)
 proc on /proc type proc (rw,noexec,nosuid,nodev)
 none on /sys type sysfs (rw,noexec,nosuid,nodev)
 none on /sys/fs/fuse/connections type fusectl (rw)
 none on /sys/kernel/debug type debugfs (rw)
 none on /sys/kernel/security type securityfs (rw)
 none on /dev type devtmpfs (rw,mode=0755)
 none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
 none on /dev/shm type tmpfs (rw,nosuid,nodev)
 none on /var/run type tmpfs (rw,nosuid,mode=0755)
 none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
 none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
 none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
 /dev/sda1 on /boot type ext2 (rw)
 /etc/glusterfs/glusterfs.vol on /mnt/glusterfs type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072)
 root@client1:~#

kalau dicek dengan perintah df -h, hasilnya sebagai berikut:

root@client1:~# df -h
 Filesystem            Size  Used Avail Use% Mounted on
 /dev/mapper/server3-root
                        29G  852M   26G   4% /
 none                  243M  172K  242M   1% /dev
 none                  247M     0  247M   0% /dev/shm
 none                  247M   36K  247M   1% /var/run
 none                  247M     0  247M   0% /var/lock
 none                  247M     0  247M   0% /lib/init/rw
 none                   29G  852M   26G   4% /var/lib/ureadahead/debugfs
 /dev/sda1             228M   17M  199M   8% /boot
 /etc/glusterfs/glusterfs.vol
                        18G  848M   16G   5% /mnt/glusterfs
 root@client1:~#

dapat dilihat kalau server1 memilik ruang bebas sekitar 18GB saja, padahal aslinya 36GB, hal ini dikarenakan kita memilih opsi saling mirror sehingga terdeteksi separuhnya saja.

Untuk melakukan mounting otomatis tiap sistem linux dijalankan, silakan masukkan baris berikut pada /etc/fstab:
[code]
/etc/glusterfs/glusterfs.vol /mnt/glusterfs glusterfs defaults 0 0
[/code]
Lakukan reboot pada client dan cek ulang dengan perintah df serta mount.

Salam,

Luthfi Emka
PPTIK Universitas Negeri Semarang

Terbaru

  • Bahaya Hacking Dibalik No WA Duda Mapan Cari Jodoh Istri Pengusaha Kaya Raya yang Serius
  • Apa arti Kota Penerbit Identitas di Bank BNI?
  • Apakah Bank Saqu Astra Aman atau Penipuan?
  • Apakah Platform Amalan.id Penipu?
  • Apa itu Rekening Pasif di Bank BRI? Apa Resikonya?
  • Apa Arti Kode ‘Bunga Rekening’ di Mutasi Rekening Bank BRI?
  • Apa itu BRI Nex Card? Keuntungan, Fitur, dan Cara Daftarnya
  • Cara Mudah Membuat Rate Card dengan AI Tahun 2026
  • Cara Memperbaiki Glance Error di OnePlus 13
  • Apakah Langkah Open-source dari X Ancam Akun Anonim?
  • Kenapa Hewan Tidak Punya Klorofil?
  • Apa itu Kegiatan Review dan Pengertian Review
  • Bulgaria Lumpuhkan Situs Pembajakan Streaming & Game, AS Ikut Campur!
  • Apa itu Google Analytics 4?
  • Cara Cek Status DTSEN Terbaru, DTSEN Jadi Penentu Bansos PKH & BPNT 2026
  • Nvidia GeForce Now Resmi di Linux!
  • Kode Redeem Blade Ball Roblox Terbaru 1 Februari 2026: Raih Hadiah Spesialmu!
  • Kode Paket Internet Indosat Murah Terbaru 2026: Kuota 25GB Cuma 50 Ribu?
  • AFK Fishing Roblox: Auto Panen Ikan 24 Jam Pakai CC Cloud Phone!
  • Rahasia Meta AI WhatsApp: Cara Ampuh Dapat Cuan dari Chatbot!
  • Gokil! Case Pixel Diskon 90% di Verizon, Buruan Sikat!
  • Apakah APK CashCepat Penipu? Ada Izin Pinjol OJK?
  • Lowongan Kerja Leader di BRI Melalui BFLP Specialist 2026, Cek Syarat Lengkapnya Di Sini!
  • Inilah Cara Ajukan KUR BSI 2026 yang Cair Hingga 500 Juta Tanpa Riba!
  • Ini Trik Supaya Pengajuan KUR BRI 2026 Kalian Cepat Disetujui!
  • Inilah Cara Mengenali Gejala Virus Nipah dan Langkah Pencegahannya
  • Spesifikasi Minimal PC untuk Game Arknights: Endfield
  • Apa itu Pengertian RSVP?
  • Inilah Kode Warna Emas/Gold di Canva
  • Ini Trik Supaya CCTV 24 Jam Nggak Bikin Kantong Jebol Karena Kuota dan Listrik!
  • Spotify Introduces Group Chat Feature: Sharing Music and Podcasts with Friends Directly
  • Microsoft Will Fix Windows 11 Performance and User Experience Issues in 2026
  • Windows 11 KB5074105 Update Explained
  • Windows 11 Start Menu Resize Issues Explained
  • Definitely Not Fried Chicken Game Explained
  • Cara Membuat Podcast dari PDF dengan NotebookLlama dan Groq
  • Tutorial Membuat Sistem Automatic Content Recognition (ACR) untuk Deteksi Logo
  • Apa itu Google Code Wiki?
  • Cara Membuat Agen AI Otomatis untuk Laporan ESG dengan Python dan LangChain
  • Cara Membuat Pipeline RAG dengan Framework AutoRAG
  • Apa itu Spear-Phishing via npm? Ini Pengertian dan Cara Kerjanya yang Makin Licin
  • Apa Itu Predator Spyware? Ini Pengertian dan Kontroversi Penghapusan Sanksinya
  • Mengenal Apa itu TONESHELL: Backdoor Berbahaya dari Kelompok Mustang Panda
  • Siapa itu Kelompok Hacker Silver Fox?
  • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025
Beli Pemotong Rumput dengan Baterai IRONHOOF 588V Mesin Potong Rumput 88V disini https://s.shopee.co.id/70DBGTHtuJ
Beli Morning Star Kursi Gaming/Kantor disini: https://s.shopee.co.id/805iTUOPRV

©2026 emka.web.id | Design: Newspaperly WordPress Theme