Thrashing the system buffer when deleting LVM volume

Bug #1312729 reported by lirenke
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
lirenke

Bug Description

When cinder begin to delete LVM volume, "dd" command would be called, then clear content and remove volume.

During clear volume, cinder check whether O_DIRECT is supported, and the below command be called:

"dd count=0 if=/dev/zero of=/dev/VG/volume-*** iflag=direct oflag=direct"

But this command never be executed successfully because of "/dev/zero" and "iflag=direct".
So the extra_flags will be reset and the below cammand is :

"dd if=/dev/zero of=/dev/VG/volume-*** count=*** bs=* conv=fdatasync"

The O_DIRECT flag lose. It may trash system buffer and make system unstable.

lirenke (lvhancy)
Changed in cinder:
assignee: nobody → lirenke (lvhancy)
Revision history for this message
Jay Bryant (jsbryant) wrote :

This is an issue that has been discussed several times before. At the moment the following solution was implemented: https://blueprints.launchpad.net/cinder/+spec/when-deleting-volume-dd-performance -- https://review.openstack.org/74810

So, ionice is the method provided to reduce consuming the system's resources when doing the DD. I believe the reason that O_DIRECT is not being used for the following reason: http://osdir.com/ml/ubuntu-bugs/2012-11/msg24054.html

Do you have a way to make sure that we don't have issues with O_DIRECT on ubuntu?

Changed in cinder:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Tomoki Sekiyama (<email address hidden>) on branch: master
Review: https://review.openstack.org/91849
Reason: This problem has been fixed by commit I4b627e95b68d56e3011cddc577c62fad0c384dba.

Revision history for this message
Tomoki Sekiyama (tsekiyama) wrote :

Fixed by commit I4b627e95b68d56e3011cddc577c62fad0c384dba (Review: https://review.openstack.org/#/c/93461/ )

Changed in cinder:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.