问题描述
IPFS作为文件管理系统,在生产环境上,必然会占用巨大的磁盘空间。一般会在IPFS节点上挂载多个磁盘,或者水平扩展磁盘。那IPFS是怎么进行磁盘挂载的呢?
IPFS挂载磁盘命令
命令如下:
>ipfs mount --help
USAGE
ipfs mount - Mounts IPFS to the filesystem (read-only).
SYNOPSIS
ipfs mount [--ipfs-path=<ipfs-path> | -f] [--ipns-path=<ipns-path> | -n]
OPTIONS
-f, --ipfs-path string - The path where IPFS should be mounted.
-n, --ipns-path string - The path where IPNS should be mounted.
DESCRIPTION
Mount IPFS at a read-only mountpoint on the OS. The default, /ipfs and /ipns,
are set in the configuration file, but can be overridden by the options.
All IPFS objects will be accessible under this directory. Note that the
root will not be listable, as it is virtual. Access known paths directly.
You may have to create /ipfs and /ipns before using 'ipfs mount':
> sudo mkdir /ipfs /i