VERY interesting discovery (for re-sharing etc.)

Oct 7, 2010 at 9:38 PM

I discovered that restarting Server service does in fact RESTORE the share!

http://serverfault.com/questions/27684/windows-2008-and-truecrypt-how-to-automatically-mount-shared-folders-after-rest

The problem with restarting this service using a scheduled (after boot) script, is that this is one of the most important services of Windows.

In my SBS7, trying to stop Server service, means you have to also stop (and then take care to re-start),

Netlogon (brrrr)

Microsoft Exchange System Attendant (oh)

Microsoft Exchange Information Store (yikes)

DFS Namespace (!)

...not cool. BUT IT WORKS! After I restart those services, automagically my merge volume is again shared!

 But worse of all? After reboot, Liquesce died on me. Service starts and then stops and I get various events (this is for the Issue Tracker, I will not give details here)...

(after second reboot it worked but really took its time)

...

The thing is that there is another OPEN SOURCE project that has dealt AND solved the exact same problem. It is the same project that initially needed the server service restart: TrueCrypt.

In TrueCrypt, a (virtual) volume can be marked as "favourite" and this indeed allows for it to get the same letter, be reshared etc.

http://www.truecrypt.org/docs/?s=favorites

In fact even better, there are even "System Favorite Volumes" that get mounted early enough to be able to be used by the system itself! EXACTLY WHAT I WOULD LOVE TO HAVE.

http://www.truecrypt.org/docs/?s=system-favorites

In fact since TrueCrypt involves, erm... encryption, in our case things should be simpler!

 

So can this be communicated to Dokan team, or maybe you could check out TrueCrypt's part of the code that deals with this?

Oct 7, 2010 at 9:51 PM

Since in LanManServer/Shares all the shares are clearly defined, seems the key to the whole thing is that Liquesce starts way too late for Server service.

 

Coordinator
Oct 8, 2010 at 5:16 PM
NLS wrote:

Since in LanManServer/Shares all the shares are clearly defined, seems the key to the whole thing is that Liquesce starts way too late for Server service.

 

LanMan Service (Server service) is written in C / C++ and starts a long time before .Net services can start (We have this as a major problem for work services in critical Realtime systems !)

My first attempt at getting the services restored was to force the restart of Server service in XP - Great it worked,

Then I did it on Win 7 in my "God Mode" development environment - Great it worked

Then I tested it on Win x64 , and found a load of service now depend on LanMan Service and cannot be stopped  and / or started by a "Normal" local service account

That's when the hunt started for an alternative(s)..

Coordinator
Oct 8, 2010 at 5:19 PM
NLS wrote:
After reboot, Liquesce died on me. Service starts and then stops and I get various events (this is for the Issue Tracker, I will not give details here)...

(after second reboot it worked but really took its time)

Seems like the Delay start thing may have a different meaning in SBS7 then.. What does the Application event log report for the amount of time given before the DelayStart services are allowed to actually start ?

Also have you reduced the delay time that is implemented for when the service is finally allowed to start before it attempts to start Dokan (This was to allow USB drives to be reconnected etc)

Oct 8, 2010 at 9:01 PM

I will look into it.

After the first reboot I had some fails in my event log coming from Liquesce (and in fact the service wouldn't stay up) - but only then.

What will reducing the delay time do for me? As you said, even with no delay it is still too late for Server service.

I think the keys are three:

1- Implement a non-.Net startup that loads early enough. I think tricking the system on the existence of the volume will be enough until the .Net proper code actually makes it work.

2- Find a nice way to actually reset Server service (maybe without actually restarting it). There must be a library call.

3- Just see what TrueCrypt does and f65643357643ing copy it. :) In fact since TrueCrypt probably is not .Net, it will just help key #1.

 

Coordinator
Oct 9, 2010 at 8:01 AM

So this investigation thread that you have started here,

Is that because your shares do not get re done after a reboot ?

Or

That you have not done the bit at the bottom of this page

http://liquesce.codeplex.com/wikipage?title=Advanced%20Settings&referringTitle=FAQs

Oct 9, 2010 at 10:26 AM
Edited Oct 9, 2010 at 10:26 AM

erm... let me get back to you on this :P

(completely forgot about that tool)

 

Oct 9, 2010 at 11:57 AM

Well not only that thing at the bottom didn't do anything for me (still no shares show after reboot), but I also discovered quite a few issues about it. :)

I have opened an issue in the tracker.