Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I zero out the empty space in a volume group? I've got a Virtual Machine contained in a Logical Volume. This logical volume itself contains sda1 for boot partition and sda2 as physical volume for the volume group vmvg.

The volume group vmvg contains two logical volumes. It has about 5-6 GB free space. I need to fill this space with zeroes (/dev/zero).

How do I go about doing this?

share|improve this question
up vote 5 down vote accepted

Create a volume that consumes the empty space, then

dd if=/dev/zero of=/dev/mapper/vg-emptyspace

(where vg-emptyspace is replaced by the volume you created)

Then delete the volume.

share|improve this answer
    
Thank you Paul. This thought occurred to me after I posted my question, but wasn't too sure. Thanks for the affirmation :) – Sparctus Dec 2 '11 at 15:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .