LVM snapshots in a file instead of wasting pre allocated space?
Linux - GeneralThis 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
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.
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.
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.
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".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.