2016-03-03 03:49:14 |
Amrith Kumar |
description |
Look ma, no share.
amrith@amrith-work:~$ manila list
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
=== Here's a share ===
amrith@amrith-work:~$ manila create nfs 3 --share-network manila-nova-network --name manila-share
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | creating |
| share_type_name | default |
| description | None |
| availability_zone | None |
| share_network_id | 7a9c3dc6-9d00-43ed-b56f-f77384fcbd92 |
| share_server_id | None |
| host | |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 6d28ec08-c1c6-47ce-bdd9-67474a1aaf71 |
| size | 3 |
| name | manila-share |
| share_type | dfeba8fc-2046-41aa-a2a4-be191b04b38b |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-03T03:27:21.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 391a288e0dff4df9ae0009248d1bbfaf |
| metadata | {} |
+-----------------------------+--------------------------------------+
=== Yup, it's there ===
amrith@amrith-work:~$ manila show manila-share
+-----------------------------+--------------------------------------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------------------------------------+
| status | available |
| share_type_name | default |
| description | None |
| availability_zone | nova |
| share_network_id | 7a9c3dc6-9d00-43ed-b56f-f77384fcbd92 |
| export_locations | |
| | uuid = ae256cfe-24e2-4259-a1e9-c74483724b69 |
| | created_at = 2016-03-03T03:27:30.000000 |
| | updated_at = 2016-03-03T03:27:30.000000 |
| | is_admin_only = False |
| | share_instance_id = bfe39581-948e-404a-8192-18b4b0dc198d |
| | path = 10.0.0.2:/shares/share-bfe39581-948e-404a-8192-18b4b0dc198d |
| share_server_id | 0027c61c-bbed-460a-bfe2-6be9c2d46dd6 |
| host | amrith-work@generic1#GENERIC1 |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 6d28ec08-c1c6-47ce-bdd9-67474a1aaf71 |
| size | 3 |
| name | manila-share |
| share_type | dfeba8fc-2046-41aa-a2a4-be191b04b38b |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-03T03:27:21.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 391a288e0dff4df9ae0009248d1bbfaf |
| metadata | {} |
+-----------------------------+--------------------------------------------------------------------+
=== Let's grant access ===
amrith@amrith-work:~$ manila access-allow manila-share ip 0.0.0.0/0 --access-level rw
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| share_id | 6d28ec08-c1c6-47ce-bdd9-67474a1aaf71 |
| access_type | ip |
| access_to | 0.0.0.0/0 |
| access_level | rw |
| state | new |
| id | ba63be56-d9f1-4806-a6ed-cc2fc13340a3 |
+--------------+--------------------------------------+
amrith@amrith-work:~$ sudo mount -t nfs -o vers=3 10.0.0.2:/shares/share-bfe39581-948e-404a-8192-18b4b0dc198d /tmp/mountpoint
mount.nfs: access denied by server while mounting 10.0.0.2:/shares/share-bfe39581-948e-404a-8192-18b4b0dc198d
==== But, can't mount it ... ====
==== Let's try this ====
amrith@amrith-work:~$ manila access-allow manila-share ip 10.0.0.0/24 --access-level rw +--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| share_id | 6d28ec08-c1c6-47ce-bdd9-67474a1aaf71 |
| access_type | ip |
| access_to | 10.0.0.0/24 |
| access_level | rw |
| state | new |
| id | 7837bca1-2907-4aea-ad07-0b29753555f1 |
+--------------+--------------------------------------+
==== Did that work? ====
amrith@amrith-work:~$ sudo mount -t nfs -o vers=3 10.0.0.2:/shares/share-bfe39581-948e-404a-8192-18b4b0dc198d /tmp/mountpoint
amrith@amrith-work:~$
==== Sure it did =====
I believe that 0.0.0.0/0 is a good enough wildcard ... |
Manila setup with default driver, see here from manila.conf.
[generic1]
driver_handles_share_servers = True
service_instance_user = manila
service_image_name = manila-service-image
path_to_private_key = /home/amrith/.ssh/id_rsa
path_to_public_key = /home/amrith/.ssh/id_rsa.pub
share_backend_name = GENERIC1
share_driver = manila.share.drivers.generic.GenericShareDriver
service_instance_network_helper_type=nova
[generic2]
driver_handles_share_servers = True
service_instance_user = manila
service_image_name = manila-service-image
path_to_private_key = /home/amrith/.ssh/id_rsa
path_to_public_key = /home/amrith/.ssh/id_rsa.pub
share_backend_name = GENERIC2
share_driver = manila.share.drivers.generic.GenericShareDriver
service_instance_network_helper_type=nova
Look ma, no share.
amrith@amrith-work:~$ manila list
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+
=== Here's a share ===
amrith@amrith-work:~$ manila create nfs 3 --share-network manila-nova-network --name manila-share
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | creating |
| share_type_name | default |
| description | None |
| availability_zone | None |
| share_network_id | 7a9c3dc6-9d00-43ed-b56f-f77384fcbd92 |
| share_server_id | None |
| host | |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 6d28ec08-c1c6-47ce-bdd9-67474a1aaf71 |
| size | 3 |
| name | manila-share |
| share_type | dfeba8fc-2046-41aa-a2a4-be191b04b38b |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-03T03:27:21.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 391a288e0dff4df9ae0009248d1bbfaf |
| metadata | {} |
+-----------------------------+--------------------------------------+
=== Yup, it's there ===
amrith@amrith-work:~$ manila show manila-share
+-----------------------------+--------------------------------------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------------------------------------+
| status | available |
| share_type_name | default |
| description | None |
| availability_zone | nova |
| share_network_id | 7a9c3dc6-9d00-43ed-b56f-f77384fcbd92 |
| export_locations | |
| | uuid = ae256cfe-24e2-4259-a1e9-c74483724b69 |
| | created_at = 2016-03-03T03:27:30.000000 |
| | updated_at = 2016-03-03T03:27:30.000000 |
| | is_admin_only = False |
| | share_instance_id = bfe39581-948e-404a-8192-18b4b0dc198d |
| | path = 10.0.0.2:/shares/share-bfe39581-948e-404a-8192-18b4b0dc198d |
| share_server_id | 0027c61c-bbed-460a-bfe2-6be9c2d46dd6 |
| host | amrith-work@generic1#GENERIC1 |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 6d28ec08-c1c6-47ce-bdd9-67474a1aaf71 |
| size | 3 |
| name | manila-share |
| share_type | dfeba8fc-2046-41aa-a2a4-be191b04b38b |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-03T03:27:21.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 391a288e0dff4df9ae0009248d1bbfaf |
| metadata | {} |
+-----------------------------+--------------------------------------------------------------------+
=== Let's grant access ===
amrith@amrith-work:~$ manila access-allow manila-share ip 0.0.0.0/0 --access-level rw
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| share_id | 6d28ec08-c1c6-47ce-bdd9-67474a1aaf71 |
| access_type | ip |
| access_to | 0.0.0.0/0 |
| access_level | rw |
| state | new |
| id | ba63be56-d9f1-4806-a6ed-cc2fc13340a3 |
+--------------+--------------------------------------+
amrith@amrith-work:~$ sudo mount -t nfs -o vers=3 10.0.0.2:/shares/share-bfe39581-948e-404a-8192-18b4b0dc198d /tmp/mountpoint
mount.nfs: access denied by server while mounting 10.0.0.2:/shares/share-bfe39581-948e-404a-8192-18b4b0dc198d
==== But, can't mount it ... ====
==== Let's try this ====
amrith@amrith-work:~$ manila access-allow manila-share ip 10.0.0.0/24 --access-level rw +--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| share_id | 6d28ec08-c1c6-47ce-bdd9-67474a1aaf71 |
| access_type | ip |
| access_to | 10.0.0.0/24 |
| access_level | rw |
| state | new |
| id | 7837bca1-2907-4aea-ad07-0b29753555f1 |
+--------------+--------------------------------------+
==== Did that work? ====
amrith@amrith-work:~$ sudo mount -t nfs -o vers=3 10.0.0.2:/shares/share-bfe39581-948e-404a-8192-18b4b0dc198d /tmp/mountpoint
amrith@amrith-work:~$
==== Sure it did =====
I believe that 0.0.0.0/0 is a good enough wildcard ... |
|