linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] lvm.conf backup section
@ 2018-11-28  9:51 Far Had
  2018-11-28 11:05 ` Zdenek Kabelac
  0 siblings, 1 reply; 8+ messages in thread
From: Far Had @ 2018-11-28  9:51 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

Hi
There are two parameters in lvm.conf which I don't understand the exact
meaning of.

1. retain_min
2. retain_days

What do "*the minimum number of archive files you wish to keep*" and "*minimum
time you wish to keep an archive file for*" mean?
Is there any auto deletion mechanism for backup archives?

[-- Attachment #2: Type: text/html, Size: 481 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm.conf backup section
  2018-11-28  9:51 [linux-lvm] lvm.conf backup section Far Had
@ 2018-11-28 11:05 ` Zdenek Kabelac
  2018-11-28 12:18   ` Far Had
  0 siblings, 1 reply; 8+ messages in thread
From: Zdenek Kabelac @ 2018-11-28 11:05 UTC (permalink / raw)
  To: LVM general discussion and development, Far Had

Dne 28. 11. 18 v 10:51 Far Had napsal(a):
> Hi
> There are two parameters in lvm.conf which I don't understand the exact 
> meaning of.
> 
> 1. retain_min
> 2. retain_days
> 
> What do "*the minimum number of archive files you wish to keep*" and "*minimum 
> time you wish to keep an archive file for*" mean?
> Is there any auto deletion mechanism for backup archives?

Hi


There is kept history for 'created' VGs, where you can specify how many
and for how long archives for individual VG you want to store.

This works reasonably well if you use 'same VG names' all the time.

However - when you use lvm2 on some testing machine where the VG name is 
essentially some random hash md5 lengthy string - you will sooner or later end 
with gazillion archive files in your /etc/lvm/archive directory.

In this case it's admins responsibility to prune VG archive files that are no 
longer necessary.

lvm2 has no idea if the VG named like: "myvg01320982woicdo8uagcd97wghcd"
will be still ever needed again - so such archives are kept mostly forever....

Every command you run which modifies metadata of particular VG does care only 
about that particular VG and it's archives.

Hopefully this explains it.

Regards

Zdenek

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm.conf backup section
  2018-11-28 11:05 ` Zdenek Kabelac
@ 2018-11-28 12:18   ` Far Had
  2018-11-28 12:24     ` Zdenek Kabelac
  0 siblings, 1 reply; 8+ messages in thread
From: Far Had @ 2018-11-28 12:18 UTC (permalink / raw)
  To: zkabelac; +Cc: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

Thanks for the response,
but I still don't get the point. Assume that I use same names for my VGs,
In this case if I do for example:
*retain_days = 10*
and
*retain_min = 15*
in lvm.conf file, what is the system's behaviour when archiving backup
files? Please explain specifically.

On Wed, Nov 28, 2018 at 2:35 PM Zdenek Kabelac <zkabelac@redhat.com> wrote:

> Dne 28. 11. 18 v 10:51 Far Had napsal(a):
> > Hi
> > There are two parameters in lvm.conf which I don't understand the exact
> > meaning of.
> >
> > 1. retain_min
> > 2. retain_days
> >
> > What do "*the minimum number of archive files you wish to keep*" and
> "*minimum
> > time you wish to keep an archive file for*" mean?
> > Is there any auto deletion mechanism for backup archives?
>
> Hi
>
>
> There is kept history for 'created' VGs, where you can specify how many
> and for how long archives for individual VG you want to store.
>
> This works reasonably well if you use 'same VG names' all the time.
>
> However - when you use lvm2 on some testing machine where the VG name is
> essentially some random hash md5 lengthy string - you will sooner or later
> end
> with gazillion archive files in your /etc/lvm/archive directory.
>
> In this case it's admins responsibility to prune VG archive files that are
> no
> longer necessary.
>
> lvm2 has no idea if the VG named like: "myvg01320982woicdo8uagcd97wghcd"
> will be still ever needed again - so such archives are kept mostly
> forever....
>
> Every command you run which modifies metadata of particular VG does care
> only
> about that particular VG and it's archives.
>
> Hopefully this explains it.
>
> Regards
>
> Zdenek
>

[-- Attachment #2: Type: text/html, Size: 2166 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm.conf backup section
  2018-11-28 12:18   ` Far Had
@ 2018-11-28 12:24     ` Zdenek Kabelac
  2018-12-01 12:44       ` Far Had
  0 siblings, 1 reply; 8+ messages in thread
From: Zdenek Kabelac @ 2018-11-28 12:24 UTC (permalink / raw)
  To: Far Had; +Cc: linux-lvm

Dne 28. 11. 18 v 13:18 Far Had napsal(a):
> Thanks for the response,
> but I still don't get the point. Assume that I use same names for my VGs, In 
> this case if I do for example:
> /retain_days = 10/
> and
> /retain_min = 15/
> in lvm.conf file, what is the system's behaviour when archiving backup files? 
> Please explain specifically.

Hi

Archive file should be kept for at least 10 days, and there should be kept at 
least 15 archive files.

So in better example:

If you have i.e. many files generated daily - this makes sure you should have 
files at least 10 days back as well  (otherwise it could happen you could have 
backup only from last few recent commands)

If you run lvm2 modifying commands very occasionally - you should still have 
at least 15 historical archives  (otherwise it could happen you could have 
very few archives if any....)

As you can see both are 'arming' at slightly different work flow.

Regards

Zdenek

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm.conf backup section
  2018-11-28 12:24     ` Zdenek Kabelac
@ 2018-12-01 12:44       ` Far Had
  2018-12-03 11:33         ` Zdenek Kabelac
  0 siblings, 1 reply; 8+ messages in thread
From: Far Had @ 2018-12-01 12:44 UTC (permalink / raw)
  To: zkabelac; +Cc: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

How does it *make sure* that I've backup files younger than 10 days old?
What if I delete those files?

On Wed, Nov 28, 2018 at 3:54 PM Zdenek Kabelac <zkabelac@redhat.com> wrote:

> Dne 28. 11. 18 v 13:18 Far Had napsal(a):
> > Thanks for the response,
> > but I still don't get the point. Assume that I use same names for my
> VGs, In
> > this case if I do for example:
> > /retain_days = 10/
> > and
> > /retain_min = 15/
> > in lvm.conf file, what is the system's behaviour when archiving backup
> files?
> > Please explain specifically.
>
> Hi
>
> Archive file should be kept for at least 10 days, and there should be kept
> at
> least 15 archive files.
>
> So in better example:
>
> If you have i.e. many files generated daily - this makes sure you should
> have
> files at least 10 days back as well  (otherwise it could happen you could
> have
> backup only from last few recent commands)
>
> If you run lvm2 modifying commands very occasionally - you should still
> have
> at least 15 historical archives  (otherwise it could happen you could have
> very few archives if any....)
>
> As you can see both are 'arming' at slightly different work flow.
>
> Regards
>
> Zdenek
>

[-- Attachment #2: Type: text/html, Size: 1568 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm.conf backup section
  2018-12-01 12:44       ` Far Had
@ 2018-12-03 11:33         ` Zdenek Kabelac
  2018-12-03 12:10           ` Far Had
  0 siblings, 1 reply; 8+ messages in thread
From: Zdenek Kabelac @ 2018-12-03 11:33 UTC (permalink / raw)
  To: LVM general discussion and development, Far Had

Dne 01. 12. 18 v 13:44 Far Had napsal(a):
> How does it _make sure_ that I've backup files younger than 10 days old? What 
> if I delete those files?

Hi

Archives in /etc/lvm/archive subdirs are not 'a must have' - they are optional 
and purely for admin's pleasure.

So admin can erase them anytime he wants to - but in that case it's probably 
more clever to disable archiving in lvm.conf ;) as archiving eats some CPU...

lvm2 itself does *only* care about metadata stored in the 'metadata' area in 
PV header - where there is also ring-buffer which typically keeps pretty long 
history of all metadata modifications - this buffer has these days ~1MiB in 
size. So unless your metadata are pretty big - the history can be relatively 
easily extracted also out from this place for i.e. recovery purpose.

I must admit I don't understand the  'make sure' part of your question??
Are you aiming at some particular issue ??

Regards


Zdenek

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm.conf backup section
  2018-12-03 11:33         ` Zdenek Kabelac
@ 2018-12-03 12:10           ` Far Had
  2018-12-03 14:56             ` Zdenek Kabelac
  0 siblings, 1 reply; 8+ messages in thread
From: Far Had @ 2018-12-03 12:10 UTC (permalink / raw)
  To: zkabelac; +Cc: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]

Hi, Thank you Zdenek
You used "makes sure" phrase in your sentence:
"this makes sure you should have files at least 10 days back as well"

I was refering to that !

So the whole thing is about PV metadata area and not /etc/lvm , am I
correct?

On Mon, Dec 3, 2018 at 3:03 PM Zdenek Kabelac <zkabelac@redhat.com> wrote:

> Dne 01. 12. 18 v 13:44 Far Had napsal(a):
> > How does it _make sure_ that I've backup files younger than 10 days old?
> What
> > if I delete those files?
>
> Hi
>
> Archives in /etc/lvm/archive subdirs are not 'a must have' - they are
> optional
> and purely for admin's pleasure.
>
> So admin can erase them anytime he wants to - but in that case it's
> probably
> more clever to disable archiving in lvm.conf ;) as archiving eats some
> CPU...
>
> lvm2 itself does *only* care about metadata stored in the 'metadata' area
> in
> PV header - where there is also ring-buffer which typically keeps pretty
> long
> history of all metadata modifications - this buffer has these days ~1MiB
> in
> size. So unless your metadata are pretty big - the history can be
> relatively
> easily extracted also out from this place for i.e. recovery purpose.
>
> I must admit I don't understand the  'make sure' part of your question??
> Are you aiming at some particular issue ??
>
> Regards
>
>
> Zdenek
>

[-- Attachment #2: Type: text/html, Size: 1927 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] lvm.conf backup section
  2018-12-03 12:10           ` Far Had
@ 2018-12-03 14:56             ` Zdenek Kabelac
  0 siblings, 0 replies; 8+ messages in thread
From: Zdenek Kabelac @ 2018-12-03 14:56 UTC (permalink / raw)
  To: LVM general discussion and development, Far Had

Dne 03. 12. 18 v 13:10 Far Had napsal(a):
> Hi, Thank you Zdenek
> You used "makes sure" phrase in your sentence:
> "this makes sure you should have files at least 10 days back as well"
> 
> I was refering to that !
> 

Hi

Oh - in that case I've been emphasizing the fact, that lvm2 will not REMOVE,
those. So nothing in the sense it will keep creating if they get missing :) so 
something completely different.

If the admin runs  'rm -f /etc/lvm/archive/*' all archives are simply gone.
(so i.e. info about executed command is lost forever! as the kernel does not 
hold all the info)

> So the whole thing is about PV metadata area and not /etc/lvm , am I correct?

Vise versa -    /etc/lvm/lvm.conf { backup/archive = 1 }  is purely about 
/etc/lvm/archive.

There is *NO* control for user to influence PV metadata backup other then 
limiting the size of metadata area - the smalller the area is - the smaller 
'ring-buffer' will be - the less older metadata could be found there.

Regards

Zdenek

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-12-03 14:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28  9:51 [linux-lvm] lvm.conf backup section Far Had
2018-11-28 11:05 ` Zdenek Kabelac
2018-11-28 12:18   ` Far Had
2018-11-28 12:24     ` Zdenek Kabelac
2018-12-01 12:44       ` Far Had
2018-12-03 11:33         ` Zdenek Kabelac
2018-12-03 12:10           ` Far Had
2018-12-03 14:56             ` Zdenek Kabelac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).