SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

System link storage location for data (MongoDB, data files)

Is it possible to install System Link application on C drive and use D drive as data storage location for mongo DB repository. Where can i configure this?

0 Kudos
Message 1 of 8
(3,953 Views)

You do have the ability to configure where the MongoDB is stored at. Before you start this process, you'll want to make sure that you stop all of the SystemLink processes. You can do this by opening up task manager and going to the details section, and killing the NationalInstruments.ServiceManager.exe. This should kill the rest of the SystemLink services.

 

After ensuring that the SystemLink services aren't running, you first need to move/copy the DB to the new location. Specifically, you want to copy the "C:\ProgramData\National Instruments\Skyline\NoSqlDatabase\db" directory to a new place. For instance if you were wanting to move the MongoDB to the D drive, you might store it at "D:\SystemLink MongoDB". When you're done moving it you should have the "D:\Systemlink MongoDB\db" directory with all of the files that were in the old location.

 

Once you've relocated the files, you'll need to edit the mongodb.conf ("C:\ProgramData\National Instruments\Skyline\NoSqlDatabase\mongodb.conf") so that it knows where the MongoDB is. You'll want to change the dbPath from the old path to the new path. 

 

After editing the mongodb.conf, you should be able to start up the services. For this startup, I would recommend opening up the SystemLink Server Configuration Utility and restarting the services there so that you can see if there are any errors while NoSqlDatabase starts up. 

-----------------------------------------------
Brandon Grey
Certified LabVIEW Architect

0 Kudos
Message 2 of 8
(3,920 Views)

Thank you for the clear explanation! I was not able to test it yet. 

0 Kudos
Message 3 of 8
(3,893 Views)

Can the database be moved to a network location?  For example, I am trying to move it to:  \\fstx01\project\fstdata\SystemLink\MongoDB\db.  However, the NoSqlDatabase service has an error when I try to restart it in the NI SystemLink Server Configuration.

 

My mongodb.conf looks like this:

storage:
dbPath: !<!> \\fstx01\project\fstdata\SystemLink\MongoDB/db
journal:
enabled: true
wiredTiger:
engineConfig:
cacheSizeGB: 1
net:
port: 27018
bindIp: localhost
security:
authorization: !<!> enabled

 

I also tried replacing fstx01 with the IP address, and had the same result.

 

 

Thanks,

 

Chris

0 Kudos
Message 4 of 8
(3,526 Views)

The NoSqlDatabase service by default uses a system account that doesn't have access to network locations. There is a way to change the user that the service uses to run. Before I get into the instructions I will point out that a database stored on a network location will have reduced I/O performance.

 

Changing the NoSqlDatabase service user:

  1. Before we get started make a backup of this file in case you want to easily restore your NoSqlDatabase configuration.
    "C:\ProgramData\National Instruments\Skyline\Install\Services\Descriptors\NoSqlDatabase.json"
  2. Open a command prompt as an administrator.
  3. Run 
    "C:\Program Files\National Instruments\Shared\Skyline\NISystemLinkServerConfigCmd.exe" edit-service-descriptor NoSqlDatabase.json --account-user "<UserWithNetworkAccess>" --account-password "<Password>"
    replacing <UserWithNetworkAccess> and <Password> with their respective values.
  4. Upon a successful operation the command will provide no output.
  5. Check the file at
    "C:\ProgramData\National Instruments\Skyline\Install\Services\Descriptors\NoSqlDatabase.json"
    and you should see that both "UserAccountName" and "UserAccountPasswordEncrypted" are specified in the file.
  6. Restart the NoSqlDatabase service in the NI SystemLink Server Configuration utility.
  7. If all went well the NoSqlDatabase service will be able to access your network-based db.

If it doesn't quite work please open

"C:\ProgramData\National Instruments\Skyline\Logs\log.txt"

and look for the last ERROR and paste the line in your reply.

Message 5 of 8
(3,428 Views)

I have tried the same steps mentioned above. But after this NoSqlDatabase service was not running. Can you please point me to any help document or manual to move the DB location?

 

Thanks,

Gokilavani

0 Kudos
Message 6 of 8
(3,221 Views)

When you say it's not running, what does the log.txt say? This is where errors accumulate for debugging purposes.

 

I will also mention that in the 19.6 version of SystemLink added a configuration GUI for specifying the NoSqlDatabase location.

0 Kudos
Message 7 of 8
(3,208 Views)

Hi Ryan,

 

I have tried the same instructions in a fresh systemlink installation and it worked fine. Thanks a lot for your response.

 

-Vani

0 Kudos
Message 8 of 8
(3,180 Views)