storj/storagenode/pieces
Cameron Ayer 586e6f2f13 private/testblobs, storage, storage/filestore: add storage dir verification to filestore
Sometimes SNOs fail to properly configure or lose connection to their storage directory
which can result in DQ. This causes unnecessary repair and is unfortunate for all parties.

This change introduces the creation of a special file in the storage directory at runtime
containing the node ID. While the storage node runs, it periodically verifies that it can
find said file with the correct contents in the correct location. If not, the node will
shut down with an error message.

This change will solve the issue of nodes losing access to the storage directory, but it will not
solve the issue of nodes pointing to the wrong directory, as the identifying file is created each
time the node starts up. After this change has been the minimum version for a few releases, we will
remove the creation of the directory-identifying file from the storage node run command and add it
to the setup command.

Change-Id: Ib7b10e96ac07373219835e39239e93957e7667a4
2020-08-19 17:18:14 +00:00
..
cache_test.go storagenode/pieces: implement buffering for writing 2020-05-04 06:01:32 +00:00
cache.go storagenode: fixed logging about piece being moved to trash, and added logging when piece was actually deleted 2020-08-02 20:00:05 +03:00
db_test.go storagenode/storagenodedb/storagenodedbtest: pass ctx as an argument 2020-01-20 16:56:12 +02:00
deleter_test.go storage/filestore: log potential disk corruption 2020-05-27 12:12:55 +00:00
deleter.go storagenode/piecestore: move queue size defaults (#3881) 2020-05-15 19:10:26 +02:00
pieceexpiration_test.go storagenode/storagenodedb/storagenodedbtest: pass ctx as an argument 2020-01-20 16:56:12 +02:00
readwrite_test.go all: replace == comparison with errors.Is 2020-07-14 15:50:25 +00:00
readwrite.go all: fix comments 2020-07-16 19:13:14 +03:00
store_test.go all: replace == comparison with errors.Is 2020-07-14 15:50:25 +00:00
store.go private/testblobs, storage, storage/filestore: add storage dir verification to filestore 2020-08-19 17:18:14 +00:00
trashchore.go all: fix dots 2020-07-16 14:58:28 +00:00