[mylvmbackup] Re: snapshot size should be given in extents, not megabytes
- From: "Boehm, Matthew" <mboehm@xxxxxxxxxxxxx>
- To: <mylvmbackup@xxxxxxxxxxxxx>
- Date: Thu, 9 Oct 2008 10:33:58 -0500
Hey Thorben,
I can understand what you're looking for. However, may I ask why you
need to use "all available space" to create the snapshot? We have 1TB
LV partitions assigned to /var/lib/mysql/ and when we do snaps, we only
use 5G even though more extents exist. Or is "all available space" your
way of saying "100%"? :)
I think someone posted a branch to support percentages. I figure the
script can be smart enough to determine the difference between these
three:
snapsize=10% (10 percent)
snapsize=2G (2 gigabytes)
snapsize=511X (511 eXtents, 'E' is the prefix for Exabyte)
-Matthew
-----Original Message-----
From: mylvmbackup-bounce@xxxxxxxxxxxxx
[mailto:mylvmbackup-bounce@xxxxxxxxxxxxx] On Behalf Of Thorben Thuermer
Sent: Thursday, October 09, 2008 10:23 AM
To: mylvmbackup@xxxxxxxxxxxxx
Subject: [mylvmbackup] snapshot size should be given in extents, not
megabytes
Hello,
i am writing a wrapper around mylvmbackup that has it create the
snapshot
using all available space in the volume group (among other things).
the problem here is that when passing the size in units of bytes, this
is
subject to rounding errors:
db01:~# lvm vgdisplay VG | grep Free
Free PE / Size 511 / 2.00 GB
db01:~# lvm lvcreate -s VG/LV -n LV-snap -L 2.00G
Insufficient free extents (511) in volume group VG: 512 required
(the same happens when passing to mylvmbackup with --lvsize, obviously)
the correct way to specify logical volume sizes for lvm is in extents,
which
allows passing exact values without rounding errors:
db01:~# lvm vgdisplay VG | grep Free
Free PE / Size 511 / 2.00 GB
db01:~# lvm lvcreate -s VG/LV -n LV-snap -l 511
Logical volume "LV-snap" created
=> it would be nice if mylvmbackup at least had an option to pass the
snapshot size in extents. instead of bytes
(note that newer versions of lvm also accept percentages of free
space)
(i'm not a perl programmer really, but i might wrtite/subit a patch if
there's
interest in it.)
- Thorben Thuermer
- Follow-Ups:
- [mylvmbackup] Re: snapshot size should be given in extents, not megabytes
- From: Thorben Thuermer
- References:
- [mylvmbackup] snapshot size should be given in extents, not megabytes
- From: Thorben Thuermer
Other related posts:
- » [mylvmbackup] snapshot size should be given in extents, not megabytes
- » [mylvmbackup] Re: snapshot size should be given in extents, not megabytes
- » [mylvmbackup] Re: snapshot size should be given in extents, not megabytes
- [mylvmbackup] Re: snapshot size should be given in extents, not megabytes
- From: Thorben Thuermer
- [mylvmbackup] snapshot size should be given in extents, not megabytes
- From: Thorben Thuermer