zfs is cool!

I just installed Nexenta and I’ve been playing around with zfs. I must say the basic replication system is very cool. Seems to work for zvols as well. Remotely replicated iscsi volumes and nfs data sets, is going to make my backups trivial.

root@hzsilo:/tank/test# ls -l /tank/test2/
total 104
-rw-r--r-- 1 root root 104000 Feb 24 00:54 random
-rw-r--r-- 1 root root 104857600 Feb 24 01:00 random2

root@hzsilo:/tank/test# rm random2
root@hzsilo:/tank/test# zfs snapshot tank/test@10:00pm

root@hzsilo:/tank/test# zfs send -i tank/test@9:59pm tank/test@10:00pm | zfs receive tank/test2@10:00pm
cannot receive: destination has been modified since most recent snapshot

root@hzsilo:/tank/test# zfs rollback -r tank/test2@9:59pm
root@hzsilo:/tank/test# zfs send -i tank/test@9:59pm tank/test@10:00pm | zfs receive tank/test2@10:00pm
root@hzsilo:/tank/test# ls -l /tank/test2/
total 103
-rw-r–r– 1 root root 104000 Feb 24 00:54 random

For those of you who might have missed it, the send receive pipe could have a ‘ssh -C’ part as well. Brilliant. Plus because of the snapshots the deleted data is still there. The whole rollback thing is probably because of atime from the ls.

Some other stats from Wikipedia:

  • 248 — Number of snapshots in any file system (2 × 1014)
  • 248 — Number of files in any individual file system (2 × 1014)
  • 16 exabytes (264 byte) — Maximum size of a file system
  • 16 exabytes (264 byte) — Maximum size of a single file
  • 16 exabytes (264 byte) — Maximum size of any attribute
  • 3 × 1023 petabytes — Maximum size of any zpool
  • 256 — Number of attributes of a file (actually constrained to 248 for the number of files in a ZFS file system)
  • 256 — Number of files in a directory (actually constrained to 248 for the number of files in a ZFS file system)
  • 264 — Number of devices in any zpool
  • 264 — Number of zpools in a system
  • 264 — Number of file systems in a zpool

With that many snapshots possible you could almost have continue data protection. Even with 100 objects to snapshot at one per mintue; 144,000 snapshots, per day, it will be a long time before any limits are reached.

Technorati Tags: ,

Comments are closed.