Re: vgscan----should i move my existing lvmtab file (203 Views)
Reply
Advisor
karthkri
Posts: 24
Registered: ‎05-09-2006
Message 1 of 9 (203 Views)
Accepted Solution

vgscan----should i move my existing lvmtab file

Hi,

Greetings to all,

Iam in a situation where my OS in booting from Local disk and my other VG's are from SAN. Now we are migrating from Brocade to Cisco Switch. Once we connect to other new cisco switch the device files will change.Im having HP-UX11.23 and what should i do now to make the LVM to recognise the new path. Please correct me if iam missing some thing or if iam wrong,

1) umount the file system (all Non-VG00)
2) De-activate all non vg00 VG's
3) mv /etc/lvmtab /tmp/lvmtab.bkp ( should i move the current LVmtab file or can i use the same lvmtab when i use vgscan), please brief me in this step
4) Vgscan
5) Activate all VG's and mount the file system
6)by moving the /etc/lvmtab, will this affect my VG00? or pls suggest how to go ahead with this.

Thanks
Acclaimed Contributor
Torsten.
Posts: 23,515
Registered: ‎10-02-2001
Message 2 of 9 (203 Views)

Re: vgscan----should i move my existing lvmtab file

A better solution would be to use vgexport/vgimport, but if you want to use vgcan you should move the lvmtab file away (do not delete it).

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Advisor
karthkri
Posts: 24
Registered: ‎05-09-2006
Message 3 of 9 (203 Views)

Re: vgscan----should i move my existing lvmtab file

how to go ahead with vgexport and vgimport. Should i vgexport the current VG's in to a map file and vgimport using the map file again?
Honored Contributor
Jeeshan
Posts: 2,084
Registered: ‎11-05-2007
Message 4 of 9 (203 Views)

Re: vgscan----should i move my existing lvmtab file

yes
a warrior never quits
Outstanding Contributor
Pete Randall
Posts: 16,205
Registered: ‎11-03-1996
Message 5 of 9 (203 Views)

Re: vgscan----should i move my existing lvmtab file

1. vgchange -s n
2. vgexport -s -m /tmp/vgNNmap /dev/vgNN
3. mkdir /dev/vgNN
4. mknod /dev/vgNN/group c 64 0xNN0000
5. vgimport -s -m /tmp/vgNN
6. vgchange -a y

That's it. And you don't even need map files if your lvols are conventionally named (lvol1, lvol2, etc).


Pete

Pete
Advisor
karthkri
Posts: 24
Registered: ‎05-09-2006
Message 6 of 9 (203 Views)

Re: vgscan----should i move my existing lvmtab file

Hi Pete and everyone,

Thanks...

My situation when iam migrating from Brocade to Cisco Mds, Device files will change in Hp-UX.

1) Now When i do an vgexport -s (with option "s")with a map file and when i vgimport with the same map file, will my new device files come in to picture in to the VG automatically or will it use the old device files from brocade?

2) One more query, when we are using vgscan, it is better to move the /etc/lvmtab to another location, the run vgscan. My question is when i move my /etc/lvmtab file, will it affect vg00?
Regular Advisor
Anand Sreenivasan
Posts: 112
Registered: ‎08-05-2002
Message 7 of 9 (203 Views)

Re: vgscan----should i move my existing lvmtab file

When you move /etc/lvmtab, It won't affect your vg00. I have done this in the past and it has worked out very well.
Advisor
karthkri
Posts: 24
Registered: ‎05-09-2006
Message 8 of 9 (203 Views)

Re: vgscan----should i move my existing lvmtab file

thanks anand.
Honored Contributor
Darrel Louis
Posts: 856
Registered: ‎11-27-2000
Message 9 of 9 (203 Views)

Re: vgscan----should i move my existing lvmtab file

Hi,

Make sure you've a good backup, before you start.
Make a listing of what your current LVM config is.
# ls -l /dev/vg*/group
# backup the /etc/lvmconf directory to a different dir.
# make a vgexport of all vg's
vgexport -v -p -m -o
All of the above is needed in case of a fallback.

Goodluck
Darrel
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.