Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kai-kou/326a735546bf69eaf91218a91298b462 to your computer and use it in GitHub Desktop.
Save kai-kou/326a735546bf69eaf91218a91298b462 to your computer and use it in GitHub Desktop.
Amazon Managed BlockchainでPeerノードのストレージ容量は変更可能か

Amazon Managed BlockchainでPeerノードのストレージ容量は変更可能か

======================================= 種類:動作検証 cloudpack担当者名:甲斐 甲 AWSアカウントID:122375472665 リージョン:us-east-1

問い合わせ内容:Amazon Managed BlockchainでPeerノードのストレージ容量は変更可能か

お世話になっております。cloudpackの 甲斐 といいます。 上記AWSアカウント 122375472665 につきまして問い合わせさせていただきます。

※※※※※

【問い合わせ内容】

現在、Amazon Managed Blockchain検証のため、Hyperledger Fabricフレームワークにてブロックチェーンネットワークを構築しチェーンコードの開発を行っております。

その際に、Peerノードのストレージ容量が枯渇し、チェーンコードのデプロイができなくなる、Peerノードへアクセスできなくなる、などの問題が発生し、Peerノードのストレージ容量を増やせないか調べております。エラー詳細は【AWSリソース情報】にまとめております。

ネットワークタイプは「Starter Edition」を利用しています。

ストレージ容量についてはチェーンコードを利用してPeerノード内でOSコマンドを実行してbc.t3.small、bc.t3.mediumのインスタンスタイプで15GBであることを確認しました。

Filesystem                                 Size  Used Avail Use% Mounted on
overlay                                     15G  4.0G   10G  29% /
tmpfs                                       64M     0   64M   0% /dev
tmpfs                                      979M     0  979M   0% /sys/fs/cgroup
/dev/mapper/app_storage_vg-app_storage_lv   15G  4.0G   10G  29% /etc/hosts
shm                                         64M     0   64M   0% /dev/shm
tmpfs                                      979M     0  979M   0% /proc/acpi
tmpfs                                      979M     0  979M   0% /sys/firmware

詳細は下記にまとめています。

Amazon Managed BlockchainのPeerノードでディスク容量が枯渇してハマった - Qiita https://qiita.com/kai_kou/items/1886ebdbccaa5407a352

Amazon Managed Blockchainによるブロックチェーンネットワークの構築は下記の手順で進めて動作検証しております。

Amazon Managed BlockchainでHyperledger Fabricのブロックチェーンネットワークを構築してみた - Qiita https://qiita.com/kai_kou/items/e02e34dd9abb26219a7e

現在、ストレージ容量が変更可能なのか、変更できない場合、容量不足に対する対策はあるのか、ご教授いただけますと助かります。

【調査・確認した内容】

価格ページにストレージ拡張できるような記述がありました。

Amazon Managed Blockchain Pricing https://aws.amazon.com/managed-blockchain/pricing/

Peer node storage elastically scales for storing the blockchain ledger and chaincode applications. Peer node storage is charged in GB-month increments.

また、下記ドキュメントでPeerノード作成時にストレージ容量選択できるような記述がありました。

Work with Peer Nodes in a Managed Blockchain Network - Amazon Managed Blockchain https://docs.aws.amazon.com/managed-blockchain/latest/managementguide/managed-blockchain-hyperledger-peer-nodes.html

When you create a peer node, you select the following characteristics:

Managed Blockchain instance type

(略)

Allocated storage

This is the amount of storage in GiB that is available to the peer node for storing local copies of the ledger. Storage rates apply.

Availability Zone

(略)

ストレージ容量を指定してPeerノードを作成できそうでしたのでドキュメントを確認しましたが該当する記述、APIは見当たりませんでした。

確認したドキュメントは以下となります。 ※すべて英語版で確認しています。

CreateNode - Amazon Managed Blockchain https://docs.aws.amazon.com/managed-blockchain/latest/APIReference/API_CreateNode.html

NodeConfiguration - Amazon Managed Blockchain https://docs.aws.amazon.com/managed-blockchain/latest/APIReference/API_NodeConfiguration.html

AWS SDK for C++: Aws::ManagedBlockchain::Model::NodeConfiguration Class Reference https://sdk.amazonaws.com/cpp/api/LATEST/class_aws_1_1_managed_blockchain_1_1_model_1_1_node_configuration.html

managedblockchain - Amazon Web Services - Go SDK https://docs.aws.amazon.com/sdk-for-go/api/service/managedblockchain/#NodeConfiguration

NodeConfiguration (AWS SDK for Java - 1.11.566) https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/managedblockchain/model/NodeConfiguration.html

Class: Aws::ManagedBlockchain::Types::NodeConfiguration — AWS SDK for Ruby V2 https://docs.aws.amazon.com/sdkforruby/api/Aws/ManagedBlockchain/Types/NodeConfiguration.html

【AWSリソース情報】

2019/06/06時点でのリソース情報となります。

  • Amazon Managed Blockchain
    • Network: n-MS4CIYZZIRHSRMOYLSWBY42KPQ
      • Member: m-RV5JEFL66JBNDKPM6CQOBBQHEQ
        • Peerノード:
          • nd-76UB5SE6PVDKZLQYLULEPRZ2AQ(削除済): デプロイ時にディスク容量枯渇でエラー
          • nd-OQ3RDLUAXNFAFGNZRHQNP6ZVOU: 作成後1日で接続エラー
          • nd-BK7ITXOTYRCL7AWOLB4XIV3MGY: 現在利用中
  • VPC: vpc-03fc0778
    • Subnet: subnet-a1f9b58e
    • セキュリティグループ: sg-0ca09751794fb5a08
    • エンドポイント: vpce-058eb38ed4327162f

デプロイ時のエラー内容

Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction d165aadcc963ff7b3afd404ea76e1209cd84425be35630b489d3f57b0e4117d5: error starting container: error starting container: Error processing tar file(exit status 1): write /usr/local/src/node_modules/grpc/deps/grpc/src/core/lib/iomgr/ev_epollex_linux.cc: no space left on device

接続失敗時のエラー内容

Error: error getting endorser client for list: endorser client failed to connect to nd-oq3rdluaxnfafgnzrhqnp6zvou.m-rv5jefl66jbndkpm6cqobbqheq.n-ms4ciyzzirhsrmoylswby42kpq.managedblockchain.us-east-1.amazonaws.com:30005: failed to create new connection: context deadline exceeded

※※※※※

それではどうぞよろしくお願いいたします。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment