Richard's Diary

Sunday, January 11, 2009

Amazon EBS Every 10G is $1/month
  1. ec2-create-volume -s 10 -z us-east-1a
    VOLUME vol-a9cf2bc0 10 us-east-1a creating 2009-01-12T02:01:55+0000
  2. ec2-describe-volumes vol-a9cf2bc0
    VOLUME vol-a9cf2bc0 10 us-east-1a available 2009-01-12T02:01:55+0000
  3. ec2-attach-volume vol-a9cf2bc0 -i i-f1cc4a98 -d /dev/sdh (this is like physically connecting device)
    ATTACHMENT vol-a9cf2bc0 i-f1cc4a98 /dev/sdh attaching 2009-01-12T02:08:01+0000
  4. yes | mkfs -t ext3 /dev/sdh (Create file system)
  5. adduser postgres;mkdir /usr/local/pgsql/data
  6. mount /dev/sdh /usr/local/pgsql/data/
  7. df -h to see storage
    /dev/sdh 10G 2M 10G 1% /usr/local/pgsql/data
  8. umount /usr/local/pgsql/data/
    1. A volume must be unmounted inside the instance before being detached
  9. ec2-detach-volume vol-a9cf2bc0
    ATTACHMENT vol-a9cf2bc0 i-f1cc4a98 /dev/sdh detaching 2009-01-12T02:08:01+0000
  10. ec2-delete-volume vol-a9cf2bc0
    VOLUME vol-a9cf2bc0
  11. ec2-describe-volumes to confirm deleted

© 2010 Picky Ricky, Inc. originalblog