Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have 2 hard drives that had been used for Ubuntu Server 11.10. Now I would like to start from scratch with 12.04 but I'm having some trouble with the existing logical volumes and volume groups. Erasing data during install looks like it's going to take days. Is there a quick and simple way to wipe out all volumes/groups/partitions so I can start with 2 empty drives? When I set this up on 11.04 it took me a while to learn how to do it and I've since forgotten most of what I learned.

For what it's worth, I'm only using this box to try and learn about Linux.

Thanks in advance,

Mark

share|improve this question

3 Answers 3

All you need to do is choose the "use whole disk" option in the installer. It will wipe out whatever is on the drive.

share|improve this answer
    
Will that limit what I can do with the drive(s) after install? –  Mark Dec 12 '12 at 3:19
1  
Gave it a shot. Here's what I got- Unable to automatically remove LVM data. Because the volume group(s) on the selected device also consist of physical volumes on other devices, it's not safe to remove automatically. Please remove it's LVM data first. –  Mark Dec 12 '12 at 3:28
    
@Mark, that's weird... choose manual partitioning and delete the existing partitions then. –  psusi Dec 12 '12 at 15:42
    
It tells me the partition is in use by LVM volume group. When I try to delete the volume group it tells me it can't because 1 or more logical volumes may be in use. It's showing me 0 Free Physical Volumes, 2 Used PVs, 1 VG and 0 Logical Volumes. I do see that the VG consists of 2 PVs - /dev/sda2 and unknown. Virtual Console(4) tells me it can't change Virtual Group while PVs are missing. I hope that makes some sense to you. I'm confused. –  Mark Dec 12 '12 at 20:05
    
Ha! I got it. Had to use vgreduce --removemissing system. Now I have two clean, empty drives. I should probably read up on LVM before going ahead with installation. Heck, it's a "learning" server. Thanks for the help! –  Mark Dec 12 '12 at 20:15
up vote 1 down vote accepted

I was unable to delete a partition because it was in use by a Volume Group (system). I was told it was unable to delete that Volume Group because a Physical Volume was missing.

Once I ran vgreduce --removemissing system I was able to delete the Volume Group and then the partition leaving me right where I wanted to be.

Thanks for the suggested answers, they got me thinking on the right track.

share|improve this answer
1  
Just to add to that, press ALT-F2 whilst using the Ubuntu installer to bring up a console, where you can enter vgreduce --removemissing system as suggested. –  NickG Jun 22 '13 at 13:28
    
I used vgremove <LVM Group Name> –  Erik Oct 5 at 0:39

Booting from a LiveCD, starting GParted and creating a new partition table on each drive will effectively remove all existing partitions. The amount of data written will be negligible, so it should not take long.

All data on the drives will be lost.

share|improve this answer
    
After d/l LiveCD and trying to create partition table with GParted, it tells me 1 partition is currently active and a partition table can't be created. I have no option to unmount. –  Mark Dec 12 '12 at 3:18
    
@Mark: This would be a swap partition on the HDD to which LiveCD swaps by default. Right-click on the partition and choose "swap off" –  Sergey Dec 12 '12 at 3:22
    
Huh, no "swap off" just - New, Delete, Resize/Move, Copy, Paste, Format to, Unmount, Manage Flags, Check, Label, New UUID, information. Only Manage Flags and Information are not grayed out. –  Mark Dec 12 '12 at 3:37
    
Would it cause trouble in the future if I just unplugged the drive, installed on the second and handled the partitions after install? With the exception of setting up the sever a year ago I'm unfamiliar with LVM. –  Mark Dec 12 '12 at 3:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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