Server (lanmanserver) service fails to start on Server 2008 after iSCSI config

Just had an issue with three newly-configured Hyper-V Servers (Server 2008 R2 Enterprise) where the Server, or lanmanserver, service was failing to start. Incidentally, all of these (blade) servers are hooked up to a HP LeftHand P4xxx SAN, but are booting from local disk.

Included in the LeftHand setup instructions is a recommendation to make the lanmanserver service dependent on the MSiSCSI service. This is to ensure that any iSCSI volumes are initialised before the Server service starts. To quote the HP documentation:

LeftHand recommends setting sc.exe to create dependencies rather than editing the registry. sc.exe is included with Server 2008 and can be run from an alternate network computer.
From a DOS prompt, type sc config <your_service_name> depend= MSiSCSI.

For example: sc config lanmanserver depend= MSiSCSI.

We had dutifully followed these instructions, but then later noticed that admin shares were inaccessible and that we couldn’t add the three hosts to VMM 2008 R2. During the troubleshooting process, I noticed that the Server service was failing to start with the error “Windows could not start the Server service on Local Computer. Error 2: The system cannot find the file specified.

Cue a wild goose chase for a while due to the uselessness of the error message and absence of any useful information in the error logs. I Then stumbled upon this post on the the TechNet forums in which user “soundstripe” describes the exact same problem (albeit with a different iSCSI SAN). User “m_a_tt” on these forums describes the problem also. I didn’t read that his solution was the same as mine until I had figured it out myself. I also noticed a post on the HP forums where someone was having the same issue, but hadn’t received an answer (in 4 months).

The HP documentation is in effect directing users to remove the original service dependencies for the lanmanserver service, instead of appending the MSiSCSI dependency to the existing list. I’m not sure if that’s because of a difference in the behaviour of the “sc” command in Server 2008 as compared to Server 2003, but I don’t know why I didn’t think of it earlier!

I logged onto another Server 2008 box that had no iSCSI configuration and noticed that the Server service had two dependencies; SamSS, and Srv. My three Hyper-V boxes only had a single dependency for MSiSCSI.

While the HP documentation advises to run the following:

sc config lanmanserver depend= MSiSCSI

The correct command on a stock Windows Server 2008 box should be (Dependencies separated by / (forward slash)):

sc config lanmanserver depend= SamSS/Srv/MSiSCSI

Do the above, and then reboot. This will solve the problem, the Server service will start, and it will still be dependent on the MSiSCSI service.

I hope this saves someone some time!

Edit: I just thought I’d add this footnote after completing HP’s LeftHand SAN training last week; Don’t forget that you may want to set other services as dependencies if their data resides on the iSCSI volumes. For example, I’ll set the Hyper-V service to be dependent on MSiSCSI if the server is a Hyper-V host.

24 thoughts on “Server (lanmanserver) service fails to start on Server 2008 after iSCSI config

  1. Yes. This saved me time !!! After a windows update rebooted the system this am we found all our fileshares were inaccessible. Various sorts of searches and things to try were unfruitful until I tried the above. I suspect the server(lanmanserver) service had become corrupt due to updates or some other change. It just needed the dependencies reconfigured !!! Yay !

    Like

  2. I cannot tell you how thankful I am that you have posted this fix!!

    I, too, have a Lefthand SAN and over the past several months have been leery to try to setup another Win 2008 server since I have run into this same Server service issue a couple of times with no luck finding a solution. Until now, that is!

    A million times, Thank You!

    God Bless!

    Like

  3. Man, this just saved my bacon. I got 0 help from Dell and social.technet either, I’m so glad I found this post. I’ve got 4 Hyper-V servers and after installing a Dell PS4000 array and their HIT (Host Integration Tools) the server service died on 3 of the 4 machines with that exact error.

    I have been digging into this for days, and this simple fix took care of it. Thanks so much!

    Like

  4. Pingback: Shares on iSCSI volumes disappear after reboot. « I Think In Code

  5. Thanks for the post.. this saved me as well.. all seems to be working after applying this fix. Thank you! Thank you! Thank You!

    Like

  6. Dude, you are awsome! I only have 1 windows server here and probably would have done a complete reinstall to try and fix the issue. Thanks a ton!
    Dan

    Like

  7. As an add-on, I had extended difficulties that I managed to solve. In my case, I have a Truecrypt-encrypted partition on the iSCSI volume, So I had to fiddle some more with the dependencies 🙂
    I
    -added MSiSCSI as a dependency to TrueCryptSystemFavorites
    -added TrueCryptSystemFavorites as a dependency to LanManServer

    Thus, MSiSCSI first mounts the volume, then Truecrypt mounts the partition, and then LanManServer can set up the shares.
    Phew, finally it works 🙂

    Like

  8. Thanks here too! Part of me wants to know what changed to make it this way, but the part of me that wants to get some sleep says, YAY!!!

    Like

  9. All I can say is, you saved my butt. Thanks a bunch, nothing like finding a post with a solution that actually works, on the eve of the most excellent eve of the year.

    What caused it was probably an update, that’s what happened for me. But we also implement the best practice as specified in the HP guide, so I will be changing my documentation to include Daniel’s findings.

    Once again, thank you!!

    Like

  10. Thank you. It’s 2am and I can go to bed finally. iSCSI dependency syntax… that would have taken another few hours to get to the bottom of without your article.
    Cheers!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s