[NCLUG] zfs (my hard drive crashed, time to upgrade the fs?)

Zak Smith zak at computer.org
Sat Jan 4 15:37:20 MST 2014


On Sat, Jan 04, 2014 at 03:27:30PM -0700, John Gilmore wrote:
> I'd like automatic snapshots instead of the rsync dance I was doing
> before. How do I set that up? I'll still need rsync for the remote
> comptuers certainly, but I think that zfs is a much more reliable and
> finer-grained solution for local (server) snapshots

I don't know anything about running ZFS on LUKS or the sparse file
tricks.  If it were my I'd create a fresh boot/root installation of
Debian 7.3 (or whatever preferred distribution) and then copy my files
from the old drive somewhere.   Then I'd create the zpool from scratch
and do it the "clean" way with the old 2TB and the new one.

Also note that you don't "have to" use a mirror or raidz with ZFS.
You can simply use a single volume and get its filesystem benefits.
Then you'd want to use a second volume as a separate backup.  That
said, the zfs mirrors and raidz's are very reliable in terms of
weathering various failures. The only downside is that there is
additional "rescue" overhead if things really go bad.

As for the snapshots, just use zfs-auto-snapshot.  It's a debian
package.  It consists of a script ("zfs-auto-snapshot") and a bunch of
files in /etc/cron* to schedule the various time-based snapshots.   

You'll also want to schedule a "zfs scrub" about once a week.  This
will detect (and correct if possible) silent data corruption on pools.

> I'd like precious files (/var/local/pics, /home/*/docs, a few others)
> to have two copies on each spindle. How can I assure that?

Check the man pages on "zfs set copies="




--
# Zak Smith    mobile 970-232-4468



More information about the NCLUG mailing list