Resizing images

Ceph Block Device images are thin-provisioned. They do not actually use any physical storage until you begin saving data to them. However, they do have a maximum capacity that you set with the --size option.

Before you begin

  • A running IBM Storage Ceph cluster.

  • Root-level access to the client node.

Procedure

  1. To increase the maximum size of a Ceph Block Device image for the default rbd pool:

    Syntax

    rbd resize --image IMAGE_NAME --size SIZE

    Example

    [root@rbd-client ~]# rbd resize --image image1 --size 1024
  2. To decrease the maximum size of a Ceph Block Device image for the default rbd pool:

    Syntax

    rbd resize --image IMAGE_NAME --size SIZE --allow-shrink

    Example

    [root@rbd-client ~]# rbd resize --image image1 --size 1024 --allow-shrink
  3. To increase the maximum size of a Ceph Block Device image for a specific pool:

    Syntax

    rbd resize --image POOL_NAME/IMAGE_NAME --size SIZE

    Example

    [root@rbd-client ~]# rbd resize --image pool1/image1 --size 1024
  4. To decrease the maximum size of a Ceph Block Device image for a specific pool:

    Syntax

    rbd resize --image POOL_NAME/IMAGE_NAME --size SIZE --allow-shrink

    Example

    [root@rbd-client ~]# rbd resize --image pool1/image1 --size 1024 --allow-shrink