SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.