I am trying to find a way to make IPFS more practical for me. My main OS is ubuntu 16.04 and it is on a 120 gb SSD. In my home network I have a server that I use for storage that has 21 TB on it. I would like to configure IPFS to use my network storage to save the files I add with "ipfs add " so I donβt fill up my SSD. Reading into the documentation it says the following towards the bottom after running βipfs --helpβ from the command line.
Use 'ipfs <command> --help' to learn more about each command.
ipfs uses a repository in the local file system. By default, the repo is
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
environment variable:
export IPFS_PATH=/path/to/ipfsrepo
In zsh I have set the IPFS_PATH variable in my .zshrc file with the following entry
export IPFS_PATH=/media/network_storage/FTP/ipfs
when I run
echo $IPFS_PATH
it returns
/media/network_storage/FTP/ipfs
Now, when I go to initalize ipfs the following happens (there is no ~/.ipfs directory and the /media/net/ftp/ipfs directory is empty as well)
initializing IPFS node at /media/network_storage/FTP/ipfs
generating 2048-bit RSA keypair...done
peer identity: Qma2soquUqaxZ3RmJp5QpC3GrbTtykywuhmbkcT8tW41F7
Error: open /media/network_storage/FTP/ipfs/blocks/_README: permission denied
when I run βtreeβ on my $IPFS_PATH I get the following:
.
βββ blocks
β βββ _README
β βββ SHARDING
βββ config
βββ datastore_spec
βββ version
if I remove the $IPFS_PATH from my .zshrc and start a new shell and run βipfs initβ there is no issue initializing ipfs. The ipfs folder is created at β~/.ipfsβ and it contains the following
.
βββ blocks
β βββ 2H
β β βββ CIQN5PVU4ECEKNEVXWRYKCPTVMIPHP5AWWKOCGCPXVNMF7ZWU6UG2HI.data
β βββ 7J
β β βββ CIQKKLBWAIBQZOIS5X7E32LQAL6236OUKZTMHPQSFIXPWXNZHQOV7JQ.data
β βββ 7R
β β βββ CIQIVZGLOUFY5L4TEYD5WLSCRDDEAW2TNVZSH3OBM5UKNOREHYSY7RA.data
β βββ B5
β β βββ CIQDOZU3EAGXWK3PLVFOFOZOAE5USX3XM6I5CSHSQGTML2BAGN7MB5I.data
β βββ IL
β β βββ CIQJFGRQHQ45VCQLM7AJNF2GF5UHUAGGHC6LLAH6VYDEKLQMD4QLILY.data
β βββ JN
β β βββ CIQPHMHGQLLZXC32FQQW2YVM4KGFORVFJAQYY55VK3WJGLZ2MS4RJNQ.data
β βββ L5
β β βββ CIQBIQXZ4NWWDXUSIYSCX7RE6EBXHMGENZNMUDEMGNKMGT2K6LLUL5Y.data
β βββ LG
β β βββ CIQJBQD2O6K4CGJVCCTJNUP57QHR4SKHZ74OIITBBGLOMCO3ZOLWLGA.data
β βββ N2
β β βββ CIQDWKPBHXLJ3XVELRJZA2SYY7OGCSX6FRSIZS2VQQPVKOA2Z4VXN2I.data
β βββ OO
β β βββ CIQBT4N7PS5IZ5IG2ZOUGKFK27IE33WKGJNDW2TY3LSBNQ34R6OVOOQ.data
β βββ PM
β β βββ CIQKNNRB2NFYXUZDJ2UWNMSKYLGTKUYDRQTJCDI7JTUDFH6YOYNUPMA.data
β βββ QV
β β βββ CIQOHMGEIKMPYHAUTL57JSEZN64SIJ5OIHSGJG4TJSSJLGI3PBJLQVI.data
β βββ R3
β β βββ CIQBED3K6YA5I3QQWLJOCHWXDRK5EXZQILBCKAPEDUJENZ5B5HJ5R3A.data
β βββ _README
β βββ SH
β β βββ CIQL3XIOKVDAW5KQF6NNWGFFYAHEQP63TJOVZHAEO7XZBD7KQOCSSHY.data
β βββ SHARDING
β βββ X3
β βββ CIQFTFEEHEDF6KLBT32BFAGLXEZL4UWFNWM4LFTLMXQBCERZ6CMLX3Y.data
βββ config
βββ datastore
β βββ 000002.ldb
β βββ 000003.log
β βββ CURRENT
β βββ LOCK
β βββ LOG
β βββ MANIFEST-000004
βββ datastore_spec
βββ keystore
βββ version
The way I mount my network storage is with this line in my /etc/fstab
//192.168.1.253/storage_pool /media/network_storage cifs uid=1000,gid=1000,credentials=/home/USER_NAME/.network_pw,iocharset=utf8 0 0
It looks as if when trying to initialize IPFS over my network something happens where it is not able to create the datastore directory and the directories and files under ~/.ipfs/blocks
I have also tried to use symoblic links with no luck either. The only thing I can think of is the line under ipfs --help that says βipfs uses a repository in the local file systemβ. Does this really mean that I can only set up my IPFS path under the local file system? If there is no way for me to change where the file blocks are stored?If so that is a really big deal killer for me since I wont have much space to add files on my small SSD while I have terrabytes available to use.
If anybody sees what I am doing wrong, or has any ideas please let me know. I would really like to figure this out and I am stuck.