LinuxQuestions.org
Help answer threads with 0 replies.
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 10-14-2013, 10:03 AM   #1
jfeyen
LQ Newbie
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu 14.04 LTS
Posts: 6

Rep: Reputation: 0
Rsync / netcat fails to copy directories with :2f


Hi,

We are testing with RSYNC and NETCAT to copy files from our NAS (Netgear ReadyNAS) to our Fileserver (SuSE SLES 11 SP2).

We are seeing some errors with a couple of directories. These directories contain a "/" in the foldername.
Example : Standfilm\ 4-13-555:2fGO_003_F
Our Mac users used these "/" in the foldername.

Rsync:
rsync -aAv --links -8 -r -h Artikels2013 sles:/path --progress
Code:
sent 30.78G bytes  received 654.06K bytes  57.05M bytes/sec
total size is 30.78G  speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]
Result: Directories which contain the "/" are not copied on the fileserver.

Netcat:
tar c Artikels2013 | pv -b | nc -q 10 -l -p 7878 (SENDER -> Readnas Netgear)
netcat -w 10 nas 7878 | tar x (RECEIVER -> FILESERVER)
Code:
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F: Cannot mkdir: No such device 
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F/13000460v2_Standfilm.ap: Cannot open: No such device 
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F/SR_0555_GO_003_F_Standfilm.ap: Cannot open: No such device 
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F/.AppleDouble: Cannot mkdir: No such device 
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F/.AppleDouble/13000460v2_Standfilm.ap: Cannot open: No such device 
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F/.AppleDouble/SR_0555_GO_003_F_Standfilm.ap: Cannot open: No such device 
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F/.AppleDouble/.Parent: Cannot open: No such device 
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F/.AppleDouble/SR_0555_GO_003_F_Standfilm.pdf: Cannot open: No such device 
tar: Artikels2013/13000486/Standfilm 4-13-555\:2fGO_003_F/SR_0555_GO_003_F_Standfilm.pdf: Cannot open: No such device
Result: Directories which contain the "/" are not copied on the fileserver.

How can we make sure the dirs with "/" and their contents is copied on the receiving side?

Why is possible to succesfully rsync between two ReadyNas devices with "/" in foldernames?

Kr,

Joeri
 
Old 10-15-2013, 02:49 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,879

Rep: Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909
I think it is not related to rsync, but the underlying filesystem. It simply does not accept filenames containing :2f
 
1 members found this post helpful.
Old 10-15-2013, 01:26 PM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,329

Rep: Reputation: 254Reputation: 254Reputation: 254
So: the original directories/files were created under Mac OS in the Finder. There the “/” is allowed, but will be saved under HFS+ as a “:”. The slash is used there already to separate directories like usual (this is the reason why you can’t use a “:” in the Finder in a filename).

That this is really encoded as ”:” can be checked with (save any file in the Finder as ”xx/xx”):
Code:
$ ls xx* | hexdump -C
00000000  78 78 3a 78 78 0a                                 |xx:xx.|
When this file is transferred to a FileServer running OS X, it will stay this way; as it will when you use scp (the full or partial pathname must be used to avoid that the “:” will be interpreted that a hostname is given).

When you use a Samba share under Linux and mount this on a Mac with “smb://fileserver” the result might be surprising when you drag the file thereto. Under Linux you see:
Code:
$ ls xx* | hexdump -C
00000000  78 78 ef 80 a2 78 78 0a                           |xx...xx.|
as the Mac tries to preserves the characters even when the fileserver’s filesystem doesn’t allow it.

In your case, it seems to be converted to “\:2f” where ASCII $2F is also a “/”. This is in the ReadyNAS’s world and hence you can copy it between two of them.

But to be sure: can you please ls somehow the directory in question with the a hexdump outlined above, to see what’s really encoded there - how do you mount where (I assume on the Linux machine).
 
1 members found this post helpful.
Old 10-23-2013, 01:44 PM   #4
jfeyen
LQ Newbie
 
Registered: May 2011
Location: Belgium
Distribution: Ubuntu 14.04 LTS
Posts: 6

Original Poster
Rep: Reputation: 0
Hi Reuti,pan64,

You guys are right it has to do with the underlying operating system.

After the feedback the first test I did was installing a fresh Ubuntu12.04 server with ext3. This is the same filesystem as the readyNAS.
This test succeeded.

Then I knew that it had something to do with the filesystem of the SuSE Sles server. We used Novell NSS filesystem on this server.
I contacted technical support and they let me know that i had to change the namespace on the volume. Now it was on "Long". And I have to change it to "Unix/linux".
Cause there there was more support for extra characters. From then it worked.

I would like to thank you guys for setting me on the right path to the solution!

Cheers.

Joeri
 
Old 10-24-2013, 01:25 AM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,879

Rep: Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909Reputation: 2909
glad to help you.
if you really want to say THANKS just press YES. Also please mark the thread solved if you are satisfied...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync to check two directories...? resetreset Linux - Software 3 01-26-2011 04:53 AM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 10:48 AM
How can I use rsync to remove source directories? tdnnash25 Linux - Server 2 10-10-2009 12:24 PM
How do I copy over directories to directories with the same name without overwriting? SentralOrigin Linux - General 1 03-14-2009 02:09 AM
LXer: Copy hard disk or partition image to another system using a network and netcat LXer Syndicated Linux News 0 08-12-2007 04:11 PM

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

All times are GMT -5. The time now is 01:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration