From 0fe842e3727baa0164965ee259362d386fb282a1 Mon Sep 17 00:00:00 2001 From: Phi Date: Thu, 21 Jul 2022 14:09:23 +0200 Subject: [PATCH 1/9] Add filter sector types Add filter sector types --- .../operate/custom-storage-layout.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index 38aacf40..2d963a4d 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -27,6 +27,24 @@ The _seal_ storage location is used when sealing sectors. It should be a really lotus-miner storage attach --init --seal ``` +### Filter sector types + +You can filter for what types of sectors are allowed in each sealing path by adjusting the configuration file that: `/sectorstorage.json`. + +```json +{ + "ID": "1626519a-5e05-493b-aa7a-0af71612010b", + "Weight": 10, + "CanSeal": false, + "CanStore": true, + "MaxStorage": 0, + "Groups": [], + "AllowTo": [], + "AllowTypes": null, + "DenyTypes": null +} +``` + ## Custom location for storing Once the _sealing_ process is completed, sealed sectors are moved to the _store_ location, which can be specified as follow: @@ -37,6 +55,36 @@ lotus-miner storage attach --init --store This location can be made of large capacity, albeit slower, spinning-disks. +### Filter sector types + +You can filter for what sector types that are allowed in each sealing path by adjusting the configuration file in: `/sectorstorage.json`. + +```json +{ + "ID": "1626519a-5e05-493b-aa7a-0af71612010b", + "Weight": 10, + "CanSeal": false, + "CanStore": true, + "MaxStorage": 0, + "Groups": [], + "AllowTo": [], + "AllowTypes": null, + "DenyTypes": null +} +``` + +Valid values for `AllowTypes` and `DenyTypes` are: + +``` +"unsealed" +"sealed" +"cache" +"update" +"update-cache" +``` + +Any other value will generate a warning and be ignored. + ## Listing storage locations ```sh From 0b1590cbee12ea1e2a21321895136d5494a03f88 Mon Sep 17 00:00:00 2001 From: Phi Date: Wed, 27 Jul 2022 11:37:16 +0200 Subject: [PATCH 2/9] Filter sector types content Add content to the filter sector types section --- .../operate/custom-storage-layout.md | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index 2d963a4d..b3ff1967 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -15,7 +15,7 @@ toc: true If you used the `--no-local-storage` flag during the [miner initialization]({{< relref "../setup/initialize#miner-initialization" >}}), you should specify the disk locations for sealing (fast SSD recommended) and long-term storage. -The Lotus Miner keeps track of defined storage locations in in `~/.lotusminer/storage.json` (or `$LOTUS_MINER_PATH/storage.json`) and uses `~/.lotusminer` path as default. +The `lotus-miner` keeps track of defined storage locations in in `~/.lotusminer/storage.json` (or `$LOTUS_MINER_PATH/storage.json`) and uses `~/.lotusminer` 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. @@ -29,7 +29,7 @@ lotus-miner storage attach --init --seal ### Filter sector types -You can filter for what types of sectors are allowed in each sealing path by adjusting the configuration file that: `/sectorstorage.json`. +You can filter for what sectors types are allowed in each sealing path by adjusting the configuration file in: `/sectorstorage.json`. ```json { @@ -57,7 +57,7 @@ This location can be made of large capacity, albeit slower, spinning-disks. ### Filter sector types -You can filter for what sector types that are allowed in each sealing path by adjusting the configuration file in: `/sectorstorage.json`. +You can filter for what sector types that are allowed in each storage path by adjusting the configuration file in: `/sectorstorage.json`. ```json { @@ -85,14 +85,43 @@ Valid values for `AllowTypes` and `DenyTypes` are: Any other value will generate a warning and be ignored. +A very basic setup where you want to seperate unsealed and sealed sectors could be achieved by: + +- Add "DenyTypes": ["unsealed"] to long-term storage path(s) where you want to store the sealed sectors. +- Add "AllowTypes": ["unsealed"] to long-term storage path(s) where you want to store the unsealed sectors. + +{{< alert icon="tip">}} +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. +{{< /alert >}} + ## Listing storage locations +You can see all your storage locations with the `lotus-miner storage list` command: + ```sh lotus-miner storage list +007bc396-cf31-4493-b75a-412e8fdccc78: + [######################################### ] 363 GiB/436.3 GiB 83% + Unsealed: 0; Sealed: 0; Caches: 0; Reserved: 0 B + Weight: 10; Use: Seal + Local: /root/sealing + URL: http://127.0.0.1:2345/remote + +Storage3: + [######################################### ] 363 GiB/436.3 GiB 83% + Unsealed: 5; Sealed: 0; Caches: 0; Reserved: 0 B + Weight: 10; Use: Store + Allow Types: unsealed + Local: /root/storage3 + URL: http://127.0.0.1:2345/remote ``` -## Updating locations +### Detach storage + +## Redeclaring locations To move data from one location to another, follow the instructions in the [Miner maintenance guide]({{< relref "maintenance#changing-storage-locations" >}}). + + To fully remove one location, edit the `storage.json` manually and re-start your miner. From ddfa8304ecb5b7f89711570d005b657ac9ef2d64 Mon Sep 17 00:00:00 2001 From: Phi Date: Thu, 28 Jul 2022 15:00:12 +0200 Subject: [PATCH 3/9] Seperate sealed and unsealed Seperate sealed and unsealed --- .../operate/custom-storage-layout.md | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index b3ff1967..5297a633 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -85,10 +85,14 @@ Valid values for `AllowTypes` and `DenyTypes` are: Any other value will generate a warning and be ignored. +### Seperate sealed and unsealed + A very basic setup where you want to seperate unsealed and sealed sectors could be achieved by: -- Add "DenyTypes": ["unsealed"] to long-term storage path(s) where you want to store the sealed sectors. -- Add "AllowTypes": ["unsealed"] to long-term storage path(s) where you want to store the unsealed sectors. +- Add `"DenyTypes": ["unsealed"]` to long-term storage path(s) where you want to store the sealed sectors. +- Add `"AllowTypes": ["unsealed"]` to long-term storage path(s) where you want to store the unsealed sectors. + +This setting will still allow for `cache` and `update-cache` files to be put in the storage path that allows for `unsealed` sectors in it. If you want to completly deny all other sector types then `unsealed` in this path, you should add all other valid values to the `"DenyTypes"` for that storage path. {{< alert icon="tip">}} 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. @@ -98,30 +102,30 @@ If there are existing files with disallowed types in a storage path, those files You can see all your storage locations with the `lotus-miner storage list` command: -```sh +```shell lotus-miner storage list -007bc396-cf31-4493-b75a-412e8fdccc78: - [######################################### ] 363 GiB/436.3 GiB 83% - Unsealed: 0; Sealed: 0; Caches: 0; Reserved: 0 B - Weight: 10; Use: Seal - Local: /root/sealing - URL: http://127.0.0.1:2345/remote - -Storage3: - [######################################### ] 363 GiB/436.3 GiB 83% - Unsealed: 5; Sealed: 0; Caches: 0; Reserved: 0 B - Weight: 10; Use: Store - Allow Types: unsealed - Local: /root/storage3 - URL: http://127.0.0.1:2345/remote -``` -### Detach storage +[########## ] 1.521 TiB/6.93 TiB 21% + Unsealed: 1; Sealed: 2; Caches: 2; Reserved: 0 B + Weight: 10; Use: Seal + Local: /root/sealing + URL: http://127.0.0.1:2345/remote + +Storage: +[############## ] 27.61 TiB/96.64 TiB 28% + Unsealed: 411; Sealed: 471; Caches: 471; Reserved: 0 B + Weight: 10; Use: Store + Allow Types: unsealed + Local: /root/storage3 + URL: http://127.0.0.1:2345/remote +``` -## Redeclaring locations +### Detach storage paths -To move data from one location to another, follow the instructions in the [Miner maintenance guide]({{< relref "maintenance#changing-storage-locations" >}}). +You can detach a storage path with the `lotus-miner storage detach /path/to/storage` command. Please note that if you are detaching a storage path forever you should make sure that there are no leftover sectors in the storage path. +## Updating locations +You can update a sectors location with the `lotus-miner storage redeclare` command if you want to move sector data from one storage path to another storage path. If moving sectors to a remote server its recommended to use a utility like rsync or similar. -To fully remove one location, edit the `storage.json` manually and re-start your miner. +After you have transferred the sector files to the new storage path you can redeclare them in that path with. \ No newline at end of file From 7cd129a2012ff4314e811f0e901dd1483d7c3075 Mon Sep 17 00:00:00 2001 From: Phi Date: Thu, 11 Aug 2022 11:09:16 +0200 Subject: [PATCH 4/9] Updating storage location Adding instruction to how you can safely update storage locations for sectors. --- .../operate/custom-storage-layout.md | 59 +++++++++++++++++-- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index 5297a633..dda62316 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -105,19 +105,28 @@ You can see all your storage locations with the `lotus-miner storage list` comma ```shell lotus-miner storage list +Sealing: [########## ] 1.521 TiB/6.93 TiB 21% Unsealed: 1; Sealed: 2; Caches: 2; Reserved: 0 B Weight: 10; Use: Seal Local: /root/sealing URL: http://127.0.0.1:2345/remote -Storage: -[############## ] 27.61 TiB/96.64 TiB 28% - Unsealed: 411; Sealed: 471; Caches: 471; Reserved: 0 B +Storage-Unsealed: +[############## ] 23.61 TiB/96.64 TiB 24% + Unsealed: 411; Sealed: 0; Caches: 0; Reserved: 0 B Weight: 10; Use: Store Allow Types: unsealed Local: /root/storage3 URL: http://127.0.0.1:2345/remote + +Storage-Sealed: +[############## ] 27.61 TiB/96.64 TiB 28% + Unsealed: 0; Sealed: 471; Caches: 471; Reserved: 0 B + Weight: 10; Use: Store + Allow Types: sealed + Local: /root/storage2 + URL: http://127.0.0.1:2345/remote ``` ### Detach storage paths @@ -126,6 +135,46 @@ You can detach a storage path with the `lotus-miner storage detach /path/to/stor ## Updating locations -You can update a sectors location with the `lotus-miner storage redeclare` command if you want to move sector data from one storage path to another storage path. If moving sectors to a remote server its recommended to use a utility like rsync or similar. +You can update a sectors location with the `lotus-miner storage redeclare` command if you want to move sector data from one storage path to another storage path. If moving sectors to a storage path on a seperate server its recommended to use a utility like rsync or similar that has checksum on both ends. If moving data to a seperate server, it is also good practice to keep the important sector files like sealed sectors and cache until you have passed the first windowPoSt with the new storage location. + +1. To redeclare sector(s) in another storage path, first copy the sector file to the new location: + +```shell +rsync -avP +sending incremental file list +s-t01024-1 +[......] +sent 537,002,093 bytes received 35 bytes 358,001,418.67 bytes/sec +total size is 536,870,912 speedup is 1.00 +``` +2. Redeclare the sector(s) in the new storage path. + +```shell +lotus-miner storage redeclare --all /destination/path +``` + +You should now be able to see that the sectors has been redeclared in the new path. You also have the option to specify the `--id` of the storage path when redeclaring instead of using the actual path. + +3. Move sector(s) from the old storage-path to a backup folder. + +```shell +rsync -avP --remove-source-files +sending incremental file list +sealed/ +sealed/s-t01024-1 +[......] +sent 537,002,093 bytes received 35 bytes 358,001,418.67 bytes/sec +total size is 536,870,912 speedup is 1.00 +``` + +4. Drop index entries with missing files in the old storage path + +```shell +lotus-miner storage redeclare --all --drop-missing /old/path +``` + +You should now be anle to see that the sectors entries has been removed from the old path. + +5. Pass windowPoSt and remove the backup -After you have transferred the sector files to the new storage path you can redeclare them in that path with. \ No newline at end of file +After passing you first windowPoSt(s), or running `lotus-miner proving compute window-post [deadlineIndex]` for the deadline(s) that includes the sectors moved to the new storage path, you can safely delete the backup files. \ No newline at end of file From d181453dd4e36bf2a6848a1975cd5ce5774e8ec4 Mon Sep 17 00:00:00 2001 From: Phi-rjan Date: Thu, 11 Aug 2022 13:08:57 +0200 Subject: [PATCH 5/9] Update content/en/storage-providers/operate/custom-storage-layout.md Co-authored-by: TippyFlits --- content/en/storage-providers/operate/custom-storage-layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index dda62316..b4e36b82 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -15,7 +15,7 @@ toc: true If you used the `--no-local-storage` flag during the [miner initialization]({{< relref "../setup/initialize#miner-initialization" >}}), you should specify the disk locations for sealing (fast SSD recommended) and long-term storage. -The `lotus-miner` keeps track of defined storage locations in in `~/.lotusminer/storage.json` (or `$LOTUS_MINER_PATH/storage.json`) and uses `~/.lotusminer` path as default. +The `lotus-miner` keeps track of defined storage locations in `~/.lotusminer/storage.json` (or `$LOTUS_MINER_PATH/storage.json`) and uses the `~/.lotusminer` 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. From 72794c3573ce0fffba4d046b041bea22ac762bc9 Mon Sep 17 00:00:00 2001 From: Phi-rjan Date: Thu, 11 Aug 2022 13:09:04 +0200 Subject: [PATCH 6/9] Update content/en/storage-providers/operate/custom-storage-layout.md Co-authored-by: TippyFlits --- content/en/storage-providers/operate/custom-storage-layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index b4e36b82..a6064107 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -47,7 +47,7 @@ You can filter for what sectors types are allowed in each sealing path by adjust ## Custom location for storing -Once the _sealing_ process is completed, sealed sectors are moved to the _store_ location, which can be specified as follow: +Once the _sealing_ process is completed, sealed sectors are moved to the _store_ location, which can be specified as follows: ```sh lotus-miner storage attach --init --store From 7b16622e12c7a198bb75e218477d7d219e3645ca Mon Sep 17 00:00:00 2001 From: Phi-rjan Date: Thu, 11 Aug 2022 13:09:14 +0200 Subject: [PATCH 7/9] Update content/en/storage-providers/operate/custom-storage-layout.md Co-authored-by: TippyFlits --- content/en/storage-providers/operate/custom-storage-layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index a6064107..7d18e76c 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -92,7 +92,7 @@ A very basic setup where you want to seperate unsealed and sealed sectors could - Add `"DenyTypes": ["unsealed"]` to long-term storage path(s) where you want to store the sealed sectors. - Add `"AllowTypes": ["unsealed"]` to long-term storage path(s) where you want to store the unsealed sectors. -This setting will still allow for `cache` and `update-cache` files to be put in the storage path that allows for `unsealed` sectors in it. If you want to completly deny all other sector types then `unsealed` in this path, you should add all other valid values to the `"DenyTypes"` for that storage path. +Setting only `unsealed` for `AllowTypes` will still allow `cache` and `update-cache` files to be placed in this storage path. If you want to completely deny all other types of sectors in this path, you can add additional valid values to the `"DenyTypes"` field. {{< alert icon="tip">}} 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. From df48b97d3433cebed1664d3e250cadf151a81aa4 Mon Sep 17 00:00:00 2001 From: Phi-rjan Date: Thu, 11 Aug 2022 13:09:22 +0200 Subject: [PATCH 8/9] Update content/en/storage-providers/operate/custom-storage-layout.md Co-authored-by: TippyFlits --- content/en/storage-providers/operate/custom-storage-layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index 7d18e76c..0478106b 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -131,7 +131,7 @@ Storage-Sealed: ### Detach storage paths -You can detach a storage path with the `lotus-miner storage detach /path/to/storage` command. Please note that if you are detaching a storage path forever you should make sure that there are no leftover sectors in the storage path. +You can detach a storage path with the `lotus-miner storage detach /path/to/storage` command. Please note that if you are permanently detaching a storage path you should make sure that there are no leftover sectors in the storage path. ## Updating locations From 1473d2418639a7e39be2c0bd86d10624fe3b65a8 Mon Sep 17 00:00:00 2001 From: Phi-rjan Date: Thu, 11 Aug 2022 13:09:28 +0200 Subject: [PATCH 9/9] Update content/en/storage-providers/operate/custom-storage-layout.md Co-authored-by: TippyFlits --- content/en/storage-providers/operate/custom-storage-layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/storage-providers/operate/custom-storage-layout.md b/content/en/storage-providers/operate/custom-storage-layout.md index 0478106b..1abe6b8d 100644 --- a/content/en/storage-providers/operate/custom-storage-layout.md +++ b/content/en/storage-providers/operate/custom-storage-layout.md @@ -135,7 +135,7 @@ You can detach a storage path with the `lotus-miner storage detach /path/to/stor ## Updating locations -You can update a sectors location with the `lotus-miner storage redeclare` command if you want to move sector data from one storage path to another storage path. If moving sectors to a storage path on a seperate server its recommended to use a utility like rsync or similar that has checksum on both ends. If moving data to a seperate server, it is also good practice to keep the important sector files like sealed sectors and cache until you have passed the first windowPoSt with the new storage location. +You can update sector locations with the `lotus-miner storage redeclare` command if you want to move sector data from one storage path to another storage path. If moving sectors to a storage path on a separate server it's recommended to use a utility like r sync or similar that has checksum on both ends. If moving data to a separate server, it is also good practice to keep the important sector files like sealed sectors and cache until you have passed the first windowPoSt with the new storage location. 1. To redeclare sector(s) in another storage path, first copy the sector file to the new location: