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?

0

1 Answer 1

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.

1
  • 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, 2011 at 15:01

You must log in to answer this question.

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