5 ms·
Nice. My gotchas form using zfs on my personal laptop with Ubuntu. - if you want to copy files for example and connect your drive to another system and mount y
by totetsu 3y ago
Nice. My gotchas form using zfs on my personal laptop with Ubuntu.
- if you want to copy files for example and connect your drive to another system and mount your zpool there, it sets some pool membership value on the file system and when you put it back in your system it won’t boot unless you set it back. Which involved chroot
- the default settings I had made snapshot every time I apt installed something, because that snap shot included my home drive when I deleted big files thereafter I didn’t get any free space back until i figued out what was going on and arbitrarily deleted some old snapshots
- you can’t just make a swap file and use it,
- Helmut10001 3y ago> - if you want to copy files for example and connect your drive to another system and mount your zpool there, it sets some pool membership value on the file system and when you put it back in your system it won’t boot unless you set it back. Which involved chroot Isn't this what `zpool export` is for?
- dizhn 3y agoOpensuse Tumbleweed comes with snapper which works with btrfs in a similar fashion and /home is not included in the snapshot by default. For your use case too you should exclude /home from your apt triggered snapshots and set a separate one for it. I had scheduled snapshots for my /home at one point but since it's a very actively used directory (downloading isos, games then deleting them) I had similar problems to yours. I guess we could both also have a dedicated separate directory for those short lived huge files, which don't need a snapshot anyway.
- Dylan16807 3y ago> I had scheduled snapshots for my /home at one point but since it's a very actively used directory (downloading isos, games then deleting them) I had similar problems to yours. What kind of schedule was it? I feel like the low-impact alternative to no snapshots at all is daily snapshots for half a week to a week, and maybe some n-hourly snapshots that last a day or two. Which I would not expect to use up very much space.
- dizhn 3y agoIt was very frequent (around every 5 minutes) because what I was trying to get was a failsafe in case I delete or otherwise mess up a file I was currently working on. It happened exactly once since I disabled snapshots of /home and I was able to recover it from the terminal's scrollback buffer of all places. :) As far as I know btrfs does get slower as the number of snapshots increase. Not sure about zfs in that regard. Your plan does sound sensible. I have a feeling you could make the snapshots even more frequent without any ill effects.
- totetsu 3y agoI found cat /etc/apt/apt.conf.d/90_zsys_system_autosnapshot // Takes a snapshot of the system before package changes. DPkg::Pre-Invoke {"[ -x /usr/libexec/zsys-system-autosnapshot ] && /usr/libexec/zsys-system-autosnapshot snapshot || true";}; // Update our bootloader to list the new snapshot after the update is done to not block the critical path DPkg::Post-Invoke {"[ -x /usr/libexec/zsys-system-autosnapshot ] && /usr/libexec/zsys-system-autosnapshot update-menu || true";}; but how would I get this to not snapshot , say /home/Downloads .. make that its own zpool?
- dizhn 3y agoDataset should be enough I think. Not zpool. Hard to be sure without knowing what that script does.