0

i have a huuuuge problem.

Created a snapshot and image from my instance...instance has 1000GB of disk.

Now i need to reduce it but everytime i try to create an image or a snapshot from that, i get the same error "Disk need to be at least 1000GB".

There is a way to reduce disk size directly on instance? Some workaround?

tidpe
  • 201
  • 3
  • 12
  • Google Cloud does not provide tools for resizing the file systems and partitions inside the snapshot. You can create a disk from the snapshot, use a third-party tool to resize and then copy the partitions to a smaller disk, then create a new snapshot. Another option is to create another disk, format and then copy the data from the exising disk to the new disk. – John Hanley Sep 19 '19 at 18:25

2 Answers2

1

You can only resize a zonal persistent disk to increase its size. You cannot reduce the size of a zonal persistent disk.

When storage parameters cannot be changed, create new storage. Get out and adapt a storage migration playbook.

One way to do so is with logical volumes. With Linux LVM:

  • Make the LV fit the new size with lvreduce --resizefs
  • Add a smaller disk with vgextend
  • pvmove to the smaller disk
  • vgreduce the old PV
John Mahowald
  • 32,050
  • 2
  • 19
  • 34
0

As far as I know, it is not possible to decrease the size of a Disk. You can only increment the size.

Source: https://cloud.google.com/compute/docs/disks/add-persistent-disk

grimmjow_sms
  • 146
  • 4