4 ms·
You can also use lvm2 and then you get atomic snapshots with any file system (I think it needs to support fsfreeze, I guess all of them do).
by _flux 2y ago
You can also use lvm2 and then you get atomic snapshots with any file system (I think it needs to support fsfreeze, I guess all of them do).
- pixelmonkey 2y agoI never knew this. Thanks for sharing!
- Am4TIfIsER0ppos 2y agolvm requires unallocated space in the volume which makes it kind of garbage to use for snapshots
- fulafel 2y agoOnly a little (as much as data will change during the backup). And default filesystems nowadays support resizing downwards so you can make space after initial partitioning.
- Am4TIfIsER0ppos 2y agoYou have to know in advance to not allocate 100% to root and home otherwise you are SOL when you want to make space later. If you're lucky you can disable swap and temporarily use its allocation to do it, providing that is large enough for the changes.
- fulafel 2y agoThis is not the case, as like I said you can shrink either of those filesystems and its container and use the freed space for this. (Also I think lvm doesn't need the volume blocks to be contiguous on the physical volume. So you might have N free space after volume a and M after volume b, and lvm would let you create a new N+M sized volume.)
- Am4TIfIsER0ppos 2y agoSo when I have root and home mounted because I am using the computer can I shrink them? No because they are mounted.
- fulafel 2y agoThe easiest way to resize the root partition is probably to boot from eg Ubuntu live/install USB stick. The home partition you can unmount (but not while non root user sessions are using it).
- Am4TIfIsER0ppos 2y ago> reboot into another OS As I said: garbage for snapshots
- fulafel 2y agoYou need to do it only once (if you didn't do it at install time), not every snapshot.
- _flux 2y agoPersonally I've never found this to be issue, as I increase volume sizes base on need, not allocate 100% from the get-go. The space needed for short-lived snapshots is not that big, though that of course can depend on the system. This also helps dealing with run-away (or long running) processes eating disk space, as you always have some extra space set aside..