ntfs to ufs copy problem for large files
This project has moved to github - see https://github.com/freenas
Brought to you by:
cochard,
mattolander
Some test results:
Copying a 5.7 GiB file from NTFS to UFS, using 'truss' to trace the 'cp' command.
write(4,"nterfaces:"\nmsgstr " interfaces"...,65536) = 65536 (0x10000)
read(3,"/a> settings."\nmsgstr ""\n"Assu"...,65536) = 65536 (0x10000)
write(4,"/a> settings."\nmsgstr ""\n"Assu"...,65536) = 65536 (0x10000)
read(3,0x804c780,65536) = 0 (0x0)
close(3) = 0 (0x0)
close(4) = 0 (0x0)
close(3) ERR#9 'Bad file descriptor'
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGU RG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTAL RM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGU RG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTAL RM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
process exit, rval = 0
The copy process stops at 1.7GiB of 5.7GiB.
OK,
did some more research and tests. I was able to copy a 5.x GiB file successfully in 6 tries :-(
Every time i got the same error result:
read(3,0x804c780,65536) = 0 (0x0)
close(3) = 0 (0x0)
...
close(3) ERR#9 'Bad file descriptor'
So, filehandle 3 is the origin file to be copied which is located on the NTFS filesystem. So i assume something with ntfs-3g goes wrong which will cause damage the filehandle in some way.
This seems to be a bug in the ntfs-3g NTFS driver
See this site
http://forums.pcbsd.org/viewtopic.php?f=1&t=12909&view=next
Looks like an older driver support files larger than 4GB but only read only.