NOVA resize for Cinder Volume Backed instances, with Ceph as backend

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux Openstack Platform 7 (Kilo)
  • Red Hat Ceph Storage 1.3.x

Issue

  • NOVA resize for Cinder Volume Backed instances, with Ceph as backend.

Resolution

Boot from glance image (ceph images pool will have glance image ) and ceph vms pool will get the root disk of the instance

  • It works fine for this use case it could be single compute with allow_resize_to_same_host=True or it could be multiple compute nodes with allow_resize_to_same_host=false. With command :
# nova resize 

Boot From bootable cinder volume (ceph volumes pool will have a volume having image from glance) and ceph vms pool will not have root disk

Cinder volume backed Instances

  • Please follow below given procedure :

    • Shutdown the Instance
     # nova stop <isntance id>
    
    • Change the state of cinder volume from in-use to available which is attached as root disk to instance
    # cinder reset-state --state available <cinder volume id>
    
    • Extend the volume with :
     # cinder extend  <cinder volume id> <size in GB>
    
    • Change back state of volume to in-use from available
      # cinder reset-state --state in-use <cinder volume id>
    
    • Start the instance
     # nova start <isntance id>
    
  • Grow the root filesystem as per file system could be xfs_growfs or rsize2fs

NOTE: There is work going on upstream right now that will allow users to shelve an instance and detach its volume, make some change, and then reattach it later.
This would let users do the thing users want to do without hacking the database (like above changing states from in-use to available and then back to in-use) However, it still needs to be rchestrated outside of nova.

SBR
Components

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.