QA:Testcase attach a volume to an instance

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{QA/Test_Case |description=Provide nova-volumes to compute instances [http://docs.openstack.org/trunk/openstack-compute/admin/content/managing-volumes.html Nova-volume] is a se...")
 
(remove from cloud SIG category)
 
(10 intermediate revisions by 4 users not shown)
Line 10: Line 10:
 
Start the SCSI target daemon
 
Start the SCSI target daemon
  
  $> sudo service tgtd start
+
  $> sudo systemctl start tgtd.service
  $> sudo chkconfig tgtd on
+
  $> sudo systemctl enable tgtd.service
  
 
Ensure the nova-volume service is enabled
 
Ensure the nova-volume service is enabled
Line 30: Line 30:
 
(note -d is the device on the compute node)
 
(note -d is the device on the compute node)
  
  $> euca-attach-volume -i i-00000001 -d /dev/vdb vol-00000001
+
  $> euca-attach-volume -i i-00000001 -d /dev/vdc vol-00000001
 +
 
 +
 
 +
ssh to the instance and verify that the vdc device
 +
is listed in /proc/partitions
 +
 
 +
$> cat /proc/partitions
 +
 
 +
Now make the device available if /dev/vdc is not already present
 +
 
 +
$> mknod /dev/vdc b 252 32
 +
 
 +
Create and mount a file system directly on the device
 +
 
 +
$> mkfs.ext3 /dev/vdc
 +
$> mkdir /mnt/nova-volume
 +
$> mount /dev/vdc /mnt/nova-volume
 +
 
 +
Display some file system details
 +
 
 +
$> df -h /dev/vdc
 +
 
 +
Unmount the volume again:
 +
 
 +
$> umount /mnt/nova-volume
 +
 
 +
Exit from the ssh session, detach and delete the volume:
 +
 
 +
$> euca-detach-volume vol-00000001
 +
$> euca-delete-volume vol-00000001
  
 
|results=
 
|results=
  
ssh to the instance and verify that the /dev/vdb device
+
The file system should be created, mounted and
is available and usable as a disk
+
reported correctly by df.
 +
 
 +
There should be no new errors in the logs:
 +
$> grep -i error /var/log/nova/*.log
 
}}
 
}}
  
 
[[Category:OpenStack Test Cases]]
 
[[Category:OpenStack Test Cases]]
[[Category:Cloud SIG]]
 

Latest revision as of 06:14, 25 April 2012

Contents

Description

Provide nova-volumes to compute instances

Nova-volume is a service that allows you to give extra block level storage to your OpenStack Compute instances (using iSCSI and LVM)

Setup

Start the SCSI target daemon

$> sudo systemctl start tgtd.service
$> sudo systemctl enable tgtd.service

Ensure the nova-volume service is enabled

$> sudo nova-manage service list 

How to test

Create a new 5GB volume

$> euca-create-volume -s 5 -z nova

View status of volumes, and wait for it to become 'available'

$> euca-describe-volumes

Make the storage available to the instance (note -d is the device on the compute node)

$> euca-attach-volume -i i-00000001 -d /dev/vdc vol-00000001


ssh to the instance and verify that the vdc device is listed in /proc/partitions

$> cat /proc/partitions

Now make the device available if /dev/vdc is not already present

$> mknod /dev/vdc b 252 32

Create and mount a file system directly on the device

$> mkfs.ext3 /dev/vdc
$> mkdir /mnt/nova-volume
$> mount /dev/vdc /mnt/nova-volume

Display some file system details

$> df -h /dev/vdc

Unmount the volume again:

$> umount /mnt/nova-volume

Exit from the ssh session, detach and delete the volume:

$> euca-detach-volume vol-00000001
$> euca-delete-volume vol-00000001

Expected Results

The file system should be created, mounted and reported correctly by df.

There should be no new errors in the logs:

$> grep -i error /var/log/nova/*.log