- Newest
- Most votes
- Most comments
Hello.
Data on instance store volumes remains even after restarting EC2.
However, data will be lost if you stop it.
If you want to move the EC2 physical host yourself, you will need to stop and start EC2, in which case your data will be lost.
If EC2 maintenance is a stop event that is notified to your AWS account, the data on the instance store volume will be lost, so you must make sure to copy files etc. somewhere.
https://aws.amazon.com/maintenance-help/?nc1=h_ls
- Stop event - Stop events are scheduled events that stop the instance during the scheduled time window. When you start the instance again, it is moved to a new host. Alternately, you can stop-start the instance any time prior to the date/time specified in the scheduled event notification to avoid the event. If you use an instance with instance store volumes then you should backup the data prior to the scheduled stop event or before you stop the instance, as the data on the instance store volume is lost when the instance is stopped.
- Reboot event - Reboot events are scheduled events that reboot the instance during the scheduled time window. Instance store data is preserved for a reboot event. You can stop-start the instance any time prior to the date/time specified in the scheduled event notification to avoid the event.
- Network event - Network events are scheduled events where the network connectivity of the instance is lost for a brief period but is restored after the event. The instance continues to run throughout the period. You can stop-start the instance any time prior to the date/time specified in the scheduled event notification to avoid the event.
Most likely your root volume is also on EBS and won't be affected by stopping and starting the instance. If you want to verify this is the case, you can check with df and lsblk commands the location of your root volume.
Thank you, with your help it is less confusing.
Hello,
Data in the instance store volume will not be deleted when the instance is rebooted. Only during stop/start the instance store data will be lost.
In your case it is a scheduled reboot which is planned from AWS end and hence the instance store data will be preserved. However, as a precautionary measure it is recommended to take a backup of the data in instance store volume. For more details on how to backup the data in instance store volume to EBS please refer the following link.
Regarding the contradictory part, in order to avoid the scheduled reboot, you can perform a stop/start before the mentioned date during your convenient time, so that the instance will be migrated to another healthy host and there will not be a scheduled maintenance for the instance.
However, if you perform a stop/start, the data in instance store will be lost, but the scheduled maintenance reboot will not occur.
Perfectly clear, thank you. It means no matter when (before or after the scheduled maintenance), any EC2 instance that is stopped will see its local volume lost (which makes sense). I marked Riku answer as solving my issue, but both of you provided me enough information to be confident about the scheduled maintenance, thank you again!
Relevant content
- asked a year ago
- asked 2 years ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago
Thak you, this is now less confusing.