Skip to content

Commit 0a345c2

Browse files
committed
document piece in storage.json allowtypes
1 parent e0294b0 commit 0a345c2

5 files changed

Lines changed: 41 additions & 9 deletions

File tree

documentation/en/curio-pdp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ Skiff requires an external Lotus-compatible chain node. Set `FULLNODE_API_INFO`
148148

149149
Curio-PDP stores piece payloads on local disk. Mount drives at **`/data`** (or bind-mount volumes beneath it). On startup the node scans `/data` and **every subdirectory**, probes each for write access, and uses every writable location as storage. Unwritable paths are skipped.
150150

151+
On a full Curio cluster that also seals sectors, keep PDP data off certain disks with the `"piece"` DenyTypes filter. Or add a dedicated storage location with AllowTypes: ["piece"]. See [Separate PDP / parked pieces from sealed storage](storage-configuration.md#separate-pdp-parked-pieces).
152+
151153
Missing `sectorstore.json` files are created automatically in each writable location.
152154

153155
Additionally, you can use a path other than `/data`:

documentation/en/experimental-features/Enable-PDP.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,9 @@ curio cli storage attach --init --store /long-term-storage/path
496496
```
497497

498498
{% hint style="info" %}
499-
Your fast-storage path should point to high-performance storage media such as NVMe or SSD
499+
Your fast-storage path should point to high-performance storage media such as NVMe or SSD.
500+
501+
To keep PDP payloads off sealed-sector disks, attach a dedicated `piece` to denytypes on storage configuration files. See [Separate PDP / parked pieces from sealed storage](../storage-configuration.md#separate-pdp-parked-pieces).
500502
{% endhint %}
501503

502504
***

documentation/en/storage-configuration.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: >-
88

99
Each Curio node keeps track of defined storage locations in `~/.curio/storage.json` (or `$CURIO_REPO_PATH/storage.json`) and uses `~/.curio` path as default.
1010

11-
Upon initialization of a storage location, a `<path-to-storage>/sectorstorage.json` file is created that contains the UUID assigned to this location, along with whether it can be used for sealing or storing.
11+
Upon initialization of a storage location, a `<path-to-storage>/sectorstore.json` file is created that contains the UUID assigned to this location, along with whether it can be used for sealing or storing.
1212

1313
## Adding sealing storage location&#x20;
1414

@@ -85,7 +85,7 @@ curio cli --machine <Machine IP:Port> storage attach <PATH_FOR_LONG_TERM_STORAGE
8585

8686
## Filter sector types <a href="#filter-sector-types" id="filter-sector-types"></a>
8787

88-
You can filter for what sectors types are allowed in each sealing path by adjusting the configuration file in: `<path-to-storage>/sectorstorage.json`.
88+
You can filter for what sector file types are allowed in each path by adjusting `<path-to-storage>/sectorstore.json`. You can also set these at attach time with `--allow-types` and `--deny-types`.
8989

9090
```json
9191
{
@@ -104,14 +104,16 @@ You can filter for what sectors types are allowed in each sealing path by adjust
104104
Valid values for `AllowTypes` and `DenyTypes` are:
105105

106106
```javascript
107-
"unsealed"
108-
"sealed"
109-
"cache"
110-
"update"
111-
"update-cache"
107+
"unsealed" // unsealed sector files
108+
"sealed" // sealed sector replicas
109+
"cache" // sealing cache
110+
"update" // snap-deal update replica
111+
"update-cache" // snap-deal update cache
112+
"piece" // parked pieces: PDP payloads and market piece parking
113+
"key" // unseal keys
112114
```
113115

114-
These values must be put in an array to be valid (e.g `"AllowTypes": ["unsealed", "update-cache"]`), any other values will generate an error on startup of the `Curio`. A restart of the `Curio` node where this storage is attached is also needed for changes to take effect.
116+
These values must be put in an array to be valid (e.g `"AllowTypes": ["unsealed", "update-cache"]`). Unknown values generate a warning and are ignored. A restart of the Curio node where this storage is attached is needed for `sectorstore.json` edits to take effect.
115117

116118
## Separate sealed and unsealed&#x20;
117119

@@ -126,6 +128,24 @@ Setting only `unsealed` for `AllowTypes` will still allow `cache` and `update-ca
126128
If there are existing files with disallowed types in a storage path, those files will remain readable for PoSt/Retrieval. So the worst that can happen in case of misconfiguration in the storage path is that sealing tasks will get stuck waiting for storage to become available.
127129
{% endhint %}
128130

131+
## Separate PDP / parked pieces from sealed storage <a href="#separate-pdp-parked-pieces" id="separate-pdp-parked-pieces"></a>
132+
133+
PDP payloads and market parked pieces are stored as file type `"piece"`, not as sealed/unsealed sector files. They also use miner ID `f00` (actor 0) internally; they do **not** use the SP miner ID. Miner `AllowMiners` / `DenyMiners` filters are for splitting disks between real miners, not for keeping PDP off sealed storage.
134+
135+
To keep parked pieces on their own disks:
136+
137+
* Attach PDP / piece-park store paths with `"AllowTypes": ["piece"]` (and `CanStore: true`).
138+
* Attach sealed long-term paths with `"DenyTypes": ["piece"]`.
139+
140+
```sh
141+
curio cli storage attach --init --store --allow-types piece /mnt/pdp
142+
curio cli storage attach --init --store --deny-types piece /mnt/sealed
143+
```
144+
145+
Long-term PDP pieces allocate on **store** paths (`--store` / `CanStore`). A `--seal`-only path will not take PDP uploads or pulls.
146+
147+
This filter applies to all parked pieces. MK12/MK20 piece parking uses the same `"piece"` type, so those files share the piece-only disks. There is no path filter that selects PDP pieces and excludes market parking.
148+
129149
## Segregating long-term storage per miner&#x20;
130150

131151
Users can allocate long-term storage to specific miner IDs by specifying miner address strings in the `sectorstore.json` file. This configuration allows precise control over which miners can use the storage.

lib/storiface/index.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ type StorageInfo struct {
7272
// - "cache"
7373
// - "update"
7474
// - "update-cache"
75+
// - "piece" (parked pieces: PDP payloads and market piece parking)
76+
// - "key" (unseal keys)
7577
// Any other value will generate a warning and be ignored.
7678
AllowTypes []string
7779

@@ -84,6 +86,8 @@ type StorageInfo struct {
8486
// - "cache"
8587
// - "update"
8688
// - "update-cache"
89+
// - "piece" (parked pieces: PDP payloads and market piece parking)
90+
// - "key" (unseal keys)
8791
// Any other value will generate a warning and be ignored.
8892
DenyTypes []string
8993

lib/storiface/storage.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ type LocalStorageMeta struct {
139139
// - "cache"
140140
// - "update"
141141
// - "update-cache"
142+
// - "piece" (parked pieces: PDP payloads and market piece parking)
143+
// - "key" (unseal keys)
142144
// Any other value will generate a warning and be ignored.
143145
AllowTypes []string
144146

@@ -151,6 +153,8 @@ type LocalStorageMeta struct {
151153
// - "cache"
152154
// - "update"
153155
// - "update-cache"
156+
// - "piece" (parked pieces: PDP payloads and market piece parking)
157+
// - "key" (unseal keys)
154158
// Any other value will generate a warning and be ignored.
155159
DenyTypes []string
156160

0 commit comments

Comments
 (0)