Closed grigzy28 closed 5 years ago
You should be able to do this already. Have your corrupted storage folder mounted, and then mount a new storage folder. Delete the corrupted folder. When you delete the corrupted folder, it'll try to migrate all of the sectors in the folder you are deleting to folders that have available space. Sectors which it cannot move it will skip, and then it will also skip the migration if there is no space available in the remaining folders.
Okay, thank you. Didn't know that it was already a functioning way to handle errors. Is there a way to remove the corrupted folder from the host when there are errors and it can't automatically remove the folder because it can't move the sectors?
Is there a way to forcefully remove a shared data folder?
Feature Request
When there is corruption in the siahostdata file the siad host should be able to go ahead and get the remaining good sectors migrated. Inform the user how much data was corrupted and what to do from the user
My corruption was caused by "data crc errors" from a defective hard drive. Of 1.8tb of data it was able to migrate to 616mb left, then this error was logged in the contract manager log. It says the file isn't there but it is there and is able to see it from all other functions.
2018/07/08 14:47:09.979666 storagefolderempty.go:198: Unable to write sector: unable to read sector selected for migration: unable to read within storage folder: read e:\sia-share\siahostdata.dat: The system cannot find the file specified.
Expected Behavior
Be able to work around a corrupted siahostdata file sector and get non-corrupted sectors from the file.
Environment