HAMMER - Add version 3 meta-data features
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 14 Oct 2009 18:44:59 +0000 (11:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 14 Oct 2009 18:44:59 +0000 (11:44 -0700)
commit83f2a3aae851887c1143dd5174eade5b66682dce
treeb2d46151a945cccdb8388ad11f636c10db84fb3f
parent750d72f9eedbcb3492745cedd91f82e2590162cc
HAMMER - Add version 3 meta-data features

* These features are available for filesystem version 3.  Version 2 may be upgraded
  to version 3 in-place.  These features are not usable until you upgrade.

* Definitively store snapshots in filesystem meta-data.  Softlinks still
  work.  The new snapshot directives (snap, snaplo, snapq, etc) also allow
  you to specify up to a 64-character note for each snapshot you create.
  The snapls directive may be used to list all snapshots stored in meta-data.

  'hammer cleanup' will move all softlink-based snapshots residing in the
  <fs>/snapshots directory to meta-data when it next snapshots the filesystem
  (within a day of upgrading, usually).   The snapshot softlinks are left intact.

  Storing snapshot information in meta-data means that accidental wipes of
  your <fs>/snapshots directory will NOT cause later hammer cleanup runs to
  destroy your snapshots!  The meta-data snapshots are also removed if you
  do a prune-everything, or through normal pruning expirations, and thus
  'hammer snapls' will definitively list your valid snapshots.

  This feature also means that you can obtain a definitive list of snapshots
  available on mirroring slaves.

* Definitively store the hammer cleanup configuration file in filesystem meta-data.
  This meta-data is not mirrored.  'hammer cleanup' will move <fs>/snapshots/config
  to the new meta-data config and deletes <fs>/snapshots/config after you've upgraded
  the filesystem.  You can edit the configuration with the 'viconfig' directive.

* The HAMMER utility has new directives:  snap, snaplo, snapq, snaprm, snapls,
  config, and viconfig.

* WARNING!  Filesystems mounted 'nohistory' and files chflagged similarly do not
  have snapshots, but the hammer utility still allows the directives to be run.
  This is a bug that needs to be fixed.
19 files changed:
sbin/hammer/Makefile
sbin/hammer/cmd_cleanup.c
sbin/hammer/cmd_config.c [new file with mode: 0644]
sbin/hammer/cmd_snapshot.c
sbin/hammer/cmd_softprune.c
sbin/hammer/cmd_version.c
sbin/hammer/hammer.8
sbin/hammer/hammer.c
sbin/hammer/hammer.h
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_disk.h
sys/vfs/hammer/hammer_ioctl.c
sys/vfs/hammer/hammer_ioctl.h
sys/vfs/hammer/hammer_mirror.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_reblock.c
sys/vfs/hammer/hammer_transaction.c
sys/vfs/hammer/hammer_vfsops.c