OpenStack Discussions

How can I attach a volume to VM using netapp volume driver?

JAESANGLEE
3,603 Views

Hi, I set my openstack volume driver to NetAppISCSIDriver.

(nova version is essex milestone-1, I think it's too old, but It's not important)

I also configured some flags for driver.

This is my configuration.(nova.conf)

42 ### volume configuration

43 --volume_manager=nova.volume.manager.VolumeManager

45 --volume_driver=nova.volume.netapp.NetAppISCSIDriver

46 --netapp_login=administrator

47 --netapp_password=password

48 --netapp_server_hostname=10.4.1.252

49 --netapp_server_port=8088

50 --netapp_storage_service=Cloud

52 --netapp_wsdl_url=http://10.4.1.252/dfm.wsdl

53 --netapp_storage_service_prefix=cloud-

When I create volume It looks like normal.

~$ nova volume-create 5 --display_name jaesang3 --availability_zone b_zone

~$ nova volume-list

+----+-----------+-----------------+------+--------------------------------------+

| ID |   Status  |   Display Name  | Size |             Attached to              |

+----+-----------+-----------------+------+--------------------------------------+

| 35 | available | jaesang3        | 5    | None                                 |

+----+-----------+-----------------+------+--------------------------------------+

It's value of volumes table.

*************************** 10. row ***************************

         created_at: 2012-11-14 13:07:40

         updated_at: 2012-11-14 13:07:46

         deleted_at: NULL

            deleted: 0

                 id: 35

             ec2_id: NULL

            user_id: admin

         project_id: sds_netapp_test

               host: stest4.p18.poc

               size: 5

  availability_zone: b_zone

        instance_id: NULL

         mountpoint: NULL

        attach_time: NULL

             status: available

      attach_status: detached

       scheduled_at: 2012-11-14 13:07:40

        launched_at: 2012-11-14 13:07:46

      terminated_at: NULL

       display_name: jaesang3

display_description: NULL

  provider_location: 278

      provider_auth: NULL

        snapshot_id: NULL

     volume_type_id: NULL

But When I attach volume to VM, It looks like abnormal.

This is my block_device_mapping db table.

mysql> select id,instance_id,volume_id,connection_info from block_device_mapping where deleted=0\G;

*************************** 1. row ***************************

             id: 6

    instance_id: 5

      volume_id: 25

connection_info: {"driver_volume_type": "iscsi", "data": {"device_path": "/dev/disk/by-path/ip-10.245.34.51:3260-iscsi-iqn.1992-08.com.netapp:sn.1574419210-lun-0", "target_discovered": false, "target_iqn": "iqn.1992-08.com.netapp:sn.1574419210", "target_portal": "10.245.34.51:3260", "volume_id": 25, "target_lun": "0"}}

*************************** 2. row ***************************

             id: 8

    instance_id: 5

      volume_id: 26

connection_info: {"driver_volume_type": "iscsi", "data": {"device_path": "/dev/disk/by-path/ip-10.245.34.51:3260-iscsi-iqn.1992-08.com.netapp:sn.1574419210-lun-0", "target_discovered": false, "target_iqn": "iqn.1992-08.com.netapp:sn.1574419210", "target_portal": "10.245.34.51:3260", "volume_id": 26, "target_lun": "1"}}

*************************** 3. row ***************************

             id: 15

    instance_id: 5

      volume_id: 32

connection_info: {"driver_volume_type": "iscsi", "data": {"device_path": "/dev/disk/by-path/ip-10.245.34.51:3260-iscsi-iqn.1992-08.com.netapp:sn.1574419210-lun-0", "target_discovered": false, "target_iqn": "iqn.1992-08.com.netapp:sn.1574419210", "target_portal": "10.245.34.51:3260", "volume_id": 32, "target_lun": "2"}}

3 rows in set (0.00 sec)

You can see volume_id is different. BUT every device_path is same. So when I mount a volume in VM,  wrong volume mounted.

When I use HP san volume driver, every device_path is different. for example,

mysql> select id,instance_id,volume_id,connection_info from block_device_mapping where deleted=0 limit 3\G

*************************** 1. row ***************************

             id: 47

    instance_id: 49

      volume_id: 57

connection_info: {"driver_volume_type": "iscsi", "data": {"device_path": "/dev/disk/by-path/ip-10.113.1.1:3260-iscsi-iqn.2003-10.com.lefthandnetworks:c1-z1-pek:292:volume-00000039-lun-0", "target_discovered": false, "target_iqn": "iqn.2003-10.com.lefthandnetworks:c1-z1-pek:292:volume-00000039", "target_portal": "10.113.1.1:3260", "volume_id": 57, "auth_password": "project_secret_P20120816-004", "auth_username": "proj_P20120816-004", "auth_method": "CHAP"}}

*************************** 2. row ***************************

             id: 128

    instance_id: 93

      volume_id: 132

connection_info: {"driver_volume_type": "iscsi", "data": {"device_path": "/dev/disk/by-path/ip-10.113.1.1:3260-iscsi-iqn.2003-10.com.lefthandnetworks:c1-z1-pek:568:volume-00000084-lun-0", "target_discovered": false, "target_iqn": "iqn.2003-10.com.lefthandnetworks:c1-z1-pek:568:volume-00000084", "target_portal": "10.113.1.1:3260", "volume_id": 132, "auth_password": "project_secret_P20120821-002", "auth_username": "proj_P20120821-002", "auth_method": "CHAP"}}

*************************** 3. row ***************************

             id: 129

    instance_id: 94

      volume_id: 133

connection_info: {"driver_volume_type": "iscsi", "data": {"device_path": "/dev/disk/by-path/ip-10.113.1.1:3260-iscsi-iqn.2003-10.com.lefthandnetworks:c1-z1-pek:571:volume-00000085-lun-0", "target_discovered": false, "target_iqn": "iqn.2003-10.com.lefthandnetworks:c1-z1-pek:571:volume-00000085", "target_portal": "10.113.1.1:3260", "volume_id": 133, "auth_password": "project_secret_P20120821-002", "auth_username": "proj_P20120821-002", "auth_method": "CHAP"}}

Why Netapp driver set device_path is same? Is this normal situation?

Please help me in understanding setup using netapp driver.

Thanks in advance.

1 REPLY 1

esker
3,603 Views

Hi Jay,

It actually is relevant that your Nova version is Essex-1.  There were a few fixes / enhancements that our driver required that came fairly late in the Essex development cycle.  Could you 1) retry with latest Essex-stable and 2) also make use of the most recent version of the driver intended to be used w/ Essex here:

https://github.com/rushiagr/nova/tree/essexport/nova/volume

Thanks!

Public