1837529 Members
3577 Online
110117 Solutions
New Discussion

How to remove vg01

 
SOLVED
Go to solution
Olga_1
Regular Advisor

How to remove vg01

Hello,
How to remove vg01? I messed up something here. Here is output of vgscan:
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg01"

The Volume Group /dev/vg01 was not matched with any Physical Volumes.

At the same time when I do
pvremove to unconfigure the disk, it says:
pvremove /dev/rdsk/c8t0d1
pvremove: The physical volume "/dev/rdsk/c8t0d1" belongs to an exported volume group.
pvremove: Couldn't remove physical volume "/dev/rdsk/c8t0d1".

Also what this error means:
Couldn't stat physical volume "/dev/dsk/c1t2d0":
Invalid argument

Thank you.
13 REPLIES 13
Denver Osborn
Honored Contributor

Re: How to remove vg01

Can you post the output of "strings /etc/lvmtab" and let us know if VG01 should be part of this system or not.

-denver
Olga_1
Regular Advisor

Re: How to remove vg01

Here is the output of lvmtab:

/dev/vg00
E9Y^
/dev/dsk/c0t6d0s2
/dev/dsk/c3t6d0s2


I was trying to delete vg01 and ucofigure the disk, but probably did something wrong.
Robert-Jan Goossens_1
Honored Contributor

Re: How to remove vg01

Hi,

If you are sure there is no data in the volume group.

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

Regards,
Robert-Jan
Denver Osborn
Honored Contributor

Re: How to remove vg01

Did you run vgexport? If so, then you're good to go. The /dev/vg01 dir would've been removed and the vg01 taken out of /etc/lvmtab.

The way to remove the volume is to remove all LV's, then vgreduce all the PVs and when only 1 PV remains, vgremove vg01. (or you can vgexport)

-denver
James R. Ferguson
Acclaimed Contributor
Solution

Re: How to remove vg01

Hi Olga:

Based on your '/etc/lvmtab' and on the 'pvremove' response, you do not have a volume group 'vg01' defined on your server.

The disk at 'c8t0d1' *did* belong to some volume group at some time, and that could be 'vg01'. If you 'vgexport'ed vg01 at some point, these results would be consistent.

If you truly want to destroy 'c8t0d1' and any LVM data on it, do a 'pvcreate' on it.

Regards!

...JRF...
Robert-Jan Goossens_1
Honored Contributor

Re: How to remove vg01

sorry typo

# vgcheange -an /dev/vg01
# vgexport /dev/vg01
Jacob Alexander
Occasional Advisor

Re: How to remove vg01


Hi,

Your issue would have caused by the vgscan command. vgscan command scans all physical volumes attached to the server and recreates the /etc/lvmtab.

looking at /etc/lvmtab o/p you posted, i think you are trying all these commands in LVM maintenance mode.

Boot the system to single user mode, check if vg01 is there in lvmtab

strings /etc/lvmtab |grep vg01

if not you are done, else

#vgchange -a n vg01
#vgexport vg01

Thanks, Alex.
Jacob Alexander
Occasional Advisor

Re: How to remove vg01


1. Instead of pvremove use
pvcreate -f /dev/rdsk/c8t0d1

2. check "/dev/dsk/c1t2d0" is present in the system or not
ioscan -fnC disk |grep /dev/dsk/c1t2d0


vgscan command is not to display anything. It is used to for re-creating the /etc/lvmtab file just in case required. FYIp

Thanks, Alex
Olga_1
Regular Advisor

Re: How to remove vg01

Thank you all for your replies.

If I do pvcreate I get:

pvcreate /dev/rdsk/c8t0d1
pvcreate: The physical volume already belongs to a volume group

What to do?
Olga_1
Regular Advisor

Re: How to remove vg01

pvcreate -f did the trick
This forum is great!
James R. Ferguson
Acclaimed Contributor

Re: How to remove vg01

Hi Olga:

# pvcreate -f /dev/rdsk/c8t0d1

...will override the fact that there is an LVM header on your disk.

Regards!

...JRF...
Raj D.
Honored Contributor

Re: How to remove vg01

Olga,

What is the output it shows,

# pvdisplay -v /dev/rdsk/c8t0d1


cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: How to remove vg01

Olga,

What is the output it shows,

# pvdisplay -v /dev/dsk/c8t0d1

and
# pvdisplay -l /dev/dsk/c8t0d1


cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "