Posts Tagged ‘robocopy’

Migrating to an OpenSolaris Fileserver

June 14th, 2009 No comments

After getting replacements for my failed drives, I tackled migrating data off my old Windows 2003 fileserver onto my fancy OpenSolaris ZFS fileserver.

My windows server decided this was the time it was going to become corrupt too.  I was using nvraid mirror and it became out of sync.  I wasn’t able to recover it.  My skepticism about cheap built in idea/sata raid has been confirmed.

All my data was still available on other drives though.  I tried attaching them to the OpenSolaris box using the read only ntfs support to copy my data to my big ZFS raidz.  The copy speed was agonizingly slow.  I had over 1tb to copy and I think it would have taken over 48 hours to copy it all.  I ended up putting the drives in a usb enclosure, attaching it to my windows laptop and copying it over the gigE nics.  Surprisingly faster.

This also gave me an opportunity to try out RichCopy as an alternative to robocopy.  As a sidebar, I use robocopy almost every day.  RichCopy includes a GUI which I would assume put behind me pouring over robocopy /? | more when I need to use an option I don’t commonly use.  Unfortunately the interface only emphisizes this was a Microsoft internal tool.  Which is to say, it’s not much better than the command line help.  The item I’m most excited that it add is multithreaded copy.  With just a couple threads I have to believe more bandwidth can be utilized.

To do all that copying, I had to setup the OpenSolaris CIFS service.  Tim Thomas’ post is a good first read.  I did run into a snag with having 1 of my domain controllers be a Windows Server 2008 machine.  Justin Thomas’ experience makes me wonder if a bleeding edge solaris version is in my future.  For now I opted to just demote the server as it was just for testing anyway.

To get the files onto the server, I just followed Tim’s instructions and had a wide open share.  Now that the files are there, I wanted to dial in the permissions.  I liked Steve Radish’s instructions.  I’m used to the old unix chmod. I found the new giant string of alphanumeric characters to implement ACL permissions with a bit daunting.  Steve made me realize you can just use the Windows side to implement the permission, and then use ls -V to see what the effective permission is.  It really helped ease me into it.

I forget at what point, but I ran into an issue where my domain credentials wouldn’t let me see the share. I was seeing this in my /var/adm/messages:

Jun 13 11:01:15 solarbox smbd[2132]: [ID 266262 daemon.error] MYDOMAIN\myusername: idmap failed

The following commands resolved it for me:

svccfg -s idmap setprop config/unresolvable_sid_mapping = boolean: true
svcadm refresh idmap
Categories: Uncategorized Tags: ,

Robocopy hates it when you end with a slash!

January 28th, 2009 No comments

Robocopy is a pretty good utility for copyin/mirroring directories in windows.  I use it a lot.  I just spent a bit of time thinking powershell hated robocopy because I was having a lot of trouble calling a robocopy against a directory that had a space in it.  Check out this command line.  Looks pretty innocent to me, but as you can see, robocopy blows its top!

PS H:\temp> robocopy 'h:\temp\test1' 'H:\temp\test space\' /L
ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010
 Started : Wed Jan 28 09:43:27 2009
Source : h:\temp\test1\
Dest : H:\temp\test space" \L\
Files : *.*
Options : *.* /COPY:DAT /R:1000000 /W:30
2009/01/28 09:43:27 ERROR 123 (0x0000007B) Accessing Destination Directory H:\temp\test space" \L\
The filename, directory name, or volume label syntax is incorrect.
PS H:\temp&gt;</span>

Turns out the trailing slash on the path that was making it freak out.  Don’t end with a slash folks.  I’m not even sure why I was because I normally don’t!

Categories: Uncategorized Tags: