Skip to contentSkip to conversation

PV Move

linux-lvm Rupert Hair 3 participants 4 messages Aug 7, 2003

lore
Share & tools
lore
#0 lore raw

I have just received a nice new disk and I would like to use it to replace one of my PVs. This would be no problem (it is well documented in the HOWTO) but I would like to put the new disk in place of the old one on the IDE cable. (i.e. one of my PVs is currently /dev/hdd1 and I would like to copy the data from that onto the new disk and then put the new disk on /dev/hdd)

So my question is really can I change where LVM is expecting to find a PV?

Thanks in advance.

Rupert

#1 lore raw
Quoted 2 lines · Rupert Hair

So my question is really can I change where LVM is expecting to find a PV?

everywhere! just put the new disk on any free IDE port you have. Or use some temporary IDE pci-card. After you extracted the old disk from your lvm (don't forget the final vgremove), you may swap all disk around as you like. LVM will find them, regardless to which devices they are connected. This is one of the most impressive features of LVM anyway!

May be hda can not be moved that easily because of the MBR to boot fom. But that has nothing to do with LVM.

Dieter.

Signature · 4 lines
Dieter St�ken, con terra GmbH, M�nster
    [email protected]
    http://www.conterra.de/
    (0)251-7474-501
#3 lore raw
In reply to Rupert Hair
Quoted 9 lines · Rupert Hair

I have just received a nice new disk and I would like to use it to replace one of my PVs. This would be no problem (it is well documented in the HOWTO) but I would like to put the new disk in place of the old one on the IDE cable. (i.e. one of my PVs is currently /dev/hdd1 and I would like to copy the data from that onto the new disk and then put the new disk on /dev/hdd)

So my question is really can I change where LVM is expecting to find a PV?

LVM identifies PVs by the metadata on the disk, not its location in the /dev/ tree. As such you are free to move disks around as much as you want, just run vgscan after moving them.

- Joe

#2 lore raw
In reply to Dieter Stueken
Quoted 3 lines

LVM will find them, regardless
to which devices they are connected. This is one of the most impressive features of LVM anyway!

It certainly is! Thanks Dieter and Joe.

Rupert