Yatendra Khandelwal

  • Random
  • Archive
  • RSS
  • Ask me anything

Adding a new volume to EC2 linux instance

(Migrated from old wordpress blog post dated 12/22/2010)

Our postgres EC2 linux instance ran out of disk space so I had to add another volume to the server. Following is what I did -

  1. Login to http://aws.amazon.com and go to EC2 tab.
  2. Go to volumes section and create a new volume.
  3. Enter the size of volume and select the availability zone. I generally skip creating a snapshot unless there is explicit need.
  4. Once the volume is created and its status is available, select it and click attach button. Select instance id of the instance to which it needs to be associated and map it to /dev/sda2
  5. Login to the server as root and execute following commands -
       mkfs -t ext3 /dev/sda2   #dont do it if creating from an existing snapshot
       echo "/dev/sda2  /disk2  ext3     noatime  0 0" >> /etc/fstab
       mkdir /disk2
       mount /disk2
       df -h #you should now see /disk2 as a new volume

    • #EBS
    • #EC2
  • 8 months ago
  • 6
  • Comments
  • Permalink
  • Share
    Tweet

6 Notes/ Hide

  1. yatendra1 posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

About

.... technology, business, technology in business, business in technology and more ....
  • Projects

Me, Elsewhere

  • @yatendra on Twitter
  • Linkedin Profile
  • yatendra on github
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr