Friday, February 04, 2011

Windows 7: Removing stale sync partnership

If you want to delete a sync partnership you no longer need (if the server went south and will never be back, for instance), you’re in an interesting situation. Windows 7 graphical tool will not allow you to delete a partnership unless it is in an OK state, which is not the situation here. So here’s how to delete it:
  • In 'Manage Offline Files' delete temp files ( not sure it's not redundant, but it won't hurt)
  • In 'Manage Offline Files', turn offline files off
  • Reboot
  • Login and navigate to C:\Windows\CSC\v2.0.6\namespace
  • Locate the folder named as the server you want to delete. Right-click on it and open Properties->Security
  • Click button 'continue', take over the ownership of the folder, including all its children
  • Now you can delete the folder
  • In 'Manage Offline Files' turn offline files on
  • Reboot

Thursday, February 03, 2011

A Solaris CIFS Mystery

Ever since I switched to Solaris 11 Express and CIFS, I have had a mysterious issue.  The process would occasionally break when I copied files from CIFS share or when I played music from it. The music would stop, the player would get very confused, and file copy would be interrupted.

This
had never happened with Samba. I considered switching back to Samba, but it's kind of obsolete in the Solaris world, and probably not as integrated with ZFS as CIFS.

There was no problem
in accessing any other resource over the network. There was also no problem in transferring the very same files from Solaris to my PC over SSH protocol.

I have turned debug on. And in Solaris syslog I could see millions of records like this:

Feb  3 11:53:52 solnas smbsrv: [ID 421734 kern.notice] NOTICE: [SMEL\sergey]: common share not found
Feb  3 11:53:52 solnas last message repeated 58 times


Once I had compared this to similar complaints on the Internet forums, I figured out that ‘common’ is the share name. It’s true that my server has no such share, but why was my laptop constantly trying to retrieve it?

There used to be such a share on my old server. I suspected laptop remembering it. But then another idea came to my head...

The old server was actually still alive (under a different name), since my wife had not migrated her email yet. I went to its smb.config. Lo and behold! The old server announced itself over WINS as one of the DNS aliases of the new server. So I changed the WINS name of the old samba server, and then I even killed the nmbd process on it.  At first it seemed as if that had made a difference – there were no more ‘share not found messages in the log. They appeared again after a while, however.

At that point I had stopped the old Samba altogether and rebooted the laptop, but the messages and file access errors kept coming.

I went on to disable the Windows networking options one by one: Homegroup, Discovery, Topology, File/Print sharing, QoS. None of that did any good. The file access kept breaking and the same messages came up in the Solaris syslog.

Finally, I removed the server’s network alias from the DNS. There was only one network name left for it. This had an immediate effect. Now both the file access errors and message logs are gone. 

Mystery...