Skip to contentSkip to conversation

what happes to VG when disks are added/removed?

linux-lvm [email protected] 2 participants 2 messages Mar 12, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Heinz J . Mauelshagen
Quoted 4 lines

I had two hard disks, the first with three VG's, the second with one VG (vg2). When the second hard disk started to fail, I installed a third with VG vg4 and copied the data over. Then, without deleting vg2, I unplugged hd 2. After reboot, the

volume

Quoted 2 lines
Quoted 2 lines

on vg2 mounted cleanly, although the disk was not available. It correctly accessed the LV on vg4 on the new disk. Is that

correct?

Quoted 2 lines
Quoted 2 lines

Can I now use either of the two vg2/vg4 to access the LV on the new disk? How do I get rid of one (and which) without risking

my

Quoted 5 lines
Quoted 1 line

data? Can I just vgremove vg2 away?

Gunther,

the result depends on *how* you copied vg2 over to your new hard

drive.

Quoted 2 lines

If you used for eg. dd to do an image copy of the partitions,

which contained

Quoted 1 line

vg2 on the flaky drive or a whole disk copy keeping sizes,

you've got
+duplicated

Quoted 2 lines

content and can unplug the flaky device.
If you ran vgscan, you saw your 'old' vg2 in the new drive,

which is

Quoted 1 line

perfectly fine.

No, I used pvcreate, vgcreate, lvcreate to create vg4 and a LV on it. And than
rsync to copy the data. That is why I am a bit confused by this behaviour.
Should I reconnect hd2, then delete vg2 and disconnect hd2 again?

Quoted 1 line

BTW: your configuration is a little bit extraordinary in terms

of how to use

Quoted 1 line

drives as PVs. Typically you shouldn't have multiple VG's on a

single drive

Quoted 2 lines

as you seem to have it.
Much rather you should have multiple drives in one VG.

Yes, I have one HD with two VG's. It might be unusual, but I can't see anything
wrong with it. I do not intend to span a VG over more than one physical disk,
because I don't want to have _part_ of a VG to fail. That's when it gets messy.
I'm not saying it's impossible to recover, I just don't want to try.
Besides, my HD size is large compared to my LV sizes, that's why I needn't
bother.

Gunther

Signature · 11 lines
Dipl.-Ing. Gunther Kuhlmann
[email protected]
[email protected]
Tel.: +49 (0)40 / 75 11 84 40
PGP: E6 BC 78 6B E6 09 C7 16  AB 5D 9A 9A D7 1C 01 FB
-- 


______________________________________________________________________________
Ohne Risiko spielend zum Börsenguru werden. Haben Sie schon eine
Strategie? Spekulieren und tolle Preis gewinnen http://boersenspiel.web.de
#1 lore raw
Quoted 27 lines · On Tue, Mar 12, 2002 at 08:04:01AM +0100, [email protected] wrote:
Quoted 4 lines · Heinz J . Mauelshagen
Quoted 4 lines

I had two hard disks, the first with three VG's, the second with one VG (vg2). When the second hard disk started to fail, I installed a third with VG vg4 and copied the data over. Then, without deleting vg2, I unplugged hd 2. After reboot, the

volume

Quoted 2 lines
Quoted 2 lines

on vg2 mounted cleanly, although the disk was not available. It correctly accessed the LV on vg4 on the new disk. Is that

correct?

Quoted 2 lines
Quoted 2 lines

Can I now use either of the two vg2/vg4 to access the LV on the new disk? How do I get rid of one (and which) without risking

my

Quoted 5 lines
Quoted 1 line

data? Can I just vgremove vg2 away?

Gunther,

the result depends on *how* you copied vg2 over to your new hard

drive.

Quoted 2 lines

If you used for eg. dd to do an image copy of the partitions,

which contained

Quoted 1 line

vg2 on the flaky drive or a whole disk copy keeping sizes,

you've got
+duplicated

Quoted 2 lines

content and can unplug the flaky device.
If you ran vgscan, you saw your 'old' vg2 in the new drive,

Quoted 8 lines

which is

Quoted 1 line

perfectly fine.

No, I used pvcreate, vgcreate, lvcreate to create vg4 and a LV on it. And than
rsync to copy the data. That is why I am a bit confused by this behaviour.
Should I reconnect hd2, then delete vg2 and disconnect hd2 again?

No need to.
You still have /dev/vg2/ device nodes and the new vg4 got the same internal number so that you can access it through /dev/vg2/*.

Either rename inactive vg4 to vg2 if you want to keep it by "rm -r /dev/vg2;vgrename vg4 vg2"

or change your fstab to use the /dev/vg4 nodes and remove /dev/vg2/.

/dev/vg2/* is left over, because you didn't remove vg2.

Regards,
Heinz -- The LVM Guy --

Quoted 20 lines
Quoted 2 lines

BTW: your configuration is a little bit extraordinary in terms

of how to use

Quoted 1 line

drives as PVs. Typically you shouldn't have multiple VG's on a

single drive

Quoted 2 lines

as you seem to have it.
Much rather you should have multiple drives in one VG.

Yes, I have one HD with two VG's. It might be unusual, but I can't see anything
wrong with it. I do not intend to span a VG over more than one physical disk,
because I don't want to have _part_ of a VG to fail. That's when it gets messy.
I'm not saying it's impossible to recover, I just don't want to try.
Besides, my HD size is large compared to my LV sizes, that's why I needn't
bother.

Quoted 21 lines

Gunther

Signature · 18 lines
Dipl.-Ing. Gunther Kuhlmann
[email protected]
[email protected]
Tel.: +49 (0)40 / 75 11 84 40
PGP: E6 BC 78 6B E6 09 C7 16  AB 5D 9A 9A D7 1C 01 FB
-- 


______________________________________________________________________________
Ohne Risiko spielend zum Börsenguru werden. Haben Sie schon eine
Strategie? Spekulieren und tolle Preis gewinnen http://boersenspiel.web.de


_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf Germany
[email protected] +49 2626 141200

                                                       FAX 924446

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-