Replace the default EBS volume on Linux
Any EC2 instance you create using the ArcGIS Server Amazon Machine Images (AMIs) has an EBS volume attached. The size of this volume is set at 100 GB by default when you build your site with ArcGIS Server Cloud Builder on Amazon Web Services. If you build your site with the AWS Management Console, the size is 10 GB. If you later decide to change the drive size, you can detach it and replace it with another drive.
If you just need more space, it might be easier to add another drive instead of replacing the existing one.
Follow the workflow below to replace the attached drive (referred to as Volume A) with one of a different size (Volume B). If you need detailed steps on how to create, attach, and detach EBS volumes using the AWS Management Console, see the Amazon Web Services documentation.
- Stop your site using ArcGIS Server Cloud Builder on Amazon Web Services (not the AWS Management Console).
- Use the AWS Management Console to create and attach Volume B with the size you want. You attach it alongside Volume A at this point. When you attach, you cannot specify /dev/sdx as the device because this is already in use by Volume A.
- Start your site using Cloud Builder (not the AWS Management Console).
- Log in to your instance. For example, you can SSH into your instance:
ssh –i <your key pair file> ubuntu@<Public DNS of your EC2 instance>
Make sure you have opened port 22 in your instance’s Amazon security group before you attempt this.
- Stop ArcGIS Server as the arcgis user. For example:
sudo -u arcgis /arcgis/server/stopserver.sh
- If your ArcGIS Server instance also has a PostgreSQL geodatabase running on the same instance, stop the PostgreSQL database by running:
sudo -u postgres -i pg_ctl stop
- Copy all the data from Volume A onto Volume B. In the following steps /mnt/data-store is used as the attach location and /dev/sdf is the device field.
This procedure assumes you are mounting an empty volume. If you are mounting a volume that already has data on it, don't use mkfs before mounting the volume; otherwise you will format the volume and delete the existing data.
sudo mkfs -t ext4 /dev/sdf sudo mkdir /mnt/data-store sudo mount /dev/sdf /mnt/data-store sudo cp –rp /gisdata/* /mnt/data-store
- Stop your site using Cloud Builder.
- Log in to the AWS Management Console and display the EC2 page corresponding to your Amazon region.
- Using the AWS Management Console, detach both Volume A and Volume B from the instance.
- Once you are certain that the volumes are detached, use the AWS Management Console to attach Volume B back onto your instance. Use /dev/sdx as the device, or your instance will not start properly.
- Once you are certain that Volume B has been attached, use Cloud Builder to start your site.
- Using the AWS Management Console, delete Volume A.