1829708 Members
1340 Online
109992 Solutions
New Discussion

unable to lvremove lvol1

 
SOLVED
Go to solution
George_Dodds
Honored Contributor

unable to lvremove lvol1

i'm trying to configure a new volume group /dev/vg01 on my array which is attached to an l class server running v11.00.

I had allready created the volume group and 2 empty lvols.

Now i want to remove the lvols on vg01 then remove the volume group itself so i can start again.

I did a vgremove which worked but when i tried to create a new volume group with lvols it complained that /dev/vg01/lvol1 allready existed.

so i tried lvremove /dev/vg01/lvol1 and received the attached error.

Ta

George
8 REPLIES 8
Stuart Abramson_2
Honored Contributor
Solution

Re: unable to lvremove lvol1

Why don't you try "vgexport vg01" and start all over.

Also, could you send an "ll -R /dev/vg01". You might see something odd there.

S.K. Chan
Honored Contributor

Re: unable to lvremove lvol1

Since you're starting over why not just vgexport it to remove the vg01 totally.
# vgchange -a n /dev/vg01
==> Deactivate it
# vgexport -v /dev/vg01
==> Export it / remove it
Bryan D. Quinn
Respected Contributor

Re: unable to lvremove lvol1

Hey George,

I would start all over.
First I would do a vgexport of /dev/vg01, then if that is successful I would create everything from scratch.

-Bryan
George_Dodds
Honored Contributor

Re: unable to lvremove lvol1

Of course!!!!

Lack of sunlight is gettinmg to me i think!!

Cheers Guys
Patrick Wallek
Honored Contributor

Re: unable to lvremove lvol1

It sounds as if all of the device files did not get removed from /dev/vg01/ directory when you removed the VG previously.

I agree with Stuart, do a 'vgexport vg01' to completely wipe out vg01.

At that point you will have to start completely over:

# pvcreate -f /dev/dsk/c?t?d?
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01 /dev/dsk/c?t?d? /dev/dsk/c?t?d? .....
# lvcreate .....
Marco Santerre
Honored Contributor

Re: unable to lvremove lvol1

George,

since you want to start all over again anyway, I would recommend just getting rid of the Volume Group by doing a :
#vgchange -a n vg01
#vgexport vg01

that way you'll get rid of any reference to vg01 altogether
Cooperation is doing with a smile what you have to do anyhow.
James R. Ferguson
Acclaimed Contributor

Re: unable to lvremove lvol1

Hi George:

You should have used 'lvremove' *first* and then 'vgremove'. Another way to dispose of the volume group, its logical volumes and its device files is to 'vgexport' it.

In this case, remove 'dev/vg01/lvolN' and '/dev/vg01/rlvolN', or 'vgexport' the whole volume group and start from scratch:

# vgexport /dev/vg01

Regards!

...JRF...
Not applicable

Re: unable to lvremove lvol1

vgremove is not recommended because you need to remove all LVs and PVs from the VG before you could use vgremove. This is not necessary with vgexport. Additionally vgexport leaves the LVM structures on the disks untouched which could be an advantage if you like to re-import the VG later.