1834446 Members
2912 Online
110067 Solutions
New Discussion

Re: Activate LVM

 
SOLVED
Go to solution
Gnananandhan
Frequent Advisor

Activate LVM

Hi leads,
I would like to like to activate a VGxx which is currently in deactivated status. I am not able to do so,
My requriement is even if I loose the data I want to configure the disk in the same VGxx, which is currently not possible because it say VGxx already exists.

How to solve the problem.

Thanks,
Gnana A.
If there is a better way to do it, find it !
7 REPLIES 7
Frederic Sevestre
Honored Contributor

Re: Activate LVM

Hi,

What is the error message when you try to activate the vgxx ?

Is it part of a cluster ?

Fr??d??ric
Crime doesn't pay...does that mean that my job is a crime ?
Sebastian Galeski_1
Trusted Contributor

Re: Activate LVM

I dont know if i understood You well but:
to activate vg gropu use:
#vgchange -a y vg_name
to add disk to greoup use:
#vgextend vg_name /dev/dsk/cxtxdx

If You want to create new group do
1. mkdir /dev/vg03
2. mknod /dev/vg03/group c64 0x030000
3. pvcreate -f /dev/rdsk/cxtxdx
4. vgcreate /dev/vg03 /dev/dsk/cxtxdx

To remove vg do
vgexport vg_name

hope it help
James R. Ferguson
Acclaimed Contributor

Re: Activate LVM

Hi:

Please provide some more specific information of what led to the state you are in.

For instance, are you trying to 'vgimport'?

Check for a duplicate minor device number (i.e. one already present):

# ls -l /dev/vg*/group

Regards!

...JRF...
Martin Burnett_2
Trusted Contributor
Solution

Re: Activate LVM

Hello,

If your are trying to activate a VG use the following:

# vgchange -a y /dev/vg##

If your are trying to save data that is on a disk where the VGRA has become corrupted check the /etc/lvmconf/vg##.conf to see if it is correct:

# strings /etc/lvmconf/vg##.conf

If it appears to be correct you can use the command:
# vgcfgrestore /dev/vg## /dev/dsk/c#t#d#

This will restore the LVM data structures.

If you are trying to blow away the old VG so that it can be rebuilt:

# vgexport /dev/vg##
# pvcreate -f /dev/rdsk/c#t#d# <-THIS WILL DESTROY DATA!
# mkdir /dev/vg##
# mknod /dev/vg##/group c 64 0x##0000
# vgcreate /dev/vg## /dev/dsk/c#t#d#

Thanks for participating in the forums,

Martin
Chaos reigns within. Reflect, repent, and reboot. Order shall return.

#
PIYUSH D. PATEL
Honored Contributor

Re: Activate LVM

Hi,

first of all you need to find out the device file group exists in /dev/vg01 or not

ll /dev/vg01

If it does exists then

vgdisplay -v /dev/vg01
This will tell you if any disks are there in the vg or not

strings /etc/lmtab can also tell you.

You can always export this volume group and the import it back and still you will get the same vg01

Give other details also

vgchange -a y /dev/vg01
Are you using clustering ??


Piyush
MANOJ SRIVASTAVA
Honored Contributor

Re: Activate LVM

Hi Gnananandhan

The way to activate is vgchange -a y /dev/vgxx. But I think yuo are getting errros in doing so ,the errors can vary from missing PV's to stale volumes etc . In case yuo are getting some missing PV's try restoring the PV with vgcfgrestore , and then activate the volume group. Please do post the errors you get.


Manoj Srivastava

Gnananandhan
Frequent Advisor

Re: Activate LVM

Thanks leads,
Anyway I had found the solution. I exported the volume group and recreated the same. By way of exporting- it removed all my VGxx directories and updated the /etc/lvmtab file.

I am saved. Thanks again. Definetly I will assign points whoever is near to the solution.
If there is a better way to do it, find it !