Did you know  45Drives offers free  public and private  webinars ?
Click here to learn more  & register!
ZFS Snapshots

Mitch talks about ZFS snapshots - what they are, why they are useful and even some of their limitations.

So a ZFS snapshot is a copy of a data-set or a volume that takes up nearly zero space and can be created almost instantly due to the way ZFS works with its copy-on-write system. Unlike other traditional file systems, when data is overwritten in ZFS, the data is written to a new block, rather than overwriting the old data in its place. And then once that write completes, the metadata is then updated to point to the new location.

So a ZFS snapshot will continue to grow in size as data gets added to the live file system. It's for this reason that you may want to continuously add new snapshots and delete old ones as time goes by. However, depending on your use case, this may vary. It's for this reason that you will want to continuously create new snapshots and remove old ones on a specific schedule that makes sense for your use case, otherwise you may end up with some extremely large snapshots.

One useful feature for ZFS snapshots is the ability to mount them read-only to allow for recovery of files or to rollback an entire file system to the last time a snapshot was created. So ZFS snapshots definitely come in handy for system admins who may have some “accident-prone” users that may end up misplacing or losing very important files.

Although ZFS snapshots serve a purpose and they serve them well, don't be fooled into thinking that they in any way replace an adequate backup solution. The name of the game in today's fast-paced business environments is availability, and companies need to be able to recover from mistakes made where loss of data occurs with minimal or no downtime. This is why snapshots can be an absolute godsend in situations like these. It should be noted, however, in case of, let's say a large-scale disaster or damage of the source data, the snapshot may become lost.

I know I've said it already but I want to reiterate, snapshots are not adequate backup. Mission-critical data should always be backed up to a separate location. We recommend the 3-2-1 rule, which is a common industry approach to backing up data from any failure scenario. The rule goes as follows: keep three copies of your data, two on different storage mediums, and one located off-site. So a really cool consequence of ZFS using the copy-on-write system is that in the event of a power failure or a system crash while new data was being written onto the disk, you may end up losing the ongoing write that was happening, but your file’s last valid state will still be completely untouched and corruption free. If this happened in a traditional file system, however, you may end up with a corrupt file or something that's half written. This is because, as I touched on prior, ZFS writes a whole new block instead of overwriting the old ones. You can find out more about ZFS snapshots, such as how to create and manage them over on our knowledge base, so be sure to check it out.

Alright, well thanks for watching. Hopefully you learned something about ZFS snapshots here, if you have any questions or comments, don't hesitate to leave them down below. Thanks for watching, we'll see you next week.



Discover how 45Drives can work for you.

Contact us to discuss your storage needs and to find out why the Storinator is right for your business.

Contact 45Drives