1.manila 部署

基本环境: kolla-ansible  rocky+centos7.4

vim /etc/kolla/globals.yml
enable_horizon_manila: "{{ enable_manila | bool }}"
enable_manila: "yes"
enable_manila_backend_generic: "yes"vim /etc/kolla/config/manila-share.conf
[generic]
service_instance_flavor_id = 2
kolla-ansible deploy -t mnila -i multinode 

2. 功能验证

2.1基本功能验证

特殊需求: 
1.可以修改share instance的实例密码; 
2.可以实现root用户远程登录;

root@deploy ~]# manila service-list
+----+------------------+------------------+------+---------+-------+----------------------------+
| Id | Binary           | Host             | Zone | Status  | State | Updated_at                 |
+----+------------------+------------------+------+---------+-------+----------------------------+
| 1  | manila-share     | network1@generic | nova | enabled | up    | 2019-07-11T22:13:14.000000 |
| 2  | manila-data      | controller1      | nova | enabled | up    | 2019-07-11T22:13:10.000000 |
| 3  | manila-scheduler | controller1      | nova | enabled | up    | 2019-07-11T22:13:05.000000 |
+----+------------------+------------------+------+---------+-------+----------------------------+
manila type-create default_share_type True
wget https://tarballs.openstack.org/manila-image-elements/images/manila-service-image-master.qcow2
备注:此处名字必须为 manila-service-image
针对镜像操作:
virt-sysprep --operations \
"-abrt-data,-backup-files,-bash-history,-blkid-tab,\
-crash-data,-cron-spool,-dhcp-client-state,-dhcp-server-state,\
-dovecot-data,-logfiles,-machine-id,-mail-spool,-net-hostname,-net-hwaddr,-pacct-log,\
-package-manager-cache,-pam-data,-passwd-backups,-puppet-data-log,\
-rh-subscription-manager,-rhn-systemid,-rpm-db,-samba-db-log,-script,-smolt-uuid,\
-ssh-hostkeys,-ssh-userdir,-sssd-db-log,-tmp-files,-udev-persistent-net,\
-utmp,-yum-uuid,customize" \
--root-password disabled \
--mount-options "/:defaults,noatime,nodiratime" \
--network \
--install "qemu-guest-agent,cloud-init" \
--run-command  'systemctl enable qemu-guest-agent' \
-a manila-service-image-master.qcow2
qemu-img convert -f qcow2 -O raw manila-service-image-master.qcow2 manila-service-image-master.raw
virt-edit -a manila-service-image-master.raw /etc/ssh/sshd_config
PermitRootLogin yes
openstack network list
manila share-network-create --name demo-share-network1 \--neutron-net-id demo-net \--neutron-subnet-id demo-subnet
manila create --name share2 --share-network c7e32fae-0af3-4809-a0a5-f97635f0d0e8 --share-type default_share_type  nfs 10+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
| ID                                   | Name   | Size | Share Proto | Status    | Is Public | Share Type Name    | Host                     | Availability Zone |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
| 7e05d0d7-ce0d-4103-81a3-35e91944bd00 | share2 | 10   | NFS         | available | False     | default_share_type | network1@generic#GENERIC | nova              |
| a0cea893-0c53-4eae-93fa-257bdd3e303c | share1 | 100  | NFS         | available | False     | default_share_type | network1@generic#GENERIC | nova              |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
[root@deploy ~]# manila show share1
+---------------------------------------+----------------------------------------------------------------------+
| Property                              | Value                                                                |
+---------------------------------------+----------------------------------------------------------------------+
| status                                | available                                                            |
| share_type_name                       | default_share_type                                                   |
| description                           | None                                                                 |
| availability_zone                     | nova                                                                 |
| share_network_id                      | c7e32fae-0af3-4809-a0a5-f97635f0d0e8                                 |
| export_locations                      |                                                                      |
|                                       | path = 10.254.0.5:/shares/share-4c9090d2-4d19-438c-a94c-445f9e0b8170 |
|                                       | preferred = False                                                    |
|                                       | is_admin_only = False                                                |
|                                       | id = 97cb067d-f2b2-4902-8606-af03730ceee3                            |
|                                       | share_instance_id = 4c9090d2-4d19-438c-a94c-445f9e0b8170             |
|                                       | path = 10.254.0.5:/shares/share-4c9090d2-4d19-438c-a94c-445f9e0b8170 |
|                                       | preferred = False                                                    |
|                                       | is_admin_only = True                                                 |
|                                       | id = 32c03ca0-a98a-4f26-9f28-ea3f1a963d27                            |
|                                       | share_instance_id = 4c9090d2-4d19-438c-a94c-445f9e0b8170             |
| share_server_id                       | 1b1e4744-fbdf-4554-b8c5-f281af0545b9                                 |
| share_group_id                        | None                                                                 |
| host                                  | network1@generic#GENERIC                                             |
| revert_to_snapshot_support            | False                                                                |
| access_rules_status                   | active                                                               |
| snapshot_id                           | None                                                                 |
| create_share_from_snapshot_support    | False                                                                |
| is_public                             | False                                                                |
| task_state                            | None                                                                 |
| snapshot_support                      | False                                                                |
| id                                    | a0cea893-0c53-4eae-93fa-257bdd3e303c                                 |
| size                                  | 100                                                                  |
| source_share_group_snapshot_member_id | None                                                                 |
| user_id                               | b33628be535a4cb083e30c880f874323                                     |
| name                                  | share1                                                               |
| share_type                            | 743bdf2f-7ca4-4394-947e-1a8aceb26622                                 |
| has_replicas                          | False                                                                |
| replication_type                      | None                                                                 |
| created_at                            | 2019-07-11T14:03:36.000000                                           |
| share_proto                           | NFS                                                                  |
| mount_snapshot_support                | False                                                                |
| project_id                            | c800b6587a864dd8a93cea7fe7c686a6                                     |
| metadata                              | {}                                                                   |
+---------------------------------------+----------------------------------------------------------------------+
[root@deploy ~]# openstack server list --all | grep manila
| 34b275ed-0209-4b8c-80e3-86b0734d67bf | f267c7ba-965e-48d1-930c-54fb4302697e | ACTIVE  | manila_service_network=10.254.0.10 | manila-service-image | m1.small |
openstack server set --root-passowrd 34b275ed-0209-4b8c-80e3-86b0734d67bf
[root@deploy ~]# openstack console url show 34b275ed-0209-4b8c-80e3-86b0734d67bf
+-------+-----------------------------------------------------------------------------------+
| Field | Value                                                                             |
+-------+-----------------------------------------------------------------------------------+
| type  | novnc                                                                             |
| url   | http://192.168.1.21:6080/vnc_auto.html?token=64245500-d565-4442-a3e9-5f29d88f0ecf |
ssh登录共享实例:
root@f267c7ba-965e-48d1-930c-54fb4302697e:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            976M     0  976M   0% /dev
tmpfs           200M  2.0M  198M   2% /run
/dev/vda1        19G  1.2G   17G   7% /
tmpfs           997M     0  997M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           997M     0  997M   0% /sys/fs/cgroup
tmpfs           200M     0  200M   0% /run/user/1000
/dev/vdb        9.8G   37M  9.3G   1% /shares/share-7fafec01-d356-4a90-bc80-c64ee0c9e4b6
tmpfs           200M     0  200M   0% /run/user/0
[root@deploy ~]# manila share-export-location-list share2
+--------------------------------------+----------------------------------------------------------------+-----------+
| ID                                   | Path                                                           | Preferred |
+--------------------------------------+----------------------------------------------------------------+-----------+
| 78b54bd1-8fb2-4408-a76c-ea16e83663b7 | 10.254.0.10:/shares/share-7fafec01-d356-4a90-bc80-c64ee0c9e4b6 | False     |
| b489c348-6cda-4ad4-94a8-97d24bea0c7b | 10.254.0.10:/shares/share-7fafec01-d356-4a90-bc80-c64ee0c9e4b6 | False     |
+--------------------------------------+----------------------------------------------------------------+-----------
# 创建访问规则
[root@deploy ~]# manila access-allow share2 ip 10.0.0.4
+--------------+--------------------------------------+
| Property     | Value                                |
+--------------+--------------------------------------+
| access_key   | None                                 |
| share_id     | adb41a06-7cd1-40c1-a216-a7162ac93b79 |
| created_at   | 2019-07-12T22:38:48.000000           |
| updated_at   | None                                 |
| access_type  | ip                                   |
| access_to    | 10.0.0.4                             |
| access_level | rw                                   |
| state        | queued_to_apply                      |
| id           | 61262a01-6fea-4747-8288-b9b5185b5bee |
| metadata     | {}                                   |
+--------------+--------------------------------------+
虚拟共享实例机内部:1 /shares/share-7fafec01-d356-4a90-bc80-c64ee0c9e4b6  10.0.0.4(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_sub    tree_check,secure_locks,acl,no_pnfs,anonuid=65534,anongid=65534,sec=sys,rw,secure,no_root_squash,no_all_squash)[root@deploy ~]# manila access-list share2
+--------------------------------------+-------------+-----------+--------------+--------+------------+----------------------------+------------+
| id                                   | access_type | access_to | access_level | state  | access_key | created_at                 | updated_at |
+--------------------------------------+-------------+-----------+--------------+--------+------------+----------------------------+------------+
| 61262a01-6fea-4747-8288-b9b5185b5bee | ip          | 10.0.0.4  | rw           | active | None       | 2019-07-12T22:38:48.000000 | None       |
+--------------------------------------+-------------+-----------+--------------+--------+------------+----------------------------+------------+
[root@deploy ~]# manila access-allow share2  ip 20.0.0.0/24 --access-level ro
+--------------+--------------------------------------+
| Property     | Value                                |
+--------------+--------------------------------------+
| access_key   | None                                 |
| share_id     | adb41a06-7cd1-40c1-a216-a7162ac93b79 |
| created_at   | 2019-07-12T22:42:43.000000           |
| updated_at   | None                                 |
| access_type  | ip                                   |
| access_to    | 20.0.0.0/24                          |
| access_level | ro                                   |
| state        | queued_to_apply                      |
| id           | 7cf0bd41-deab-46a4-a104-547742883a77 |
| metadata     | {}                                   |
+--------------+--------------------------------------+
[root@deploy ~]# manila access-list share2
+--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+
| id                                   | access_type | access_to   | access_level | state  | access_key | created_at                 | updated_at |
+--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+
| 61262a01-6fea-4747-8288-b9b5185b5bee | ip          | 10.0.0.4    | rw           | active | None       | 2019-07-12T22:38:48.000000 | None       |
| 7cf0bd41-deab-46a4-a104-547742883a77 | ip          | 20.0.0.0/24 | ro           | active | None       | 2019-07-12T22:42:43.000000 | None       |
+--------------------------------------+-------------+-------------+--------------+--------+------------+----------------------------+------------+
vim /etc/exports /shares/share-7fafec01-d356-4a90-bc80-c64ee0c9e4b6  10.0.0.4(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,no_pnfs,anonuid=65534,anongid=65534,sec=sys    ,rw,secure,no_root_squash,no_all_squash)2 /shares/share-7fafec01-d356-4a90-bc80-c64ee0c9e4b6  20.0.0.0/24(ro,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,no_subtree_check,secure_locks,acl,no_pnfs,anonuid=65534,anongid=65534,sec=    sys,ro,secure,no_root_squash,no_all_squash)
# 取消访问规则
[root@deploy ~]# manila access-deny  share2  61262a01-6fea-4747-8288-b9b5185b5bee
[root@deploy ~]# manila access-deny  share2  7cf0bd41-deab-46a4-a104-547742883a77
[root@deploy ~]# manila access-list  share2
+----+-------------+-----------+--------------+-------+------------+------------+------------+
| id | access_type | access_to | access_level | state | access_key | created_at | updated_at |
+----+-------------+-----------+--------------+-------+------------+------------+------------+
+----+-------------+-----------+--------------+-------+------------+------------+------------+

