Migration error

hello to all
now I am try to do migrations to hashstore

all is config in passive migrations

I have add this line to config.yaml also create /mnt/storagenodeDB/table in SSD

hashstore.table-default-kind: hashtbl

hashstore.table-path: /mnt/storagenodeDB/table

hashstore.hashtbl.mmap: false

hashstore.compaction.alive-fraction: float

hashstore.compaction.probability-power: float

hashstore.compaction.rewrite-multiple: float

but I get this error

2025-12-22T23:09:57Z ERROR failure during run {“Process”: “storagenode”, “error”: “Failed to create storage node peer: hashstore: missing hashtbl when log files exist\n\tstorj.io/storj/storagenode/hashstore.NewStore:194\n\tstorj.io/storj/storagenode/hashstore.New:96\n\tstorj.io/storj/storagenode/piecestore.(*HashStoreBackend).getDB:252\n\tstorj.io/storj/storagenode/piecestore.NewHashStoreBackend:117\n\tstorj.io/storj/storagenode.New:604\n\tmain.cmdRun:84\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.InitBeforeExecute.func1.2:389\n\tstorj.io/common/process.InitBeforeExecute.func1:407\n\tgithub.com/spf13/cobra.(*Command).execute:985\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:1117\n\tgithub.com/spf13/cobra.(*Command).Execute:1041\n\tstorj.io/common/process.ExecWithCustomOptions:115\n\tmain.main:34\n\truntime.main:283”, “errorVerbose”: “Failed to create storage node peer: hashstore: missing hashtbl when log files exist\n\tstorj.io/storj/storagenode/hashstore.NewStore:194\n\tstorj.io/storj/storagenode/hashstore.New:96\n\tstorj.io/storj/storagenode/piecestore.(*HashStoreBackend).getDB:252\n\tstorj.io/storj/storagenode/piecestore.NewHashStoreBackend:117\n\tstorj.io/storj/storagenode.New:604\n\tmain.cmdRun:84\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.InitBeforeExecute.func1.2:389\n\tstorj.io/common/process.InitBeforeExecute.func1:407\n\tgithub.com/spf13/cobra.(*Command).execute:985\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:1117\n\tgithub.com/spf13/cobra.(*Command).Execute:1041\n\tstorj.io/common/process.ExecWithCustomOptions:115\n\tmain.main:34\n\truntime.main:283\n\tmain.cmdRun:86\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.InitBeforeExecute.func1.2:389\n\tstorj.io/common/process.InitBeforeExecute.func1:407\n\tgithub.com/spf13/cobra.(*Command).execute:985\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:1117\n\tgithub.com/spf13/cobra.(*Command).Execute:1041\n\tstorj.io/common/process.ExecWithCustomOptions:115\n\tmain.main:34\n\truntime.main:283”}
Error: Failed to create storage node peer: hashstore: missing hashtbl when log files exist
storj.io/storj/storagenode/hashstore.NewStore:194
storj.io/storj/storagenode/hashstore.New:96
storj.io/storj/storagenode/piecestore.(*HashStoreBackend).getDB:252
storj.io/storj/storagenode/piecestore.NewHashStoreBackend:117
storj.io/storj/storagenode.New:604
main.cmdRun:84
main.newRunCmd.func1:33
storj.io/common/process.InitBeforeExecute.func1.2:389
storj.io/common/process.InitBeforeExecute.func1:407
github.com/spf13/cobra.(*Command).execute:985
github.com/spf13/cobra.(*Command).ExecuteC:1117
github.com/spf13/cobra.(*Command).Execute:1041
storj.io/common/process.ExecWithCustomOptions:115
main.main:34
runtime.main:283

any help please

If the node has been running for awhile: then new uploads have already been going into hashstore (which means you already have hashtable files, and the data log files they point to). If you set a different hashstore.table-path value now… maybe that new location is empty BUT the node can see you already have data log files?

You’ll have to Migrate or Regenerate the hastable files. I believe that error means the node found data, but didn’t find the tables it would expect.

But also, you don’t need to migrate the hashtable files. They can live in your main storage node directory.

If you want to move them to faster storage, the table files will be in the meta folders nested in the storage/hashstore directory. I made this little script to copy the files, it worked for me but obviously your mileage may vary and you’ll need to update the /srv/$NODE and /opt/storj/tables paths for your system. There should be a top level meta folder (I don’t think it needs to move but I did anyway, and meta folders for each satellite.

#!/bin/bash

set -e
set -x

NODE=$1

for d in $( ls /srv/$NODE/data/storage/hashstore ); do
        if [ "$d" = "meta" ]; then
                mkdir -p /opt/storj/tables/$NODE/meta/
                rsync -ravh /srv/$NODE/data/storage/hashstore/$d/ /opt/storj/tables/$NODE/meta/
        else
                mkdir -p /opt/storj/tables/$NODE/$d/s0/meta/
                rsync -ravh /srv/$NODE/data/storage/hashstore/$d/s0/meta/ /opt/storj/tables/$NODE/$d/s0/meta/

                mkdir -p /opt/storj/tables/$NODE/$d/s1/meta/
                rsync -ravh /srv/$NODE/data/storage/hashstore/$d/s1/meta/ /opt/storj/tables/$NODE/$d/s1/meta/
        fi
done

1 Like

Hello @nlstudio,
Welcome to the forum!

Seems you either forgot to move hashtables or put them in a wrong path.

1 Like

thank you I will try.

kind regards