DbAu1550 copy file corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I still have a problem of file corruption after a big copy (around 300M)
and no solution at this time...

Who have a dbau1550 and who could try the following script to check
copies on big files?


####################################
#!/bin/sh

path_file=$1
if test -z $path_file ; then
	path_file=`pwd`
fi

# You can modify the source and the destination filename, the source
file 
# size and the number of iterations.

# Source and destination filename
src_file=${path_file}/src_test_file
dst_file=${path_file}/dst_test_file
# Source file size: 300M
src_file_size=300000
# Number of iterations
let max_it=50

# Create source file
if test ! -f ${src_file} ; then
	echo "* Generating ${src_file}..."
	dd bs=1024 count=${src_file_size} if=/dev/urandom of=${src_file}
	echo ""
fi

# Check if source exists
if test -f ${src_file} ; then
	echo "* Check copy from $src_file to $dst_file:"
	echo ""
else
	echo "$src_file does NOT exist" ; exec false
fi

# Clear destination
if test -f ${dst_file} ; then
	rm ${dst_file}
fi

# Go
let i=0
let nb_err=0
while [ $i -lt $max_it ]
do
	cp ${src_file} ${dst_file}
	cmp ${src_file} ${dst_file}
	if [ $? -eq 0 ]
		then
			echo ${src_file} ${dst_file} IDENTICAL
		else
			let nb_err=nb_err+1
		fi
	rm ${dst_file}
	let i=i+1
done

# Result
echo ""
echo "Done"
echo -e "\t$nb_err error(s) over $max_it iteration(s)"
echo ""
####################################

On my DbAu155 + Sata HDD on PDC20579 + Linux Kernel 2.6.10 + busybox
1.0:
Each destination differs from the source:

####################################
* Generating ./src_test_file...
300000+0 records in
300000+0 records out

* Check copy from ./src_test_file to ./dst_test_file:

./src_test_file ./dst_test_file differ: char 10388254, line 40877
./src_test_file ./dst_test_file differ: char 69932960, line 274140
./src_test_file ./dst_test_file differ: char 36867840, line 144723
...

Done
        50 error(s) over 50 iteration(s)
####################################

Thanks'

David



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux