How to expand your ebs volume
Increasing size of your ebs volume is pretty easy. resize2fs does the trick. Here is the detailed procedure to increase size of your ebs volume.
First detach the volume and take a snapshot of the volume. If you already have a snapshot and haven’t made any changes after that, no need to take a new snapshot.
No create a new volume from this snapshot. Let’s say your original volume was 10G and you wanted to increase its size to 20G.
ec2-create-volume -z us-east-1a --size 20 --snapshot snap-xxxxxxxx
The command will output id of the new volume. Use that id in the following command to attach the volume to any instance you have up.
ec2-attach-volume vol-yyyyyyyy --instance i-xxxxxxxx --device /dev/sdh
Make sure that ec2-describe-volumes show the state of the instance as attached. Once the volume is attached, mount it at a path say /mnt/data. I am assuming here that your volume had ext3 filesystem.
mkdir /mnt/data
echo '/dev/sdh /mnt/data ext3 defaults,noatime 0 0' >> /etc/fstab
mount /mnt/data
Mounting the volume is necessary as otherwise you wont’ be able to execute the following (resize2fs) command.
Now execute the following command to resize the volume
resize2fs /dev/sdh
You should see the following output (sizes you see might be different):
Filesystem at /dev/sdh is mounted on /mnt/data; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 2
Performing an on-line resize of /dev/sdh to 5505024 (4k) blocks.
The filesystem on /dev/sdh is now 5505024 blocks long.
The command should execute in a minute or two for 20G size. That’s it, you can verify your new size by executing:
df -h
This should show you that the volume’s new size. That’s it!

February 24th, 2010 at 9:01 pm
Don’t forget about deleting your old volume once you have created the new larger copy, otherwise you’ll be paying for storage you’re not using.
March 24th, 2010 at 9:17 pm
i have a bootable EBS volume that i want to shrink. i followed some of the instructions here, i copied the bootable volume, mounted it on a running instance then i ran resize2fs passing in 3GB which is much smaller than the 15GB i started with.
I’m not sure how I can make this work.
July 15th, 2010 at 3:24 pm
Buy:Super Active ED Pack.VPXL.Viagra Super Active+.Cialis.Soma.Viagra Professional.Maxaman.Propecia.Cialis Professional.Viagra.Levitra.Cialis Super Active+.Zithromax.Viagra Soft Tabs.Tramadol.Cialis Soft Tabs.Viagra Super Force….
August 29th, 2010 at 7:10 pm
on http://eoffice07s.AUTOPARTSVILLE.INFO/tag/use+on+Use+furniture/ : furniture…
Use…
September 12th, 2010 at 12:28 am
Buy:Accutane.Lumigan.Prevacid.Synthroid.100% Pure Okinawan Coral Calcium.Arimidex.Retin-A.Petcam (Metacam) Oral Suspension.Prednisolone.Valtrex.Zovirax.Zyban.Mega Hoodia.Actos.Nexium.Human Growth Hormone….
September 14th, 2010 at 9:21 pm
accessories http://jwo.8bk.ll1.co : ranger…
2007…
September 17th, 2010 at 9:01 am
……….
great, your blog site design is definitely good, I am looking to get a new theme for my Doors China own blog site, I like yours, now I’ll go research the same layout style!…
September 17th, 2010 at 1:00 pm
Track back from http://monclerjacken.want2blog.net/ ……
good, your blog design is definitely great, I’m looking for any new theme for my own personal blog, I like yours, now I will go seek the identical layout style!…
September 17th, 2010 at 3:35 pm
……….
very good, your http://www.wooddoorschina.com blog site theme is actually great, I’m hunting for a new layout style for my own personal blog site, I like yours, now I will go seek the similar design!…
September 17th, 2010 at 7:34 pm
Track back from http://monclerjacken.want2blog.net/ ……
good, your blog design is actually good, I am searching for the new theme for my own personal website, I like yours, now I will go research the exact same template!…
October 20th, 2010 at 12:07 am
……….
very good, your blog site template is genuinely wonderful, I am seeking to get a new http://www.alljewishlinks.com design for my individual website, I like yours, now I am going to go search the same design!…
October 21st, 2010 at 8:08 am
……….
good, your blog site theme is actually great, I am searching for the new http://www.alljewishlinks.com template for my individual website, I like yours, now I am going to go research the exact same layout style!…