Handle "no space left on device" scenario more gracefully
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
#### Version information:
go-ipfs version: 0.4.19-dev-852a8db40
Repo version: 7
System version: amd64/linux
Golang version: go1.11.2
#### Type:
Enhancement
#### Description:
When the file system ipfs stores its block on runs out of space, the daemon rightfully reports `ERROR bitswap: Error writing block to datastore: write /home/daniel/.ipfs/blocks/UT/put-335992698: no space left on device bitswap.go:331` and a file down retrieval stalls.
I think this should be handled more gracefully by trying to free some old objects and then try again. A full GC seems overkill, and freeing unpinned objects to make room for the new one is more appropriate.
The background of this is that I'm trying to use ipfs for exchanging files in a fleet of embedded devices where ipfs blocks are stored in a tmpfs which is limited in size. As each of these embedded nodes should act as data provider to others, a full GC would remove too much of the blocks that are still be useful to others.
Contributor guide
Assessment
This issue has not been assessed yet.