Two lvm questions
On Mon, Aug 02, 2010 at 01:23:28PM -0400, S Scharf wrote:
> I am running Squeeze with two 1.5 TB disks. Each disk has a /boot
> partition and a swap partition. The rest of each disk
> is 1/2 of a mdadm raid1 (/dev/md0). md0 is then used as the physical
> volume for lvm which hosts my 100GB root and 500GB
> /home partitions. Having plenty of extra space I also have 6 (six)
> snapshots of each partition going back in time.
> Question 1: Is having all of those snapshots killing my disk performance.
> Or, is LVM smart enough so that when I change something on the disk that
> exists in all of the snapshots it only makes one additional copy rather
> than 6 copies (one for each snapshot)
Curious, but why are you holding on to your snapshots? The only reason
I've found for creating snapshots is to do an immediate backup of the
volume, after which I remove the snapshot. Having 6 in play, I can
imagine that your processor, and disk are probably a bit overwhelmed.
And yes, LVM is smart enough to copy data to the snapshot when there are
changes made on the target. You do understand that upon an initial
snapshot, only pointers are created that are pointing to the original
data at that specific point in time are created, right? That's why after
a snapshot, not much, of any data is use. However, as soon as you start
removing data off the target, for example, then the snapshot needs a
copy of that data.
> Question 2: The system take about 1/2 hour to boot, most of which is in
> LVM discovery. Is there any way to speed this up? I have tried to tweek
> /etc/lvm/lvm.conf but couldn't find much to do there other than set the
> filter to only scan the md0 device;
My first advice, would be to get rid of the 6 snapshots, make a new one,
back it up, send the backup off disk, then remove that backup and
snapshot. LVM is taking too much time trying to get all the pointers and
data in place with the snapshots that you have.
. O . O . O . . O O . . . O .
. . O . O O O . O . O O . . O
O O O . O . . O O O O . O O O