Operating System - Linux
1753830 Members
9577 Online
108806 Solutions
New Discussion юеВ

Re: Attaching a Red Hat with LVM to a new EVA without loosing current configuration

 
SOLVED
Go to solution
luissma
Advisor

Attaching a Red Hat with LVM to a new EVA without loosing current configuration

Hi,

I have a box with RHEL 4 U4 and LVM with several filesystems mounted on Logical Volumes belonging to a single Volume Group that contains 4 Physical Volumes on a EVA storage.

The thing is, in order to make some testing with a new 8XXX EVA, I need to disconnect fibre from the old EVA and connect it to the new one to play around with new volumes, etc, etc, and afterwards fall back to the original situation.

My main concern is how to do this...

will I run into problems if I simply umount everything, comment out all the current configuration, connect system to the new EVA, discover new disks and, after tests, try to restore system to its original status?

Right now I have disks identified by /dev/sda to /dev/sdd. When I connect system to the new EVA will I see new disks from /dev/sde on and system will respect my old disk identifiers?

Would it be necessary to "vgexport" before attaching system to the new EVA and "vgimport" to recover current situation?

Thanks in advance.
3 REPLIES 3
Matti_Kurkela
Honored Contributor
Solution

Re: Attaching a Red Hat with LVM to a new EVA without loosing current configuration

> will I run into problems if I simply umount everything, comment out all the current configuration, connect system to the new EVA, discover new disks and, after tests, try to restore system to its original status?

I would expect this to work OK. However, see below.

> Right now I have disks identified by /dev/sda to /dev/sdd. When I connect system to the new EVA will I see new disks from /dev/sde on and system will respect my old disk identifiers?

In Linux, the /dev/sd* identifiers are not persistent unless you write specific udev rules to make them so.

If you shut down the system, disconnect the old storage, connect a new one and reboot, the system will label the new disks starting from /dev/sda.

However, the LVM *will not* be confused about this: it notices none of the new disks have any previously-known PV UUIDs, and will treat them as completely new disks. In fact, there only persistent VG information stored anywhere in /etc are back-ups: /etc/lvm/cache is automatically regenerated at every boot. The LVM will have no knowledge (other than old configuration backups) of your original VGs while the old storage is disconnected.

When you restore the system to the old configuration, the LVM will re-discover information about the VGs from the disks themselves. The VG names are stored on disks. If all disks/LUNs belonging to a particular LV are available, then that LV can be activated (and usually will be, as part of the standard boot procedures).

This discovery is pretty reliable, because *it happens the same way at every boot*, whether you've changed the storage configuration or not.

MK
MK
luissma
Advisor

Re: Attaching a Red Hat with LVM to a new EVA without loosing current configuration

Matti, I will only comment out lines in /etc/fstab and will attach the new EVA to the system.

I will let you know if I had any problem.

For the moment, thanks a lot for your quick response.
Steven E. Protter
Exalted Contributor

Re: Attaching a Red Hat with LVM to a new EVA without loosing current configuration

Shalom,

Your concerns are valid.

The probability of difficulty with this unplug methodology is high.

I would recommend:
1) Use a second fiber connection for the test EVA.
2) Back up the system using clonezilla or mondorescue or acronis, because you may need to restore the system.

If neither option works, vgexport followed by import after the test would be the best way to go.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com