More information on failed tape verify/restore
"David C. Partridge" <[email protected]>
| Newsgroups | gmane.linux.mondo.devel |
|---|---|
| Message-ID | <[email protected]> |
I modified readh_header_block_from_stream in libmondo-stream.c to
1) dump out the contents of each buffer read from the tape.
2) to set retval to 1 if it thinks it sees a bad header as this might stop
it heading off into "la-la" land .
Thus:
read_header_block_from_stream(long long *plen, char *filename,
int
*pcontrol_char)
{
/*@ buffers ***************************************************** */
char *tempblock;
/*@ int ********************************************************* */
int i, retval = 0;
/*@ end vars *************************************************** */
tempblock = (char *) malloc((size_t) TAPE_BLOCK_SIZE);
for (i = 0; i < (int) TAPE_BLOCK_SIZE; i++) {
tempblock[i] = 0;
}
while (!(*pcontrol_char = tempblock[7000])) {
g_tape_posK += fread(tempblock, 1, (size_t) TAPE_BLOCK_SIZE,
g_tape_stream) / 1024;
print_hex_dump_bytes(" ", DUMP_PREFIX_OFFSET, tempblock,
TAPE_BLOCK_SIZE);
}
memcpy((char *) plen, tempblock + 7001, sizeof(long long));
if (strcmp(tempblock + 6000 + *pcontrol_char, STR_HEADER)) {
log_it("Bad header block at %ld K", (long) g_tape_posK);
retval = 1;
}
I attach the log of stdout obtained by doing:
./mondoarchive -b65536 -Vt -d/dev/st0 | tee ./verify.log
showing the content of each 128k buffer.
PS I don't quite "get" what that code is doing with the 7000 byte/6000 byte
offsets etc.. Please could you clarify for the slow on the uptake - I would
have expected to be looking at the start of each buffer for headers
Are those 128k block that are mostly nulls the header blocks?
Thanks
Dave
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
_______________________________________________
Mondo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mondo-devel
verify.rar
(application/octet-stream, 297.4 KB) - not displayed