Skip to content

            Lost ?  |  Need an account:
 
LVM Snapshots PDF Print E-mail
(3 votes, average 5.00 out of 5)
Written by Tom Hirt   
Monday, 18 May 2009 13:10
Article Index
LVM Snapshots
Snapshot Creation
All Pages

 

LVM Snapshots Overview


Continuing with our LVM how to series, in this KB, we will build on the knowledge from our LVM Configuration KB, and explore logical volume (LV) snapshots.  We will show you how to create a LV snapshot which can then be mounted for a backup or some other purpose.

Linux administrators typically use LV snapshots for backups.  Often times, running a backup can take anywhere from a couple of minutes to several hours (depending on the amount of data to backup.)  Depending on how busy your system, from the time the backup begins to the time it completes, some of your files could have changed with omissions to open files.  Snapshots provide a means of obtaining a consistent volume (free of changes) in a matter of seconds.  The snapshot (which is a exact copy of the LV taken at the time the snapshot command was run) can then be backed-up without the worry of changes to the file system or need to shutdown running databases or close open files.

LVM snapshots can only be taken from logical volumes.  Non LV partitions cannot have a snapshot taken of them.

Snapshots require only a fraction of the space required by the source LV.  Behind the scenes, when a snapshot is taken, the source LV is frozen while the changes to the LV are written to the LV snapshot.  Thus, the size of the snapshot only needs to be large enough for the anticipated changes to the file system over the lifetime of the snapshot.  So in other words, the size of the source LV has no bearing on the size requirements for the snapshot LV, but rather how many changes will be made to the source LV throughout the lifetime of the existence of the snapshot LV.

Once the snapshot is removed, the changes logged in the LV snapshot are written back to the source LV.  Should a snapshot LV run out of space, the snapshot will be released.

One cautionary note with LV snapshots, they are I/O intensive.  I have seen I/O performance hits by more than 50% of the snapshot LV while running with a snapshot.  Therefore, you should ensure that you do not run with a snapshot LV any longer than absolutely necessary.

 



Comments
Add New Search
hamed  - to appreciate |02/09/2009 07:50:58
thanx for your nice tutorial
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:D:):(:0:shock::confused:8):lol::x:P:oops::cry::evil::twisted::roll::wink::!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

Last Updated on Tuesday, 02 June 2009 10:27
 

Forum Activity

Author:
Author: kenny22
Jan.24.12
Author: AaronRiley
Jan.15.12

Online Stats

Guests Online: 87
Members Online: 0



We thank you for visiting TcpDump and hope you find our knowledge base articles helpful. However, we need your support!!

If you found the content on our site useful, please help support us and visit one of our sponsors sites. Your support pays for the electric, servers and bandwidth required to run TcpDump and we can’t do it without your help!

Thank you again for all your support!

Best Regards,
-Tom Hirt