[linux-lvm] what happes to VG when disks are added/removed?
Heinz J . Mauelshagen
mauelshagen at sistina.com
Tue Mar 12 07:32:02 UTC 2002
On Tue, Mar 12, 2002 at 08:04:01AM +0100, gunther.kuhlmann at web.de wrote:
> On Mon, Mar 11, 2002, Heinz J . Mauelshagen wrote:
>
> > > 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
> > > on vg2 mounted cleanly, although the disk was not available. It
> > > correctly accessed the LV on vg4 on the new disk. Is that
> correct?
> > > 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
> > > data? Can I just vgremove vg2 away?
> >
> > Gunther,
> >
> > the result depends on *how* you copied vg2 over to your new hard
> drive.
> >
> > If you used for eg. dd to do an image copy of the partitions,
> which contained
> > vg2 on the flaky drive or a whole disk copy keeping sizes,
> you've got
> +duplicated
> > content and can unplug the flaky device.
> > If you ran vgscan, you saw your 'old' vg2 in the new drive,
> which is
> > 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 --
>
> > BTW: your configuration is a little bit extraordinary in terms
> of how to use
> > drives as PVs. Typically you shouldn't have multiple VG's on a
> single drive
> > 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
>
> --
> Dipl.-Ing. Gunther Kuhlmann
> gunther_kuhlmann at mentorg.com
> gunther-kuhlmann at easy-call.net
> 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
> linux-lvm at sistina.com
> 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
Mauelshagen at Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
More information about the linux-lvm
mailing list