Re: [Hampshire] Strange overflow messages when backing up

Top Page

Reply to this message
Author: Vic
Date:  
To: hampshire
Subject: Re: [Hampshire] Strange overflow messages when backing up
> I then ran 'pvcreate /dev/hdb1' and got response
>     Physical volume "/dev/hdb1" successfully created


/dev/hdb1 is now a PV. That means you shouldn't do anything more at that
level (i.e. referring to it as "/dev/hdb1") unless you're trying to do
something fundamental to that partition (like removing it from LVM).

> vgscan told me it had found volume group "telgar" using
> metadata type lvm2


OK. That's good.

> I then tried vgextend telgar /dev/hdb1 and got response
>     Volume group "telgar" successfully extended.

>
> so what has actually happened


The VG known as "telgar" now owns the space you previously thought of as
"/dev/hdb1". IOW, talk to that part of your diskspace through the telgar
VG, not through the disk partition.

> and how do I take advantage of the 'larger' volume.


Depends what you want to do with it.

If you want to create new volumes, create them with lvcreate. If you want
to add that space to existing LVM volumes, resize them with lvextend (or
lvresize - but be very careful not to shrink the LV if you do!).

> Does it just mean I now have a lump of unused space
> attached to /dev/hda1?


It means you have a lump of unused space in your telgar VG. Don't think of
it in terms of hdax or hdbx any more.

> cfdisk shows /dev/hda with /dev/hdb1 as a bootable primary Linux ext3

partition and /dev/hda5 as a logical Linux LVM partition

OK, so hda1 (assuming a typo in your post) is not part of the LVM (and is
probably /boot). hda5 is where telgar has been physically situated up
until now; it might stay there, or it might migrate to hdb1. You can force
things if you wish, but it's probably not worth it...

> cfdisk shows /dev/hdb with just /dev/hdb1 as a primary Linux LVM partition


Yep. So don't mess with it :-)

> Both disks are 30gig and one is normally quite adequate for my needs.

This is the first time I have used LVM and I really don't understand how
best to use it.

The first time, LVM seems like unnecessary complication. But with time
(and especially if you are playing with servers in remote locations),
you'll become a fanboi just ilke me :-)

> Wikipedia says LVM can be used to
>
> * Create read-write snapshots of logical volumes (LVM2).


That's handy for backing things up; you can "freeze" a live filesystem so
that you get a view of the filesystem at one point in time; that view
doesn't change, however long your command takes to run - even though other
processes on the box see the filesystem running normally, and can read &
write files to their hearts' content.

> * Stripe whole or parts of logical volumes across multiple PVs, in a

fashion similar to RAID0.
>
> * Mirror whole or parts of logical volumes, in a fashion similar to RAID1


You can; I don't.

> amongst other things.


The "other things" are what I consider most important; I can resize
volumes on remote machines without having to take them off-line (although
I do have to unmount any filesystem I want to shrink). I can move data
between partitions or between disks, even though that data is part of my
live filesystem (and might even contain the LVM programmes I'm using to do
it). I can treat my disk space as a resource, without needing to worry too
much about which drives *physically* contain the data.

And I think that's brilliant.

Vic.