LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-09-2012, 02:18 PM   #1
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
LVM snapshots in a file instead of wasting pre allocated space?


Hi,

I am just fiddling around with LVM and snapshots and was wondering if there is a way to use snapshots without wasting a lot of space.

Normally, when you do a snapshot, the size you allocate for the snapshot must be free in the volume group. So if your snapshot will take 10% of your volume, you have to keep 10% reserved in the VG and this will be wasted and never be used for anything else than snapshots. Since I will not be using snapshots that much, I prefer to have a solution that is dynamical, i.e. that the snapshot space is a file that can grow and shrink. Currently, it seems that snapshots are similar allocated (and have to be space reserved for it rigidly, when you create the filesystem) like the swap space: you cannot use it for anything else. But with the difference, that swap space you might need every day, while snapshots you might only use from time to time.
Resizing the filesystem and logical volume is not an option, as so far I have found, reduction of the FS does not work online and you have to shut down the server every time you do it, which is unfeasable.

Can a LVM snapshot be put in a file and dynamically grow and take up as much space as it needs? In Windows I have noticed that you don't seem to have to plan for how large the snapshots become when you install the system /setup the filesystem, as it is dynamically taken from the FS.

Cheers

Markus
 
Old 03-10-2012, 06:47 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
Use btrfs instead of LVM.
 
Old 03-14-2012, 03:50 PM   #3
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by syg00 View Post
Use btrfs instead of LVM.
That does not seem good advice at this point:

http://www.h-online.com/open/news/it...l-1471706.html

quote:
----
Oracle the second Linux distributor to officially support Btrfs in an enterprise distribution, even though the filesystem is currently still considered experimental in the Linux kernel that is maintained by Linus Torvalds
...
In Fedora, OpenSUSE and Ubuntu, Btrfs has been available during installation for some time. However, plans to use Btrfs as the default filesystem have repeatedly been postponed; one of the reasons is that only a rudimentary tool for testing and repairing Btrfs filesystems is available. Like SUSE, Oracle's distribution includes an improved variant of the btrfsfsck program that hasn't become available separately. The code for an improved test and repair tool has been available in the developer repository for Btrfs tools for a month – but it is located in a branch whose name, "dangerdonteveruse", clearly advises against its use.

----

Not something that I want to trust with my valuable data. Not having a basic maintenance tool is a nono for me. It is like getting a new car and well, having no wrench (yet) available to open the hood to check the oil, coolant and belts.
But the premise of BTRFS is good, I just hope it will be ready this century still, it has been an a quasi beta state for a long time.
 
Old 03-14-2012, 03:51 PM   #4
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
But I was also not asking the question "what alternatives are there to LVM?" but more specific "how to do this with LVM?"

Markus
 
Old 03-14-2012, 05:27 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
And I answered it.
 
Old 03-28-2012, 04:50 PM   #6
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by syg00 View Post
And I answered it.
I disagree. You did not answer my original question, you side stepped it by talking about some other technology. At this point, LVM is the only viable option for me and my question was how to do it with that. It is a little like asking "how do I raise the horse power of my Ford xzy" and somebody answers "buy a Ferrari".
 
Old 03-28-2012, 05:01 PM   #7
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
To help others, this might be relevant:

http://glandium.org/blog/?p=2059

here a few excepts:
----
...Debian Squeeze + btrfs = FAIL
...Lesson learned:
Never use a file system without a working fsck in production...
----

Like me he is using RAID and Debian Squeeze and is looking for a fs that can do snapshotting.
So it seems to be still a work in progress, beta stage.

Not that great for a filesystem, as consistent and reliable operation is unfortunately not an option at such an essential layer of the OS.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Understanding LVM Snapshots forbin Linux - Server 19 02-16-2011 04:08 PM
LVM Snapshots, can they be disabled? Stiken Linux - Newbie 2 01-29-2010 02:57 PM
LVM snapshots: How to use? gargamel Linux - Server 12 02-24-2008 02:57 PM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM
LVM snapshots that run out of space, results? haertig Linux - Software 2 03-02-2006 02:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:55 AM.

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