问题:一个分布式复制Gluster卷只有一半的容量.
我将AWS EC2实例设置为Gluster卷,以及安装Gluster卷的第三个EC2实例。
两个Gluster服务器都有两个2G块。Gluster卷是用复制因子2设置的,目的是使这两台服务器保存相同数据的4G。下面是在Gluster服务器上查询的输出:
ubuntu@ip-172-31-10-167:~$ sudo gluster volume info
Volume Name: swarm
Type: Distributed-Replicate
Volume ID: 142a9406-f3c9-49c8-a38f-f55e85185d1a
Status: Started
Snapshot Count: 0
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: ip-172-31-10-167.eu-west-1.compute.internal:/data/gluster/swarm/brick0
Brick2: ip-172-31-28-55.eu-west-1.compute.internal:/data/gluster/swarm/brick0
Brick3: ip-172-31-10-167.eu-west-1.compute.internal:/data/gluster/swarm/brick1
Brick4: ip-172-31-28-55.eu-west-1.compute.internal:/data/gluster/swarm/brick1
Options Reconfigured:
auth.allow: *
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off
ubuntu@ip-172-31-10-167:~$ sudo gluster volume status
Status of volume: swarm
Gluster process TCP Port RDMA Port Online Pid
------------------------------------------------------------------------------
Brick ip-172-31-10-167.eu-west-1.compute.in
ternal:/data/gluster/swarm/brick0 49152 0 Y 15345
Brick ip-172-31-28-55.eu-west-1.compute.int
ernal:/data/gluster/swarm/brick0 49152 0 Y 14176
Brick ip-172-31-10-167.eu-west-1.compute.in
ternal:/data/gluster/swarm/brick1 49153 0 Y 15366
Brick ip-172-31-28-55.eu-west-1.compute.int
ernal:/data/gluster/swarm/brick1 49153 0 Y 14197
Self-heal Daemon on localhost N/A N/A Y 15388
Self-heal Daemon on ip-172-31-28-55.eu-west
-1.compute.internal N/A N/A Y 14219
Task Status of Volume swarm
------------------------------------------------------------------------------
There are no active volume tasks
ubuntu@ip-172-31-10-167:~$ sudo gluster volume status swarm detail
Status of volume: swarm
------------------------------------------------------------------------------
Brick : Brick ip-172-31-10-167.eu-west-1.compute.internal:/data/gluster/swarm/brick0
TCP Port : 49152
RDMA Port : 0
Online : Y
Pid : 15345
File System : xfs
Device : /dev/xvdb
Mount Options : rw,relatime,attr2,inode64,noquota
Inode Size : 512
Disk Space Free : 2.0GB
Total Disk Space : 2.0GB
Inode Count : 1048576
Free Inodes : 1048533
------------------------------------------------------------------------------
Brick : Brick ip-172-31-28-55.eu-west-1.compute.internal:/data/gluster/swarm/brick0
TCP Port : 49152
RDMA Port : 0
Online : Y
Pid : 14176
File System : xfs
Device : /dev/xvdb
Mount Options : rw,relatime,attr2,inode64,noquota
Inode Size : 512
Disk Space Free : 2.0GB
Total Disk Space : 2.0GB
Inode Count : 1048576
Free Inodes : 1048533
------------------------------------------------------------------------------
Brick : Brick ip-172-31-10-167.eu-west-1.compute.internal:/data/gluster/swarm/brick1
TCP Port : 49153
RDMA Port : 0
Online : Y
Pid : 15366
File System : xfs
Device : /dev/xvdb
Mount Options : rw,relatime,attr2,inode64,noquota
Inode Size : 512
Disk Space Free : 2.0GB
Total Disk Space : 2.0GB
Inode Count : 1048576
Free Inodes : 1048533
------------------------------------------------------------------------------
Brick : Brick ip-172-31-28-55.eu-west-1.compute.internal:/data/gluster/swarm/brick1
TCP Port : 49153
RDMA Port : 0
Online : Y
Pid : 14197
File System : xfs
Device : /dev/xvdb
Mount Options : rw,relatime,attr2,inode64,noquota
Inode Size : 512
Disk Space Free : 2.0GB
Total Disk Space : 2.0GB
Inode Count : 1048576
Free Inodes : 1048533 所以从上面看一切似乎都很好。但是当我在第三台服务器上挂载卷时,卷显示它的容量仅为2G,而不是4G:
ubuntu@ip-172-31-13-169:~$ mount
ip-172-31-10-167.eu-west-1.compute.internal:/swarm on /swarm/volumes/mytest type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072,_netdev)
ubuntu@ip-172-31-13-169:~$ df -h
Filesystem Size Used Avail Use% Mounted on
ip-172-31-10-167.eu-west-1.compute.internal:/swarm 2.0G 53M 2.0G 3% /swarm/volumes/mytest
ubuntu@ip-172-31-13-169:~$ 当然,如果我给它写2G的话,卷就会被填满。
如果我一次创建一堆小文件,我可以看到它们分布在brick0和brick1之间。
所有AWS EC2实例都在运行Ubuntu 16.04 AMD64 HVM。试过的Gluster版本分别为3.12.7和4.0.1。
我遗漏了什么?
发布于 2022-06-28 20:32:35
发布于 2018-04-02 05:16:45
当你创建胶卷时,你有没有列出像server.167/brick0server.167/brick1server.55/brick0server.55/brick1这样的砖块?
如果是第一种情况,如果复制集位于同一台服务器上,那么我敢打赌,服务器上的存储空间将减半,而不是池,因为服务器的复制容量不能超过2GB。
如果是这样,则重建卷,但是列出像server.167/brick0server.55/brick0server.167/brick1server.55/brick1这样的砖块。
https://serverfault.com/questions/905071
复制相似问题