LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-26-2016, 02:57 AM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
LVM snapshot vs backup


I read this article here on snapshot vs backup:
1) https://en.wikipedia.org/wiki/Snapsh...ter_storage%29

And I also read this:
2) http://tldp.org/HOWTO/LVM-HOWTO/snapshotintro.html

In 1), the writer wrote snapshot is much faster than backup.
Assume we are backing up to another area of same disk and assume
our snapshot located on same disk.


The author wrote:
Quote:
One approach to safely backing up live data is to temporarily disable write access to data during the backup, either by stopping the accessing applications or by using the locking API provided by the operating system to enforce exclusive read access
(OK, I get that.)

and this:
Quote:
To avoid downtime, high-availability systems may instead perform the backup on a snapshot—a read-only copy of the data set frozen at a point in time—and allow applications to continue writing to their data. Most snapshot implementations are efficient and can create snapshots in O(1). In other words, the time and I/O needed to create the snapshot does not increase with the size of the data set; by contrast, the time and I/O required for a direct backup is proportional to the size of the data set.

I fail to see why snapshot is faster since you still have to copy entire data set from one area to another area. You still have to prevent data corruption (as in stop application from writing to Logical Volume) while doing snapshot, just like backup.

What did I missed?

May be this can help me clear up my misunderstanding.
Assuming we are not doing delta snapshots, why snapshot time does not increase with data size?

Thank you.

Last edited by fanoflq; 04-26-2016 at 03:40 AM.
 
Old 04-26-2016, 03:28 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by fanoflq View Post
What did I missed?
copy-on-write.
The snaps take (effectively) no space - and no I/O. When data changes on the source filesystem, the unmodified block is copied to the snap. Hence snaps increase in size over time as more (original) data is modified. The blocks are only copied to the snap when they are written to (copy-on-write). Much more efficient.

However, they aren't backups. But you can use them to take backups from (a point-in-time backup) then delete the snap without affecting the original data or the application(s) using the data.
 
1 members found this post helpful.
Old 04-26-2016, 03:53 AM   #3
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
Thank you.

Quote:
However, they aren't backups. But you can use them to take backups from (a point-in-time backup) then delete the snap without affecting the original data or the application(s) using the data.
Here is how I interpret your response:
The snap is unmodified data from source.
A snap is a clone of the original source if all blocks in source were modified at least once.
If there is no modification to source, snap is empty.

How does backups from (a point-in-time backup) works?
If snap is only partial image of source when source has only modified its data partially, how does a point-in-time backup works?

To backup in above scenario, it looks like we still have to pull data from source and from snap. And this can prevent other application from writes. Thus slowing down snapshot-based backup.

Then high-availability systems is no longer valid with LVM systems.
Correct?

Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] what is a LVM snapshot? aceone Red Hat 6 05-22-2010 12:08 PM
LVM Snapshot eldo Linux - Server 2 11-20-2009 04:10 AM
lvm snapshot for backup eco Linux - Server 5 03-15-2009 07:27 AM
lvm snapshot Ammad Linux - General 1 02-18-2009 07:03 AM
LVM snapshot(configuring backup time) abhishekrahel Linux - General 1 10-07-2008 10:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration