Volume Documentation

Nova uses ata-over-ethernet (AoE) to export storage volumes from multiple storage nodes. These AoE exports are attached (using libvirt) directly to running instances.

Nova volumes are exported over the primary system VLAN (usually VLAN 1), and not over individual VLANs.

AoE exports are numbered according to a “shelf and blade” syntax. In order to avoid collisions, we currently perform an AoE-discover of existing exports, and then grab the next unused number. (This obviously has race condition problems, and should be replaced by allocating a shelf-id to each storage node.)

The underlying volumes are LVM logical volumes, created on demand within a single large volume group.

The storage Module

Nova Storage manages creating, attaching, detaching, and destroying persistent storage volumes, ala EBS. Currently uses Ata-over-Ethernet.

class nova.volume.storage.BlockStore

Bases: object, twisted.application.service.Service

There is one BlockStore running on each volume node. However, each BlockStore can report on the state of all volumes in the cluster.

all
returns a list of all volumes
by_node(node_id)
returns a list of volumes for a node
create_volume(*pargs, **kargs)
delete_volume(volume_id)
report_state(*args, **kwargs)
class nova.volume.storage.FakeVolume(volume_id=None)

Bases: nova.volume.storage.Volume

create_lv()
exception nova.volume.storage.NoMoreVolumes(message=None)
Bases: nova.exception.Error
class nova.volume.storage.Volume(volume_id=None)

Bases: nova.datastore.BasicModel

classmethod create(size, user_id, project_id)
create_lv(*args, **kwargs)
default_state()
destroy()
finish_attach()
finish_detach()
identifier
start_attach(instance_id, mountpoint)
start_detach()
nova.volume.storage.get_next_aoe_numbers()
nova.volume.storage.get_volume(volume_id)
Returns a redis-backed volume object

The storage_unittest Module

class nova.tests.storage_unittest.StorageTestCase(methodName='runTest')

Bases: nova.test.TrialTestCase

setUp()
test_multi_node()
test_run_attach_detach_volume()
test_run_create_volume()
test_too_big_volume()
test_too_many_volumes()

Table Of Contents

Previous topic

NOVA Libraries

Next topic

nova Packages & Dependencies

This Page