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?