Operating System - HP-UX
1751894 Members
5319 Online
108783 Solutions
New Discussion юеВ

Re: Moving disks: What do I do with /etc/lvmpvg?

 
Stuart Abramson
Trusted Contributor

Moving disks: What do I do with /etc/lvmpvg?

We're moving our data center. New SAN. "cX" numbers will change on EMC physical volumes.

We're preparing vgexport -s /vgimport -s scritps, saving mapfiles and minor numbers, etc. We're going to vgexport on shutdown and vgimport on startup.

I just discovered that we have several servers with /etc/lvmpvg files, which I have never used before.

So what do we do?:

Shutdown:
1...vgexport volumes.
2...shutdown

Reboot in new location.
1...rediscover volumes.
2...verify new "cX" numbers.
3...create new /etc/lvmpvg with new "cX" numbers.
4...vgimport vgs.

Will that do it?

Is there some easier way?
5 REPLIES 5
Barry Sollitt
Advisor

Re: Moving disks: What do I do with /etc/lvmpvg?

Stuart,

Run the import first, then create the lvmpvg file.

You may want to find out what the PVGs are used for on your server, for example I only use this file when I have a disk array.

I create a PVG for each bank of drives to ensure that my lvols are mirrored over both controllers.

However, you will be able to import everything the way it was with or without this file, recreate it afterwards of course but it may not be important at all.

Unfortunately there is no easier way, the steps you have outlined are the only way to get across a change of disk device files.
"I'm the Man"
Stuart Abramson
Trusted Contributor

Re: Moving disks: What do I do with /etc/lvmpvg?

Barry:

1. You say run the vgimport first and then create the /etc/lvmpvg file.

..But the /etc/lvmpvg file already exists. Should I copy it aside, vgimport and then recreate it?

2. You say I should be able to vgimport even without the /etc/lvmpvg file.

..If I can do without it, why don't I just forget it completely? move it aside, vgimport it and then just forget about it?

What good does it do anyway?
Thomas Kaufhold
Occasional Advisor

Re: Moving disks: What do I do with /etc/lvmpvg?

Hi Stuart!

You should check what /etc/lvmpvg is used for.
Check
man lvmpvg
more /etc/lvmpvg
vgdisplay ...
lvdisplay ...

If lvmpvg is used vgexport will delete entries, so make a backup before. vgimport does not use lvmpvg but you can tell it to recreate entries (but you must specify "cX" names - probably no option in your case).

What I (would) do:
rename lvmpvg
save vgdisplay information
save lvdisplay information
vgexport
vgimport
compare vgdisplay information
change entries in lvmpvg accordingly (few find/replace)
compare lvdisplay information

regards,
Thomas
Thomas Kaufhold
Occasional Advisor

Re: Moving disks: What do I do with /etc/lvmpvg?

Hi!

You cant tell vgimport do recreate lvmpvg, I just mixed it up with telling it which order of physical devices to use.

regards,
Thomas
Barry Sollitt
Advisor

Re: Moving disks: What do I do with /etc/lvmpvg?

Stuart,

Apologies for the delay..., if the file exists then you won't need to recreate it, you can leave it in place and it will not affect the import.

What I am assuming is that it was created for a reason in the first place. It may not be needed now, but considering it's presence alone will not affect the system it is safer to leave it there.
"I'm the Man"