(3) Online adjust the size ceph rbd

############ Online adjust ceph RBD size ##########
Ceph support thin provisioning block device, that is to say only when the stored data to the block device, it
will actually use physical storage space, ceph RADOS equipment is very flexible, you are free to increase or decrease the capacity of RBD course, this requires the underlying file system also supports the adjustment capacity. Advanced File System (such as XFS, Btrfs, EX ZFS) are supported adjust the file system capacity under specified conditions.

#(1)客户端中查看remote_rbd71容量
[root@zabbix71 /]# rbd --image remote_rbd71 info
rbd image 'remote_rbd71':
size 100 GiB in 25600 objects
order 22 (4 MiB objects)
snapshot_count: 0
id: 148fdf5968ea2
block_name_prefix: rbd_data.148fdf5968ea2
format: 2
features: layering, exclusive-lock
op_features:
flags:
create_timestamp: Mon Aug 26 15:23:16 2019
access_timestamp: Mon Aug 26 15:23:16 2019
modify_timestamp: Mon Aug 26 15:23:16 2019

# (2) the capacity of the cluster to upgrade remote_rbd71 150G
[@ node140 the root /] # RBD RBD a resize / 150G remote_rbd71 --size

# (3) Client view remote_rbd71 capacity expansion has been successful
[@ zabbix71 the root /] # --image remote_rbd71 info RBD
RBD Image 'remote_rbd71':
size 150 GiB 38400 Objects in
Order 22 is (MiB Objects. 4)
snapshot_count: 0
ID : 148fdf5968ea2
block_name_prefix: rbd_data.148fdf5968ea2
the format: 2
Features: layering, exclusive-Lock
op_features:
the flags:
create_timestamp: Mon-Aug 2019 15:23:16 26 is
access_timestamp: Mon-Aug 2019 15:23:16 26 is
modify_timestamp: 26 is 15-Aug Mon: 23:16 2019

# (4) to view the size of the client, or 100G
[@ zabbix71 the root /] # DF -H
the Filesystem Size Used Avail the Use% Mounted ON
/ dev / Mapper / CentOS. 12G 34G 46G-26 is the root% /
devtmpfs 7.8G 7.8G 0 0 % / dev
tmpfs 7.8G 7.8G 0 0% / dev / SHM
tmpfs 7.8G 113M 7.7 g of 2% / RUN
tmpfs 7.8G 7.8G 0 0% / SYS / FS / a cgroup
/ dev / sda1 of 10-14m% 180M 18 is 835m / Boot
1.6G 1.6G 0% 0 tmpfs / RUN / User / 0
/ dev / 33M rbd0 100G 100G. 1% / mnt

# (5) operating system file system capacity line adjustment, in a case where a large number of read and write may be slower
[zabbix71 the root @ ~] # xfs_growfs -d / mnt /
[@ zabbix71 the root /] # DF -H
the Filesystem Size Used Avail the Use Mounted ON%
/ dev / Mapper / CentOS. 12G 34G 46G-26 is the root% /
devtmpfs 7.8G 7.8G 0 0% / dev
tmpfs 7.8G 7.8G 0 0% / dev / SHM
tmpfs 7.8G 113M 7.7 g of 2% / RUN
tmpfs 0% 0 7.8G 7.8G / SYS / FS / a cgroup
/ dev / sda1 of 10-14m% 180M 18 is 835m / Boot
tmpfs 1.6G 1.6G 0 0% / RUN / User / 0
/ dev / 33M rbd0 100G 150G. 1% / mnt

Guess you like

Origin blog.51cto.com/7603402/2432709