All Forums
> RAM Disk
> Current topic
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?
Re: Shared status lost on RAM disk after reboot 27 June 2018, 16:04 |
Admin Registered: 18 years ago Posts: 3 519 |
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.
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.
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?
Re: Shared status lost on RAM disk after reboot 04 July 2018, 11:13 |
Admin Registered: 10 years ago Posts: 893 |
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.
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