Mengubah ukuran disk. Baik disk sistem maupun disk data dapat diubah ukurannya.
Deskripsi operasi
Sebelum Anda mengubah ukuran disk, minta format partisi yang digunakan oleh disk. Jika disk menggunakan format partisi MBR, disk tidak dapat diubah ukurannya melebihi 2 TiB. Jika tidak, kehilangan data mungkin terjadi. Untuk mengubah ukuran disk yang menggunakan format partisi MBR melebihi 2 TiB, kami merekomendasikan agar Anda membuat dan memasang disk data baru, gunakan format partisi GPT untuk disk data baru, lalu salin data dari disk asli ke disk baru. Untuk informasi lebih lanjut, lihat Mengubah ukuran cloud disk.
-
Kategori disk berikut mendukung pengubahan ukuran: basic disk (
cloud), ultra disk (cloud_efficiency), standard SSD (cloud_ssd), ESSD (cloud_essd), ESSD AutoPL disk (cloud_auto), standard elastic ephemeral disk (elastic_ephemeral_disk_standard), premium elastic ephemeral disk (elastic_ephemeral_disk_premium), dan ESSD regional (cloud_regional_disk_auto). -
Disk yang sedang dibuatkan snapshot tidak mendukung pengubahan ukuran. Tunggu hingga snapshot dibuat lalu ubah ukuran disk.
-
Operasi ini tidak dapat mengubah ukuran partisi atau sistem file. Setelah Anda mengubah ukuran disk, Anda harus mengalokasikan partisi dan sistem file secara manual. Untuk informasi lebih lanjut, lihat Memperluas partisi dan sistem file (Linux) dan Memperluas partisi dan sistem file (Windows).
-
Disk dengan fitur multi-attach yang diaktifkan mendukung pengubahan ukuran online dan offline. Pastikan instans tempat disk dipasang memenuhi kondisi berikut:
Untuk pengubahan ukuran online, instans harus dalam status Berjalan (
Running).Untuk pengubahan ukuran offline, instans harus dalam status Berjalan (
Running) atau Dihentikan (Stopped).
-
Pastikan disk memenuhi kondisi berikut:
Disk berada dalam status Sedang Digunakan (
In Use) atau Tersedia (Available).(Sangat disarankan) Snapshot telah dibuat untuk disk untuk mencadangkan data. Untuk informasi lebih lanjut, lihat Membuat snapshot.
Jika Anda baru saja membeli disk data, inisialisasi disk sebelum Anda mengubah ukurannya. Untuk informasi lebih lanjut, lihat Ikhtisar inisialisasi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ResizeDisk |
update |
*Disk
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DiskId |
string |
Yes |
ID disk. Anda dapat memanggil operasi DescribeDisks untuk meminta ID disk. |
d-bp67acfmxazb4p**** |
| Type |
string |
No |
Metode yang digunakan untuk mengubah ukuran disk. Nilai yang valid:
|
offline |
| NewSize |
integer |
Yes |
Ukuran disk baru. Satuan: GiB. Nilai yang valid:
Catatan
Ukuran disk baru yang ditentukan harus lebih besar dari ukuran disk asli. Jika tidak, panggilan API akan gagal. |
1900 |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilai tersebut, tetapi Anda harus memastikan bahwa nilainya unik di antara permintaan yang berbeda. ClientToken hanya dapat berisi karakter ASCII dan panjangnya tidak boleh melebihi 64 karakter. Untuk informasi lebih lanjut, lihat Cara memastikan idempotensi. |
123e4567-e89b-12d3-a456-426655440000 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| OrderId |
string |
ID pesanan yang dihasilkan. Catatan
ID pesanan hanya dikembalikan ketika Anda mengubah ukuran disk berlangganan. |
20413515388**** |
| RequestId |
string |
ID permintaan. |
F3CD6886-D8D0-4FEE-B93E-1B732396**** |
Contoh
Respons sukses
JSONformat
{
"OrderId": "20413515388****",
"RequestId": "F3CD6886-D8D0-4FEE-B93E-1B732396****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidDataDiskSize.ValueNotSupported | The specified DataDisk.n.Size beyond the permitted range, or the capacity of snapshot exceeds the size limit of the specified disk category. | |
| 400 | InvalidParameter.Conflict | %s | |
| 400 | IncompleteParamter | Some fields can not be null in this request. | |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | InvalidParam.Type | The specified type is not supported. | |
| 400 | LastOrderProcessing | The previous order is still processing, please try again later. | |
| 400 | InvalidStatus.Upgrading | The instance which the disk attachs is upgrading; please try again later. | |
| 400 | InvalidSystemDiskSize.ImageNotSupportResize | The image of the instance does not support resize. | |
| 400 | InvalidDisk.DetachedSystemDisk | The specified disk is a detached system disk, does not support this operation. | |
| 400 | OperationDenied.NotEnoughCapacity | The capacity of the current dedicated block storage cluster is not enough to expand. | |
| 400 | IncorrectDiskStatus.ReplicationStatusNotFound | Disk replication status not found. | |
| 400 | IncorrectDiskStatus.InReplication | Disk already in replication. | |
| 400 | QuotaExceed.DiskCapacity | The used capacity of disk type has exceeded the quota in the zone, %s. | |
| 400 | NoPermission.Price | The operation requires price permission. Please either apply for permission from your main account, or set the parameter AutoPay as true. | |
| 400 | NoPermission.Refund | The operation requires refund permission. Please apply for permission from your main account. | |
| 400 | InvalidOperation.InstanceRenewWithDowngradeInPlan | The operation is denied due to the specified instance has renew with downgrade record in plan. | |
| 400 | InvalidSystemDiskSize.ValueNotSupported | The specified system disk size is invalid. | |
| 400 | OperationDenied.UnfinishedOrder | The current instance has unfinished refundOrder, this operation is denied. | |
| 400 | AccountForbidden.CreateOrder | Order cannot be created due to abnormal account. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | InvalidDataDiskSize.ValueNotSupported | The specified DataDisk.n.Size beyond the permitted range, or the capacity of snapshot exceeds the size limit of the specified disk category. | |
| 403 | OperationDenied | The type of the disk does not support the operation. | |
| 403 | InvalidDiskSize.TooSmall | Specified new disk size is less than the original disk size. | |
| 403 | InvalidDiskSize.TooLarge | Specified new disk size is beyond the permitted range. | |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | DiskError | Incorrect disk status. | |
| 403 | DiskInArrears | The specified operation is denied as your disk owing fee. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | DiskCreatingSnapshot | The operation is denied due to a snapshot of the specified disk is not completed yet. | |
| 403 | InvalidDiskSize | Specified new disk size is less than or equal the original disk size. | |
| 403 | Operation.Conflict | The operation may conflicts with others. | |
| 403 | InstanceLockedForSecurity | The instance is locked due to security. | |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | |
| 403 | InvalidDiskCategory.NotSupported | The specified disk category is not supported. | |
| 403 | InvalidRegion.NotSupport | The specified region does not support resize online. | |
| 403 | InvalidInstanceStatus.NotRunning | The status of instance to which the disk attachs must be running when resizing online. | |
| 403 | InvalidOperation.InstanceTypeNotSupportOnlineResize | The instance type of the specified instance does not support resize online. | |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK needs to be added ECS tag. | |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service have no right to access your KMS. | |
| 403 | InstanceSpecModification.NotEffective | The instance which the disk attachs has been reserved for making a spec modification and not taken effective in the current contract period. | |
| 403 | InvalidDiskSize.NotSupportResizeOnline | The current size of the resource does not support resize online. | |
| 403 | SecurityRisk.3DVerification | We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email. | |
| 403 | QuotaExceeded.PostpaidDataDiskCapacity | The quota of postpaid data disk capacity exceeds. | |
| 403 | InvalidOperation.MultiAttachDiskNotSupportResizeOnline | Multi attach disk does not support resize online. | |
| 403 | InvalidDataDiskCategory.ValueNotSupported | The specified Category of Data Disk is not valid. | |
| 403 | InvalidDiskSize.NotSupportMultiAttachDisk | The specified disk size exceeds the maximum limit 65536 for enabling multi-attach. | |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.