Ask Your Question
0

Create an image with multiple disks mounted

asked 2011-08-29 15:16:07 -0500

gagupta gravatar image

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 (http://wiki.openstack.org/CreatingRHE...)

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?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2011-08-29 17:39:14 -0500

vishvananda gravatar image

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/...

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

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.

edit flag offensive delete link more
0

answered 2011-08-30 21:33:17 -0500

gagupta gravatar image

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-08-29 15:16:07 -0500

Seen: 561 times

Last updated: Aug 30 '11