-2

I have a Windows 2003R2 Server soon to be replaced. The server was just connected via iSCSI to a WD MyCloud 4100 NAS, using the Microsoft iSCSI initiator.

A large number of directories exists on this disk. And most of the root-level directories are network shared over Active Directory.

The deal is that due to power outages the server automatically reboots occasionally. The server makes clean shutdowns in this case, using the UPS provided software. From the looks of it though, even though the iSCSI connection is re-established, the network share information gets lost.

Q1) Is there some sort of registry hack or policy that would allow the server to "remember" share-state?

In case the answer to Q1 is "no", I'm prepping a script that I could run, containing commands to set the new shares, ie:

net share "sharename1"="f:\share_dir_1" /grant:<my_ad>\administrator,FULL "f:\share_dir_1" /grant:administrator,FULL /grant:"Domain users",FULL 
net share "sharename2"="f:\share_dir_2" /grant:<my_ad>\administrator,FULL /grant:administrator,FULL /grant:"Domain users",FULL
...

"F" is the iSCSI volume. The script above should contain minimally some checks whether drive F is mounted (ideas?) and start at system startup (again ideas?)

Q2) Is the above a decent way to accomplish that? If not what would you propose as alternatives?

5
  • You're more than five years past the time the server should have been replaced. It seems unlikely you'll be able to get any sort of help at all, and the community here tends to reject questions about retro operating systems. You really should put this aside and work on replacing the machine yesterday. – Michael Hampton Sep 22 '20 at 11:04
  • 1
    It's doubtful that the Shares are being "lost" and if you look in the Registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares I'm certain you'll see the shares. When this issue occurs try stopping and restarting the Server service. – joeqwerty Sep 22 '20 at 12:45
  • Did you changed iscsi initiator configuration? – Lukáš Viktora Sep 22 '20 at 15:52
  • @MichaelHampton since 2014 I've been trying to get upper management proceed into a procurement for newer servers and clients. With any luck they will arrive Q1 '21. In any case though, it would be more helpful to actually address my questions, instead of assuming that I can proceed with an upgrade.@joeqwerty thanks for a helpful pointer here. I wanted to avoid a reboot, but I'll force one tomorrow and see how it goes. Lukas I did not change the iscsi config. – carmik Sep 22 '20 at 16:01
  • A Microsoft KB article sheds some light here. Basically the server service starts before the iscsi one, hence for not restoring the shares. Luckily the KB article explains how to change that behaviour for shares to persist. I'll edit the original topic later. – carmik Sep 22 '20 at 16:12
0

A Microsoft KB article sheds some light here. Basically the server service starts before the iscsi one, hence for not restoring the shares. Luckily the KB article explains how to change that behaviour for shares to persist.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.