* [linux-lvm] Create Snapshot volume, with sized based on size of original lv
@ 2008-10-04 9:05 Michael Schmarck
2008-10-06 13:11 ` Alasdair G Kergon
0 siblings, 1 reply; 3+ messages in thread
From: Michael Schmarck @ 2008-10-04 9:05 UTC (permalink / raw)
To: linux-lvm
Hi.
I'd like to create a snapshot volume of eg. /dev/sys/Bilder and
call it /dev/sys/Bilder_snap. Bilder_snap should be 25% the size
of Bilder.
How would I do that?
In lvcreate --help, I find:
$ lvm lvcreate --help
[...]
lvcreate -s|--snapshot
[...]
{-l|--extents LogicalExtentsNumber[%{VG|LV|PVS|FREE}] |
-L|--size LogicalVolumeSize[kKmMgGtTpPeE]}
[...]
$ lvm version
WARNING: Running as a non-root user. Functionality may be unavailable.
LVM version: 2.02.36 (2008-04-29)
Library version: 1.02.24 (2007-12-20)
/dev/mapper/control: open failed: Keine Berechtigung
Failure to communicate with kernel device-mapper driver.
Based on the --help output, I tried:
$ sudo lvm lvcreate -s -l 25%LV -n Bilder_snap /dev/sys/Bilder
Please express size as %VG, %PVS, or %FREE.
Did I do something wrong, or is the output "--help"
just wrong?
Thanks a lot,
Michael
--
Psssst! Schon vom neuen GMX MultiMessenger geh�rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Create Snapshot volume, with sized based on size of original lv
2008-10-04 9:05 [linux-lvm] Create Snapshot volume, with sized based on size of original lv Michael Schmarck
@ 2008-10-06 13:11 ` Alasdair G Kergon
2008-10-06 17:15 ` Michael Schmarck
0 siblings, 1 reply; 3+ messages in thread
From: Alasdair G Kergon @ 2008-10-06 13:11 UTC (permalink / raw)
To: LVM general discussion and development
On Sat, Oct 04, 2008 at 11:05:34AM +0200, Michael Schmarck wrote:
> $ sudo lvm lvcreate -s -l 25%LV -n Bilder_snap /dev/sys/Bilder
> Please express size as %VG, %PVS, or %FREE.
> Did I do something wrong, or is the output "--help"
> just wrong?
%LV is for resizing an existing LV.
lvcreate -s -l n%LV would indeed be unambiguous,
but what then about lvresize on a snapshot? Would it be % of
base LV or % of existing snapshot? (Perhaps we need %ORIGIN.)
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Create Snapshot volume, with sized based on size of original lv
2008-10-06 13:11 ` Alasdair G Kergon
@ 2008-10-06 17:15 ` Michael Schmarck
0 siblings, 0 replies; 3+ messages in thread
From: Michael Schmarck @ 2008-10-06 17:15 UTC (permalink / raw)
To: LVM general discussion and development
Hi!
2008/10/6 Alasdair G Kergon <agk@redhat.com>
>
> On Sat, Oct 04, 2008 at 11:05:34AM +0200, Michael Schmarck wrote:
> > $ sudo lvm lvcreate -s -l 25%LV -n Bilder_snap /dev/sys/Bilder
> > Please express size as %VG, %PVS, or %FREE.
> > Did I do something wrong, or is the output "--help"
> > just wrong?
>
> %LV is for resizing an existing LV.
All right; but why is it shown in the output of
lvcreate --help in the "-s" section? It's not
as if %<whatever> is shown in every output
of "-l" (eg. in the normal/first section of lvcreate,
in the "-l" list, no % options are shown).
> lvcreate -s -l n%LV would indeed be unambiguous,
Yep.
> but what then about lvresize on a snapshot? Would it be % of
> base LV or % of existing snapshot?
Hm. What happens, if you do a "lvcreate -s -l 42%VGS"
and then make the VG larger? Do you then make the
snapshot volume larger as well? Or what, if you'd
use 8%FREE and then change the free space - do you
make the snap lv larger and smaller as required?
Anyway: I'd expect the size of the snap lv to *NOT*
change. Reason: The snap LV has been created with
a certain size. Why should changes in the setup of
the VG change the size of the snap lv? The size of
a (snap) LV is something which I expect to be static
(unless I, the admin of the system, change it). It should
not at all be dynamic (although dynamic volumes are
kinda cool, as can be seen in the case of ZFS - but
that's a totally different approach and thus not comparable
to LVM).
> (Perhaps we need %ORIGIN.)
Maybe. But that would IMO only make sense, if you
currently change the sizes of snap LVs dynamically
in the case of the other % options. If that's not done,
then adding yet another option there would not be such
a great idea, IMO. Instead, %LV should be used - for
the reasons, please see above *g*.
Best regards,
Mike
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-06 17:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-04 9:05 [linux-lvm] Create Snapshot volume, with sized based on size of original lv Michael Schmarck
2008-10-06 13:11 ` Alasdair G Kergon
2008-10-06 17:15 ` Michael Schmarck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.