I have try again:
This is the starting point on storagenode storage’s location:
fabrizio@storenode:/mnt/storage$ ll
total 2350864
drwxr-xr-x 7 root root 4096 Apr 8 10:04 ./
drwxr-xr-x 8 root root 4096 Apr 7 10:18 …/
-rw-r–r-- 1 root root 7905280 Apr 7 12:48 bandwidth.db
drwxr-xr-x 2 root root 4096 Jul 16 2019 blob/
drwxr-xr-x 7 root root 4096 Feb 11 21:36 blobs/
-rw-r–r-- 1 root root 29556308 Apr 8 00:10 dump_all.sql
-rw-r–r-- 1 root root 29556281 Apr 8 00:10 dump_all_notrans.sql
drwxr-xr-x 2 root root 4096 Apr 7 09:05 garbage/
-rw-r–r-- 1 root root 32768 Apr 7 12:00 heldamount.db
-rw-r–r-- 1 root root 24576 Apr 7 11:58 info.db
-rw-r–r-- 1 root root 24576 Apr 7 12:00 notifications.db
-rw-r–r-- 1 root root 8192 Apr 8 08:32 orders.db
-rw-r–r-- 1 root root 73728 Apr 7 12:00 piece_expiration.db
-rw-r–r-- 1 root root 24576 Apr 7 12:00 piece_spaced_used.db
-rw-r–r-- 1 root root 24576 Apr 7 11:58 pieceinfo.db
-rw-r–r-- 1 root root 20480 Apr 7 12:00 reputation.db
-rw-r–r-- 1 root root 32768 Apr 7 11:58 satellites.db
-rw-r–r-- 1 root root 118784 Apr 7 12:00 storage_usage.db
drwxr-xr-x 2 root root 65536 Apr 7 10:08 temp/
drwxr-xr-x 7 root root 4096 Feb 17 10:41 trash/
-rw-r–r-- 1 root root 40951808 Apr 8 01:14 used_serial.db
I have removed the old orders.db
fabrizio@storenode:/mnt/storage$ sudo rm orders.db
[sudo] password for fabrizio:
fabrizio@storenode:/mnt/storage$ ll
total 2350856
drwxr-xr-x 7 root root 4096 Apr 8 10:05 ./
drwxr-xr-x 8 root root 4096 Apr 7 10:18 …/
-rw-r–r-- 1 root root 7905280 Apr 7 12:48 bandwidth.db
drwxr-xr-x 2 root root 4096 Jul 16 2019 blob/
drwxr-xr-x 7 root root 4096 Feb 11 21:36 blobs/
-rw-r–r-- 1 root root 29556308 Apr 8 00:10 dump_all.sql
-rw-r–r-- 1 root root 29556281 Apr 8 00:10 dump_all_notrans.sql
drwxr-xr-x 2 root root 4096 Apr 7 09:05 garbage/
-rw-r–r-- 1 root root 32768 Apr 7 12:00 heldamount.db
-rw-r–r-- 1 root root 24576 Apr 7 11:58 info.db
-rw-r–r-- 1 root root 24576 Apr 7 12:00 notifications.db
-rw-r–r-- 1 root root 73728 Apr 7 12:00 piece_expiration.db
-rw-r–r-- 1 root root 24576 Apr 7 12:00 piece_spaced_used.db
-rw-r–r-- 1 root root 24576 Apr 7 11:58 pieceinfo.db
-rw-r–r-- 1 root root 20480 Apr 7 12:00 reputation.db
-rw-r–r-- 1 root root 32768 Apr 7 11:58 satellites.db
-rw-r–r-- 1 root root 118784 Apr 7 12:00 storage_usage.db
drwxr-xr-x 2 root root 65536 Apr 7 10:08 temp/
drwxr-xr-x 7 root root 4096 Feb 17 10:41 trash/
-rw-r–r-- 1 root root 40951808 Apr 8 01:14 used_serial.db
then run the procedure that you wrote me
fabrizio@storenode:/mnt/storage$ docker run --rm -it --mount type=bind,source="/mnt/storage",destination=/storage sstc/sqlite3 sh
/data # sqlite3 orders.db
SQLite version 3.30.1 2019-10-10 20:19:45
Enter “.help” for usage hints.
sqlite> CREATE TABLE unsent_order (
…> satellite_id BLOB NOT NULL,
…> serial_number BLOB NOT NULL,
…>
…> order_limit_serialized BLOB NOT NULL, – serialized pb.OrderLimit
…> order_serialized BLOB NOT NULL, – serialized pb.Order
…> order_limit_expiration TIMESTAMP NOT NULL, – when is the deadline for sending it
…>
…> uplink_cert_id INTEGER NOT NULL,
…>
…> FOREIGN KEY(uplink_cert_id) REFERENCES certificate(cert_id)
…> );
sqlite> CREATE TABLE order_archive_ (
…> satellite_id BLOB NOT NULL,
…> serial_number BLOB NOT NULL,
…>
…> order_limit_serialized BLOB NOT NULL,
…> order_serialized BLOB NOT NULL,
…>
…> uplink_cert_id INTEGER NOT NULL,
…>
…> status INTEGER NOT NULL,
…> archived_at TIMESTAMP NOT NULL,
…>
…> FOREIGN KEY(uplink_cert_id) REFERENCES certificate(cert_id)
…> );
sqlite> CREATE UNIQUE INDEX idx_orders ON unsent_order(satellite_id, serial_number);
sqlite> CREATE TABLE versions (version int, commited_at text);
sqlite> CREATE INDEX idx_order_archived_at ON order_archive_(archived_at);
sqlite> .exit
/data # exit
this is the final situation:
fabrizio@storenode:/mnt/storage$ ll
total 2350864
drwxr-xr-x 7 root root 4096 Apr 8 10:05 ./
drwxr-xr-x 8 root root 4096 Apr 7 10:18 …/
-rw-r–r-- 1 root root 7905280 Apr 7 12:48 bandwidth.db
drwxr-xr-x 2 root root 4096 Jul 16 2019 blob/
drwxr-xr-x 7 root root 4096 Feb 11 21:36 blobs/
-rw-r–r-- 1 root root 29556308 Apr 8 00:10 dump_all.sql
-rw-r–r-- 1 root root 29556281 Apr 8 00:10 dump_all_notrans.sql
drwxr-xr-x 2 root root 4096 Apr 7 09:05 garbage/
-rw-r–r-- 1 root root 32768 Apr 7 12:00 heldamount.db
-rw-r–r-- 1 root root 24576 Apr 7 11:58 info.db
-rw-r–r-- 1 root root 24576 Apr 7 12:00 notifications.db
-rw-r–r-- 1 root root 8192 Apr 8 10:05 orders.db
-rw-r–r-- 1 root root 73728 Apr 7 12:00 piece_expiration.db
-rw-r–r-- 1 root root 24576 Apr 7 12:00 piece_spaced_used.db
-rw-r–r-- 1 root root 24576 Apr 7 11:58 pieceinfo.db
-rw-r–r-- 1 root root 20480 Apr 7 12:00 reputation.db
-rw-r–r-- 1 root root 32768 Apr 7 11:58 satellites.db
-rw-r–r-- 1 root root 118784 Apr 7 12:00 storage_usage.db
drwxr-xr-x 2 root root 65536 Apr 7 10:08 temp/
drwxr-xr-x 7 root root 4096 Feb 17 10:41 trash/
-rw-r–r-- 1 root root 40951808 Apr 8 01:14 used_serial.db
fabrizio@storenode:/mnt/storage$
then I have run the storagenode
fabrizio@storenode: /mnt/storage $ docker start storagenode
storagenode
this is the log with the same error
fabrizio@storenode : /mnt/storage $ docker logs --tail 20 storagenode
2020-04-08T08:12:04.334Z INFO operator wallet: 0xB8f8a2A65916b1442B824833Cfd6101910f8Ab7b
2020-04-08T08:12:04.999Z INFO version running on version v1.1.1
2020-04-08T08:12:05.008Z INFO db.migration.27 Add index archived_at to ordersDB
Error: Error creating tables for master database on storagenode: migrate: no such table: main.order_archive_
storj.io/storj/private/migrate.SQL.Run:251
storj.io/storj/private/migrate.(*Migration).Run.func1:171
storj.io/storj/private/dbutil/txutil.withTxOnce:67
storj.io/storj/private/dbutil/txutil.WithTx:36
storj.io/storj/private/migrate.(*Migration).Run:170
storj.io/storj/storagenode/storagenodedb.(*DB).CreateTables:285
main.cmdRun:189
storj.io/private/process.cleanup.func1.2:312
storj.io/private/process.cleanup.func1:330
github.com/spf13/cobra.(*Command).execute:840
github.com/spf13/cobra.(*Command).ExecuteC:945
github.com/spf13/cobra.(*Command).Execute:885
storj.io/private/process.ExecWithCustomConfig:84
storj.io/private/process.ExecCustomDebug:66
main.main:329
runtime.main:203