Files
terraform/oracle/kr/increase_boot_volume.sh

30 lines
1.6 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 启动卷大小调整脚本
echo "启动卷大小调整说明"
echo "==================="
echo ""
echo "要调整A1实例的启动卷大小从100GB增加到150GB请按以下步骤操作"
echo ""
echo "1. 首先查找A1实例的OCID"
echo " oci --profile korea compute instance list --compartment-id ocid1.compartment.oc1..aaaaaaaahn5rlnycgdjdttsgir2q3v5otzzk2hyc7xrxiebzmipzskpvaaaq"
echo ""
echo "2. 查找A1实例的启动卷OCID"
echo " oci --profile korea compute instance get --instance-id <INSTANCE_OCID>"
echo ""
echo "3. 在实例详情中找到启动卷附件信息,然后获取启动卷的详细信息:"
echo " oci --profile korea bv boot-volume list --compartment-id ocid1.compartment.oc1..aaaaaaaahn5rlnycgdjdttsgir2q3v5otzzk2hyc7xrxiebzmipzskpvaaaq"
echo ""
echo "4. 使用以下命令调整启动卷大小(注意:实例必须处于终止状态才能调整大小):"
echo " oci --profile korea bv boot-volume update --boot-volume-id <BOOT_VOLUME_OCID> --size-in-gbs 150"
echo ""
echo "重要注意事项:"
echo "- 实例必须在调整启动卷大小前完全停止"
echo "- 启动卷大小只能增加,不能减少"
echo "- 调整大小后需要重新启动实例才能识别新的磁盘空间"
echo ""
echo "对于数据卷(非启动卷),可以直接在线调整大小:"
echo "oci --profile korea bv volume update --volume-id <VOLUME_OCID> --size-in-gbs <NEW_SIZE>"
echo ""
echo "如果您希望我们继续使用Terraform方法来处理存储调整请运行"
echo "cd /home/ben/terraform/oracle/kr && ./reallocate_storage.sh"