3

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?

5

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.