Reduce Persistent Disk Size

前端 未结 2 1800
别那么骄傲
别那么骄傲 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: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.

提交回复
热议问题