LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-08-2010, 12:46 PM   #1
andres-m77
LQ Newbie
 
Registered: May 2009
Posts: 3

Rep: Reputation: 0
can't create more tan 16 snapshots


I would like now if someone has the same problem.

I'm running slackware with lvm snapshots with ext3.

When i create the snapshot number 17 i get this error:




Code:
  

root@fl65:~# lvcreate -L3G -s -n mysql20101008 /dev/vgbackup/lvmysql
  device-mapper: reload ioctl failed: Cannot allocate memory
  Failed to suspend origin lvmysql
How could i add more than 16 snapshot volumes?

Thanks in advance!
 
Old 10-08-2010, 01:11 PM   #2
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by andres-m77 View Post
I would like now if someone has the same problem.

I'm running slackware with lvm snapshots with ext3.

When i create the snapshot number 17 i get this error:




Code:
  

root@fl65:~# lvcreate -L3G -s -n mysql20101008 /dev/vgbackup/lvmysql
  device-mapper: reload ioctl failed: Cannot allocate memory
  Failed to suspend origin lvmysql
How could i add more than 16 snapshot volumes?

Thanks in advance!
Why on earth would you ever need so many snapshots? You could always take a snapshot, backup from that snapshot, release the snapshot and take another...I don't see any reason why 17 would be necessary (even if your partitioning setup is so convoluted). You are aware that an LVM snapshot is not a backup, right? You create backups *from* a snapshot and then release the snapshot immediately upon finishing the backup to relieve the performance penalty (since writing to the initial volume requires two writes [one to the snapshot as well], and reading from the snapshot requires two reads [one from the original volume as well]).

I don't mean to be patronizing, I really don't -- but unless you have a very odd backup strategy, I can only assume that you have the wrong idea about what LVM snapshots are...they are not backups and shouldn't be used as such. Take an LVM snapshot and dd/rsync/tar from the snapshot, then release the snapshot. 17 should never be required.
 
Old 10-10-2010, 08:44 AM   #3
andres-m77
LQ Newbie
 
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you T3slider, i really didn't know the 16 logical volumes limitation, did you?

It is usefull to get more than n days of changes, and get them all mounted without using more disk space than the required for the lv.

Do you know if is possible to get more than 16 volumes?
 
Old 10-10-2010, 10:26 AM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by andres-m77 View Post
It is usefull to get more than n days of changes, and get them all mounted without using more disk space than the required for the lv.
No, it doesn't. The changes are all in the original logical volume. The disk blocks that were changed are in the snapshot volume(s).

In your case, every time you write something into a file in your original logical volume, the original sector(s) get copied into the 16 other snapshot volumes.

If you are trying to keep track of changes to files, then you should be looking at a version control system which is designed to do that sort of thing.
 
Old 10-20-2010, 01:20 PM   #5
andres-m77
LQ Newbie
 
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
I had one partition and one vg, something like:

pv /dev/sdb1 vg vgbackup lv1 lv2 lv3 and snapshots of lv1, lv2, lv3

Now i made 3 partitions, sdb1, sdb2, sdb3 and vg1, vg2, vg3 with logical volumes lv1, lv2, lv3 and i was able to make more than 16 new snapshots.

Thanks!

Last edited by andres-m77; 10-20-2010 at 01:21 PM.
 
Old 10-20-2010, 02:13 PM   #6
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
I really don't think you're grasping the concept of an lvm snapshot...your methods are particularly dangerous if the snapshot LV runs out of space. Do you have 16 logical volumes, and therefore each snapshot represents a different logical volume? If not, then you're doing it wrong. If you want incremental snapshots to avoid wasting space you could, perhaps, use rsync (or another utility) to create incremental backups. As it is, assuming you are using 16 snapshots of the same logical volume, every time you write to that volume you are writing 17 times (once to the original volume and once to each of the 16 [or more!] snapshots of that volume). This is a *huge* performance hit. Furthermore, if you run out of space on any of those volumes (I would assume snapshot number 1 would run out first, followed by sequential failing of each snapshot) then you will *lose* all of those changes -- when a snapshot LV is full, the LV is marked as unusable and it no longer tracks any changes to the system (and thus is useless).

I will repeat myself -- LV snapshots are *NOT* backups themselves, but instead should be used to *create* backups of live filesystems to avoid backing up changing data. I maintain a one-to-one backup of each of my logical volumes (as well as my two non-LVM partitions) on a backup drive using rsync, and any changed files are backed up to another date-and-time-stamped directory. This provides me with a main backup and a backup of any changed or deleted files, and since the snapshots are unmounted immediately after the backup, there is no permanent system resource penalty, nor is there a danger of my snapshots being marked unusable over time.
 
  


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
snapshots Nitish068 Linux - Software 2 10-10-2009 10:36 PM
Ubuntu 8.1 install-- then blank tan screen with cursor HMikeH Linux - Newbie 1 04-01-2009 03:01 AM
What is integral (x tan(x) dx) corbis_demon Linux - General 1 12-06-2007 05:29 AM
Linux-Tan ..Gorgeous stuff for all of us GTrax Linux - Distributions 2 02-04-2007 01:06 AM
tan(x) function doesn't work in linux C pranavojha Programming 12 03-21-2006 07:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:31 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