You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by Sam's Lists <sa...@gmail.com> on 2011/05/28 12:14:17 UTC

[dev] Increasing Root Disk Size of an EC2 Image...

[ I sent this to the new users mailing list too...but as far as I can
tell that didn't work. Take a look at
http://mail-archives.apache.org/mod_mbox/libcloud-users/ vs.
http://mail-archives.apache.org/mod_mbox/libcloud-dev/ ]

I'd like to be able to use libcloud to increase the root disk size of
an ec2 image upon launch.

This blog post covers what I want to do:
http://alestic.com/2009/12/ec2-ebs-boot-resize

If I were using the amazon tools it would look something like this:

ec2-run-instances --key KEYPAIR --block-device-mapping /dev/sda1=:100
ami-1aad5273

The end result is instead of the 8GB file system that the official
Ubuntu image uses by default - I'll have a 100 GB file system after I
run resize2fs.

How can I pass a block-device-mapping parameter when creating a node
using libcloud?

Thanks

Re: [dev] Increasing Root Disk Size of an EC2 Image...

Posted by Tomaž Muraus <to...@apache.org>.
Hello,

Yeah, you aren't subscribed to the users mailing list this is why the
message has been rejected.

Currently the EC2 compute driver does not support passing in block device
mapping argument.

This argument is only supported by EC2 which means we would need to
implement it as an extension argument in the EC2 driver "create_node" method
(
https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/ec2.py#L763
).

The argument should probably be *ex_block_device_mapping* and the value of
this argument would be a list of dictionaries. Each dictionary would contain
the block device options.

Actually, after looking at the EC2 docs (
http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-RunInstances.html)
the whole "block device mapping" concept isn't that simple so it might make
sense to create a new EC2BlockDeviceMapping class which would contain all
the block device options and a user would pass a list of those objects to
the create_node method instead of a list of dictionaries.

What do others think?

On Sat, May 28, 2011 at 12:14 PM, Sam's Lists <sa...@gmail.com> wrote:

> [ I sent this to the new users mailing list too...but as far as I can
> tell that didn't work. Take a look at
> http://mail-archives.apache.org/mod_mbox/libcloud-users/ vs.
> http://mail-archives.apache.org/mod_mbox/libcloud-dev/ ]
>
> I'd like to be able to use libcloud to increase the root disk size of
> an ec2 image upon launch.
>
> This blog post covers what I want to do:
> http://alestic.com/2009/12/ec2-ebs-boot-resize
>
> If I were using the amazon tools it would look something like this:
>
> ec2-run-instances --key KEYPAIR --block-device-mapping /dev/sda1=:100
> ami-1aad5273
>
> The end result is instead of the 8GB file system that the official
> Ubuntu image uses by default - I'll have a 100 GB file system after I
> run resize2fs.
>
> How can I pass a block-device-mapping parameter when creating a node
> using libcloud?
>
> Thanks
>