Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2007 12:02:48 GMT
From:      P <pb@ludd.luth.spamsuck.se>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/117241: Stock i386/v6.0 nfs + cp -pRP cause corrupted files on destination volume.
Message-ID:  <200710161202.l9GC2mI6099667@www.freebsd.org>
Resent-Message-ID: <200710161210.l9GCA2RW078444@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         117241
>Category:       kern
>Synopsis:       Stock i386/v6.0 nfs + cp -pRP cause corrupted files on destination volume.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 16 12:10:02 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     P
>Release:        6.0-RELEASE #0
>Organization:
>Environment:
FreeBSD f6.my.domain 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov  3 09:36:13 UTC 2005     root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Mounting an nfs volume from a '6.2-RELEASE #0' machine with default settings. Cause some files (50%?) to miss the last block of the file. At least when copying gigabytes of data. Seems the destination file lenght is = int(source_filesize/512)*512. In the other direction (6.2 -> 6.0) there's no problem asfaik.
I have not investigated this problem 100%. But I think it's serious enough that others should know.
Maybe some test script should be written to test for this condition before releasing new versions?
>How-To-Repeat:
Proberbly setup machine1 with v6.0, and machine2 with v6.2. Then copy many files via default nfs from v6.0 disc to v6.2 nfs volume.
pb@v60 ~ #cp -p img_8030.jpg /nfs62/
pb@v60 ~ #dir img_8030.jpg /nfs62/
-rw-r--r--  1 pb  wheel  3121562 Sep 24  2007 img_8030.jpg

/nfs62/:
-rw-r--r--  1 pb  wheel  3121152 Sep 24  2007 img_8030.jpg

3121562 / 512 = 6096.80078125
3121152 / 512 = 6096

3121562 % 512 = 410
3121152 % 512 = 0

>Fix:
Use tar/pax/cpio etc.. + tcp pipes.
Don't copy via nfs.


>Release-Note:
>Audit-Trail:
>Unformatted:



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