Moving database files to a different drive with symbolic links

There was the question how to move the DB to other drive…
To a SSD Drive. …

This could be very easy. I tried and i dont have any problems.
My Node FileStoredData is on C: a SSD with 256GB. I make Symbolic Links from my 60TB Filestorage.
The folder (Trash/blob/garbage/temp) are on drive D and Folder is in C as a symbolic Link

Open CMD and type:

mklink /j <C:Node/Storage> <D:/Storj>
mklink /j

So all DB and DB-wal files stored on SSD an the Big Data is on normal HDD

Unbenannt

SQlite do not support symbolic links as I remember, so you will kill dbs

you dont need symbolic links you can just put to config the location of Dbs with this parameter
Storage2.Database-Dir: C:\Program Files\Storj2

1 Like

SQLite simply requires all connections to connect to a database through one specific file name. This is because the write-ahead log file (.db-wal) is placed next that file name and has to be shared by all connections. If the SNO ensures all connections go through the same symlink, it should be fine.

Besides, OP is actually mistaken and creates junctions, not symlinks. :person_shrugging: That’s probably not a meaningful difference here, but I don’t have enough knowledge about Windows.

Hello @surfercool,
Welcome to the forum!

Junctions and symlinks are not supported for storagenode and databases in particular, at least under Windows.
I believe that they also does not supported on Linux too.
If you was able to make it work - fine, but be prepared that it may broke your node, since these options are not tested, not supported and not recommended.

So, you may use the parameter storage2.database-dir: for the databases location instead.

Perhaps your databases actually not on SSD, since by default with empty storage2.database-dir:, databases will be in the storage location specified by storage.path: option.
So, in case if you made a junction of C:\Node\Storage to d:\Storj and specified storage.path: C:\Node\Storage, but not provided a different path for databases in storage2.database-dir:, your databases will be created/used in d:\Storj.