Quantcast

[Mondo-devel] More information on failed tape verify/restore

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Mondo-devel] More information on failed tape verify/restore

David C. Partridge
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mondo-devel

verify.rar (407K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Mondo-devel] More information on failed tape verify/restore

Bruno Cornec-4
David C. Partridge said on Wed, Dec 21, 2016 at 11:29:59AM +0000:
>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

Honestly I'm as lost as you here. I wasn't there when the code was created, and except reading it as you, I have ni clue on why that was done :-(

>Are those 128k block that are mostly nulls the header blocks?

I'd need to dig more in it, but would prefer to concentrate my current efforts before Christmas on solving some bugs:

For Debian:
http://trac.mondorescue.org/ticket/802
http://trac.mondorescue.org/ticket/803
http://trac.mondorescue.org/ticket/797
http://trac.mondorescue.org/ticket/789

For SLES:
http://trac.mondorescue.org/ticket/783
http://trac.mondorescue.org/ticket/794

and the most important for me (and some customers), more generic:
http://trac.mondorescue.org/ticket/805

And also:
http://trac.mondorescue.org/ticket/798 ;-) But you're the man for that one !

Of course, as usual, I won't have time to do them all. But honestly, I'm happy with where 3.3.0 is going now that I've solve the mindi-busybox issues. Hopefully will make a new stable version early next year.

So again, if you have some time, and willingness to improve that part, you're more than welcome David !

Best regards,
Bruno.
--
Open Source Profession, WW Linux Community Lead     http://www.hpintelco.net
HPE EMEA EG FLOSS Technology Strategist http://www.hpe.com/engage/opensource
FLOSS projects:    http://mondorescue.org         http://project-builder.org
Musique ancienne?   http://www.musique-ancienne.org  http://www.medieval.org

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mondo-devel
Loading...