Operating System - HP-UX
1838642 Members
2175 Online
110128 Solutions
New Discussion

vgimport vg02 after replacing the HUB

 
SOLVED
Go to solution
Rambo_1
Regular Advisor

vgimport vg02 after replacing the HUB

Hi,
I need to replace the old FC HUB with a new FC switch .
There is a vg02 in va71xx now ,I want to know whether I can use vgexport and vgimport to restore the vg02 after replacing the HUB?

thanks for your help
Rambo
5 REPLIES 5
Sivakumar TS
Honored Contributor

Re: vgimport vg02 after replacing the HUB

Hi Rambo,

There should not be any issue to do a vgimport.

Just make sure the disks are sensed in the server using

#ioscan -fnCdisk

after replacing the HUB.

With Regards,

Siva.

Nothing is Impossible !
Luk Vandenbussche
Honored Contributor
Solution

Re: vgimport vg02 after replacing the HUB

Hi,

You can perfectly do this

vgchange -a n vg02
vgexport -m map.file vg02
Replace the hub
ioscan -fnC disk
insf -e
mkdir /dev/vg02
mknod c 64 0x020000 /dev/vg02/group
vgimport -m mapfile vg02 /dev/dsk/cxtydz (new device file)
Mridul Shrivastava
Honored Contributor

Re: vgimport vg02 after replacing the HUB

map file is required only when u r not using standard lvol names (ie lvol1, lvol2 etc). U do vgexport with -s option it will retain the VGID so u need not to remember the device file names.
# vgexport -s -m map.file /dev/vg02

so mapfile will have VGID info so u just import it later using this map file, it will automatically update the new device file names also.
Time has a wonderful way of weeding out the trivial
Chan 007
Honored Contributor

Re: vgimport vg02 after replacing the HUB

Hi,

1. vgexport -p -s -v -m vg02.map -f vg02.txt
2. Unmount the LVs,
3. VGchange -a n
4. once the change is complete
5. iscan -fCdisk
6. insf -e
7. to ensure that disks are correct use diskinfo /dev/rdsk/cxtydz

note the map file will have 1st file with some info. leave it.
note the txt file may require modification if new devs are cdreted by insf -e

8. vgimport -m vg02.map -f vg02.txt /dev/vg02

where the vg02.txt may require changes or use
vgimport -m vg02.map /dev/dsk/cxtydz /dev/vg02

Chan
Chauhan Amit
Respected Contributor

Re: vgimport vg02 after replacing the HUB

Hi Rambo,

There is no Need to do vgexport , unless the device files are changing (However it is advisable to keep a map file in case of any issues).

Here is the procedure for doing vgexport/vgimport

1. umount /dev/vg_name/lv_name
2. vgchange -a n /dev/vg_name
3. vgexport -p -v -m map_name /dev/vg_name
4. mkdir /dev/vg_name
5. mknod /dev/vg_name/group c 64 0xNN0000
Where NN is for the vg number for example: /dev/vg01 the
minor number will be 0x010000.
6. vgimport -p -v -m map_name /dev/vg_name /dev/dsk/new_name
7. vgchange -a y /dev/vg_name
8. mount /dev/vg_name/lv_name /mount_pt
9. mv /etc/lvmtab /etc/lvmtab.old
10. vgscan -v
11. strings /etc/lvmtab ---->>look for new physical volume name(s)
12. vgdisplay -v /dev/vg_name -->>look for new pv_name(s)
13. pvdisplay -v /dev/dsk/new_name --->look for new pv_name(s)

If all looks good then:
14. vgcfgbackup /dev/vg_name

Hope this helps.

Amit
If you are not a part of solution , then you are a part of problem