LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-22-2006, 09:41 AM   #1
jstars
Member
 
Registered: Jun 2005
Location: Edmonton, Canada
Distribution: SuSE 10
Posts: 51

Rep: Reputation: 15
Unhappy Rsync errors to USB drive


I run a home linux server. I have an external USB HD (FAT32) attached to it that I am trying to backup some directories to. This USB HD is mounted at start-up in /etc/fstab using the following entry:

Code:
/dev/sdb1 /mnt/usb vfat defaults 1 2
I use the following rsync command:
Code:
rsync -av --delete /var/flexshare/shares/ /mnt/usb/backup/
However I get a lot of errors. Some of them are like this:
Code:
rsync: chown "/mnt/usb/backup/documents/My Pictures/2002/Normandy/Copy of Normandy/.addsc01031.jpg.uJoNs7" failed: Operation not permitted (1)
A lot of the chown errors have strange filenames beginning with a "."

Finally, the rsync fails to complete, issuing these errors:
Code:
rsync: connection unexpectedly closed (449722 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
rsync: connection unexpectedly closed (246188 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
Please note that I have ensured that the USB disk has enough free space. What is the reason for the chown errors and the failure to complete the rsync?
 
Old 12-22-2006, 09:56 AM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
The chown error is due to the FAT32 not supporting Linux file permissions. I suspect the final error is also due to rsync trying to do something that FAT32 doesn't support.

You can either try without the -a switch, this of course means you lose all ownership and file permissions, or, if you only use this drive on Linux systems format the drive to ext3 or some other Linux file system of your choosing
 
Old 12-22-2006, 10:36 AM   #3
jstars
Member
 
Registered: Jun 2005
Location: Edmonton, Canada
Distribution: SuSE 10
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks, I'll try formating as ext3. I wanted to use FAT32 as I wanted the ability to simply plug the USB drive into a windows system to recover the files if my linux server completely failed. However, I note there are some free utilities that allow one to read ext3 from Windows.

Last edited by jstars; 12-22-2006 at 10:42 AM.
 
Old 12-22-2006, 11:43 AM   #4
jstars
Member
 
Registered: Jun 2005
Location: Edmonton, Canada
Distribution: SuSE 10
Posts: 51

Original Poster
Rep: Reputation: 15
I just tried again with the USB drive formatted as ext3. I am still getting errors.

Code:
rsync: writefd_unbuffered failed to write 4 bytes: phase "unknown" [sender]: Broken pipe (32)
rsync: write failed on "/mnt/usb/backup/documents/My Music/NOW That's What I Call Music! 21/Nickelback - 14 - Photograph.mp3": Read-only file system (30)
rsync error: error in file IO (code 11) at receiver.c(305)
documents/My Pictures/2002/
rsync: connection unexpectedly closed (449722 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
rsync: connection unexpectedly closed (12148 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
Could the drive be the problem?
 
Old 12-22-2006, 12:17 PM   #5
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
The chown errors are definately because FAT32 doesn't support unix file permissions.

The other errors could indeed because of a bad drive. if you have enough space on your main drive try rsync'ing /home to /home2 see if that throws any errors up
 
Old 12-22-2006, 12:17 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Seems as if your mounting it as "Read-only file system (30)" which is stated in the error. Remount the device as read-write before trying to write data to it.
 
Old 12-23-2006, 01:08 AM   #7
jstars
Member
 
Registered: Jun 2005
Location: Edmonton, Canada
Distribution: SuSE 10
Posts: 51

Original Poster
Rep: Reputation: 15
I attempted to rsync -a to another directory on the same drive (to /tmp/test) and it worked flawlessly.

Regarding my USB drive, I ran:
Code:
fsck -pcVt ext3 /dev/sdb1
fsck 1.35 (28-Feb-2004)
[/sbin/fsck.ext3 (1) -- /mnt/usb] fsck.ext3 -pc /dev/sdb1
/dev/sdb1: Inode 5685259 has illegal block(s).

/dev/sdb1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
[root@gateway tmp]# fsck -cVt ext3 /dev/sdb1
fsck 1.35 (28-Feb-2004)
[/sbin/fsck.ext3 (1) -- /mnt/usb] fsck.ext3 -c /dev/sdb1
e2fsck 1.35 (28-Feb-2004)
Checking for bad blocks (read-only test): done
Pass 1: Checking inodes, blocks, and sizes
Inode 5685259 has illegal block(s).  Clear<y>? yes

Illegal block #5132 (3091629248) in inode 5685259.  CLEARED.
Illegal block #5133 (1244712014) in inode 5685259.  CLEARED.
Illegal block #5134 (2778857784) in inode 5685259.  CLEARED.
Illegal block #5135 (4081630798) in inode 5685259.  CLEARED.
Illegal block #5136 (3004343806) in inode 5685259.  CLEARED.
Illegal block #5137 (3698748904) in inode 5685259.  CLEARED.
Illegal block #5138 (520452500) in inode 5685259.  CLEARED.
Illegal block #5139 (157995145) in inode 5685259.  CLEARED.
Illegal block #5140 (2809637349) in inode 5685259.  CLEARED.
Illegal block #5141 (1370337581) in inode 5685259.  CLEARED.
Illegal block #5142 (2922626401) in inode 5685259.  CLEARED.
Too many illegal blocks in inode 5685259.
Clear inode<y>? yes
There were other inodes that had illegal blocks. What does this mean? Drive kaput?
 
Old 12-23-2006, 03:42 AM   #8
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Possibly. However now that you have run fsck, and it seems to have fixed it then I would try rsync'ing again. I would also try taking the drive out of the enclosure and plugging it directly on the motherboard to find out which has/is failing - the controller or the actual hard drive.

Considering you have only just formatted the drive, it doesn't look very promising.
 
Old 12-23-2006, 11:35 PM   #9
jstars
Member
 
Registered: Jun 2005
Location: Edmonton, Canada
Distribution: SuSE 10
Posts: 51

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by phil.d.g
Possibly. However now that you have run fsck, and it seems to have fixed it then I would try rsync'ing again. I would also try taking the drive out of the enclosure and plugging it directly on the motherboard to find out which has/is failing - the controller or the actual hard drive.

Considering you have only just formatted the drive, it doesn't look very promising.
I agree, nor does it give me much confidence in the drive which is to be used for backup. The drive is from a four year old HP desktop and is manufactured by a company that isn't well known for hard drives. The fsck ran and I had to fix a number of problems, but after that the rsync ran fine. Good call on isolating the controller or drive problem. I wouldn't have thought of that.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive errors flycast Linux - Hardware 10 12-03-2006 10:41 AM
rsync usb drive win95 fat32 PDock Linux - Software 1 06-12-2006 05:24 AM
rsync fails with USB hard drive Mad Scientist Linux - Software 3 03-27-2006 12:02 PM
Plug-in usb hard drive gives errors in /var/log/messeges and dmesg jasone Linux - Hardware 12 11-18-2005 12:19 AM
USB simpletech hard drive errors MDK hoyLANd Linux - Hardware 4 08-21-2005 07:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:25 PM.

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