All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] meaning of -L for snapshots ?
@ 2005-12-19 13:33 Olivier Kaloudoff
  2005-12-20  0:49 ` kelsey hudson
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier Kaloudoff @ 2005-12-19 13:33 UTC (permalink / raw)
  To: linux-lvm

Hello,

 	I'm playing with lvm snapshots for the first time,
and wondering the meaning of -L when creating a snapshot. Indeed,
the following example shows a snapshot done with -L10M, on a
volume that's already 156M used for a total of 2G;


[root@shinwey root]# df /vservers/skel/ -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/nr_180/skel      2.0G  156M  1.8G   9% /vservers/skel

[root@shinwey root]# lvcreate  -L10M --snapshot --name snaptest 
/dev/nr_180/skel
lvcreate -- rounding size up to physical extent boundary
lvcreate -- WARNING: the snapshot will be automatically disabled once it 
gets full
lvcreate -- INFO: using default snapshot chunk size of 64 KB for 
"/dev/nr_180/snaptest"
lvcreate -- doing automatic backup of "nr_180"
lvcreate -- logical volume "/dev/nr_180/snaptest" successfully created

[root@shinwey root]# mount /dev/nr_180/snaptest  /mnt/snaptest/
mount: block device /dev/nr_180/snaptest is write-protected, mounting 
read-only

[root@shinwey root]# df -h /mnt/snaptest/
Filesystem            Size  Used Avail Use% Mounted on
/dev/nr_180/snaptest  2.0G  156M  1.8G   9% /mnt/snaptest



 	Who can explain the usage of -L10M for my snapshot ?


Best Regards,


Olivier Kaloudoff

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

* Re: [linux-lvm] meaning of -L for snapshots ?
  2005-12-19 13:33 [linux-lvm] meaning of -L for snapshots ? Olivier Kaloudoff
@ 2005-12-20  0:49 ` kelsey hudson
  2005-12-20 21:43   ` Jonathan Brassow
  0 siblings, 1 reply; 3+ messages in thread
From: kelsey hudson @ 2005-12-20  0:49 UTC (permalink / raw)
  To: LVM general discussion and development



Olivier Kaloudoff wrote:

>     Who can explain the usage of -L10M for my snapshot ?

LVM snapshots have a limitation to how much data can change before the 
snapshot becomes invalid. So, by using -L10M, you're saying to keep the 
snapshot around until 10M of data has changed, then the snapshot becomes 
invalid.

Because of the way LVM snapshots work, they require extra space on a 
volume. So, the size of your snapshot volume dictates how long it will 
remain valid. A good rule of thumb is between 10% and 20% of your 
primary volume's size. That way, 10 to 20% of the filesystem's contents 
can change and your snapshot will remain valid.

Hope this clears some things up for you.

-Kelsey

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

* Re: [linux-lvm] meaning of -L for snapshots ?
  2005-12-20  0:49 ` kelsey hudson
@ 2005-12-20 21:43   ` Jonathan Brassow
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Brassow @ 2005-12-20 21:43 UTC (permalink / raw)
  To: LVM general discussion and development

Note, that if you guess wrong and create a snapshot that is too small,
you can always grow the volume (lvextend).

 brassow

On Mon, 2005-12-19 at 16:49 -0800, kelsey hudson wrote:
> 
> Olivier Kaloudoff wrote:
> 
> >     Who can explain the usage of -L10M for my snapshot ?
> 
> LVM snapshots have a limitation to how much data can change before the 
> snapshot becomes invalid. So, by using -L10M, you're saying to keep the 
> snapshot around until 10M of data has changed, then the snapshot becomes 
> invalid.
> 
> Because of the way LVM snapshots work, they require extra space on a 
> volume. So, the size of your snapshot volume dictates how long it will 
> remain valid. A good rule of thumb is between 10% and 20% of your 
> primary volume's size. That way, 10 to 20% of the filesystem's contents 
> can change and your snapshot will remain valid.
> 
> Hope this clears some things up for you.
> 
> -Kelsey
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

end of thread, other threads:[~2005-12-20 21:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-19 13:33 [linux-lvm] meaning of -L for snapshots ? Olivier Kaloudoff
2005-12-20  0:49 ` kelsey hudson
2005-12-20 21:43   ` Jonathan Brassow

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.