This topic describes how to create an iSCSI volume in the local block gateway console.
- You have registered an Alibaba Cloud account and passed the real-name verification.
For more information, see Sign up with Alibaba Cloud.
Note We recommend that you log on to the CSG console as a RAM user. For more information, see Use RAM to implement account-based access control.
- You have activated the CSG service.
When you log on to the for the first time, you can follow the instructions on the page to activate the CSG service.
- You have deployed the local block gateway console.
- You have created an Object Storage Service (OSS) bucket. For more information, see
Create a bucket.
Note Block gateways support OSS buckets of standard and infrequent access (IA) types.
- You have added a disk on the deployment platform.
Step 1: Create a cache
Before you create an iSCSI volume that has the Cache mode enabled, you must add a cache disk to the block gateway.
- Open your browser, and in the address bar, enter
https://<IP address of the target block gateway>to connect to the local block gateway console.
- In the dialog box that appears, enter the username and password, and click OK.
- Go to the Caches page, and click Create.
- On the Create Cache dialog box that appears, select an available disk.
Disks are available only after you add the disks on the deployment platform.
- Click OK.
Step 2: Bind cloud resources
You can create shares that use OSS buckets as backend storage. One bucket corresponds to one share. You can bind a block gateway to multiple cloud resources.
- Open the local block gateway console, click Cloud Resources in the left-side navigation pane, and then click Bind.
- In Bind Cloud Resource dialog box that appears, set the following parameters.
Parameter Description Resource Name Specifies the name of the cloud resource that you want to bind. Cross-region Binding
Note The regions of the local file gateway and the OSS bucket must belong to the same time zone.
- Yes: specifies that you can access the bucket that stays in the different region from the specified gateway.
- No: specifies that you can access only the bucket that stays in the same region as the specified gateway.
Region The region where the target bucket is located. Bucket Name The name of the bucket that you want to bind to the gateway.Notice If you select an Internet endpoint of the target bucket to bind your cloud resource to the block gateway, you may be charged for external download traffic. Use SSL Specifies whether to access an OSS bucket over SSL. Valid values: Yes and No.
- Click OK.
Step 3: Create an iSCSI volume
- Open the local block gateway console, select iSCSI Volumes in the left-side navigation pane to go to the iSCSI Volumes page, and then click Create.
- In the Create iSCSI dialog box that appears, set the following parameters.
Parameter Description Name Specifies the name of the iSCSI volume that you want to create. The name must be 1 to 31 characters in length, and can contain letters and digits. Use Recovery Mode Specifies whether to restore a volume that uses the specified OSS bucket as backend storage. Valid values: Yes and No.
- Yes: uses the metadata such as the capacity of the specified volume to restore the volume.
- No: uses the specified OSS bucket to create a volume.
Capacity When you set Use Recovery Mode to No, you must set the Capacity parameter.
Valid values: 1 GB to 256 TB.
Cloud Resource Specifies the cloud resource that you have bound to the gateway. Enabled Specifies whether to enable the specified iSCSI volume.
You can set this parameter to No to disable the specified iSCSI volume.
Data Access Mode Specifies the mode that CSG uses to read and write files. Valid values: Write-through Mode and Cache Mode.
- Write-through Mode: writes files directly to an OSS bucket, and reads data directly from the bucket.
- Cache Mode: writes files to and reads files from a target local cache disk in priority. Typically, the Cache mode provides better read and write performance.
Cache When you set Data Access Mode to Cache Mode, you must specify a cache disk. Storage Allocation Unit When you set Use Recovery Mode to No, you must set the Storage Allocation Unit parameter. Valid values: 8 KB, 16 KB, 32 KB, 64 KB, and 128 KB. Default value: 32 KB.
- Click Next to go to the Summary tab, make sure that the specified information is correct, and then click OK.
- After you create the iSCSI volume, you can use the volume.