1833978 Members
1548 Online
110063 Solutions
New Discussion

Re: Can not remove group

 
SOLVED
Go to solution
Tomek_1
Advisor

Can not remove group

Hello
I want to remove group, when i use vgremove i got message: Volume group not activated. When i try vgchange -a y vg02 i got message: Couldn't attach to the volume group physical volume "/dev/dsk/vg02": Cross-device link.
First i've tried vgimport two times, first without mapfile, and later with mapfile.
How can i remove volume and group when i remove disk from system.

Best regards
Tom
12 REPLIES 12
Armin Feller
Honored Contributor
Solution

Re: Can not remove group

Hi,

the best way to remve a volume group from a system is to use the vgexport command. Please try following:

# vgexport vg02

If that doesn't work, let me know.

Regards,
Armin
Bill McNAMARA_1
Honored Contributor

Re: Can not remove group

"/dev/dsk/vg02":
should not be there.. that's quite strange.
In /dev/dsk/ device files look like cXtYd0

the LVM device files should be located in /dev/vg02

strings /etc/lvmtab to verify the vg definition.

vgexport vg02
should work, then examine /dev/dsk/vg00 directory and remove it..

recreate the vg properly.

mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x020000

note the 0x020000
should not be present in the ouput of
ll /dev/*/group

Later,
Bill
It works for me (tm)
Tomek_1
Advisor

Re: Can not remove group

That was my mistake: /dev/dsk/c3t8d0.
strings /etc/lvmtab shows me:
/dev/vg00
wo>U1
/dev/dsk/c3t5d0
/dev/vg01
wo>U=6fE
/dev/dsk/c3t9d0

I thnik something is wrong.
T G Manikandan
Honored Contributor

Re: Can not remove group

Try doing

#vgreduce -f /dev/vg02


Thanks
Bill McNAMARA_1
Honored Contributor

Re: Can not remove group

vg02 does not exist on the system..
vexport will not works because it's not in the /etc/lvmtab.

whats in /etc/fstab ?

are you trying to vgimport or remove??

I'm sorry but I don't see exactly the problem.
Anything in the syslog?

Later,
Bill
It works for me (tm)
T G Manikandan
Honored Contributor

Re: Can not remove group

Also rebuild your lvmtab file

#mv /etc/lvmtab /etc/lvmtab.old
#vgscan -a

Ravi_8
Honored Contributor

Re: Can not remove group

Hi, Tom

since you have executed vgremove it might have remove vg02 entry in lvmtab file.

#mv /etc/lvmtab /etc/lvmtab.old
#vgscan

now you should be able to see vg02 in lvmtab if you are lucky.
pls post the output
never give up
Tomek_1
Advisor

Re: Can not remove group

I wanted to use vgimport but now i have created new volume group and file system.
I'm trying to remove group and logical volume from an old server (i've remove a disk): lvremove -f /dev/vg02/lvol1, and i got message: The supplied lv number refers to a non-existent logical volume.

strings /etc/lvmtab shows me:
/dev/vg00
wo>U1
/dev/dsk/c3t5d0
/dev/vg01
wo>U=6fE
/dev/dsk/c3t9d0
/dev/vg02
wo>U=
/dev/dsk/c3t8d0

You think it's OK? (i mean wo>....)

I have made vgscan -a:

Creating "/etc/lvmtab".
Couldn't stat physical volume "/dev/dsk/c1t2d0":
Invalid argument
Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c3t10d0

The c3t10d0 is an empty disk, c1t2d0 is a cdrom.
T G Manikandan
Honored Contributor

Re: Can not remove group

Check this doc for the vgscan messages

you have to vgimport for the missing volumes.

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065255412


Thanks
BFA6
Respected Contributor

Re: Can not remove group

Hi Tom,

Don't worry about the wo>U=
in the lvmtab file. It's not a text file. Strings finds the printable characters in the file, so hence sometimes you get odd characters.

Regards,

Hilary
Tomek_1
Advisor

Re: Can not remove group

Right now i want to remove group, because i've erased all data, and i don't want to import.

Thanks for help
Tom
James R. Ferguson
Acclaimed Contributor

Re: Can not remove group

Hi Tom:

It appears that you *don't* want /dev/dsk/dev/dsk/c3t10d0 and that you incorrectly "destroyed" its LVM information. If this is correct, do:

# pvcreate -f /dev/rdsk/c3t10d0

This will erase existing LVM headers from the device.

In the future, use 'lvremove' to remove a logical volume; use 'vgreduce' and 'vgremove' to remove volume groups; and/or use 'vgexport' to quicky remove a whole volume group; its logical volumes; and '/dev/' structures. I suggest your review these man pages ('man 7 lvm') and read the chapter on disk and filesystem maintenance in "Managing Systems and Workgroups: A Guide for HP-UX System Administrators":

http://docs.hp.com/hpux/onlinedocs/B2355-90742/B2355-90742.html

Regards!

...JRF...