Ceph supports thin provisioned block devices, which means that the physical storage space will not get occupied until you begin storing data on the block device. The Ceph block device is very flexible; you can increase or decrease the size of an RBD on the fly from the Ceph storage end. However, the underlying filesystem should support resizing. Advance filesystems such as XFS, Btrfs, EXT, ZFS, and others support filesystem resizing to a certain extent. Please follow filesystem specific documentation to know more about resizing.
To increase or decrease Ceph RBD image size, use the --size <New_Size_in_MB>
option with the rbd resize
command, this will set the new size for the RBD image:
# rbd resize --image rbd1 --size 20480 --name client.rbd # rbd info --image rbd1 --name client.rbd
# dmesg | grep -i capacity # xfs_growfs -d /mnt/ceph-disk1
3.149.29.71