1. In openstack, I have a cinder-volume service running with IBM v7000 as the backend.
2. Create a volume with size 8G, the volume state is "available"
```
[root@112-mgt-ydy ~]# openstack volume list
+--------------------------------------+----------------+-----------+------+-----------------------------------+
| ID | Name | Status | Size | Attached to |
+--------------------------------------+----------------+-----------+------+-----------------------------------+
| 1e2971be-6496-4310-a2cd-d46b4a0be7b8 | testfastformat | available | 8 | |
```
3. update the volume size with command:
```
openstack volume set --size 10 testfastformat
```
Result: the command failed with following error:
```
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager Traceback (most recent call last):
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/manager.py", line 2777, in extend_volume
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager self.driver.extend_volume(volume, new_size)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/powervc_cinder/volume/drivers/storwize_svc/storwize_svc_common_product.py", line 117, in decorator
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager return f(*new_args, **kwargs)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/powervc_cinder/volume/drivers/storwize_svc/storwize_svc_common_product.py", line 918, in extend_volume
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager volume, new_size)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py", line 3621, in extend_volume
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager self._extend_volume_op(volume, new_size)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py", line 3699, in _extend_volume_op
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager self._helpers.extend_vdisk(volume_name, extend_amt)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py", line 2571, in extend_vdisk
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager self.ssh.expandvdisksize(vdisk, amount)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py", line 572, in expandvdisksize
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager self.run_ssh_assert_no_output(ssh_cmd)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py", line 196, in run_ssh_assert_no_output
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager out, err = self._run_ssh(ssh_cmd)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/utils.py", line 696, in _wrapper
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager return r.call(f, *args, **kwargs)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/retrying.py", line 206, in call
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager return attempt.get(self._wrap_exception)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/retrying.py", line 247, in get
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager six.reraise(self.value[0], self.value[1], self.value[2])
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager raise value
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/retrying.py", line 200, in call
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/powervc_cinder/volume/drivers/storwize_svc/storwize_svc_common_product.py", line 144, in _run_ssh
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager return super(PowerVCStorwizeSSH, self)._run_ssh(*args, **kwargs)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py", line 186, in _run_ssh
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager raise exception.VolumeBackendAPIException(data=msg)
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager cinder.exception.VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: CLI Exception output:
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager command: ['svctask', 'expandvdisksize', '-size', '2', '-unit', 'gb', '"volume-testfastformat-1e2971be-6496"']
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager stdout:
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager stderr: CMMVC8587E The command failed because the volume is fast formatting.
2021-05-17 04:50:46.379 1891085 ERROR cinder.volume.manager .
```
I know the root cause is that the volume is still in the fast-formatting process as indicated in storage backend.
But the expected behavior should be: The volume should not be reported as "available" before the fast-formatting is done.
Marking this bug as invalid for now, as discussed volume is made "available" if it is ready for mounts, formating will depend on the size of the volume and we cannot wait until the format is done.
this issue is specific to thick volume only.