1838671 Members
5849 Online
110128 Solutions
New Discussion

Cannot remove LV??

 
SOLVED
Go to solution
Greg Stark_1
Frequent Advisor

Cannot remove LV??

I have a workstation class that I am trying to clone to another machine for a backup. I inherited this machine so I'm not sure why it was configured the way it was, but the OS is on one of the internal 4G drives, and the home LV is on the other (/dev/vg01/lvol1).

For various reasons, I needed the make_tape_recovery to fit on one tape, so I excluded the home LV since it was rather large and could be re-created later. The restore of the image went fine. I then created vg01 on the second disk, which also went fine. The problem is that when I try to re-create the LV for the home FS, it errors out because it thinks the LV already exists. When I try to delete /dev/vg01/lvol1, it also errors out saying "The supplied minor number refers to a non-existent logical volume"

I'v also tried lvremove -f /dev/vg01/lvol1 from the command line, but get the same type of error.

How can I remove all traces of the /dev/vg01/lvol1 so I can re-add it again properly?

Thanks again,
Greg
5 REPLIES 5
Denver Osborn
Honored Contributor
Solution

Re: Cannot remove LV??

Have you tried removing and recreating vg01 again?

# vgchange -a n /dev/vg01
# vgexport /dev/vg01

mkdir, mknod, pvcreate then vgcreate...

-denver
A. Clay Stephenson
Acclaimed Contributor

Re: Cannot remove LV??

Hi Greg:

Run vgexport /dev/vg01. That will generally wipe that puppy out.

Clay
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Cannot remove LV??

Hi Greg:

'vgexport' /dev/vg01. Then simply recreate it from scratch.

Regards!

...JRF...
Deshpande Prashant
Honored Contributor

Re: Cannot remove LV??

Hi
If nothing else is in same VG, try exporting out the VG.

Thsnk.
Prashant.
Take it as it comes.
Sridhar Bhaskarla
Honored Contributor

Re: Cannot remove LV??

This happens when someone uses the command "rm" to remove the logical volumes. You can recreate the logical volumes using mknod command and then remove.

cd /dev/vg01
mknod lvol1 b 64 0x0?0001 (check the group file for the value of ?)
mknod rlvol1 c 64 0x0?0001

You can do lvremove /dev/vg01/lvol1 now.

If you don't have anything in the volume group, then the simplest way is to export.

vgexport vg01.

Then recreate it fresh.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try