2

I have a Windows Server 2008 instance on EC2. I need to shrink one of the drives (non-root) to a certain amount. Is there are well defined way of doing it?

Thanks

Andrew M.
  • 10,982
  • 2
  • 34
  • 29
Wajih
  • 235
  • 1
  • 3
  • 9

1 Answers1

1

There is a tutorial for Linux boxes described here, but while it may not apply directly, the concept is the same.

You'll need to:

  1. Create a snapshot of the current EBS volume.
  2. Unmount the EBS volume from the host.
  3. Create a new volume of the specified size using the previous snapshot from the first step.
  4. Remount the EBS volume.

So in essence, you're not resizing anything--you're creating a new EBS volume and transferring the content over using Amazon's built in snapshot system.

Andrew M.
  • 10,982
  • 2
  • 34
  • 29
  • Thanks, but there is one more thing. Current volume is 800GB, now I need only 400GB, and there is 380GB of space which I used up in the 800GB drive. If I by mistake allocate 370 GB (create a volume from the snapshot), will I get an error?, which I should logically thinking. Or should I allocate a new 400GB drive, attach it to the instance, copy the contents from 800GB to 400GB drive and remove the 800GB drive. Is this a good way of doing it? – Wajih Jan 02 '11 at 17:18
  • The latter would be the safest. – Andrew M. Jan 02 '11 at 19:36
  • Didn't help: Volume size 12GiB must be at least snapshot size 30GiB. –  Jan 26 '11 at 15:56
  • 1
    These steps are for increasing the volume size not the other way around! You will get the error: "The size must be at least as big as the snapshot" – Maziyar Dec 04 '13 at 06:27