GlusterFS的日常应用

基本上搭建glusterfs都是用了2个副本,用来保证数据冗余

建立新卷,/export/test-vol目录不用事先建立,会自动建立的:

1gluster volume create test-vol replica 2 transport tcp 172.16.8.5:/export/test-vol/ 172.16.8.6:/export/test-vol/  

如上建立新卷后,test-vol的属主是root,如果我们想基于gfs之上做个虚拟的vsftpd,建设用户是virtual.virtual,500.500

设置卷uid/gid属性:

1gluster volume set test-vol storage.owner-uid 500  
2gluster volume set test-vol storage.owner-gid 500  

设置卷的quota空间配额:

1gluster volume quota test-vol enable  
2gluster volume quota test-vol limit-usage / 10GB  
3gluster volume quota test-vol limit-usage /path/in/volume 2G  
4gluster volume set test-vol features.quota-timeout 30  
5gluster volume quota test-vol list  
6gluster volume quota test-vol list /path/in/volume  

去掉quota限制:

1gluster volume quota test-vol remove /  
2gluster volume quota test-Vol remove /path/in/volume  

优化tcp参数:

 1gluster volume set test-vol diagnostics.brick-log-level WARNING  
 2gluster volume set test-vol diagnostics.client-log-level WARNING  
 3gluster volume set test-vol nfs.enable-ino32 on  
 4gluster volume set test-vol nfs.addr-namelookup off  
 5gluster volume set test-vol nfs.disable on  
 6gluster volume set test-vol performance.cache-max-file-size 2MB  
 7gluster volume set test-vol performance.cache-refresh-timeout 4  
 8gluster volume set test-vol performance.cache-size 256MB  
 9gluster volume set test-vol performance.write-behind-window-size 4M  
10gluster volume set test-vol performance.io-thread-count 32  

设置卷访问权限

1gluster volume set test-vol auth.allow 192.168.2.*  
2gluster volume set test-vol auth.reject 192.168.2.*  

监控

1gluster volume profile  zfws-vol start  
2gluster volume profile  zfws-vol info  

Ipxe中menu.c32和vesamenu.c32的用法
Linux下virtual FTP的搭建pure-Ftpd
comments powered by Disqus