come-maiz / ipfs-snap

IPFS packaged as a snap
MIT License
21 stars 6 forks source link

IPFS snap copying full block storage with every version (e.g. we're not using the "common" directory) #12

Open jamiew opened 6 years ago

jamiew commented 6 years ago

Possibly not an issue, but this is starting to eat up a lot of disk space for me, especially as I'm using the --edge distribution.

I'm new to snap in general. Is there a standard practice for using the common directory for large directories like this? Happy to help put together a patch.

Thank you for putting this package together!

come-maiz commented 6 years ago

Hey @jamiew. There is no super simple solution for that, because it depends a lot on the project. But take a look at the hack we are doing on bitcoin:

https://github.com/elopio/blockchain-snaps/blob/master/bitcoin/snap/patches/default_data_dir.patch

We can try something similar.

mkg20001 commented 6 years ago

Simply setting IPFS_PATH env variable should be enough I think

jamiew commented 6 years ago

Thanks, SNAP_USER_COMMON seems promising, will do some more homework. I had trouble getting the snap version to respect IPFS_PATH properly

Semi-related, been trying to make it so the snap-installed ipfs can access an external disk... installing using --classic (or --devmode or --dangerous) doesn't seem to allow me to break out of confinement properly. Have either of you seen similar?

come-maiz commented 6 years ago

The snap already has the removable-media plug. Do you have it connected?

olizilla commented 4 years ago

@jamiew I just pushed out 0.5.1 to the edge channel, with a fix to use SNAP_USER_COMMON as the IPFS_PATH. If you're still using the snap on the edge channel, let me know if it works for you.

I'm experimenting with the release process... will push out 0.6 to edge shortly and to stable next week.