Is this how LVM snapshots work?


 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Is this how LVM snapshots work?
# 1  
Old 04-05-2011
Is this how LVM snapshots work?

Hi guys.

I'm confused how LVM snapshots work. Here is what i understood:

1. we have a Logical Volume holding our data.
2. we make a snap shot of it with this command:
Code:
lvcreate -L 1000M -s -n backup /dev/vg01/lv01

3. mount the snap shot
4. take your backup
5. remove the snapshot --> in this step LVM will write new changes back to our main volume.? am i right?

In second step we specify the size. is that 1000MB holds the changes from the point we had created the snapshot?
# 2  
Old 04-05-2011
No. New changes will be written to the master volume right away. However, if data is changed that existed before the snapshot was taken, the old data is copied to the snapshot area, and only then the new one is committed to disk (see Copy-on-write). The size you're setting for the snapshot is the maximum amount of data the snapshot area can hold, meaning the maximum amount of data that may change before the snapshop becomes stale.
This User Gave Thanks to pludi For This Post:
# 3  
Old 04-05-2011
So if the newly changed data is written to master volume why we need to specify size to snapshot volume? what is use of it?
# 4  
Old 04-06-2011
Quote:
Originally Posted by pludi
The size you're setting for the snapshot is the maximum amount of data the snapshot area can hold, meaning the maximum amount of data that may change before the snapshop becomes stale.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Ubuntu

I need help setting up LVM snapshots on Ubuntu 16.04

I am running Ubuntu 16.04 on a HP laptop with a core I3 processor. I am trying to run mariaDB and do hot backups to disk. In order to do that I wanted to create an LVM snapshot and backup the snapshot for a point in time backup, possibly using tar. I included a snapshot of the gparted app showing... (1 Reply)
Discussion started by: gandolf989
1 Replies

2. UNIX for Dummies Questions & Answers

How to create LVM snapshots?

Please suggest me how do I create LVM snapshots in linux. Best regards, Vishal (5 Replies)
Discussion started by: admin_db
5 Replies

3. Solaris

Permissions to run ZFS Snapshots

Hi, I work as an Oracle Technical consultant (mainly DBA related), and I have used ZFS snapshots on previous projects which has helped me a great deal. I often take snapshots before doing some dev work, and then I can roll it back if I want to start again, or if it goes pear shaped!! I have... (4 Replies)
Discussion started by: AndyG
4 Replies

4. UNIX for Dummies Questions & Answers

How to convert non LVM root partition to LVM?

Hi Guys, I m using redhat 6, I have installed root partition as non-LVM . Is there any way i can convert it to LVM? (1 Reply)
Discussion started by: pinga123
1 Replies

5. UNIX for Dummies Questions & Answers

mplayer snapshots

I have a script with: mplayer tv:// -tv driver=v4l2:device=/dev/video0:width=320:height=240:norm=NTSC:fps=30:noaudio:input=0 -vf screenshot -aspect 4:3 -vo xv to take .png screenshots. It now works but am not getting what the webcam sees displayed in the frame -- just snow noise. Does someone... (1 Reply)
Discussion started by: slak0
1 Replies

6. HP-UX

How to reduce LVM to create another LVM

Hi, I'm new to HP-UX. I have LVM on /var with 92Gig. I would like to reduce it to create another LVM for Oracle client with 800 meg or so. How to do it. I'm running 11.iv3 Thanks (4 Replies)
Discussion started by: lamoul
4 Replies

7. Solaris

snapshots backup

Hi guys, I have a dout how to take snapshots backup, i want to take /expote/home(it is of 5.3GB) c0t0d0s7 to /backup dir( i created 6.0GB of slice) in different drive c0t1d0s0. i kow the sintax but i feel dificulty to take backup.i use this:- fssnap -F ufs -o bs=/export/home/ /backup/ but... (4 Replies)
Discussion started by: kurva
4 Replies

8. Solaris

snapshots syntax

Hi guys, i am intrested to learn about snapshots. I was a bit confused about snapshot i know using fssnap -F ufs -o bs (i dont understand the exact what to give the path after this ) if any one know the proper syntax..pls help me. (2 Replies)
Discussion started by: kurva
2 Replies
Login or Register to Ask a Question