Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

2707

March 24th, 2011 08:00

"Selective" copying with Sharedup

I have 10 or so shares on a single VDM.  I'd like to move each share to its own CIFS server on several VDMs.  LGDUP has worked great, so I've tried running SHAREDUP to copy certain shares to certain VDMs.  I created an output file with the /FO flag, then removed some of the shares I don't want to copy.  When I try and run SHAREDUP with /FI and read in my modified file, all I get is "No share found on source server."

Any ideas?  Thanks in advance!

Karl

275 Posts

March 24th, 2011 12:00

There is only one line in your FI file, wondering if that could explain the problem (ie Sharedup not completely parsing the file)

Check that there is not extra blank line in the FO file (a NL or CR) missing from the FI file, or remove all line from FO but the one you want plus the last one (if the share corresponding to that last lime does not exist on destination you'll get an error message)

Next step would be to run a nw trace from the server doing the Sharedup and see what is going on

Claude

275 Posts

March 24th, 2011 08:00

Strange, that should work

Can you send a copy of the file before/after edit as well as sharedup output?

Don't forget to put C: as srcdrive in the command line

Claude

March 24th, 2011 09:00

Sure - the output.txt file is the original output from SHAREDUP /FO.  This is the original I worked with.

cat output.txt:

#
#SHAREDUP FILE
@Revision:1
@Source:CAEN-OAK
@Target:NS80-TEST
#
# Please leave the above lines intact, SHAREDUP checks them.
#
# File format:
# A comment line must begin with the character '#'.
#
# A share info is stored in one line and must begin with the character ':'.
# The ';' character is used as a field separator for the formated line below:
# : ; ; ;[target_comment]
#    Note: the target_pathname field includes the drive letter.
#          Please leave intact the source_share_name field.
#
# Maximun lengths of fields:
#    - : 80
#    - : 80
#    -    : 1026
#    -     : 255
#
# This file is in UNICODE format.
#
#
@Drive:C
:CAEN;CAEN;C:\test_fs03\caen_oak_fs01\dept\CAEN;Computer Aided Engineering Network
:CEE;CEE;C:\test_fs03\caen_oak_fs01\dept\CEE;Civil and Environmental Engineering
:NERS;NERS;C:\test_fs03\caen_oak_fs01\dept\NERS;
:Office;Office;C:\test_fs03\caen_oak_fs01\dept\CAEN\Services & Support;CAEN Office Files
:CAEN_ITech;CAEN_ITech;C:\test_fs03\sa_caen_oak_fs04\inst_tech;CAEN Instructional Technology
:AERO;AERO;C:\test_fs03\caen_oak_fs01\dept\AERO;Aerospace Engineering
:CAENBIZ;CAENBIZ;C:\test_fs03\caen_oak_caenbiz\data\CAENBIZ;
:CAEN_MacDev;CAEN_MacDev;C:\test_fs03\sa_caen_oak_fs03\dev;CAEN Macintosh Development
:CAEN_Images;CAEN_Images;C:\test_fs03\sa_caen_oak_fs03\images;CAEN Image Repository
:CAEN_MR_Images;CAEN_MR_Images;C:\test_fs03\sa_caen_oak_fs03\mr_images;CAEN Machine Room Image Repository
:CAEN_Networking;CAEN_Networking;C:\test_fs03\fc_caen_oak_fs05\DATA;CAEN Networking
:NV;NV;C:\test_fs03\caen_oak_caenbiz\data\NV;

I stripped out everything except the ONE share I want to copy in this pass, and I'm left with:

cat input.txt:


#
#SHAREDUP FILE
@Revision:1
@Source:CAEN-OAK
@Target:NS80-TEST
#
# Please leave the above lines intact, SHAREDUP checks them.
#
# File format:
# A comment line must begin with the character '#'.
#
# A share info is stored in one line and must begin with the character ':'.
# The ';' character is used as a field separator for the formated line below:
# : ; ; ;[target_comment]
#    Note: the target_pathname field includes the drive letter.
#          Please leave intact the source_share_name field.
#
# Maximun lengths of fields:
#    - : 80
#    - : 80
#    -    : 1026
#    -     : 255
#
# This file is in UNICODE format.
#
#
@Drive:C
:CAEN_ITech;CAEN_ITech;C:\test_fs03\sa_caen_oak_fs04\inst_tech;CAEN Instructional Technology

So, I run the following command:

C:\Program Files\EMC\CifsTools\sharedup\nt>sharedup.exe \\server-source \\ns80-test C: /fi:c:\input.txt

SHAREDUP 02.02

        Copyright (C) 2008, All Rights Reserved,
        by EMC Corporation, Hopkinton MA.

Source server:SERVER-SOURCE        5.0 EMC-SNAS:T6.0.40.8
Target server:NS80-TEST       5.0 EMC-SNAS:T6.0.40.8


*****************************************************************************

SHAREDUP source:SERVER-SOURCE             target:NS80-TEST

Summary results:
Elapsed time: hours: 00, mins: 00, secs: 00

  No share found on drive C: of server SERVER-SOURCE.


*****************************************************************************


Very odd.  Thanks!

March 24th, 2011 11:00

Sorry - I was trying to be clever and remove mention of our actual file servers in public forums.  Suffice it to say, the output matches the actual server names.

275 Posts

March 24th, 2011 11:00

Strange indeed

Could it be that the /FI file says that the source is CAEN-OAK but you run the Sharedup command with \\SERVER-SOURCE (are these DNS or NETBIOS aliases?)

Claude

275 Posts

March 24th, 2011 12:00

The documentation says you must use Wordpad to edit the file (because of international chars) but I have seen other programs which are very sensitive to that extra NL

Some need it but some do not like it (eg I think there is a Primus not to add an extra NL to the /nas/server/slot_X/param file)

Claude

9 Legend

 • 

20.4K Posts

March 24th, 2011 12:00

Did you use VIM on a windows box ? Use notepad++ and enable all characters ☺

March 24th, 2011 12:00

No, worse - I was using vi inside of cygWin.  The installed vi defaults to ASCII, even when Unicode is set and enabled.  I think I've got the right setting in the startup file to force vi to Unicode, but I'm not 100% confident it won't be wiped out in an upgrade.

I think I've seen you recommend Notepad++ before - I'll have to try that out and see how it goes.

Thanks!

March 24th, 2011 12:00

There's only one line in the input file because I only want to parse - and copy - one share.  I don't want SHAREDUP to try and make all of the shares in this pass - I need to put each share on a different VDM and CIFS server.  Processing the entries one by one lets me confirm that each share was duplicated succesfully and the customers are satisfied.  Also, I can do different shares and CIFS servers on different days and times.

After digging around in this a bit more, sure enough - the line feed is the source of the problem.  As it says in the readme, the file created is Unicode - if I cat the output, the last NL is not visible.  If I edit the file with vi, and remove everything but the last NL, the file works successfully.  I had no idea a Windows utility would be so sensitive to CR-LF, but I now I know more.  Thanks again for your help!

Karl

March 24th, 2011 12:00

I'll second that - vi defaulted to ASCII when I opened the file, even though it was Unicode.  I needed to explicitly set vi to Unicode to avoid the linefeed error.  Hopefully, the next UNIX admin who tries to edit these files will find this thread and launch vi with the right settings.  I'm off to the races now - thanks again!

Karl

No Events found!

Top