测试步骤:
- 创建一个1G大小的卷:
cinder create --name wangyue01 --volume-type netapp_volume_type 1
- 扩容到100G:
cinder extend wangyue01 100
- 查看卷状态变成 error_extending
- 检查cinder-volume.log日志:
2017-07-28 15:13:07.410 87 ERROR cinder.volume.manager return f(*args, **kwargs)
2017-07-28 15:13:07.410 87 ERROR cinder.volume.manager File "/var/lib/kolla/venv/lib/python2.7/site-packages/cinder/volume/drivers/netapp/dataontap/client/client_cmode.py", line 507, in clone_lun
2017-07-28 15:13:07.410 87 ERROR cinder.volume.manager self.connection.invoke_successfully(clone_create, True)
2017-07-28 15:13:07.410 87 ERROR cinder.volume.manager File "/var/lib/kolla/venv/lib/python2.7/site-packages/cinder/volume/drivers/netapp/dataontap/client/api.py", line 227, in invoke_successfully
2017-07-28 15:13:07.410 87 ERROR cinder.volume.manager raise NaApiError(code, msg)
2017-07-28 15:13:07.410 87 ERROR cinder.volume.manager NaApiError: NetApp API failed. Reason - 17161:Clone operation failed to start: Partial 'File restore or LUN clone' operations are not supported on secondary compression enabled volumes.
问题确认:
看起来是netapp的api返回空间不足了!
在netapp命令行界面,可用指令lun show -instance xxxx
检查lun的最大扩展限制
NetApp2650::lun> lun show -instance /vol/vol_09052017_154346_88/volume-bad235e0-6e2c-47ce-973e-9ecde458a32f
Vserver Name: bm_test_svm
LUN Path: /vol/vol_09052017_154346_88/volume-bad235e0-6e2c-47ce-973e-9ecde458a32f
Volume Name: vol_09052017_154346_88
Qtree Name: ""
LUN Name: volume-bad235e0-6e2c-47ce-973e-9ecde458a32f
LUN Size: 1GB
OS Type: linux
Space Reservation: enabled
Serial Number: 808ta$Jb4Oc3
Serial Number (Hex): 3830387461244a62344f6333
Comment:
Space Reservations Honored: false
Space Allocation: disabled
State: online
LUN UUID: c0bfbbde-ff3d-4ced-a0b0-130cb09b6c12
Mapped: unmapped
Block Size: 512
Device Legacy ID: -
Device Binary ID: -
Device Text ID: -
Read Only: false
Fenced Due to Restore: false
Used Size: 0
Maximum Resize Size: 64.00GB
Creation Time: 7/28/2017 15:52:41
Class: regular
Node Hosting the LUN: NetApp2650-01
QoS Policy Group: -
Caching Policy Name: -
Clone: false
Clone Autodelete Enabled: false
Inconsistent Import: false
可以看到 Maximum Resize Size: 64.00GB ,最大才64GB,难怪我们扩容到100G会有限制。
测试发现:
lun size | Maximum Resize Size |
---|---|
1GB-10GB | 64GB |
11GB | 128GB |
20GB | 256GB |
30GB | 320GB |
40GB | 448GB |
规律不是很明确。文档里也没用提示。
另外,测试发现,只有创建LUN的时候选择为此 LUN 选择一个现有的卷或 qtree的时候才有最大扩容限制,如果选用为此 LUN 选择一个现有的卷或 qtree来创建,则没有限制。cinder调用netapp api创建lun,用的是为此 LUN 选择一个现有的卷或 qtree。
华为存储是没有这种问题的
如果卷状态变成 error_extending,如何恢复可用?
用指令修改状态为available
cinder reset-state 142b3c02-2127-4ab8-b692-d52a0c2bbb70 --state available
只要扩容前的卷状态是available,那么是可以正常恢复的。
网友评论