Erase data very slow compared to standard dd wipe

Bug #945001 reported by Robert Ayres
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
partman-crypto (Debian)
Fix Released
Unknown
partman-crypto (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

'Erase data' option is very slow on a newly created dm-crypt device. On my 4k sector disk, it took approx. 4 hours to complete 10% of a ~700Gb device wipe. I cancelled the process, then opened a shell and used a simple 'dd if=/dev/zero of=/dev/mapper/sda5_crypt bs=1M' and wiped the device in around 2-3 hours (much more expected)!

It looks like blockdev-wipe is responsible for the device wipe. Not sure if it's the block size the installer uses being too small - 65536 or the fact the device is opened with the 'O_SYNC' flag.

'Erase data' is disabled by default but for those of us who do wish to use it, it'd be nice if you didn't have to exit the installer to a temporary shell to issue a 'dd' wipe.

Ubuntu Release: Ubuntu 11.10 amd64 Alternate CD

Tags: oneiric
tags: added: oneiric
Changed in partman-crypto (Ubuntu):
importance: Undecided → Low
Revision history for this message
hannes s (temporaer) wrote :

I don't think the request makes much sense.

Overwriting the hard disk with random numbers (instead of zeros as proposed) is what takes time.
However, this is an essential part of hard drive encryption and should not be substituted by overwriting with zeros.
In short, well-encrypted data looks like random data and is therefore hard to make out in the sea of random numbers initially written. You are providing hints for decryption if you omit this step.

Revision history for this message
hannes s (temporaer) wrote :

I retract my previous comment, sorry about that. Random numbers are not written by blockdev-wipe as I assumed.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Hi Hannes,
  What hardware were you doing this test on ?
I saw similar abysmal speed running this on a debian install inside a qemu kvm guest (bug 1035921) - and it does seem to be blockdev-wipe that's inexplicably slow.

Changed in partman-crypto (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in partman-crypto (Ubuntu):
status: New → Confirmed
Changed in partman-crypto (Debian):
status: New → Confirmed
Changed in partman-crypto (Debian):
status: Confirmed → 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.