1834737 Members
3056 Online
110070 Solutions
New Discussion

Re: remove volume group

 
rajat
Occasional Advisor

remove volume group

hi

i had external hard disk on my system and volume group vg01 was created on that
.
now that disk crashed, i add another disk in place of that, and i want to
include that disk in vg01
but this is not happening message comes that vg01 already exist.
when i try to remove vg01 , message comes "Volume group not
activated"
when i try to remove logical volume , it gives error as " volume group not found
. couldn't query physical volume "/dev/dsk/c5t4d0 "
how can i remove previous logical volume and further volume group
thanks
8 REPLIES 8
Vijeesh CTK
Trusted Contributor

Re: remove volume group


hi

so u want to remove vg01.

If your r creating vg01 (fresh ) on the new disk first u remove the vg01

# vgexport /dev/vg01 will remove the entry in /etc/lvmtab

then create new vg ( vg01 ) on new disk

CTK
Sukant Naik
Trusted Contributor

Re: remove volume group

Hi Rajat,

If there was only one disk in the vg01 volumegroup you can safely use the following command to remove the volumegroup.

# vgexport /dev/vg01

Later start afresh for creating the new volumegroup.

-Sukant
Who dares he wins
steven Burgess_2
Honored Contributor

Re: remove volume group

Hi

Have a read of the attached

Regards

Steve
take your time and think things through
Sebastian Galeski_1
Trusted Contributor

Re: remove volume group

use
vgexport /dev/dsk/vgxx
Frederic Sevestre
Honored Contributor

Re: remove volume group

Hi,

If I understand what you say, you changed the disk without removing the vg01 ?
So you can't activate the vg01 neither remove it, the only way is to export it :

# vgexport vg01

Then you will have to create it on the new disk


Fr??d??ric
Crime doesn't pay...does that mean that my job is a crime ?
Michael Tully
Honored Contributor

Re: remove volume group

Hi,

# /usr/sbin/vgexport /dev/vg01

When creating you new volume group assuming it is /dev/vg01 you will need to do a force create on the disk(s) as such because doing a 'vgexport' does not wipe the disk.

# /usr/sbin/pvcreate -f /dev/rdsk/cxtydz

HTH
~Michael~
Anyone for a Mutiny ?
PIYUSH D. PATEL
Honored Contributor

Re: remove volume group

Hi,

You need to export the volume group from the system first

vgexport /dev/vg01

After that you can

pvcreate /dev/rdsk/c*t*d* on the new disk

mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgcreate /dev/vg01 /dev/dsk/c*t*d*

Then you can create logical volumes using lvcreate

Piyush

Juergen Nagel_1
Frequent Advisor

Re: remove volume group

Hi,

If the disk not accessible, you can???t export the volumegroup with vgexport. Please, try the following.
mv /etc/lvmtab /etc/lvmtab.backup
vgscan

vgscan rebuilt the /etc/lvmtab. After this the old devicefile should not include the lvmtab. You can control this with strings ???/etc/lvmtab???. You can try the option ??????a??? of the vgscan command.
But read the manpage first and make a backup of the lvmtab.

Bye