Last week I finished up shutting down LiveMosaic as Matt knew it. I thought I would post the steps I used to resize the data storage in case I need to do something similar again. Then I realized I could get geeky and morose and make the analogy between this and adjusting to life without Matt.
- Pair down the volume of Matt’s experience to my experience of him.
- Take a snapshot (A) of my experience of Matt from the instance (Build1) that was our life together.
- Create a new volume (Prometheus, sized 500G) of my experience of Matt from snapshot A.
- Create a new instance (Patience1) of my life.
- Attach volume Prometheus to instance Patience1– integrate my experience of Matt into my new experience of myself now.
- Create a new empty volume (Phoenix, sized 200G) of experience and attach to instance Patience1, aka the way forward.
- Start instance Patience1 and get a public DNS.
- Log into instance Patience1:
ssh -i Downloads/phenson.pem ec2-user@ec2-xx-xxx-xx-xxx.compute-1.amazonaws.com
- View available disk devices to help determine the correct device name to use:
cat /proc/partitions
- Create a file system on my new volume of experience:
$ sudo mkfs -t ext3 device_name
for volume Phoenix ONLY.
This step assumes that you’re mounting an empty volume. If you’re mounting a volume that already has data on it (for example, a public data set), don’t use mkfs before mounting the volume (skip to the next step instead). Otherwise you’ll format the volume and delete the existing data.
from docs.aws.amazon.com
- Create data directories and mount the volumes.
$ sudo mkdir /prometheus
$ sudo mkdir /phoenix
$ sudo mount device_name /prometheus
$ sudo mount device_name /phoenix - Restore data from the larger volume Prometheus to the smaller volume Phoenix.
sudo cp -ur /prometheus/* /phoenix
Most of this process involved sitting around (personal down time) waiting and hoping that the server would not give me hard time about copying a large amount of data just using wildcards. Background processing for me as well as diffing the two directories in chunks to make sure everything was accounted for.
- Take a snapshot (B) of the new volume Phoenix. I have arrived at point B.
- Launch a new instance Patience2 to test the process of detaching the newly sized data from one instance and reattaching to the current instance of my life. That is, repeat for the rest of my life with every change, every experience, every instance that is mine.
Yes, that was complicated!