[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Create Snapshot volume, with sized based on size of original lv



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]