LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-23-2012, 03:04 PM   #1
dilettante9
Member
 
Registered: Jun 2012
Location: U.S.
Distribution: Debian, Xubuntu
Posts: 46

Rep: Reputation: Disabled
NTFS corruption when backing up


I have a home network with several Windows computers and one Linux computer (Mint Maya Cinnamon distro). When I backup the Linux computer using tar, I get a relatively large tar.gz file (1.4 GB compressed). When I then transfer that file over the network to my main data server, which is a Windows NTFS drive that I have mounted in Linux using cifs, the file becomes irrevocably corrupt. In particular, it is impossible to extract it whether I use Winrar on the Windows box or whether I transfer it back to Linux and use tar again.

This is clearly a problem with transferring from Linux to a mounted NTFS drive, because when I instead copy the tar.gz file directly from the Linux box to a USB drive formatted as FAT, then plug the USB drive into a Windows box, there is no corruption and the file extracts properly.

Does anyone know how I can solve this problem and still copy the file directly from the Linux box to a Windows NTFS drive mounted in Linux? In other words, is there a workaround? (By the way, I'm not a total Linux newbie but am not very experienced with Linux either; I guess I'm more like an advanced beginner with Linux.)
 
Old 06-23-2012, 04:33 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,669

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
What versions of windows are running your computers and also post the output of the command smbd -V. This will tell us what version is running. samba client (cifs) is the protocol that talks with windows networks but does not actually interface with a filesystem. So it could be the samba client that is corrupting the file during the transfer process.

Have you tried copying other files to your windows computer? Are you using nautilus as your file browser? It has a samba client built in and would be interesting to see if the file is corrupted when transferred using this method.
 
Old 06-23-2012, 04:54 PM   #3
dilettante9
Member
 
Registered: Jun 2012
Location: U.S.
Distribution: Debian, Xubuntu
Posts: 46

Original Poster
Rep: Reputation: Disabled
Thanks, michaelk, for your reply. Let me start by saying that, just now, I have gotten a workaround working that is sufficient for my purposes. What I did was to install a USB hard drive on a Windows 7 computer on my network, format the drive as FAT-32, then share it. Over on the Linux side, I then mounted that USB drive as read-write. Now, when I copy the tar.gz file from Linux to to the mounted Windows share (which, again, is formatted FAT-32), it comes out non-corrupt on the Windows side. I can then, on the Windows 7 computer, copy it from the USB drive to the Windows 7 boot drive, which is NTFS, and it is still non-corrupt. The corruption seems to only occur when I mount a Windows NTFS drive in Linux, then copy a large tar.gz file directly from Linux to the mounted NTFS drive.

So I think I'm good.

To answer your questions, michaelk, and to document this problem for the future: (1) the Windows versions running on the computers in questions were Windows Home Server (which is a stripped-down Windows Server 2003), and Windows 7 Professional 64-bit (the corruption occurred when copying to either of these two machines); (2) the output to command smbd -V is "Version 3.6.3"; (3) the only other files I have tried copying to the NTFS Windows shares are very small text files (shell scripts), and they copy fine with no corruption; and (4) yes, I am using Nautilus as my file browser, and all of the copying that I have done to test this problem has been from within Nautilus, rather than at the command prompt.
 
Old 06-23-2012, 06:14 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Are you using ntfs-3g or the in-kernel NTFS driver. I suspect the latter. Mount a NTFS drive and let us see the results of
Code:
cat /proc/mounts
 
Old 06-23-2012, 10:28 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,669

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
It is a network share not a local file system so should not be a ntfs vs ntfs-3g issue.
 
Old 06-23-2012, 10:51 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Good point.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backing up from Windows XP to Samba, SetShortName Error, NTFS problems? Wetzel Linux - Networking 5 01-02-2009 10:40 PM
LXer: How To Enable NTFS Write Support (ntfs-3g) On Ubuntu Feisty Fawn LXer Syndicated Linux News 0 09-11-2007 08:20 PM
LXer: How To Enable NTFS Write Support (ntfs-3g) On Mandriva 2007 Spring LXer Syndicated Linux News 0 09-05-2007 05:30 PM
Backing up Fedora Core 3 files to an NTFS Windows XP drive. Dark_Oppressor Linux - General 8 06-29-2005 09:13 PM
Writing to an NTFS volume using captive-ntfs (repairing boot.ini) macskeeball Linux - General 3 02-06-2005 09:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration