vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Parted can be used to create primary and logical disk partitions, the steps that are involved are the same. To create a partition, parted uses mkpart. You can give it other parameters like primary or logical depending on the partition type that you want to create. The listed units default to megabytes (MB). To create a 10-GB partition, you start from 1 and end at 10000. You can also change the sizing units to terabytes by entering unit TB if you want to.

mkpart
5. Exit parted with quit.

quit



3. Create a file system on the new partition.

mkfs.ext3 /dev/mapper/XXXp1

It's important to select the right disk and partition when you run this command. Verify the result by printing the partition table. Under file system column, you can see ext3.
4. Create a mount point for the file system and mount it.



* Create a partition name PerfDisk or where you want to mount the file system.

mkdir /PerfDisk
* Mount the storage with the partition name.

mount /dev/mapper/XXXp1 /PerfDisk
* Check that you see your new file system listed.

df -h



5. Add the new file system to the system's /etc/fstab file to enable automatic mounting on boot.



* Append the following line to the end of /etc/fstab (by using the partition name from Step 3).

/dev/mapper/XXXp1 /PerfDisk ext3 defaults,_netdev 0 1











 Verifying MPIO configuration 

If MPIO isn't configured correctly, your storage device might disconnect and appear offline when a network outage occurs or when IBM Cloud® teams perform maintenance. MPIO ensures an extra level of connectivity during those events, and keeps an established session to the LUN with active read/write operations.



* To check whether multipath is picking up the devices, list the current configuration.
id This is the KEY_ID, it is unique and is used whenever the CLI specifies a KEY_ID 
 name The name provided when the key was created 
 type Used by the API to set the content-type in a REST call 
 algorithmType Algorithm types are advanced encryption standard (AES) or cipher block chaining (CBC) 
 createdBy The user id that created the key 
 creationDate Date and time the key was created 
 lastUpdateDate Date and time the key was last updated 
 lastRotateDate Date and time the key was last rotated; this entry only exists if the key has been rotated 
 keyVersion / id This identifies the latest version of the root key 
 keyVersion / creationDate Date and time the key material was last updated 
 extractable A boolean that determines whether the key material can leave the service. If set to false, Key Protect designates the key as a nonextractable root key used for wrap and unwrap actions. If set to true, Key Protect designates the key as a standard key that you can store in your apps and services. Once set to false it cannot be changed to true. 
 state 1 - the key is active; 2 - the key is suspended; see [key states](https://cloud.ibm.com/docs/key-protect?topic=key-protect-key-states) 
 crn The cloud resource name (CRN) 









 Required parameters 



* KEY_ID_OR_ALIAS

The v4 UUID or alias of the root key that you want to show.
* -i, --instance-id

The IBM Cloud instance ID that identifies your Key Protect instance.

You can set an environment variable instead of specifying -i with the following command: $ export KP_INSTANCE_ID=<INSTANCE_ID>.







 Optional parameters 



* -o, --output

Set the CLI output format. By default, all commands print in table format. To change the output format to JSON, use --output json.
* --key-ring

A unique, human readable name for the key-ring. Required if the user doesn't have permissions on the default key ring.









 kp key sync
This subnet must exist in the same VPC and location as your cluster, but can't be attached to your cluster or any worker nodes.



1. From the [VPC subnet dashboard](https://cloud.ibm.com/vpc/network/subnets), click New subnet.
2. Enter a name for your subnet.
3. Select the location where your cluster exists and the zone where you want to create the VPC NLB.
4. Select the name of the VPC where your cluster exists.
5. Specify the number of IP addresses to create. Because this subnet is dedicated to the VPC NLB, you might choose a smaller size, such as 16. You can't change the number of IPs that a VPC subnet has later. If you enter a specific IP range, don't use the following reserved ranges: 172.16.0.0/16, 172.18.0.0/16, 172.19.0.0/16, and 172.20.0.0/16.
6. Click Create subnet. After the subnet is provisioned, note its ID.



2. If the client that must connect to your app through the VPC NLB exists outside of the VPC and zone that you created the dedicated VPC subnet in, you must create a custom ingress routing table. Private VPC NLBs might add rules to the custom routing table to ensure service availability for some failure conditions. For more information, see the table in the [known limitations](https://cloud.ibm.com/docs/vpc?topic=vpc-nlb-limitations) and [About routing tables and routes](https://cloud.ibm.com/docs/vpc?topic=vpc-about-custom-routes).



1. From the [VPC routing tables dashboard](https://cloud.ibm.com/vpc-ext/network/routingTables), click Create.
2. Enter a name for your routing table.
3. Select the location and zone where you created the dedicated subnet.
4.
You can create a collection from the deployed Content Mining application. The collection that you create is not added to your existing Content Mining project. A new Content Mining project is created to store the collection. The collection can contain an uploaded CSV file only. The project that is generated is given the name that you specify for the collection.

Because the data that you add to this type of project is often structured, consider using the API to submit queries in the Discovery Query Language (DQL). With DQL queries, you can get information from specific fields or find specific enrichment type mentions. You cannot apply relevancy training to a Content Mining project.





 Custom 

Choose this type if you prefer not to use one of the other project types. No enrichments are applied automatically, so you can add only those enrichments that are necessary for your use case.







 Basic project defaults 

Some enrichments and query result settings are applied to each project type by default.



Basic project defaults

 Project type Default enrichments Default query result settings 

 Document Retrieval Entities, Part of Speech Facets (by Entity), Passages 
 Document Retrieval for Contracts Entities, Parts of speech, Table Understanding, and Contracts Facets (by Category, Nature, Contract Term, Contract Payment Term, Contract Type, Contract Currency, Invoice Buyer, Invoice supplier, Invoice Currency, Purchase Order Buyer, Purchase Order Supplier, Purchase Order Payment Term) and Table Retrieval 
 Conversational Search Part of Speech Passages 
 Content Mining Part of Speech None 
 Custom None Passages 







 Project limits 

The number of projects you can create depends on your Discovery plan type.



Plan details

 Plan Projects per service instance 

 Cloud Pak for Data Unlimited 
 Premium 100 
 Enterprise 100 
 Plus (includes Trial) 20 



The Sample project is excluded from the total number of projects.





 Renaming a project 

You cannot rename the Sample Project.

To rename a project after you create it, complete the following steps:



1. Go to the My Projects page.
2. Find the project that you want to rename, click the Project actions icon !
To help you to create a new lock and remove older locks in a single operation, you can also specify an optional mode at lock creation.



Table 1. Optional lock modes and their descriptions

 Mode Query parameter Description 

 Remove previous locks mode=remove_previous Removes any other locks that match the name that you specify. If any matching locks are found in the previous version of the secret, those locks are deleted when your new lock is created.<br><br>For example, suppose that the previous version of your secret contains a lock lock-x. Creating a lock and enabling the remove_previous mode on the current secret version results in removing lock-x from the previous version. 
 Remove previous locks mode=remove_previous_and_delete Same as the remove_previous option, but also permanently deletes the data of the previous secret version if it doesn't have any locks that are associated with it.<br><br>Suppose that the previous version of your secret contains a lock lock-z. Creating a lock and enabling the remove_previous_and_delete mode on the current secret version results in removing lock-z from the previous version. Additionally, because the previous version doesn't have any other locks that are attached to it, the secret data that is associated with the previous version is also deleted. 





 Creating locks on the current secret version 

The following request creates two locks on the current version of a secret. When you call the API, replace the ID variables and IAM token with the values that are specific to your Secrets Manager instance.

curl -X POST
-H "Authorization: Bearer {iam_token}" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
"locks": [
{
"name": "lock-1",
"description": "Lock for consumer 1.",
"attributes": {
"key": "value"
}
},
{
"name": "lock-2",
"description": "Lock for consumer 2.",
"attributes": {
"key": "value"
}
}
]
}'
You can also create toolchains by [using Terraform](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-toolchains_getting_started&interface=terraform).

The following example creates a toolchain and a pipeline by using the specified Terraform resources.

data "ibm_resource_group" "group" {
name = "default"
}

resource "ibm_cd_toolchain" "my_toolchain" {
name = "terraform_toolchain"
resource_group_id = data.ibm_resource_group.group.id
}

resource "ibm_cd_toolchain_tool_pipeline" "my_pipeline_tool" {
parameters {
name = "terraform-pipeline-integration"
}
toolchain_id = ibm_cd_toolchain.my_toolchain.id
}

resource "ibm_cd_tekton_pipeline" "my_tekton_pipeline" {
worker {
id = "public"
}
pipeline_id = ibm_cd_toolchain_tool_pipeline.my_pipeline_tool.tool_id
}
Show more

For more information about the [ibm_cd_toolchain_tool_pipeline](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cd_toolchain_tool_pipeline) and [ibm_cd_tekton_pipeline](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cd_tekton_pipeline) resources, see the argument reference details in the Terraform Registry Documentation.
3. Initialize the Terraform CLI, if required.

terraform init
4. Create a Terraform execution plan. This plan summarizes all of the actions that must run to create a toolchain.

terraform plan
5. Apply the Terraform execution plan. Terraform takes all of the required actions to create the toolchain.

terraform apply
You can also create toolchains by [using Terraform](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-toolchains_getting_started&interface=terraform).

The following example creates a toolchain and a pipeline by using the specified Terraform resources.

data "ibm_resource_group" "group" {
name = "default"
}

resource "ibm_cd_toolchain" "my_toolchain" {
name = "terraform_toolchain"
resource_group_id = data.ibm_resource_group.group.id
}

resource "ibm_cd_toolchain_tool_pipeline" "my_pipeline_tool" {
parameters {
name = "terraform-pipeline-integration"
}
toolchain_id = ibm_cd_toolchain.my_toolchain.id
}

resource "ibm_cd_tekton_pipeline" "my_tekton_pipeline" {
worker {
id = "public"
}
pipeline_id = ibm_cd_toolchain_tool_pipeline.my_pipeline_tool.tool_id
}

For more information about the [ibm_cd_toolchain_tool_pipeline](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cd_toolchain_tool_pipeline) and [ibm_cd_tekton_pipeline](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cd_tekton_pipeline) resources, see the argument reference details in the Terraform Registry Documentation.
3. Initialize the Terraform CLI, if required.

terraform init
4. Create a Terraform execution plan. This plan summarizes all of the actions that must run to create a toolchain.

terraform plan
5. Apply the Terraform execution plan. Terraform takes all of the required actions to create the toolchain.

terraform apply
* cloud-object-storage.object-object-lock-legal-hold.create
* cloud-object-storage.object-object-lock-legal-hold.read
* cloud-object-storage.object-object-lock-retention.create
* cloud-object-storage.object-object-lock-retention.read



For cloud-object-storage.bucket-object-lock.create events, the following fields provide extra information:



 Field Description 

 requestData.object_lock_configuration.enabled Indicates that Object Lock is enabled on the bucket 
 requestData.object_lock_configuration.defaultRetention.mode Indicates COMPLIANCE mode is active - GOVERNANCE mode is not yet supported. 
 object_lock_configuration.defaultRetention.years The default retention period in years. 
 object_lock_configuration.defaultRetention.days The default retention period in days. 



Only object_lock_configuration.defaultRetention.years or object_lock_configuration.defaultRetention.days will be present, but not both at the same time.

For operations on protected objects, the following fields may be present:



 Field Description 

 requestData.object_lock_protection.legal_hold Indicates that a legal hold is in force on the object version. 
 requestData.object_lock_protection.retention.mode Indicates COMPLIANCE mode is active on the object version - GOVERNANCE mode is not yet supported. 
 requestData.object_lock_protection.retention.retain_until_date Indicates the date that object version is eligible for deletion. After this date the object is no longer delete protected based on a retention date. 







 REST API examples 

The following examples are shown using cURL for ease of use. Environment variables are used to represent user specific elements such as $BUCKET, $TOKEN, and $REGION. Note that $REGION would also include any network type specifications, so sending a request to a bucket in us-south using the private network would require setting the variable to private.us-south.



 Enable object lock on a bucket 

The Object Lock configuration is provided as XML in the body of the request. New requests will overwrite any existing replication rules that are present on the bucket.

An Object Lock configuration must include one rule.



 Header Type Description
$ ibmcloud kp key create my-root-key

Creating key: 'my-root-key', in instance: '390086ac-76fa-4094-8cf3-c0829bd69526'...
OK
Key ID Key Name
807eb0a6-cc10-4bfe-8331-41a6f712c4ea my-root-key

 create a new key and wrap it with the root key, creating a DEK (this is the ciphertext)
$ ibmcloud kp key wrap 807eb0a6-cc10-4bfe-8331-41a6f712c4ea

Wrapping key...
OK
Ciphertext
eyJjaXBoZXJ0ZXh0IjoiKzhjbHVqcUNP ...<redacted>... NmY3MTJjNGViIn0=

 capture the ciphertext
$ CIPHERTEXT=eyJjaXBoZXJ0ZXh0IjoiKzhjbHVqcUNP ...<redacted>... NmY3MTJjNGViIn0=

 unwrap the ciphertext to reveal the plaintext (DEK)
$ ibmcloud kp key unwrap 807eb0a6-cc10-4bfe-8331-41a6f712c4ea $CIPHERTEXT

Unwrapping key...
OK
Plaintext Rewrapped Plaintext
mXW4GmBhkRG1+Dzkx1D6dMX99a4KyYwtwbghaaLEQZ0=





 Example 2 

Generate a base64-encoded data encryption key (DEK) and wrap it with the root key.

 create a root key
$ KEY_ID=$(ibmcloud kp key create my-root-key --output json | jq -r '.["id"]')

$ echo $KEY_ID
Use ibmcloud cbr <command> — help for a full list of options and parameters. For example, ibmcloud cbr rule-create — help outputs parameters for rule creation.





 Creating rules in Terraform 

To create rules using Terraform, see [IBM Cloud Provider](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs) in the [Terraform Registry](https://registry.terraform.io/).

To create a rule, you need the appropriate Cloud Databases service_name:



* databases-for-etcd
* databases-for-elasticsearch
* databases-for-mongodb
* databases-for-postgresql
* databases-for-redis
* messages-for-rabbitmq
* databases-for-cassandra
* databases-for-enterprisedb
* database-for-mysql



The ibm_cbr_rule provides a resource for cbr_rule and allows a cbr_rule to be created, updated, and deleted.

Create a rule by using a command like:

resource "ibm_cbr_rule" "cbr_rule" {
contexts {
attributes {
name = "networkZoneId"
value = "559052eb8f43302824e7ae490c0281eb"
}
attributes {
name = "endpointType"
value = "private"
}
}
description = "this is an example of a rule with one context one zone"
enforcement_mode = "enabled"
operations {
api_types {
api_type_id = "api_type_id"
}
}
resources {
attributes {
name = "accountId"
value = "12ab34cd56ef78ab90cd12ef34ab56cd"
}
attributes {
name = "serviceName"
value = "network-policy-enabled"
}
tags {
name = "tag_name"
value = "tag_value"
}
}
}
The user creates a persistent volume claim (PVC) that specifies the storage type, storage class, size in gigabytes, number of IOPS, and billing type. The storage class determines the type of storage that is provisioned and the allowed ranges for size and IOPS. Creating a PVC in a cluster automatically triggers the storage plug-in for the requested type of storage to provision storage with the given specification.
2. The storage device is automatically ordered and provisioned into your IBM Cloud infrastructure account. The billing cycle for your storage device starts.
3. The storage plug-in automatically creates a persistent volume (PV) in the cluster, a virtual storage device that points to the actual storage device in your IBM Cloud infrastructure account.
4. The PVC and PV are automatically connected to each other. The status of the PVC and the PV changes to Bound. You can now use the PVC to mount persistent storage to your app. If you delete the PVC, the PV and related storage instance are also deleted.



Review the following common use cases for dynamic provisioning:



1. Provision storage when needed: Instead of pre-providing persistent storage for developers and paying for storage that is not used, you can give developers the freedom to provision storage when they need it. To determine the type of storage that the developer can provision, you can define storage classes.
2. Automate the creation of PVC, PV, and storage device: You want to automatically provision and deprovision storage without manual intervention from a cluster admin.
3. Create and delete storage often: You have an app or set up a continuous delivery pipeline that creates and removes persistent storage regularly. Persistent storage that is dynamically provisioned with a non-retaining storage class can be removed by deleting the PVC.







 Static provisioning 

If you have an existing persistent storage device in your IBM Cloud infrastructure account, you can use static provisioning to make the storage instance available to your cluster.

Static provisioning is a feature that is native to Kubernetes and that allows cluster administrators to make existing storage devices available to a cluster. As a cluster administrator, you must know the details of the storage device, its supported configurations, and mount options.
Alternatively, from the [Code Engine console](https://cloud.ibm.com/codeengine/overview), you can select Start creating from either Run a container image or Run your source code, and then click Create project from the Start creating page.
2. Choose a location to deploy the project.
3. Enter a name for the project. The name must be unique for all your projects within the specified location.
4. Choose the resource group where you want to create the project.
5. Click Create.



To view the service instance for the project resource, go to your [IBM Cloud dashboard](https://cloud.ibm.com/resources) and find your project name in Code Engine.





 Creating a project with the CLI 

When you create a project, it is automatically selected as the current context. To create a project that is not automatically selected, use the --no-select option.



1. Install the [Code Engine CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli). Target the resource group that you want to use for the project.
2. Create a project with the [project create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-project-create) command. Use a project name that is unique to your region.

ibmcloud ce project create --name PROJECT_NAME

Example output

Creating project 'myproject'...
OK
3. Verify that your new project is created with the [project get](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-project-get) command.

ibmcloud ce project get --name PROJECT_NAME

Example output

Getting project 'myproject'...
OK
Name: myproject
ID: 01234567-abcd-abcd-abcd-abcdabcd1111
Status: active
Selected: true
Region: us-south
Resource Group: default
pvcreate /dev/mapper/${ERS_pvid}

Sample output:

 pvcreate /dev/mapper/${ERS_pvid}
Physical volume "/dev/mapper/360050768108103357000000000002e31" successfully created.





 Creating volume groups 

Create the volume group for the ASCS.

On NODE1, run the following command.

vgcreate ${ASCS_vg} /dev/mapper/${ASCS_pvid}

Verify that the System ID is set.

vgs -o+systemid

Sample output:

 vgs -o+systemid
VG PV LV SN Attr VSize VFree System ID
s01ascsvg 1 0 0 wz--n- <50.00g <50.00g cl-sap-1

Create the volume group for the ERS.

On NODE2, run the following command.

vgcreate ${ERS_vg} /dev/mapper/${ERS_pvid}

Verify that the System ID is set.

Sample output:

 vgs -o+systemid
VG PV LV SN Attr VSize VFree System ID
s01ersvg 1 0 0 wz--n- <50.00g <50.00g cl-sap-2





 Creating logical volumes and file systems 

Create the logical volume for the ASCS and format it as XFS file system.

On NODE1, run the following commands.

lvcreate -l 100%FREE -n ${ASCS_lv} ${ASCS_vg}

mkfs.xfs /dev/${ASCS_vg}/${ASCS_lv}

Create the logical volume for the ERS and format it as XFS file system.

On NODE2, run the following commands.

lvcreate -l 100%FREE -n ${ERS_lv} ${ERS_vg}
[Creating an IBM Cloud Kubernetes Service cluster on VPC infrastructure](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templateprovisioning-terraform-template)



* [Description](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templateprovisioning-desc)
* [Objectives](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templateprovisioning-tut-obj)
* [Time required](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templateprovisioning-timereq)
* [Audience](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templateprovisioning-tut-audience)
* [Prerequisites](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templateprovisioning-tut-prereq)
* [Creating your Schematics Workspace](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templatecreate-wkspace-for-cluster)
* [Creating your IBM Cloud Schematics Workspace](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templatecreate-tut-wks)
* [Planning and applying the Terraform template](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templatetut-plan-wks)
* [What's next?](https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-templatetut_whats_next)