BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- Subject: [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: markw at mohawksoft.com (markw at mohawksoft.com)
- Date: Thu, 28 Jul 2022 10:52:15 -0400
- In-reply-to: <20220727165955.00002f55.Richard.Pieri@gmail.com>
- References: <0f9cacf3-e355-1109-6e92-2cab27643886@borg.org> <b7cc0845dafc88d9dd78ded6441d2bf8.squirrel@mail.mohawksoft.com> <34520471-2c87-0751-1293-d797156ee4a5@borg.org> <40c13ef8cbd1396712aa21641a9cb995.squirrel@mail.mohawksoft.com> <20220727125338.5e4e2a69.Richard.Pieri@gmail.com> <0f2a15806f492b56c2189d642b119e03.squirrel@mail.mohawksoft.com> <20220727154805.00002ce7.Richard.Pieri@gmail.com> <d73d79dc8225f3a70a363f24e6ad968a.squirrel@mail.mohawksoft.com> <20220727165955.00002f55.Richard.Pieri@gmail.com>
ZFS Uses: ZFS is really great for backups. We all know that the best backup is two copies. My previous company had a product strategy that allows incremental backups backups "forever" and always resulted in a "full." Configure your "master" or server using ZFS. Configure your replication target also with ZFS. Enable compression on both. Most of the time the overhead is negligible and saves both disk and I/O. Create your first snapshot. Use zfs send to replicate your zfs data to your replication target using the snapshot. Backup: (time passes) Create a new snapshot Use ZFS send to send an incremental backup to the replication target based on the difference between the previous and new snapshot. Delete previous snapshot if you no longer need it. goto Backup You can put this behavior in a cron job. This only backs up the changes between snapshots at the block level. It creates a "crash consistent" backup on the replication target. ZFS and KVM: Do you use KVM or QEMU? Well, ZFS is AWESOME for this as well. The QCOW2 format is ridiculously slow. ZFS ZVOLS are fantastic, you can allocate them as "sparse" zfs create -V 128G -s zpool001/rocky8dev zfs set compression=lz4 zpool001/rocky8dev The above creates a block device "/dev/zpool001/rocky8dev" It is sparsely allocated so that its takes almost no space when created. (-s) Then we enable compression. In KVM, use /dev/zpool001/rocky8dev as the storage for the virtual machine. Install normally. Using a ZFS ZVOL is faster than QCOW2, uses less space than QCOW2, creates a device that can be inspected and modified by the host system with standard tools. It has all the benefits of a RAW device as well as the benefits the QCOW2 does badly: Snapshots, rollback, and sparse allocation. RaspberryPI I have even used ZFS ZVOLS with iscsi to share them on my network to RaspberryPI systems configured to boot from the iscsi volume. I have created ZVOLs exactly the size of a raspberry PI SDcard. Dumped a configuration from SDcard to ZVOL. With snapshots, I can track changes. You can use "zdb" to find all the blocks that have changed between snapshots and revert only the blocks that have changed to restore an SDcard to a previous version. Its a time save and reduces the total number of writes to the SDcard. > On Wed, 27 Jul 2022 16:13:31 -0400 > markw at mohawksoft.com wrote: > >> A stripe over two mirrors is not as reliable as RAID6. If you have 4 >> drives arranged in two mirrors, each mirror can only survive the loss >> of one drive. So, your system, if it loses 2 drives, has a 33.33% >> chance of losing half its data. > > If I cared that much about fault tolerance then I'd be running one > 4-way mirror instead of two 2-way mirrors. As is, if I lose two drives > out of the four before I can replace and resilver one, all I'm really > out is the most recent backups of my daily drivers and the time needed > to restore my backups which are kept on auxiliary storage. > > -- > \m/ (--) \m/ > _______________________________________________ > Discuss mailing list > Discuss at lists.blu.org > http://lists.blu.org/mailman/listinfo/discuss >
- References:
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: kentborg at borg.org (Kent Borg)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: markw at mohawksoft.com (markw at mohawksoft.com)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: kentborg at borg.org (Kent Borg)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: markw at mohawksoft.com (markw at mohawksoft.com)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: markw at mohawksoft.com (markw at mohawksoft.com)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: markw at mohawksoft.com (markw at mohawksoft.com)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- Prev by Date: [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- Next by Date: [Discuss] ZFS on Raspberry Pi?
- Previous by thread: [Discuss] ZFS for an Encrypted External Disk: My Experience and Notes
- Next by thread: [Discuss] ZFS on Raspberry Pi?
- Index(es):