[Samba] file differences when copying files to linux, using samba - Samba

This is a discussion on [Samba] file differences when copying files to linux, using samba - Samba ; I have a backup file server running linux 2.6.23.12 and samba 3.0.25b I have four sata hard drives configured as a software raid 5 array. I have a client machine running windows xp pro sp2, with all the patches. I ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: [Samba] file differences when copying files to linux, using samba

  1. [Samba] file differences when copying files to linux, using samba

    I have a backup file server running linux 2.6.23.12 and samba 3.0.25b
    I have four sata hard drives configured as a software raid 5 array.
    I have a client machine running windows xp pro sp2, with all the patches.
    I have configured samba, and copied all my files to my backup file server,
    using the windows explorer, and 'copy' and 'paste'.

    I also wrote a python program that computes the md5sum for all files
    in a directory,
    and writes out a file per directory with that info.

    After I copied a directory tree containing 255gb of files, I ran
    'diff --recursive'
    on the windows tree and the samba tree (from windows).
    There were roughly 100 differences reported.

    I ran my python program locally on the linux system, and it reported
    that roughly
    100 md5sums for files differed.

    I have looked at the samba logs, and noticed nothing interesting.
    I looked at the status of the raid array, and it is ok.
    I ran smartmontools, and all the hard drives have no problems.

    Any ideas how to track down this problem?

    thanks,
    jeff


    My network is gigabit ethernet, with intel on-motherboard ethernet nics on both
    machines.

    I don't know what to do to track down this problem.
    Any pointers would be appreciated.

    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  2. Re: [Samba] file differences when copying files to linux, using samba

    jeffunit wrote:
    >
    > I ran my python program locally on the linux system, and it reported
    > that roughly
    > 100 md5sums for files differed.


    > Any ideas how to track down this problem

    ---
    Could it be a code-page conversion issue?

    Have you tried copying the file over with "cp" from
    windows to your server? (cp from 'cygwin')?

    Have you tried comparing some of the differing files and
    looking for a pattern?

    Does the "change" get "undone" if you use explorer to
    copy the file back from the linbox to the winbox?

    I use a similar setup to backup my files -- though I use
    'rsync' from windows to keep the server copy synchronized (which
    gets backed up nightly w/xfsdump.

    I can't say why, exactly, but I wouldn't trust windows
    "explorer" to copy over such a large number of files.


    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  3. Re: [Samba] file differences when copying files to linux, using samba

    At 01:03 AM 1/27/2008, Linda W wrote:
    >jeffunit wrote:
    >>I ran my python program locally on the linux system, and it
    >>reported that roughly
    >>100 md5sums for files differed.

    >
    >>Any ideas how to track down this problem

    >---
    > Could it be a code-page conversion issue?


    I am not sure, but I think that involves translating language encoding
    from one form to another. I hope that neither samba nor windows explorer
    does that silently.

    > Have you tried copying the file over with "cp" from
    >windows to your server? (cp from 'cygwin')?


    No, but I will try that today.

    > Have you tried comparing some of the differing files and
    >looking for a pattern?


    Yes. I wrote a modified version of cmp that tries to list all byte differences.
    I was looking at an iso image of some linux distribution.
    There were three bytes that differed, and if I recall correctly,
    they were all one bit differences.

    > Does the "change" get "undone" if you use explorer to
    >copy the file back from the linbox to the winbox?


    I haven't tried that, but even if it does, I consider it a bug if
    a file isn't stored remotely, byte-for-byte the same.

    > I use a similar setup to backup my files -- though I use
    >'rsync' from windows to keep the server copy synchronized (which
    >gets backed up nightly w/xfsdump.


    I have tried rsync several times. I don't trust it, because even when I give it
    the --delete option, it has never reliably deleted extraneous files
    at the dest dir.

    > I can't say why, exactly, but I wouldn't trust windows
    >"explorer" to copy over such a large number of files.


    That is certainly something to consider. My problem isn't that files
    don't get copied
    though; my problem is a few bits get flipped in the gigabytes I transfer. That
    is scarier to me, as a missing file is much more obvious than a few
    bits flipped.

    Both of my machines are as reliable as I can make them, for example both have
    ecc memory. If there are setting for samba to do more checksums during transfer
    or to use tcp only, I will happily try them out.

    Right now I am installing a second os disk, so I can switch os/samba
    configurations
    quickly, as well as remove the old os disk as a possible problem.

    thanks,
    jeff

    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  4. Re: [Samba] file differences when copying files to linux, using samba

    jeffunit wrote:
    > At 01:03 AM 1/27/2008, Linda W wrote:
    >> jeffunit wrote:
    >>> I ran my python program locally on the linux system, and it reported
    >>> that roughly
    >>> 100 md5sums for files differed.

    >>
    >>> Any ideas how to track down this problem

    >> ---
    >> Could it be a code-page conversion issue?

    >
    > I am not sure, but I think that involves translating language encoding
    > from one form to another. I hope that neither samba nor windows explorer
    > does that silently.
    >
    >> Have you tried copying the file over with "cp" from
    >> windows to your server? (cp from 'cygwin')?

    >
    > No, but I will try that today.
    >
    >> Have you tried comparing some of the differing files and
    >> looking for a pattern?

    >
    > Yes. I wrote a modified version of cmp that tries to list all byte
    > differences.
    > I was looking at an iso image of some linux distribution.
    > There were three bytes that differed, and if I recall correctly,
    > they were all one bit differences.
    >

    Hi,
    I would think one bit differences should be picked up by the TCP
    transport layer.

    You probably have Rx checksum offload on the receiving box. You could
    try turning that off and recopying to see if the error persists. Could
    be a bad card.

    Seems unlikely the Tx sender could send an incorrect checksum unless the
    buffer memory flipped a bit before checksum computation which seems
    ruled out by the ECC. Still, I'm a believer in memtest.

    Regards, Doug

    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  5. Re: [Samba] file differences when copying files to linux, using samba


    > >> Have you tried copying the file over with "cp" from
    > >> windows to your server? (cp from 'cygwin')?

    > >
    > > No, but I will try that today.
    > >
    > >> Have you tried comparing some of the differing files and
    > >> looking for a pattern?

    > >
    > > Yes. I wrote a modified version of cmp that tries to list all byte
    > > differences.
    > > I was looking at an iso image of some linux distribution.
    > > There were three bytes that differed, and if I recall correctly,
    > > they were all one bit differences.
    > >

    >Hi,
    >I would think one bit differences should be picked up by the TCP
    >transport layer.
    >
    >You probably have Rx checksum offload on the receiving box. You could
    >try turning that off and recopying to see if the error persists. Could
    >be a bad card.


    How do I turn rx checksums off under linux? This is an intel pro1000 ct.
    I am happy to try it.
    The gigabit ethernet is on-board, but I have several spare gigabit
    nics available.

    >Seems unlikely the Tx sender could send an incorrect checksum unless the
    >buffer memory flipped a bit before checksum computation which seems
    >ruled out by the ECC. Still, I'm a believer in memtest.


    I ran memtest-86+ through about 5 iterations, and there were no problems.

    thanks,
    jeff

    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  6. Re: [Samba] file differences when copying files to linux, using samba

    jeffunit wrote:
    >
    >> >> Have you tried copying the file over with "cp" from
    >> >> windows to your server? (cp from 'cygwin')?
    >> >
    >> > No, but I will try that today.
    >> >
    >> >> Have you tried comparing some of the differing files and
    >> >> looking for a pattern?
    >> >
    >> > Yes. I wrote a modified version of cmp that tries to list all byte
    >> > differences.
    >> > I was looking at an iso image of some linux distribution.
    >> > There were three bytes that differed, and if I recall correctly,
    >> > they were all one bit differences.
    >> >

    >> Hi,
    >> I would think one bit differences should be picked up by the TCP
    >> transport layer.
    >>
    >> You probably have Rx checksum offload on the receiving box. You could
    >> try turning that off and recopying to see if the error persists. Could
    >> be a bad card.

    >
    > How do I turn rx checksums off under linux? This is an intel pro1000 ct.
    > I am happy to try it.
    > The gigabit ethernet is on-board, but I have several spare gigabit nics
    > available.


    If eth0 is the name:
    ethtool -K eth0 rx off

    I got good service out of these settings in modprobe.conf (one line)
    options e1000 RxDescriptors=1024 TxDescriptors=1024
    InterruptThrottleRate=1

    I have lots of memory, so I upped the buffers, probably overkill.
    Default is 256
    InterruptThrottleRate defaults to 3 (dynamic conservative) and I changed
    it to 1 (dynamic).

    see /usr/src//Documentaion/networking/e1000.txt

    Along with larger buffers in smb.conf, I regularly hit my hard disk
    limits on gigabyte. And bit error free. I never did it your way, but I
    have run tripwire with checksums and after disaster recovery, haven't
    had any issues or noticed any discrepancies with entire drives going
    across the wires.

    >
    >> Seems unlikely the Tx sender could send an incorrect checksum unless the
    >> buffer memory flipped a bit before checksum computation which seems
    >> ruled out by the ECC. Still, I'm a believer in memtest.

    >
    > I ran memtest-86+ through about 5 iterations, and there were no problems.
    >
    > thanks,
    > jeff


    Good luck (whatever it is), Doug
    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

  7. Re: [Samba] file differences when copying files to linux, using samba

    At 10:50 AM 1/27/2008, you wrote:
    >jeffunit wrote:
    > >
    > >> >> Have you tried copying the file over with "cp" from
    > >> >> windows to your server? (cp from 'cygwin')?
    > >> >
    > >> > No, but I will try that today.
    > >> >
    > >> >> Have you tried comparing some of the differing files and
    > >> >> looking for a pattern?
    > >> >
    > >> > Yes. I wrote a modified version of cmp that tries to list all byte
    > >> > differences.
    > >> > I was looking at an iso image of some linux distribution.
    > >> > There were three bytes that differed, and if I recall correctly,
    > >> > they were all one bit differences.
    > >> >
    > >> Hi,
    > >> I would think one bit differences should be picked up by the TCP
    > >> transport layer.
    > >>
    > >> You probably have Rx checksum offload on the receiving box. You could
    > >> try turning that off and recopying to see if the error persists. Could
    > >> be a bad card.

    > >
    > > How do I turn rx checksums off under linux? This is an intel pro1000 ct.
    > > I am happy to try it.
    > > The gigabit ethernet is on-board, but I have several spare gigabit nics
    > > available.

    >
    >If eth0 is the name:
    > ethtool -K eth0 rx off


    I made a fresh os install on a new physical disk.
    The os is mandriva 2008.0 free.
    I set up my raid-5 disk, and configured samba.
    I turned off the rx checksum offload from the ethernet, using the
    above command.

    Still getting file corruptions.

    I ran my md5sum program a few times on the linux box, and I kept on getting
    file differences. This clearly has nothing to do with samba. I now suspect the
    sata controller driver (which is under active kernel development). I
    will get the
    latest kernel, and continue testing.

    thanks,
    jeff

    --
    To unsubscribe from this list go to the following URL and read the
    instructions: https://lists.samba.org/mailman/listinfo/samba

+ Reply to Thread