cinder 默認配置下,無論後端是lvm仍是ceph 刪除卷,會清零整個分區,會致使速度很慢。python
日誌中看出他是直接用dd 命令去寫磁盤的後端
DEBUG oslo_concurrency.processutils [req-47e7d88d-8bf1-4cb3-980b-26f713579e8e 2b6c47d8328b4270ab643b3ab9870d54 1cc33477a6594fd2a0228ec16c59f4eb - default default] CMD "sudo cinder-rootwrap /etc/cinder/rootwrap.conf dd count=0 if=/dev/zero of=/dev/mapper/cinder--volumes-volume--d271a71f--608d--4291--ab94--30cd4c8cea70 oflag=direct" returned: 0 in 0.127s execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:374
也就是說刪除時間和卷大小成正比, 安全
若是沒有這個安全性。能夠考慮關閉這個功能bash
在 配置文件中增長
app
volume_clear = none
默認值是 zeropython2.7
查看日誌 已經沒有去清零這個動做了。秒刪
ide
2016-11-10 21:45:35.661 175421 INFO cinder.volume.drivers.lvm [req-d002a265-14b2-4267-9444-3283f5908337 2b6c47d8328b4270ab643b3ab9870d54 1cc33477a6594fd2a0228ec16c59f4eb - default default] Successfully deleted volume: 74e0d582-6fc0-452a-a972-0e02456add05 2016-11-10 21:45:36.198 175421 INFO cinder.volume.manager [req-d002a265-14b2-4267-9444-3283f5908337 2b6c47d8328b4270ab643b3ab9870d54 1cc33477a6594fd2a0228ec16c59f4eb - default default] Deleted volume successfully.
可是切記,生產環境不建議這麼作,日誌