官术网_书友最值得收藏!

Ceph RBD resizing

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.

How to do it…

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:

  1. The original size of the RBD image that we created earlier was 10 GB. We will now increase its size to 20 GB:
    # rbd resize --image rbd1 --size 20480 --name client.rbd
    # rbd info --image rbd1 --name client.rbd
    
  2. Grow the filesystem so that we can make use of increased storage space. It's worth knowing that the filesystem resize is a feature of the OS as well as the device filesystem. You should read filesystem documentation before resizing any partition. The XFS filesystem supports online resizing. Check system messages to know the filesystem size change:
    # dmesg | grep -i capacity
    # xfs_growfs -d /mnt/ceph-disk1
    
主站蜘蛛池模板: 青阳县| 临颍县| 桐城市| 绥阳县| 汕头市| 利津县| 德令哈市| 镇江市| 玛多县| 东平县| 宣化县| 枣阳市| 长丰县| 新干县| 阆中市| 新巴尔虎左旗| 秦皇岛市| 陕西省| 阿瓦提县| 磐安县| 咸丰县| 磐安县| 信阳市| 棋牌| 上犹县| 贞丰县| 乌什县| 堆龙德庆县| 梁河县| 沭阳县| 青冈县| 铁岭县| 方山县| 虹口区| 石首市| 鄂托克旗| 武宁县| 福清市| 大田县| 林甸县| 汪清县|