======= Gluster Command / Perintah Dasar =======
Daftar Gluster Command atau perintah dasar gluster kami tulis disini secara lengkap beserta penjelasannya
===== - Melihat Versi GlusterFS =====
glusterfsd --version
Hasil yang keluar
glusterfs 3.7.6 built on Nov 9 2015 15:19:41
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2013 Red Hat, Inc.
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.
====== - Probe Commands ======
===== - Mengecek Koneksi Server =====
gluster peer probe HOSTNAME
===== - Memutus Koneksi Server =====
peer detach HOSTNAME
===== - Melihat Total Peer =====
Peer artinya total server yang terhubung di glusterfs
gluster peer status
Hasilnya
Number of Peers: 1
Hostname: stor2
Uuid: f10c357e-34ef-4a48-a674-f960309f417f
State: Peer in Cluster (Connected)
Hasil diatas menandakan terdapat 1 server terhubung dengan nama stor2.
===== - Mengecek Status Koneksi per Server =====
gluster --remote-host=HOSTNAME peer status
====== - Volume Command ======
===== - Membuat Volume Baru =====
gluster volume create nama_volume hostname:/path/.brick/
anda bisa menggunakan fungsi force untuk memaksakan pembuatan volume contoh seperti ini
gluster volume create nama_volume hostname:/path/.brick/ force
===== - Menghapus Volume =====
gluster delete NAMA_VOLUME
===== - Menjalankan Volume =====
gluster volume start nama_volume
===== - Menghentikan Volume =====
gluster volume stop nama_volume
===== - Merubah Nama Volume =====
gluster volume rename NAMA_VOLUME NAMA_BARU_VOLUME
===== - Menampilkan Semua Volume =====
gluster volume info all
===== - Menampilkan Volume tertentu =====
gluster volume info nama_volume
===== - Menampilkan Status Volume =====
gluster volume status nama_volume
===== - Menampilkan Status Klien Terkoneksi Volume =====
gluster volume status VOLUME_NAME clients
====== - Brick Command ======
===== - Menambah Brick =====
volume add-brick VOLNAME NEW-BRICK
===== - Mengganti Brick =====
gluster volume replace-brick VOLNAME (BRICK NEW-BRICK) start | pause | abort | status
===== - Menghapus Brick Pada Volume Tertentu =====
gluster volume remove-brick VOLNAME [(replica COUNT)|(stripe COUNT)] BRICK
====== - Rebalance Commands ======
===== - Menjalankan Rebalance / Sinkronisasi Volume =====
gluster volume rebalance VOLNAME start
===== - Menghentikan Proses Rebalance / Sinkronisasi =====
gluster volume rebalance VOLNAME stop
===== - Melihat Status Rebalance =====
gluster volume rebalance VOLNAME status
====== - Log Command ======
===== - Membuat Log Baru =====
gluster volume log filename VOLNAME [BRICK] DIRECTORY
===== - Melihat Lokasi log =====
volume log locate VOLNAME [BRICK]
===== - Log Rotate =====
volume log rotate VOLNAME [BRICK]
====== - Mount ======
===== - Mounting Gluster Volume =====
mount -t glusterfs HOSTNAME:/VOLUME_NAME /mount/path
====== - Security ======
===== - Membuka Akses Untuk IP Address Tertentu =====
Untuk membuka akses pada ip address tertentu harus tidak ada client yang terhubung dengan volume terkait
gluster volume set NAMA_VOLUME auth.allow IP_ADDRESS
untuk melihat informasi auth.allow anda bisa menggunakan gluster volume info