Create an image with multiple disks mounted

Asked by Gaurav Gupta on 2011-08-29

I am trying to create a custom CentoOS image for Openstack. This wiki has been helpful in creating one successfully:
http://wiki.openstack.org/CreatingRHELImages

But, I want to build an image with more than just disk e.g. /dev/sda containing the root file system and say another /dev/sdb mounted on /mnt. If I convert it to an Openstack image and boot it, will I get two disks on Openstack? When I tried it, the instance failed to boot, the init sequence failed when trying to run fsck on the second disk.

Also is it required to mount the root file system on /dev/vda? Can it have a partition table?

Question information

Language:
English Edit question
Status:
Answered
For:
Glance Edit question
Assignee:
No assignee Edit question
Last query:
2011-08-29
Last reply:
2011-08-29
Vish Ishaya (vishvananda) said : #1

If you create a whole disk image, witha boot loader, you can give it a partition table. You will have to make sure that fstab refers to vda. The image will get a second disk attached with a size based on the local_gb field of the instance_type table (note that m1.tiny has 0 local_gb so it doesn't get a second drive). This device will be /dev/vdb but you will have to format and mount it yourself.

Vish

On Aug 29, 2011, at 8:20 AM, Gaurav wrote:

> New question #169501 on Glance:
> https://answers.launchpad.net/glance/+question/169501
>
> I am trying to create a custom CentoOS image for Openstack. This wiki has been helpful in creating one successfully:
> http://wiki.openstack.org/CreatingRHELImages
>
> But, I want to build an image with more than just disk e.g. /dev/sda containing the root file system and say another /dev/sdb mounted on /mnt. If I convert it to an Openstack image and boot it, will I get two disks on Openstack? When I tried it, the instance failed to boot, the init sequence failed when trying to run fsck on the second disk.
>
> Also is it required to mount the root file system on /dev/vda? Can it have a partition table?
>
> --
> You received this question notification because you are a member of
> Glance Core, which is an answer contact for Glance.

Gaurav Gupta (gagupta) said : #2

Thanks Vish. I believe the second drive (the one based on local_gb size) will also be ephemeral?

Can you help with this problem?

Provide an answer of your own, or ask Gaurav Gupta for more information if necessary.

To post a message you must log in.