2.2 快照功能

快照操作:
请确认创建的 `share-type` 已启用快照支持,如未启用快照支持,可参照下面的命令重新创建 `share-type`usage: manila type-create [--description <description>]
>                           [--snapshot_support <snapshot_support>]
>                           [--create_share_from_snapshot_support <create_share_from_snapshot_support>]
>                           [--revert_to_snapshot_support <revert_to_snapshot_support>]
>                           [--mount_snapshot_support <mount_snapshot_support>]
>                           [--extra-specs [<key=value> [<key=value> ...]]]
>                           [--is_public <is_public>]
>                           <name> <spec_driver_handles_share_servers>
>
> Create a new share type (Admin only).
>
> Positional arguments:
>   <name>                Name of the new share type.
>   <spec_driver_handles_share_servers>
>                         Required extra specification. Valid values are
>                         'true'/'1' and 'false'/'0'.
>
> Optional arguments:
>   --description <description>
>                         Filter results by description. Available only for
>                         microversion >= 2.41.
>   --snapshot_support <snapshot_support>, --snapshot-support <snapshot_support>
>                         Boolean extra spec used for filtering of back ends by
>                         their capability to create share snapshots.
>   --create_share_from_snapshot_support <create_share_from_snapshot_support>, --create-share-from-snapshot-support <create_share_from_snapshot_support>
>                         Boolean extra spec used for filtering of back ends by
>                         their capability to create shares from snapshots.
>   --revert_to_snapshot_support <revert_to_snapshot_support>, --revert-to-snapshot-support <revert_to_snapshot_support>
>                         Boolean extra spec used for filtering of back ends by
>                         their capability to revert shares to snapshots.
>                         (Default is False).
>   --mount_snapshot_support <mount_snapshot_support>, --mount-snapshot-support <mount_snapshot_support>
>                         Boolean extra spec used for filtering of back ends by
>                         their capability to mount share snapshots. (Default is
>                         False).
>   --extra-specs [<key=value> [<key=value> ...]], --extra_specs [<key=value> [<key=value> ...]]
>                         Extra specs key and value of share type that will be
>                         used for share type creation. OPTIONAL: Default=None.
>                         example --extra-specs thin_provisioning='<is> True',
>                         replication_type=readable.
>   --is_public <is_public>, --is-public <is_public>
>                         Make type accessible to the public (default true).
>
manila type-create \
--snapshot_support True \
--create_share_from_snapshot_support True \
default_share_type True
或者
manila type-key default_share_type \
set snapshot_support=True \
create_share_from_snapshot_support=True
备注:最好是在创建 default_type_share的时候指定是否支持快照。
[root@deploy ~]# manila show share1
+---------------------------------------+-----------------------------------------------------------------------+
| Property                              | Value                                                                 |
+---------------------------------------+-----------------------------------------------------------------------+
| status                                | available                                                             |
| share_type_name                       | default_share_type                                                    |
| description                           | None                                                                  |
| availability_zone                     | nova                                                                  |
| share_network_id                      | c7e32fae-0af3-4809-a0a5-f97635f0d0e8                                  |
| export_locations                      |                                                                       |
|                                       | path = 10.254.0.11:/shares/share-6121a068-9615-4452-a2cd-27e2af0b923d |
|                                       | preferred = False                                                     |
|                                       | is_admin_only = False                                                 |
|                                       | id = fc26c793-c3cc-44d9-b543-25af199373fd                             |
|                                       | share_instance_id = 6121a068-9615-4452-a2cd-27e2af0b923d              |
|                                       | path = 10.254.0.11:/shares/share-6121a068-9615-4452-a2cd-27e2af0b923d |
|                                       | preferred = False                                                     |
|                                       | is_admin_only = True                                                  |
|                                       | id = 4902805b-dac7-4bd8-bdde-8dae077de3da                             |
|                                       | share_instance_id = 6121a068-9615-4452-a2cd-27e2af0b923d              |
| share_server_id                       | f4455a66-b45b-4132-92b9-28ea5f5e6429                                  |
| share_group_id                        | None                                                                  |
| host                                  | network1@generic#GENERIC                                              |
| revert_to_snapshot_support            | False                                                                 |
| access_rules_status                   | active                                                                |
| snapshot_id                           | None                                                                  |
| create_share_from_snapshot_support    | True                                                                  |
| is_public                             | False                                                                 |
| task_state                            | None                                                                  |
| snapshot_support                      | True                                                                  |
| id                                    | a24b3222-9b1e-436d-a5e2-cc285d3e9b05                                  |
| size                                  | 1                                                                     |
| source_share_group_snapshot_member_id | None                                                                  |
| user_id                               | b33628be535a4cb083e30c880f874323                                      |
| name                                  | share1                                                                |
| share_type                            | 8d0b99f7-d481-496b-a4d7-ebffa3e3fa20                                  |
| has_replicas                          | False                                                                 |
| replication_type                      | None                                                                  |
| created_at                            | 2019-07-13T00:13:24.000000                                            |
| share_proto                           | NFS                                                                   |
| mount_snapshot_support                | False                                                                 |
| project_id                            | c800b6587a864dd8a93cea7fe7c686a6                                      |
| metadata                              | {}                                                                    |
+---------------------------------------+-----------------------------------------------------------------------+
[root@deploy ~]# manila snapshot-create --name mysnapshot --description "My Manila snapshot" share1
+-------------------+--------------------------------------+
| Property          | Value                                |
+-------------------+--------------------------------------+
| status            | creating                             |
| share_id          | a24b3222-9b1e-436d-a5e2-cc285d3e9b05 |
| user_id           | b33628be535a4cb083e30c880f874323     |
| description       | My Manila snapshot                   |
| created_at        | 2019-07-13T00:24:22.848368           |
| size              | 1                                    |
| share_proto       | NFS                                  |
| provider_location | None                                 |
| id                | c85c42c3-8e64-41da-b3c2-e547e7dd3b75 |
| project_id        | c800b6587a864dd8a93cea7fe7c686a6     |
| share_size        | 1                                    |
| name              | mysnapshot                           |
+-------------------+--------------------------------------+
[root@deploy ~]# manila snapshot-list
+--------------------------------------+--------------------------------------+-----------+------------+------------+
| ID                                   | Share ID                             | Status    | Name       | Share Size |
+--------------------------------------+--------------------------------------+-----------+------------+------------+
| c85c42c3-8e64-41da-b3c2-e547e7dd3b75 | a24b3222-9b1e-436d-a5e2-cc285d3e9b05 | available | mysnapshot | 1          |
+--------------------------------------+--------------------------------------+-----------+------------+------------+
manila create NFS 1 \--snapshot-id  c85c42c3-8e64-41da-b3c2-e547e7dd3b75 \--share-network demo-share-network1 \--share-type default_share_type \--name mysharefromsnap
[root@deploy ~]# manila show mysharefromsnap
+---------------------------------------+-----------------------------------------------------------------------+
| Property                              | Value                                                                 |
+---------------------------------------+-----------------------------------------------------------------------+
| status                                | available                                                             |
| share_type_name                       | default_share_type                                                    |
| description                           | None                                                                  |
| availability_zone                     | nova                                                                  |
| share_network_id                      | c7e32fae-0af3-4809-a0a5-f97635f0d0e8                                  |
| export_locations                      |                                                                       |
|                                       | path = 10.254.0.11:/shares/share-22f5df94-a054-4324-9592-a1d63ac82d25 |
|                                       | preferred = False                                                     |
|                                       | is_admin_only = False                                                 |
|                                       | id = b96597e8-7c5c-474d-a50f-1c6e5e99bd14                             |
|                                       | share_instance_id = 22f5df94-a054-4324-9592-a1d63ac82d25              |
|                                       | path = 10.254.0.11:/shares/share-22f5df94-a054-4324-9592-a1d63ac82d25 |
|                                       | preferred = False                                                     |
|                                       | is_admin_only = True                                                  |
|                                       | id = 8008c6df-9050-4ccd-a092-54dbebce59ed                             |
|                                       | share_instance_id = 22f5df94-a054-4324-9592-a1d63ac82d25              |
| share_server_id                       | f4455a66-b45b-4132-92b9-28ea5f5e6429                                  |
| share_group_id                        | None                                                                  |
| host                                  | network1@generic#GENERIC                                              |
| revert_to_snapshot_support            | False                                                                 |
| access_rules_status                   | active                                                                |
| snapshot_id                           | c85c42c3-8e64-41da-b3c2-e547e7dd3b75                                  |
| create_share_from_snapshot_support    | True                                                                  |
| is_public                             | False                                                                 |
| task_state                            | None                                                                  |
| snapshot_support                      | True                                                                  |
| id                                    | 6729d3c0-2b59-46af-b15d-44a2b5d7df44                                  |
| size                                  | 1                                                                     |
| source_share_group_snapshot_member_id | None                                                                  |
| user_id                               | b33628be535a4cb083e30c880f874323                                      |
| name                                  | mysharefromsnap                                                       |
| share_type                            | 8d0b99f7-d481-496b-a4d7-ebffa3e3fa20                                  |
| has_replicas                          | False                                                                 |
| replication_type                      | None                                                                  |
| created_at                            | 2019-07-13T00:30:19.000000                                            |
| share_proto                           | NFS                                                                   |
| mount_snapshot_support                | False                                                                 |
| project_id                            | c800b6587a864dd8a93cea7fe7c686a6                                      |
| metadata                              | {}                                                                    |
+---------------------------------------+-----------------------------------------------------------------------+
[root@deploy ~]# manila list
+--------------------------------------+-----------------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
| ID                                   | Name            | Size | Share Proto | Status    | Is Public | Share Type Name    | Host                     | Availability Zone |
+--------------------------------------+-----------------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
| 6729d3c0-2b59-46af-b15d-44a2b5d7df44 | mysharefromsnap | 1    | NFS         | available | False     | default_share_type | network1@generic#GENERIC | nova              |
| a24b3222-9b1e-436d-a5e2-cc285d3e9b05 | share1          | 1    | NFS         | available | False     | default_share_type | network1@generic#GENERIC | nova              |
+--------------------------------------+-----------------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
manila delete mysharefromsnap
manila snapshot-delete mysnapshot

2.3 共享扩容和缩减

[root@deploy ~]# manila extend share1 2
[root@deploy ~]# manila show share1
+---------------------------------------+-----------------------------------------------------------------------+
| Property                              | Value                                                                 |
+---------------------------------------+-----------------------------------------------------------------------+
| status                                | extending                                                             |
| share_type_name                       | default_share_type                                                    |
| description                           | None                                                                  |
| availability_zone                     | nova                                                                  |
| share_network_id                      | c7e32fae-0af3-4809-a0a5-f97635f0d0e8                                  |
| export_locations                      |                                                                       |
|                                       | path = 10.254.0.11:/shares/share-6121a068-9615-4452-a2cd-27e2af0b923d |
|                                       | preferred = False                                                     |
|                                       | is_admin_only = False                                                 |
|                                       | id = fc26c793-c3cc-44d9-b543-25af199373fd                             |
|                                       | share_instance_id = 6121a068-9615-4452-a2cd-27e2af0b923d              |
|                                       | path = 10.254.0.11:/shares/share-6121a068-9615-4452-a2cd-27e2af0b923d |
|                                       | preferred = False                                                     |
|                                       | is_admin_only = True                                                  |
|                                       | id = 4902805b-dac7-4bd8-bdde-8dae077de3da                             |
|                                       | share_instance_id = 6121a068-9615-4452-a2cd-27e2af0b923d              |
| share_server_id                       | f4455a66-b45b-4132-92b9-28ea5f5e6429                                  |
| share_group_id                        | None                                                                  |
| host                                  | network1@generic#GENERIC                                              |
| revert_to_snapshot_support            | False                                                                 |
| access_rules_status                   | active                                                                |
| snapshot_id                           | None                                                                  |
| create_share_from_snapshot_support    | True                                                                  |
| is_public                             | False                                                                 |
| task_state                            | None                                                                  |
| snapshot_support                      | True                                                                  |
| id                                    | a24b3222-9b1e-436d-a5e2-cc285d3e9b05                                  |
| size                                  | 1                                                                     |
| source_share_group_snapshot_member_id | None                                                                  |
| user_id                               | b33628be535a4cb083e30c880f874323                                      |
| name                                  | share1                                                                |
| share_type                            | 8d0b99f7-d481-496b-a4d7-ebffa3e3fa20                                  |
| has_replicas                          | False                                                                 |
| replication_type                      | None                                                                  |
| created_at                            | 2019-07-13T00:13:24.000000                                            |
| share_proto                           | NFS                                                                   |
| mount_snapshot_support                | False                                                                 |
| project_id                            | c800b6587a864dd8a93cea7fe7c686a6                                      |
| metadata                              | {}                                                                    |
+---------------------------------------+-----------------------------------------------------------------------+
root@ubuntu:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            976M     0  976M   0% /dev
tmpfs           200M  2.0M  198M   1% /run
/dev/vda1        19G  1.2G   17G   7% /
tmpfs           997M     0  997M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           997M     0  997M   0% /sys/fs/cgroup
tmpfs           200M     0  200M   0% /run/user/1000
/dev/vdb        2.0G  3.0M  1.9G   1% /shares/share-6121a068-9615-4452-a2cd-27e2af0b923d
tmpfs           200M     0  200M   0% /run/user/0
缩容:
[root@deploy ~]# manila shrink  share1 1
[root@deploy ~]# manila show share1
+---------------------------------------+-----------------------------------------------------------------------+
| Property                              | Value                                                                 |
+---------------------------------------+-----------------------------------------------------------------------+
| status                                | shrinking                                                             |
| share_type_name                       | default_share_type                                                    |
| description                           | None                                                                  |
| availability_zone                     | nova                                                                  |
| share_network_id                      | c7e32fae-0af3-4809-a0a5-f97635f0d0e8                                  |
| export_locations                      |                                                                       |
|                                       | path = 10.254.0.11:/shares/share-6121a068-9615-4452-a2cd-27e2af0b923d |
|                                       | preferred = False                                                     |
|                                       | is_admin_only = False                                                 |
|                                       | id = fc26c793-c3cc-44d9-b543-25af199373fd                             |
|                                       | share_instance_id = 6121a068-9615-4452-a2cd-27e2af0b923d              |
|                                       | path = 10.254.0.11:/shares/share-6121a068-9615-4452-a2cd-27e2af0b923d |
|                                       | preferred = False                                                     |
|                                       | is_admin_only = True                                                  |
|                                       | id = 4902805b-dac7-4bd8-bdde-8dae077de3da                             |
|                                       | share_instance_id = 6121a068-9615-4452-a2cd-27e2af0b923d              |
| share_server_id                       | f4455a66-b45b-4132-92b9-28ea5f5e6429                                  |
| share_group_id                        | None                                                                  |
| host                                  | network1@generic#GENERIC                                              |
| revert_to_snapshot_support            | False                                                                 |
| access_rules_status                   | active                                                                |
| snapshot_id                           | None                                                                  |
| create_share_from_snapshot_support    | True                                                                  |
| is_public                             | False                                                                 |
| task_state                            | None                                                                  |
| snapshot_support                      | True                                                                  |
| id                                    | a24b3222-9b1e-436d-a5e2-cc285d3e9b05                                  |
| size                                  | 2                                                                     |
| source_share_group_snapshot_member_id | None                                                                  |
| user_id                               | b33628be535a4cb083e30c880f874323                                      |
| name                                  | share1                                                                |
| share_type                            | 8d0b99f7-d481-496b-a4d7-ebffa3e3fa20                                  |
| has_replicas                          | False                                                                 |
| replication_type                      | None                                                                  |
| created_at                            | 2019-07-13T00:13:24.000000                                            |
| share_proto                           | NFS                                                                   |
| mount_snapshot_support                | False                                                                 |
| project_id                            | c800b6587a864dd8a93cea7fe7c686a6                                      |
| metadata                              | {}                                                                    |
+---------------------------------------+-----------------------------------------------------------------------+
[root@deploy ~]# manila list
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
| ID                                   | Name   | Size | Share Proto | Status    | Is Public | Share Type Name    | Host                     | Availability Zone |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
| a24b3222-9b1e-436d-a5e2-cc285d3e9b05 | share1 | 1    | NFS         | available | False     | default_share_type | network1@generic#GENERIC | nova              |
+--------------------------------------+--------+------+-------------+-----------+-----------+--------------------+--------------------------+-------------------+
root@ubuntu:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            976M     0  976M   0% /dev
tmpfs           200M  2.0M  198M   1% /run
/dev/vda1        19G  1.2G   17G   7% /
tmpfs           997M     0  997M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           997M     0  997M   0% /sys/fs/cgroup
tmpfs           200M     0  200M   0% /run/user/1000
tmpfs           200M     0  200M   0% /run/user/0
/dev/vdb        976M  2.6M  907M   1% /shares/share-6121a068-9615-4452-a2cd-27e2af0b923d

也可以关注微信公众号:启航学城,干货满满,扫码关注:

也欢迎加入OpenStack技术交流群,进行技术交流。

转载于:https://www.cnblogs.com/jonc/p/11194259.html

Openstack-实践4.Manila 部署及功能验证相关推荐

  1. Openstack云平台脚本部署之Ceph存储集群配置(十四)

    目录 一.简介 二.部署脚本 三.参考文档 四.源码 五.系列文章 一.简介 Openstack的后端存储对接Ceph分布式统一存储,将Glance镜像.Nova虚拟机及快照.Cinder-Volum ...

  2. OpenStack实践系列②认证服务Keystone

    OpenStack实践系列②认证服务Keystone 三.实战OpenStack之控制节点 3.1 CentOS7的时间同步服务器chrony 下载chrony # yum install -y ch ...

  3. Openstack组件实现原理 — Keystone认证功能

    前言 Keystone实现始终围绕着Keystone所实现的功能来展开,所以在理解其实现之前,建议大家尝试通过安装Keystone这一个过程来感受Keystone在Openstack架构中所充当的角色 ...

  4. 服务器部署邮件功能_真正连续部署的功能标志

    服务器部署邮件功能 Even the best software development teams I work with struggle to solve the problem of comp ...

  5. OpenStack全网最全部署教程

    简单介绍 简单点来说就是一个云,一个属于自己的云平台,openstack的原版是亚马逊云,可以说openstack就是Rackspace和NASA的抄袭产物. 官方点说一个云平台管理的项目,它不是一个 ...

  6. 1、nifi-1.9.2介绍、单机部署及简单验证

    Apache NiFi系列文章 1.nifi-1.9.2介绍.单机部署及简单验证 2.NIFI应用示例-GetFile和PutFile应用 3.NIFI处理器介绍.FlowFlie常见属性.模板介绍和 ...

  7. 升讯威微信营销系统开发实践:(3)功能介绍与此项目推广过程的一些体会( 完整开源于 Github)...

    GitHub:https://github.com/iccb1013/Sheng.WeixinConstruction因为个人精力时间有限,不会再对现有代码进行更新维护,不过微信接口比较稳定,经测试至 ...

  8. Ranger功能验证

    Apache Ranger功能验证 1.概况 1.1.Apache Ambari Apache Ambari 是一个基于 Web 的 Apache Hadoop 集群的供应.管理和监控.Ambari ...

  9. openstack跟着官网部署过程

    openstack搭建 环境准备 主机 配置 ip地址 网卡模式 控制节点 4核4G eth0:192.168.200.10/24;eth1:10.0.1.10/24 NAT/仅主机 计算节点 4核4 ...

最新文章

  1. 史上最全的“大数据”学习资源
  2. linux tr命令书上的一个很好的例子
  3. python处理进度条
  4. 剑指offer之把字符串里面空格替换成百分之20[时间复杂度是O(n)]
  5. 《白鹿原》金句摘抄(五)
  6. 多个定时器相互干扰的问题_相互问题
  7. 关于STM32的两个小问题的总结
  8. LeetCode LCP 34. 二叉树染色(树上DP)
  9. chartjs更新数据 vue_vue.js - 在vue中 怎么更改chart图表的文字大小
  10. UI加载动效模板|优秀作品给UI设计师做个示范
  11. wincc怎么做数据库_关于WINCC通过PLCSIM来进行仿真中要怎么设置?
  12. SQLServer基本操作
  13. 读书节第三日丨产品大咖荐读直播齐上阵,学院超级会员限时开抢!
  14. CleanMyMac X4.12.2免费版MAC电脑系统磁盘优化工具
  15. 机器学习数据分析极简思路及sklearn算法小试
  16. 群晖NAS 7.X 搭建个人博客网站并发布公网 1/8
  17. 移动硬盘安装centos8
  18. PhpExcel 写一个漂亮的表格
  19. 【菜谱】口感好的快手菜
  20. 计算机英语考试试题一附答案,计算机英语考试试题一附答案.doc

热门文章

  1. 配置文档的访问权限 配置LDAP家目录漫游
  2. 简单理解操作系统之存储器管理
  3. 计算机英文缩写ISA,计算机中的英文缩写
  4. 研发管理01:项目管理(PM) 与 Scrum Master (SM)
  5. gin实现简易服务器
  6. 微信小程序js把数字转化成字母
  7. Linux下安装bugzilla
  8. 2020东软面试题小计(校招Java篇)
  9. udp ue4 通讯_UE4 UDP通信
  10. awk 分隔符_awk 命令快速入门