Reduce Persistent Disk Size

前端 未结 2 1801
别那么骄傲
别那么骄傲 2020-12-17 10:11

I have a persistent disk of 100GB attached to a VM instance. But I don\'t need all that space, and thus don\'t want to be billed for it. It has some data as

相关标签:
2条回答
  • 2020-12-17 10:42

    This is not possible TMK. You'll need to create another disk and copy the data over, though you can expand a snapshot to a larger disk.

    0 讨论(0)
  • 2020-12-17 10:49

    I had to recently just do this. I originally created a disk 500GB, but quickly realized that was a mistake as the disk is only using 20GB.

    The high-level process involves creating a new instance with the desired smaller disk size. Stopping all services that write to the larger disk (think MySQL/MongoDB, NGINX/Apache, etc). Then, using rsync copy over all files from the larger disk to the smaller disk excluding a subset of instance specific data.

    0 讨论(0)
提交回复
热议问题