Shared status lost on RAM disk after reboot

Started by Slawek

Slawek

Shared status lost on RAM disk after reboot   27 June 2018, 16:02

I'm evaluating the last version of Ramdisk on Win10 (April update) and having issues with the Ramdisk losing a share after the computer reboots. The share exists, because it comes back when I restart the Windows Server service. This seems to be some timing issue during startup where the Ramdisk is ready only after the Server service has started. Do you have any solution for this issue?
SoftPerfect Support forum - Andrew avatar image

Re: Shared status lost on RAM disk after reboot   27 June 2018, 16:04

It is probably indeed the case: a RAM disk is ready after the Server service has started. This is more likely to happen for large RAM disks as they take more time to initialise.

The easiest workaround is to change the Server's service to start delayed as shown below. Delayed start usually takes place within 2-3 minutes after boot, by which time the RAM disk should be ready.

SoftPerfect support forum
Slawek

Re: Shared status lost on RAM disk after reboot   04 July 2018, 11:07

Thanks for the reply. Unfortunately 2-3 minute delay is not an option. I did create a startup batch file that shares RAMdisk with full privileges, but I'm not 100% sure this will be bullet proof. In our application the RAMdisk must be shared as soon as computer starts up, otherwise the GUI cannot access video in the buffer. Is there any way I could add RAMdisk as a dependency to the Server service?
SoftPerfect Support forum - Ann avatar image
Ann

Re: Shared status lost on RAM disk after reboot   04 July 2018, 11:13

The RAM disk is mounted by a driver that starts long before services start. These processes happen in parallel, so a service may already be running, but a RAM disk is still not ready.

The only workaround I can think of is a simple batch script that checks once a minute whether the drive letter exists. When the drive letter has been found, it starts the SERVER (or any other) service. Obviously the service needs to be configured to start manually.

Below is a sample script. You would need to modify it to match your drive letter and create a scheduled task as shown in the following screen shots. The idea is to run the batch file upon startup and wait for a drive letter. Once it's available, start the service that depends on it.

@ECHO OFF
SET WaitTimeMinutes=60

:CHECK

TIMEOUT 60
SET /A WaitTimeMinutes-=1
IF %WaitTimeMinutes%==0 GOTO NOTFOUND
IF NOT EXIST R:\ GOTO CHECK

:FOUND
ECHO Drive was found
NET START SERVER
EXIT

:NOTFOUND
ECHO Drive was not found in time

SoftPerfect support forum

SoftPerfect support forum

SoftPerfect support forum

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

  ******    *******   ********    *******   ********  
 **    **  **     **  **     **  **     **  **     ** 
 **        **         **     **         **  **     ** 
 **        ********   ********    *******   ********  
 **        **     **  **                **  **        
 **    **  **     **  **         **     **  **        
  ******    *******   **          *******   **        

Message: