Why doesn't my instance recognise more space in the disk after a cinder expansion?
I had an instance with a 2GB cinder volume that I expanded to 10GB but it still reports the volume as having 2GB. Interestingly, making a snapshot of the instance and booting from the new volume it reports the disk as having 10GB. Can someone help me?
Updated with the cinder config:
####################
# cinder.conf sample #
####################
[DEFAULT]
#
# Options defined in cinder.exception
#
# make exception message format errors fatal (boolean value)
#fatal_exception_format_errors=false
#
# Options defined in cinder.policy
#
# JSON file representing policy (string value)
#policy_file=policy.json
# Rule checked when requested rule is not found (string value)
#policy_default_rule=default
#
# Options defined in cinder.quota
#
# number of volumes allowed per project (integer value)
#quota_volumes=10
# number of volume snapshots allowed per project (integer
# value)
#quota_snapshots=10
# number of volume gigabytes (snapshots are also included)
# allowed per project (integer value)
#quota_gigabytes=1000
# number of seconds until a reservation expires (integer
# value)
#reservation_expire=86400
# count of reservations until usage is refreshed (integer
# value)
#until_refresh=0
# number of seconds between subsequent usage refreshes
# (integer value)
#max_age=0
# default driver to use for quota checks (string value)
#quota_driver=cinder.quota.DbQuotaDriver
# whether to use default quota class for default quota
# (boolean value)
#use_default_quota_class=true
#
# Options defined in cinder.service
#
# seconds between nodes reporting state to datastore (integer
# value)
#report_interval=10
# seconds between running periodic tasks (integer value)
#periodic_interval=60
# range of seconds to randomly delay when starting the
# periodic task scheduler to reduce stampeding. (Disable by
# setting to 0) (integer value)
#periodic_fuzzy_delay=60
# IP address for OpenStack Volume API to listen (string value)
#osapi_volume_listen=0.0.0.0
osapi_volume_listen=0.0.0.0
# port for os volume api to listen (integer value)
#osapi_volume_listen_port=8776
#
# Options defined in cinder.test
#
# File name of clean sqlite db (string value)
#sqlite_clean_db=clean.sqlite
# should we use everything for testing (boolean value)
#fake_tests=true
#
# Options defined in cinder.wsgi
#
# Number of backlog requests to configure the socket with
# (integer value)
#backlog=4096
# Sets the value of TCP_KEEPIDLE in seconds for each server
# socket. Not supported on OS X. (integer value)
#tcp_keepidle=600
# CA certificate file to use to verify connecting clients
# (string value)
#ssl_ca_file=<None>
# Certificate file to use when starting the server securely
# (string value)
#ssl_cert_file=<None>
# Private key file to use when starting the server securely
# (string value)
#ssl_key_file=<None>
#
# Options defined in cinder.api.common
#
# the maximum number of items returned in a single response
# from a collection resource (integer value)
#osapi_max_limit=1000
# Base URL that will be presented to users in links to the
# OpenStack Volume API (string value)
#osapi_volume_base_URL=<None>
#
# Options defined in cinder.api.middleware.auth
#
# Treat X-Forwarded-For as the canonical remote address. Only
# enable this if you have a sanitizing proxy. (boolean value)
#use_forwarded_for=false
#
# Options defined in cinder.api.middleware.sizelimit
#
# Max size for body of a request (integer value)
#osapi_max_request_body_size=114688
#
# Options defined in cinder.backup.drivers.ceph
#
# Ceph config file to use. (string value)
#backup_ceph_conf=/etc/ceph/ceph.conf
# the Ceph user to connect with (string value)
#backup_ceph_user=cinder
# the chunk ...
Did you resize the partition? If you recreate it, then you are probably forcing cloud-init to run again which will grow the root partition. If you do it while it's running then you have to grow it instead.
No because fdisk tells me that the disk is 2GB. The problem is not the partition that was not resized but rather the instance doesn't recognises the expanded disk.