Hi Marco, Thank you very much for the info, much much clearer. I was looking for the boot disk using "ls -l /dev/sd*", but the existence of /dev/vda1 should have given me a clue.
A few follow up questions: - I am assuming the space for the VM boot disk is allocated from the local hard disk of the physical host on which the VM is instantiated, right? - If Yes - How is the boot disk represented on the physical host. Is it a file on the local filesystem that represent the VM boot disk? - I am guessing there is some logic in nova-scheduler that checs first if there is enough disk apace on the physical host for the VM (along with RAM, VCPUs) before launching the VM on the host? - Is there any way to find out from Horizon how much disk space is available on a (or each) physical host for VM boot disk allocation? Thank you, Ahmed. On Tue, Dec 4, 2012 at 12:07 AM, Marco CONSONNI <[email protected]> wrote: > Hello, > > > When you use a flavor with an ephemeral disk size different from zero, the > instance is booted with an extra virtual disk whose size is indicated by > the ephemeral value (in GB). > > Using cirros image, try a flavor with ephemeral disk size different from > zero (you need to create one yourself because the "standard" flavors have > ephemeral size equal to 0), then log into the just booted instance and type: > > > *$ ls /dev/vd** > > /dev/vda /dev/vda1 /dev/vdb > > > > Disk /dev/vdb is a (virtual) disk, automatically created at boot time, > corresponding to the ephemeral disk space indicated by the flavor . Please > note that /dev/vda, mounted as /dev/vda1, is the boot disk, always created > when you boot an instance. > > Verify the size of the available disks; more specifically, verify /dev/vdb: > > * > * > > *$ sudo fdisk -l* > > Disk /dev/vda: 1073 MB, 1073741824 bytes > > 255 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors > > Units = sectors of 1 * 512 = 512 bytes > > Sector size (logical/physical): 512 bytes / 512 bytes > > I/O size (minimum/optimal): 512 bytes / 512 bytes > > Disk identifier: 0x00000000 > > > > Device Boot Start End Blocks Id System > > /dev/vda1 * 16065 2088449 1036192+ 83 Linux > > > > Disk /dev/vdb: 1073 MB, 1073741824 bytes > > 16 heads, 63 sectors/track, 2080 cylinders, total 2097152 sectors > > Units = sectors of 1 * 512 = 512 bytes > > Sector size (logical/physical): 512 bytes / 512 bytes > > I/O size (minimum/optimal): 512 bytes / 512 bytes > > Disk identifier: 0x00000000 > > > > Disk /dev/vdb doesn't contain a valid partition table > > > > Please note that /dev/vdb is made available as raw device, meaning that > you need to partition and format it before using. > > You can find instructions on how to do that here > http://docs.openstack.org/folsom/openstack-compute/admin/content/configure-nova-volume.html(search > for command fdisk) > > Also note that this disk, being ephemeral, disappears when you terminate > the VM. If you want to keep the data you produce with a VM that is destined > to be terminated, you need to use Volumes that you explicitly create and > attach using the services implemented by Cinder (former nova-volume). > > > For what concerns the size you define for the boot disk, try and lunch two > instances: one with flavor m1.tiny the other with m1.small: > > > -- tiny -- > > *$ sudo fdisk -l > * > Disk /dev/vda: 41 MB, 41126400 bytes > 255 heads, 63 sectors/track, 5 cylinders, total 80325 sectors > Units = sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disk identifier: 0x00000000 > > Device Boot Start End Blocks Id System > /dev/vda1 * 16065 80324 32130 83 Linux > > > -- small -- > > > *$ sudo fdisk -l > * > Disk /dev/vda: 21.5 GB, 21474836480 bytes > 255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors > Units = sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disk identifier: 0x00000000 > > Device Boot Start End Blocks Id System > /dev/vda1 * 16065 41929649 20956792+ 83 Linux > > > As you notice, the size indicated by the flavor has effects on the size of > the boot disk. > > > Hope it helps, > Marco. > > > > > On Mon, Dec 3, 2012 at 7:03 PM, Ahmed Al-Mehdi <[email protected]>wrote: > >> Hello, >> >> I instantiated a VM using the cirros image, using the pre-defined >> "m1.small" (1 VCPU, 2 GB Ram, 20G boot disk, 0 Ephemeral disk). I then >> logged into the console of the VM to view some system stats. The num of >> CPU and memory makes sense, but I am a bit confused on the storage aspect. >> I see the output of "df -h " as following: >> >> $ df -h >> Filesystem Size Used Available Use% >> Mounted on >> /dev 1001.1M 0 1001.1M >> 0% /dev >> /dev/vda1 23.2M 12.9M 9.1M 59% >> / >> tmpfs 1004.1M 0 1004.1M >> 0% /dev/shm >> tmpfs 200.0K 20.0K 180.0K >> 10% /run >> >> >> What is the difference between Boot disk and Ephemeral disk? >> >> How can I correlate the 20G boot disk to the output of "df -h". >> >> >> Regards, >> Ahmed. >> >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~openstack >> Post to : [email protected] >> Unsubscribe : https://launchpad.net/~openstack >> More help : https://help.launchpad.net/ListHelp >> >> >
_______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp

