共享文件系统

共享文件系统

创建service镜像

注解

在典型部署结构中,您需要从支持网络共享文件系统比如NFS/CIFS的镜像创建一个实例,用于评估共享文件系统服务。这个教程应该使用CirrOS镜像创建实例来降低评估的资源需求。然而,CirrOS镜像缺少网络文件系统的支持。为了评估共享文件系统服务,这个教程使用``manila-share-service``镜像创建了一个常规实例,这是因为它支持网络文件系统,使用 ``manila-service-flavor``类型限制资源消耗,使用计算节点上的256M内存。

  1. 下载共享服务器的源镜像:

    $ wget http://tarballs.openstack.org/manila-image-elements/images/manila-service-image-master.qcow2
    
  2. 添加镜像到镜像服务里:

    # openstack image create "manila-service-image" \
    --file manila-service-image-master.qcow2 \
    --disk-format qcow2 \
    --container-format bare \
    --public
    +------------------+------------------------------------------------------+
    | Field            | Value                                                |
    +------------------+------------------------------------------------------+
    | checksum         | abb1fdf972162c7214db9fad43229dad                     |
    | container_format | bare                                                 |
    | created_at       | 2016-03-16T23:37:51Z                                 |
    | disk_format      | qcow2                                                |
    | file             | /v2/images/dcec8c7f-4c59-4223-a06f-220231b49c0c/file |
    | id               | dcec8c7f-4c59-4223-a06f-220231b49c0c                 |
    | min_disk         | 0                                                    |
    | min_ram          | 0                                                    |
    | name             | manila-service-image                                 |
    | owner            | fd4a657caa054ca99d8b4179722f49de                     |
    | protected        | False                                                |
    | schema           | /v2/schemas/image                                    |
    | size             | 324665344                                            |
    | status           | active                                               |
    | tags             |                                                      |
    | updated_at       | 2016-03-16T23:37:55Z                                 |
    | virtual_size     | None                                                 |
    | visibility       | public                                               |
    +------------------+------------------------------------------------------+
    
  3. 创建一个新的支持服务镜像的类型:

    # openstack flavor create manila-service-flavor --id 100 --ram 256 --disk 0 --vcpus 1
    +----------------------------+-----------------------+
    | Field                      | Value                 |
    +----------------------------+-----------------------+
    | OS-FLV-DISABLED:disabled   | False                 |
    | OS-FLV-EXT-DATA:ephemeral  | 0                     |
    | disk                       | 0                     |
    | id                         | 100                   |
    | name                       | manila-service-flavor |
    | os-flavor-access:is_public | True                  |
    | ram                        | 256                   |
    | rxtx_factor                | 1.0                   |
    | swap                       |                       |
    | vcpus                      | 1                     |
    +----------------------------+-----------------------+
    

    注解

    类型是镜像规格,镜像直接可以不同。

启动服务镜像的实例

注解

这个章节使用``manila-service-image``镜像创建一个实例用于挂载共享。

  1. 使用``manila-service-image`` 和 ``manila-service-flavor``启动一个实例。

  2. 使用``manila``作为用户和密码登陆到实例。

创建共享

创建一个共享文件系统服务选项,选项参见:ref:manila-storage

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.