"Johan Hartzenberg" <[EMAIL PROTECTED]> wrote:
> On Sat, Oct 25, 2008 at 6:49 PM, Marcus Sundman <[EMAIL PROTECTED]>
> wrote:
> > Richard Elling <[EMAIL PROTECTED]> wrote:
> > > Marcus Sundman wrote:
> > > > How can I verify the checksums for a specific file?
> > >
> > > ZFS doesn't checksum files.
> >
> > AFAIK ZFS checksums all data, including the contents of files.
> >
> > > So a file does not have a checksum to verify.
> >
> > I wrote "checksums" (plural) for a "file" (singular).
> >
> 
> AH - Then you DO mean the ZFS built-in data check-summing - my
> mistake.  ZFS checksums allocations (blocks), not files. The checksum
> for each block is stored in the parent of that block.  These are not
> shown to you but you can "scrub" the pool, which will see zfs run
> through all the allocations, checking whether the checksums are valid.

I don't want to scrub several TiB of data just to verify a 2 MiB file. I
want to verify just the data of that file. (Well, I don't mind also
verifying whatever other data happens to be in the same blocks.)

> This PDF document is quite old but explains it fairly well:

I couldn't see anything there describing either how to verify the
checksums of individual files or why that would be impossible.

OK, since there seems to be some confusion about what I mean, maybe I
should describe the actual problems I'm trying to solve:

1) When I notice an error in a file that I've copied from a ZFS disk I
want to know whether that error is also in the original file on my ZFS
disk or if it's only in the copy.

2) Before I destroy an old backup copy of a file I want to know that the
other copy, which is on a ZFS disk, is still OK (at least at that very
moment).

Naturally I could calculate new checksums for all files in question and
compare the checksums, but for reasons I won't go into now this is not
as feasible as it might seem, and obviously less efficient.

Up to now I've been storing md5sums for all files, but keeping the
files and their md5sums synchronized is a burden I could do without.


Cheers,

Marcus
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to