diff --git a/documentation/en/curio-pdp.md b/documentation/en/curio-pdp.md index 0948495f2..0d97eb30b 100644 --- a/documentation/en/curio-pdp.md +++ b/documentation/en/curio-pdp.md @@ -148,6 +148,8 @@ Skiff requires an external Lotus-compatible chain node. Set `FULLNODE_API_INFO` 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. +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). + Missing `sectorstore.json` files are created automatically in each writable location. Additionally, you can use a path other than `/data`: diff --git a/documentation/en/experimental-features/Enable-PDP.md b/documentation/en/experimental-features/Enable-PDP.md index f10b69e4a..2bb875444 100644 --- a/documentation/en/experimental-features/Enable-PDP.md +++ b/documentation/en/experimental-features/Enable-PDP.md @@ -496,7 +496,9 @@ curio cli storage attach --init --store /long-term-storage/path ``` {% hint style="info" %} -Your fast-storage path should point to high-performance storage media such as NVMe or SSD +Your fast-storage path should point to high-performance storage media such as NVMe or SSD. + +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). {% endhint %} *** diff --git a/documentation/en/storage-configuration.md b/documentation/en/storage-configuration.md index 8f2d2f377..6c7d7339d 100644 --- a/documentation/en/storage-configuration.md +++ b/documentation/en/storage-configuration.md @@ -8,7 +8,7 @@ description: >- 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. -Upon initialization of a storage location, a `/sectorstorage.json` file is created that contains the UUID assigned to this location, along with whether it can be used for sealing or storing. +Upon initialization of a storage location, a `/sectorstore.json` file is created that contains the UUID assigned to this location, along with whether it can be used for sealing or storing. ## Adding sealing storage location @@ -85,7 +85,7 @@ curio cli --machine storage attach -You can filter for what sectors types are allowed in each sealing path by adjusting the configuration file in: `/sectorstorage.json`. +You can filter for what sector file types are allowed in each path by adjusting `/sectorstore.json`. You can also set these at attach time with `--allow-types` and `--deny-types`. ```json { @@ -104,14 +104,16 @@ You can filter for what sectors types are allowed in each sealing path by adjust Valid values for `AllowTypes` and `DenyTypes` are: ```javascript -"unsealed" -"sealed" -"cache" -"update" -"update-cache" +"unsealed" // unsealed sector files +"sealed" // sealed sector replicas +"cache" // sealing cache +"update" // snap-deal update replica +"update-cache" // snap-deal update cache +"piece" // parked pieces: PDP payloads and market piece parking +"key" // unseal keys ``` -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. +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. ## Separate sealed and unsealed @@ -126,6 +128,24 @@ Setting only `unsealed` for `AllowTypes` will still allow `cache` and `update-ca 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. {% endhint %} +## Separate PDP / parked pieces from sealed storage + +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. + +To keep parked pieces on their own disks: + +* Attach PDP / piece-park store paths with `"AllowTypes": ["piece"]` (and `CanStore: true`). +* Attach sealed long-term paths with `"DenyTypes": ["piece"]`. + +```sh +curio cli storage attach --init --store --allow-types piece /mnt/pdp +curio cli storage attach --init --store --deny-types piece /mnt/sealed +``` + +Long-term PDP pieces allocate on **store** paths (`--store` / `CanStore`). A `--seal`-only path will not take PDP uploads or pulls. + +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. + ## Segregating long-term storage per miner 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. diff --git a/lib/storiface/index.go b/lib/storiface/index.go index 3bf695687..726b6de60 100644 --- a/lib/storiface/index.go +++ b/lib/storiface/index.go @@ -72,6 +72,8 @@ type StorageInfo struct { // - "cache" // - "update" // - "update-cache" + // - "piece" (parked pieces: PDP payloads and market piece parking) + // - "key" (unseal keys) // Any other value will generate a warning and be ignored. AllowTypes []string @@ -84,6 +86,8 @@ type StorageInfo struct { // - "cache" // - "update" // - "update-cache" + // - "piece" (parked pieces: PDP payloads and market piece parking) + // - "key" (unseal keys) // Any other value will generate a warning and be ignored. DenyTypes []string diff --git a/lib/storiface/storage.go b/lib/storiface/storage.go index 62884d08e..840a17315 100644 --- a/lib/storiface/storage.go +++ b/lib/storiface/storage.go @@ -139,6 +139,8 @@ type LocalStorageMeta struct { // - "cache" // - "update" // - "update-cache" + // - "piece" (parked pieces: PDP payloads and market piece parking) + // - "key" (unseal keys) // Any other value will generate a warning and be ignored. AllowTypes []string @@ -151,6 +153,8 @@ type LocalStorageMeta struct { // - "cache" // - "update" // - "update-cache" + // - "piece" (parked pieces: PDP payloads and market piece parking) + // - "key" (unseal keys) // Any other value will generate a warning and be ignored. DenyTypes []string