1834604 Members
4633 Online
110069 Solutions
New Discussion

one lun in two vgs

 
SOLVED
Go to solution
Sanjiv Sharma_1
Honored Contributor

one lun in two vgs

Hi,

I have vg06/lvol1 & lvol2 consisting of about 20 luns and vg07/lvol1 consisting of 2 luns of 7 GB each. I have removed lvol2 from vg06 and checked and removed one lun from vg06.

This lun was added to vg07/lvol1.

Now I can see that the same lun appears from primary link in vg07 and from the alternate link in vg06.
pvdisplay -v shows both of them as current.

This has corrupted my lvol1 in vg06.

What is the best possible method to recover?
I have free luns available in vg06.

Thanks,
Raje.
Everything is possible
5 REPLIES 5
avsrini
Trusted Contributor
Solution

Re: one lun in two vgs

Hi Raje,
You should have vgexported the lun on vg06 before you
added it to vg07.

Do a vgreduce on vg06 for the lun you took out.

If you have a vgconfig saved,
restore that.

vgreduce vg06 "lun device file"

do a fsck on vg06/lvol1.
and mount it back.

vgextend the lun to vg07.

Let me know when u solved the problem.


Srini.
Be on top.
Sridhar Bhaskarla
Honored Contributor

Re: one lun in two vgs

Hi Raje,

I am not sure how you did it.

If you haven't written anything onto the new link (which is alternate on vg06), then you can possibly recover your data but is not guaranteed.

First, take the lun out of vg07.

Then do a vgcfgrestore on the disk in vg06.

vgcfgrestore -n vg06 /dev/dsk/c?t?d?

vgchange -a y vg06

Now unmount lvol1, Do an fsck and mount it. If everything is looking ok, then add the other link.

If it doesn't work, then you will need to restore it from backup.



-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sanjiv Sharma_1
Honored Contributor

Re: one lun in two vgs

Hi Srini/Sridhar,

Thanks for your reply and advice.

The users has already written data on vg07/lvol1 on this lun.
Presently my requirement is to remove the Alternate link from vg06.

When I do
# vgreduce /dev/vg06 /dev/dsk/c10t1d5
It says Cannot remove as there are some PE already in use.

What needs to be done to remove the alternate link from vg06?

Thanks,
Raje.
Everything is possible
avsrini
Trusted Contributor

Re: one lun in two vgs

Hi Raje,
Try

vgreduce -l

This has to solve your problem.

If not, try deactivating the volume groups.

Srini.
Be on top.
Sridhar Bhaskarla
Honored Contributor

Re: one lun in two vgs

Hi Raje,

I thought your problem was solved when I saw rabbit on this.

Do a pvdisplay /dev/dsk/c10t1d5

and see what lvols are still seen on it. Remove them using lvremove.

Then use vgreduce. This will corrupt the volume headers of the disk. So, nce you reduced it, do

vgcfgrestore -n vg07 /dev/rdsk/c10t1d5

vgchange -a y vg07

-Sri

PS: Please do no assign points until your problem is solved
You may be disappointed if you fail, but you are doomed if you don't try