LVM volume copy/clear assumes volume_dd_blocksize is set to 1M

Bug #1192258 reported by Eric Harney on 2013-06-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
Huang Zhiteng

Bug Description

The recent change to enable adjusting volume dd blocksize to sizes other than 1M does not adjust the "count" parameter of the dd command. Therefore, if you change volume_dd_blocksize to (for example) "1K", for a 1GB volume, only the first 1 MB of the volume will be copied/wiped.

The "count" parameter for dd needs to scale based on what the volume_dd_blocksize option is set to to ensure the whole volume is copied/wiped.

https://review.openstack.org/#/c/24833/1/cinder/volume/drivers/lvm.py

(Note: not tested, just observed while reading code. Feel free to correct if I'm missing something.)

Eric Harney (eharney) on 2013-06-18
Changed in cinder:
importance: Undecided → High
milestone: none → havana-2
Changed in cinder:
status: New → Confirmed

Fix proposed to branch: master
Review: https://review.openstack.org/33523

Changed in cinder:
assignee: nobody → Huang Zhiteng (zhiteng-huang)
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/33523
Committed: http://github.com/openstack/cinder/commit/411a85d0958a574ff6e3b27569b7ce248675c731
Submitter: Jenkins
Branch: master

commit 411a85d0958a574ff6e3b27569b7ce248675c731
Author: Zhiteng Huang <email address hidden>
Date: Wed Jun 19 04:43:26 2013 +0800

    Calculate count for customized dd blocksize

    In previous commit we introduce a configurable blocksize option for
    'dd' command, however the 'count' value wasn't updated accordingly.
    As a result, count could be too small which is bug. This patch
    introduce a private method to 1) validate custom dd blocksize; 2)
    calculate correct count value.

    Fix bug: 1192258

    Change-Id: Icfd2d80e8f615ed585bd1d40c741a97cf55299d3

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-07-17
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers