Deaktivieren von DHSS vor dem Erstellen einer Freigabe mittels LVM-Treiber
Sourcen Sie die admin-Anmeldeinformationen, um Zugriff auf die Admin-Befehle zu erhalten:
$ . admin-openrc
Erzeugen Sie ein Standard-Share mit aktiviertem DHSS:
$ manila type-create default_share_type False
+----------------------+--------------------------------------+
| Property | Value |
+----------------------+--------------------------------------+
| required_extra_specs | driver_handles_share_servers : False |
| Name | default_share_type |
| Visibility | public |
| is_default | - |
| ID | 3df065c8-6ca4-4b80-a5cb-e633c0439097 |
| optional_extra_specs | snapshot_support : True |
+----------------------+--------------------------------------+
Sourcen Sie die demo-Anmeldeinformationen, um die folgenden Schritte mit nicht-administrativen Rechten auszuführen:
$ . demo-openrc
Erstellen einer NFS-Freigabe
$ manila create NFS 1 --name share1
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | creating |
| share_type_name | default_share_type |
| description | None |
| availability_zone | None |
| share_network_id | None |
| host | |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| size | 1 |
| name | share1 |
| share_type | c6dfcfc6-9920-420e-8b0a-283d578efef5 |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-30T19:10:33.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| metadata | {} |
+-----------------------------+--------------------------------------+
Nach kurzer Zeit sollte sich der Freigabestatus von Erzeuge in Verfügbar ändern:
$ manila list
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
| 55c401b3-3112-4294-aa9f-3cc355a4e361 | share1 | 1 | NFS | available | False | default_share_type | storage@lvm#lvm-single-pool | nova |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+-----------------------------+-------------------+
Bestimmen der Export-IP-Adresse der Freigabe:
$ manila show share1
+-----------------------------+------------------------------------------------------------------------------------+
| Property | Value |
+-----------------------------+------------------------------------------------------------------------------------+
| status | available |
| share_type_name | default_share_type |
| description | None |
| availability_zone | nova |
| share_network_id | None |
| export_locations | |
| | path = 10.0.0.41:/var/lib/manila/mnt/share-8e13a98f-c310-41df-ac90-fc8bce4910b8 |
| | id = 3c8d0ada-cadf-48dd-85b8-d4e8c3b1e204 |
| | preferred = False |
| host | storage@lvm#lvm-single-pool |
| access_rules_status | active |
| snapshot_id | None |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| size | 1 |
| name | share1 |
| share_type | c6dfcfc6-9920-420e-8b0a-283d578efef5 |
| has_replicas | False |
| replication_type | None |
| created_at | 2016-03-30T19:10:33.000000 |
| share_proto | NFS |
| consistency_group_id | None |
| source_cgsnapshot_member_id | None |
| project_id | 3a46a53a377642a284e1d12efabb3b5a |
| metadata | {} |
+-----------------------------+------------------------------------------------------------------------------------+
Konfigurieren Sie den Benutzer-Zugriff zur neuen Freigabe bevor Sie versuchen sie über das Netzwerk zu mounten:
$ manila access-allow share1 ip INSTANCE_IP_ADDRESS
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
| share_id | 55c401b3-3112-4294-aa9f-3cc355a4e361 |
| access_type | ip |
| access_to | 10.0.0.41 |
| access_level | rw |
| state | new |
| id | f88eab01-7197-44bf-ad0f-d6ca6f99fc96 |
+--------------+--------------------------------------+
Ersetzen Sie INSTANCE_IP_ADDRESS durch die IP-Adresse der Instanz.
Bemerkung
Die Instanz muss eine Verbindung zur Management-IP-Adresse des Speicherknotens haben.
Erstellen Sie ein Verzeichnis, wohin gemounted werden soll:
$ mkdir ~/test_folder
Mount the NFS share in the instance using the export location of the share:
# mount -t nfs 10.0.0.41:/var/lib/manila/mnt/share-b94a4dbf-49e2-452c-b9c7-510277adf5c6 ~/test_folder
Für weitere Informationen zum managen von Freigaben lesen Sie Manage shares im OpenStack End User Guide.
Kehren Sie zurück zu Starten Sie eine Instanz:.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.