Re: old burned cd file in wav

"Jerry Baker jbaker6953-/[email protected] [EAC]" <[email protected]> Fri, 2 Oct 2020 09:20:49 -0700
Newsgroups gmane.comp.audio.eac.user
Message-ID <[email protected]>
On 10/1/2020 7:38 PM, Fred Maxwell [email protected] [EAC] wrote:
> 
>  > On Oct 1, 2020, at 6:32 PM, Jerry Baker jbaker6953-/[email protected] [EAC] 
> <[email protected]> wrote:
>  >
>  > The ZFS file system makes file corruption almost impossible.
>  >
> I am aware of the capabilities of ZFS; I’ve set up ZFS-based NASs such 
> as FreeNAS.
> 
>  > It's the primary advantage of ZFS over RAID.
> 
> A RAID 6 (striping with double parity) NAS can detect and correct 
> errors, including individual bit-flips. And all mission-critical ZFS 
> storage employs some form of RAID (e.g. RAIDZ2). There are some edge 
> cases where ZFS has theoretical advantages over generic RAID-6, but on a 
> RAID 6 NAS with ECC RAM and a high-quality UPS, undetected and 
> uncorrected in situ file corruption is very, very unlikely.

I've never seen it happen spontaneously in a lot of years of using HDDs. 
Every file corruption I've ever seen happened while someone was doing 
something with the file. The advantages of ZFS in this case are:

1. Copy on write. When saving a file ZFS does not overwrite the existing 
file. Instead, it creates a new copy by copying the unchanged sectors 
and writes the new changed ones. Only after verifying that the checksums 
of the copied sectors match and writing the new sectors were successful 
does the file system get updated to point to the new copy and the 
original copy of the file get deleted. The advantage of copy on write is 
that a power failure, memory error, disk error, or anything else that 
interrupts the file operations will not corrupt the original file nor 
result in the creation of new corrupted file.

2. Snapshots. The copy on write strategy allows ZFS to keep snapshots of 
the file system. For those unfamiliar, snapshots are sort of like a 
backup without having to create a second copy of a file. A snapshot 
essentially "freezes" the sectors so that any future changes to the file 
are written to new sectors. This means editing 1 kb of a 50 GB file can 
result in two versions of that 50 GB file in the file system that only 
takes up an extra 1 kb of actual disk space. While working on a file 
that large you could have snapshots taken every 5 minutes and after an 8 
hour day only have 96 kb of "extra" data stored on disk but be able to 
revert to any one of those 96 versions or create a copy of any version 
while leaving the current version untouched.

3. Checksumming. Every sector is checksummed and the checksum is not 
stored in that sector. Every single time a sector is read it is verified 
against the stored checksum and if different the data is corrected on 
the fly using parity data. This protects against read errors, something 
of which other file systems are not capable that I know of.

4. There's more, but a lesson on ZFS is too long for me to write here 
and for everyone to read.


> What no filesystem can do is detect and correct file corruption that was 
> caused elsewhere.

ZFS snapshots help in this case. If even one bit of a file was changed 
it's a simple thing to go back through the snapshots to find a copy from 
before the error happened. Even metadata like last-modified dates can be 
restored. What makes it so much better than straight backups is that the 
size required for a snapshot is only the size of the sectors that 
actually changed. I take nightly snapshots of my entire collection of 
music and personal photographs and keep those snapshots for 2 years. The 
entire collection of snapshots takes up less than a few megabytes of 
disk space.

FreeNAS creates snapshots in such a way that if you access your data 
from a Windows PC through a Samba share you can just right-click any 
file and select "Previous Versions" to peruse all the previous versions 
of that file or directory.

I know you probably know most of this, but I'm targeting a wider 
audience. It's getting off on a tangent, but it is important for people 
interested in long-term digital archival.