1752806 Members
5557 Online
108789 Solutions
New Discussion юеВ

Re: vgexport

 
SOLVED
Go to solution
bchinnat
Frequent Advisor

vgexport

I have 8 alternate path for one LUN. But i have added only one path while creating vg. That path went down, so i am not able to access teh data. here the solution is like need to vgexport the info:
# vgexport -v -m /tmp/dboracl.map dboracle_vg
then
need to create dir
#mkdir /dev/dboraclenew
#mknod /dev/dboraclenew c 64
then
#vgimport -v -m /tmp/dboracle.map dboraclenew
then we nee to activate the vg..

here my Question starts:

we are copying the information of vg dboracle_vg to /tmp/dboracle.map while vgexport.
so if we vgimport the same information will be there in the file right( i mean to say, teh information about failed path will be there right) then how it will work.,......


thanks in Advance
11 REPLIES 11
TTr
Honored Contributor

Re: vgexport

Yes the map file keeps track of the logical volumes in the VG. You can look at the contents of the map file it is a text file. The will become the new primary path.

You should also add more pathes as alternate paths either on the same vgimport command or later with vgextend.
bchinnat
Frequent Advisor

Re: vgexport

Thanks for your reply... You mean to say the map file will not contain the information about the failed path.....

TTr
Honored Contributor

Re: vgexport

No, the map file is a list of the LV names with their index number as they are on the physical disk. It does not contain any disk paths. Take a look at the map file.
Ganesan R
Honored Contributor
Solution

Re: vgexport

Hi Balasub,

>>>You mean to say the map file will not contain the information about the failed path.....<<<<

Yep. You are right. There are few options you can specify with vgexport. If you specify only -m, map file will contain only the logical volume names. With this map file, you need to specify the all the physical paths with vgimport command when you import it.

Example:
#vgexport -p -v -m /tmp/vg01.map vg01
Result map will looks like this..
/# more /tmp/vg01.map
1 lvol1
2 lvol2
3 lvol3
4 lvol4
5 lvol7
6 lvol8
7 lvol9
8 lvol10
5 lvol5
6 lvol6
#vgimport -v -m /tmp/vg01.map vg01 pvpath1 pvpath2 ...

There is another option -s . If you specify -s with vgexport VGID will be included in the map file. With this map file, you don't need to specify the disks when you import. System will scan all the disks which contains the VGID and import it.

#vgexport -p -v -s -m /tmp/vg01.map vg01
#more /tmp/vg01.map
VGID 286ef1244162b5ce
1 lvol1
2 lvol2
3 lvol3
4 lvol4
5 lvol7
6 lvol8
7 lvol9
8 lvol10
5 lvol5
6 lvol6

Second option is the preferred way. It will import with all the paths. If not you can add all the paths later on with vgextend.
Best wishes,

Ganesh.
Ganesan R
Honored Contributor

Re: vgexport

Hi Again,

There is another option with vgexport which is -f. If you specify -f with vgexport, it will write current set of the pv paths in output file. You can use the same file or modify the output with correct path and import it.

Example:

# vgexport -p -v -f /tmp/vg01.out vg01
# more /tmp/vg01.out
/dev/dsk/c33t4d1
/dev/dsk/c31t4d1
#

#vgimport -v -f /tmp/vg01.out vg01

You can use any of the above options depends on your convenient and import it.

Best wishes,

Ganesh.
Patrick Wallek
Honored Contributor

Re: vgexport

If you have 8 paths, why not just use vgextend to add one of the other 7 paths to this LUN to the vg? This should enable you to access the data relatively quickly.

Once the new path is part of the VG, you could try vgreducing the bad path out of the VG.
bchinnat
Frequent Advisor

Re: vgexport

Hi Patrick,

Whether it will work, if only one path added , if it goes down dirctly adding the other path?
TTr
Honored Contributor

Re: vgexport

What is the status of the dboraclenew right now? Is the original path restored and is it up and available? Or you vgexported it already. Adding alternate paths as discussed above assumed that you had already exported the VG. If it is still active and available, all you need to do is add the alternate paths using vgextend as PAtrck mentioned.
bchinnat
Frequent Advisor

Re: vgexport

I had done the steps mentioned like vgexport and vgimport week back.. suddenly got doubt thats the reason i started the thread,,... If patrick method is correct then no other worry right, we can directly add the remaining path and vgreduce the failed path.... Thats what i am not able to check it right now because i had done that vgexport and import.... If you could confirm that the patrick method is correct then it is very good......