[lug] Interface CRC error on USB connected SATA drive

Jed S. Baer blug at jbaer.cotse.net
Sat Sep 10 11:02:19 MDT 2016


On Fri, 9 Sep 2016 20:40:58 -0600
Davide Del Vento wrote:

> Try something like
> tar --mtime='2010-01-01' cf - | md5sum
> from both locations to rule out file corruption (remove mtime if you
> want to include mtime int the checksum). Try first on a subdir to
> check if this is correct as is (I haven't tested it).
> You might want to do this in smaller chunks.

I like this idea. It's interesting how it played out.
I used tar cf - --mtime='2010-01-01' . | md5sum in both source and
destination, using a subdir having only 6 files. Sums did not match.
Manually checked all files using diff, and they are identical.

All files in the directory match the file glob h*, but
tar cf - --mtime='2010-01-01' h* | md5sum produces a different checksum
from using . for the input files list.

Using the h* file glob for input to tar, the sums match in both source
and destination. Also using your suggestion of smaller chunks, this
should work fine, just using file globs a*, b* ... quickie shell script.

> My best practices:
> - always use tmux, and (in reality "or" suffice) set the scroll back
> options in your shell to infinite

I use screen sometimes, though I've heard tmux is better. In practice,
I've never before needed huge scrollback.

> - never put long-running jobs in background, always use a new tmux tab
> (or terminal tab) for doing other stuff
> - if I anticipate there might be problem, redirect stderr to stdout
> and pipe into a file with tee (easier to grep and parse than tmux or
> terminal scrollback) -- if it weren't so complicated I would also keep
> a copy of the stdout and stderr separately, besides the merged one

Good advice, and I probably would've done something smart like that if I
hadn't been distracted thinking of other things. I do have a defense in
place against spammy programs, but I sometimes forget to use it. I have a
little script named deadlaunch.

  #!/bin/bash
  # launch a gui, with annoying output sent to /dev/null
  exec nohup $* 1>/dev/null 2>&1 &

So, e.g. 'deadlaunch bluefish'

Yeah, it could be improved upon, and adding an ad-hoc logfile would be a
good enhancement.


More information about the LUG mailing list