Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2012 22:07:50 -0700
From:      "CH" <freebsd-fs@ch.pkts.ca>
To:        "Steven Hartland" <killing@multiplay.co.uk>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Can you list internal checksums of a ZFS filesystem?
Message-ID:  <20120717220750.03a7b7c5@kirk.lan>
In-Reply-To: <451BA6FA76214F37B2F271F91708E275@multiplay.co.uk>
References:  <20120717152629.42e0641e@fedora14-x86-64.shechinah.mi.microbiology.ubc.ca> <451BA6FA76214F37B2F271F91708E275@multiplay.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 17 Jul 2012 23:54:38 +0100
"Steven Hartland" <killing@multiplay.co.uk> wrote:

> ----- Original Message ----- 
> From: "CH" <freebsd-fs@ch.pkts.ca>
> To: <freebsd-fs@freebsd.org>
> Sent: Tuesday, July 17, 2012 11:26 PM
> Subject: Can you list internal checksums of a ZFS filesystem?
> 
> 
> > Hello list,
> > 
> > I'm moving data to a ZFS filesystem, and it's a ton of big files
> > (more than 3 terabytes).  I don't trust the network copy command
> > completely, and so I'd like to compare checksums.  I'm not looking
> > forward to it, since it's going to be a slow process, especially if
> > I can't run the command on the server. 
> > 
> > Since ZFS already has computed and stored checksums for every file
> > on the destination machine, is there an easy way to extract that
> > from the filesystem? Perhaps 'ls -lR --checksums' or similar?
> > 
> > Note, checksums still have to be calculated on the source machine,
> > and so the overall operation will still take the same length of time
> > (assuming ZFS is faster than HFS+), but it does save a lot of cpu
> > and disk reads on the destination machine, which can then be used
> > for other things.
> 
> IIRC it's block level checksums, not file level ones, so I don't think
> this will be what you're looking for.
> 
>     Regards
>     Steve

You're right, block-level checksums would be less efficient, and
there probably isn't a handy program out there for generating the same
block-level checksums on a non-ZFS system.  I suspect it wouldn't
(shouldn't?) be hard: for each file, while not eof, read block, checksum
block, print checksum, repeat, compare list of checksums, do next file.
As long as the checksum algorithm and the block size are the same, the
thing should work.

In any case, if the checksums are effectively unreachable from
userspace, then I should just recalculate file-level checksums.

Thanks
CH



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120717220750.03a7b7c5>