GlusterFs配额
1 理论基础
mount -t glusterfs GlusterH01.cmdschool.org: /gv0 /mnt
GlusterH01.cmdschool.org:
/gv0
#或挂载点(/mnt)
2)在多层次目录结构,严格的磁盘限制将被强制执行。
2 实践
gluster volume quota VolumeName enable
gluster volume quota gv0 enable
gluster volume quota VolumeName disable
gluster volume quota gv0 disable
gluster volume quota VolumeName limit-usage / size
gluster volume
quota
gv0 limit-usage / 10GB
gluster volume
quota
VolumeName limit-usage DirectoryPath LimitSize
mount
-t glusterfs GlusterH01.cmdschool.org:
/gv0
/mnt
mkdir
/mnt/dir1
umount
/mnt
ls
/dir1
ls
: cannot access
/dir1
: No such
file
or directory
gluster volume
quota
gv0 limit-usage
/dir1
1GB
volume
quota
: success
ls
-l
/var/run/gluster/gv0/
gluster volume
quota
VolumeName list
gluster volume
quota
gv0 list
gluster volume
quota
VolumeName list DirectoryPath
gluster volume
quota
gv0 list
/dir1
gluster volume
set
VolumeName
quota
-deem-statfs on
gluster volume
set
gv0
quota
-deem-statfs on
df
-hT
localhost:gv0 fuse.glusterfs 10G 49M 10G 1%
/var/run/gluster/gv0
gluster volume
set
VolumeName features.
quota
-deem-statfs off
gluster volume
set
gv0 features.
quota
-deem-statfs off
df
-hT
localhost:gv0 fuse.glusterfs 200G 82M 200G 1%
/var/run/gluster/gv0
gluster volume
set
VolumeName features.
quota
-timeout
time
gluster volume
set
gv0 features.
quota
-timeout 5
gluster volume
quota
VolumeName alert-
time
time
gluster volume
quota
gv0 alert-
time
1d
gluster volume
quota
VolumeName remove DirectoryPath
gluster volume
quota
gv0 remove
/dir1
mount
-t glusterfs GlusterH01.cmdschool.org:
/gv0
/mnt
GlusterH01.cmdschool.org:
/gv0
#或挂载点(/mnt)
gluster volume
quota
VolumeName
enable
gluster volume
quota
gv0
enable
gluster volume
quota
VolumeName disable
gluster volume
quota
gv0 disable
gluster volume
quota
VolumeName limit-usage / size
gluster volume
quota
gv0 limit-usage / 10GB
gluster volume
quota
VolumeName limit-usage DirectoryPath LimitSize
mount
-t glusterfs GlusterH01.cmdschool.org:
/gv0
/mnt
mkdir
/mnt/dir1
umount
/mnt
ls
/dir1
ls
: cannot access
/dir1
: No such
file
or directory
gluster volume
quota
gv0 limit-usage
/dir1
1GB
volume
quota
: success
ls
-l
/var/run/gluster/gv0/
gluster volume
quota
VolumeName list
gluster volume
quota
gv0 list
gluster volume
quota
VolumeName list DirectoryPath
gluster volume
quota
gv0 list
/dir1
gluster volume
set
VolumeName
quota
-deem-statfs on
gluster volume
set
gv0
quota
-deem-statfs on
df
-hT
localhost:gv0 fuse.glusterfs 10G 49M 10G 1%
/var/run/gluster/gv0
gluster volume
set
VolumeName features.
quota
-deem-statfs off
gluster volume
set
gv0 features.
quota
-deem-statfs off
df
-hT
localhost:gv0 fuse.glusterfs 200G 82M 200G 1%
/var/run/gluster/gv0
gluster volume
set
VolumeName features.
quota
-timeout
time
gluster volume
set
gv0 features.
quota
-timeout 5
gluster volume
quota
VolumeName alert-
time
time
gluster volume
quota
gv0 alert-
time
1d
gluster volume
quota
VolumeName remove DirectoryPath
gluster volume
quota
gv0 remove
/dir1