Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Thursday, December 23, 2010

Backup Strategies: Linux to FreeBSD ZFS

I use FreeBSD on my home server mainly for the ZFS support, but I run Linux on my workstation and laptop.

I've been trying to figure out the best backup strategy for this environment. If I was running FreeBSD on my client machines and they had local ZFS filesystems, I could use snapshots with ZFS send to propagate changes to the server. This would be really great but is impractical until a fast, stable version of ZFS arrives in Linux (probably never).

For now I've settled on mounting an NFS share from the server on each machine and then using rsync to copy changes from the local volume to the NFS share via cron job. Using NFS is faster than tunneling over rsync over ssh since the server is slow. I run rsync in the mode that propagates deletions to the destination volume and rely on zfs snapshots on the server to recover any accidentally deleted files.

I guess it's not perfect, but probably the best I can do without switching my client machines to FreeBSD.

Saturday, December 18, 2010

Ubuntu Slow After Hibernate Resume

I use hibernate probably more often than I should. It's not totally stable on my hardware and sometimes it crashes on resume, or does weird things like crashes on the first resume attempt but works fine on the second. And God help you if you install some system update and then accidentally hibernate instead of restarting. But even with all the weird idioscyncracies it's still faster than rebooting every morning, so I use it.

I've already had to write a custom hibernate/resume script to unmount/remount my NFS share, lest it hang on resume and make the system unusable by locking up every shell when it tries to read my home directory (still haven't figured out a way out of that pickle). I'm thinking about also adding swapoff -a; swapon -a to the resume script. For whatever reason linux seems to leave everything on the swap disk by default and only page stuff back in as it's accessed, which means the system is slow for a few hours after hibernate resume every time you access some program you haven't accessed yet. I rarely use even half my RAM so it makes more sense to page everything back in right after resume so the system is snappy again.

Isn't that true for most people? I wonder why this isn't done by default.