Skip to content

Commit

Permalink
Document ledger.snapshots.rootDir
Browse files Browse the repository at this point in the history
Clarify that peer needs write access to ledger.snapshots.rootDir directory.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
(cherry picked from commit 3714ca3)
  • Loading branch information
denyeart authored and ale-linux committed Apr 1, 2021
1 parent ce16177 commit 25f6612
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/deploypeer/peerchecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ localMspId: SampleOrg
# modification that might corrupt the peer operations.
fileSystemPath: /var/hyperledger/production
```
- **`fileSystemPath`**: (Default value should be overridden.) This is the path to the ledger and installed chaincodes on the local filesystem of the peer. It can be an absolute path or relative to `FABRIC_CFG_PATH`. It defaults to `/var/hyperledger/production`. The user running the peer needs to own and have write access to this directory. **The best practice is to store this data in persistent storage**. This prevents the ledger and any installed chaincodes from being lost if your peer containers are destroyed for some reason.
- **`fileSystemPath`**: (Default value should be overridden.) This is the path to the ledger and installed chaincodes on the local filesystem of the peer. It can be an absolute path or relative to `FABRIC_CFG_PATH`. It defaults to `/var/hyperledger/production`. The user running the peer needs to own and have write access to this directory. **The best practice is to store this data in persistent storage**. This prevents the ledger and any installed chaincodes from being lost if your peer containers are destroyed for some reason. Note that ledger snapshots will be written to `ledger.snapshots.rootDir`, described in the [ledger.* section](#ledger).

## peer.gossip.*

Expand Down
8 changes: 7 additions & 1 deletion docs/source/deploypeer/peerdeploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ Note that the local MSP contains the signed certificate (public key) and the pri

### Storage

You must provision persistent storage for your ledger. If you are not using an external chaincode builder and launcher, you should factor in storage for that as well. The default location for the ledger is located at `/var/hyperledger/production`. Ensure that your peer has write access to the folder. If you choose to use a different location, provide that path in the `peer.fileSystemPath` parameter in the `core.yaml` file. If you decide to use Kubernetes or Docker, recall that in a containerized environment local storage disappears when the container goes away, so you will need to provision or mount persistent storage for the ledger before you deploy a peer.
You must provision persistent storage for your ledger files. The following properties in `core.yaml` dictates where ledger files and snapshots are written:
* `peer.fileSystemPath` - defaults to `/var/hyperledger/production`
* `ledger.snapshots.rootDir` - defaults to `/var/hyperledger/production/snapshots`

Ensure that your peer has write access to these directories.

If you decide to use Kubernetes or Docker, recall that in a containerized environment local storage disappears when the container goes away, so you will need to provision or mount persistent storage for the ledger before you deploy a peer.

### Configuration of `core.yaml`

Expand Down

0 comments on commit 25f6612

Please sign in to comment.