2 Respuestas
- Más nuevo
- Más votos
- Más comentarios
0
Hello,
Unfortunately reducing the size of an EBS GP2 volume is not currently supported. The only available options for modifying your EBS volume are:
- Increasing the size
- Increase/decreasing the performance
- Changing the volume type
Your best option if you'd like to decrease the EBS volume size is to:
- Create a snapshot of the current volume
- Create a new volume and mount it to the existing instance
- Copy the data from the existing volume to the new volume
- Delete the old volume
While this is not a quick and easy exercise, it is one of the only ways to decrease the volume size.
Documentation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/requesting-ebs-volume-modifications.html
0
If you are using LVM you can also make this change online through pvmove command:
#add the new volume to the volume group
vgextend dbdata01 /dev/sdg
#move all the data from old to new
pvmove -i 1 --alloc anywhere /dev/sdf /dev/sdg
#remove the old volume
vgremove dbdata01 /dev/sdg
Also you can test this on a restored snapshot first on a test instance.
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 9 meses
- ¿Cómo amplío mi sistema de archivos Linux después de aumentar el volumen de EBS en mi instancia EC2?OFICIAL DE AWSActualizada hace 7 meses