我要评分
获取效率
正确性
完整性
易理解

Configuring File Storage

Defining Ceph Service Requirements

  1. Open the site.yml file.
    1
    vim site.yml
    
  2. Add the mdss option, as shown in the following figure.

Defining the Cluster Host Service

Open the hosts file in the ceph-ansible directory.

1
vi hosts

Modify the applications on each node in the cluster as required.

Defining the Ceph Cluster Configuration

  1. Open the all.yml file.
    1
    vim all.yml
    
  2. Search for the "CephFS" keyword and modify the configuration as follows:
    • Online Ceph download mode
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      ceph_origin: repository
      ceph_repository: community
      ceph_mirror: http://download.ceph.com
      ceph_stable_release: nautilus
      ceph_stable_repo: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}"
      ceph_stable_redhat_distro: el7
      monitor_interface: enp133s0
      journal_size: 5120
      public_network: 172.19.106.0/0
      cluster_network: 172.19.106.0/0
      osd_objectstore: bluestore
      
      # CEPHFS #
      ##########
      cephfs: cephfs # name of the ceph filesystem
      cephfs_data_pool:
          name: "{{ cephfs_data if cephfs_data is defined else 'cephfs_data' }}"
          pg_num: "{{ osd_pool_default_pg_num }}"
          pgp_num: "{{ osd_pool_default_pg_num }}"
          rule_name: "replicated_rule"
          type: 1
          #  erasure_profile: ""
          #  expected_num_objects: ""
          application: "cephfs"
          size: "{{ osd_pool_default_size }}"
          min_size: "{{ osd_pool_default_min_size }}"
      cephfs_metadata_pool:
          name: "{{ cephfs_metadata if cephfs_metadata is defined else 'cephfs_metadata' }}"
          pg_num: "{{ osd_pool_default_pg_num }}"
          pgp_num: "{{ osd_pool_default_pg_num }}"
          rule_name: "replicated_rule"
          type: 1
          #  erasure_profile: ""
          #  expected_num_objects: ""
          application: "cephfs"
          size: "{{ osd_pool_default_size }}"
          min_size: "{{ osd_pool_default_min_size }}"
      cephfs_pools:
          - "{{ cephfs_data_pool }}"
          - "{{ cephfs_metadata_pool }}"
      

      monitor_interface indicates the network interface device ID of the public network.

    • Offline Ceph download mode
      1
      2
      3
      ceph_origin: distro
      ceph_repository: local
      ceph_stable_release: nautilus
      

Defining OSDs

Define the required OSDs by referring to Defining OSDs.