what is the best Hammer setup to taclke the bitrot problem + DRP
PeerCorps Trust Fund
ipc at peercorpstrust.org
Mon Dec 26 05:06:24 PST 2016
Most users do go with the OS installed on an SSD (120-256 GB or more), and depending on your storage needs, you can 'hammer mirror-stream' to mirror a main storage drive to a second in the same machine as well as to a third drive in a remote machine.
Each of these disks can have a different history retention policy. The ability to access filesystem history gives you some safeguards against for instance an accidental deletion, or a rogue program that decides to write garbage to a file (as happened to me recently). If one of those disks should die, you have two other live full copies of all of your data that you can access. No need to rebuild or resilver anything, just promote the backup (slave) disk to a main (master) disk and move on.
HAMMER has checksums which will allow you to detect bitrot and you can use a few different strategies to proactively check for it, but nothing is going to try to "repair" a file as might be the case elsewhere (HAMMER 2 seems to address this though). What you can do instead when you encounter some bad data is cd into your filesystem history (provided you had a sufficiently long enough retention policy) and look for a good copy before it was corrupted. This might also be on a different disk in another machine if you made use of remote replication.
Siju George has written a nice commentary about how he made use of DragonflyBSD and HAMMER in his company:
HAMMER doesn't do RAID on its own if that is what you are looking for. You will need to get a real hardware RAID card. Areca makes cards that are supported very well under Dragonfly. HAMMER's built-in filesystem replication features have some advantages over traditional RAID depending on your use case and needs.
There is also a nice guide on BSDNow about HAMMERfs which might give you some additional ideas: https://www.bsdnow.tv/tutorials/hammer
You can check out this for mirroring ideas as well: https://www.dragonflybsd.org/docs/how_to_implement_hammer_pseudo_file_system__40___pfs___41___slave_mirroring_from_pfs_master/
In your case where a disk is only connected once per month, you can use 'hammer mirror-copy' to backup your data when it is needed. For something more automatic 'hammer mirror-stream' should work also.
If any of the above is in error, I imagine someone with deeper insight will chime in.
On 12/26/2016 01:30 PM, vincent delft wrote:
> First of all I'm new to DF.
> Thanks for the nice install process. It's a quite easy to have DF running.
> But my concerns are more linked to HammerFS.
> My context is the following:
> - I would like to have a NAS system running on a small machine: 4GB RAM
> having a celeron CPU of 1.6GHz.
> - This NAS host +- 700GB of data
> - I plan to install 1 disk of 1TB in the NAS and keep a second disk of 1TB
> outside the NAS for DRP reasons.
> - I'm looking for a solution tackling the bit-rot problem.
> Concerning HammerFS, I've still read lot of DF manuals, pages, ... :
> So basically, I've understood that I must install DF on a small SSD disk
> and will dedicated the 1TB disk to HammerFS.
> But I have some questions:
> - What must be the setup of HammerFS to solve "bit-rot" ? Should it be
> Raid1 or Raid5, ... ? Can it be done on 1 physical disk (thus 2
> filesystems) ? Should it be 2 PFS in 1 HammerFS located on 1 slice or
> should I create 2 slices on the disk?
> - For DRP reasons, how can I perform a backup on an external disk ? (the
> disk is only connected 1x per month on the NAS). Should I do a "dd" ?
> should I use the master-slave concepts ? Should I use cpdup ?
> Many thanks for your replies.
More information about the Users