Adding data pools

The Ceph File System (CephFS) supports adding more than one pool to be used for storing data.

Before you begin

Before you begin, be sure that you have root-level access to the Ceph Monitor node.

About this task

Adding data pools can be useful for:
  • Storing log data on reduced redundancy pools.
  • Storing user home directories on an SSD or NVMe pool.
  • Basic data segmentation.

Before using another data pool in the Ceph File System, you must add a data pool.

By default, for storing file data, CephFS uses the initial data pool that was specified during its creation. To use a secondary data pool, you must also configure a part of the file system hierarchy to store file data in that pool or optionally within a namespace of that pool, using file and directory layouts.

Procedure

  1. Create a data pool.
    ceph osd pool create POOL_NAME
    Replace POOL_NAME with the name of the pool.
    For example,
    [ceph: root@host01 /]# ceph osd pool create cephfs_data_ssd
    
    pool 'cephfs_data_ssd' created
  2. Add the newly created pool under the control of the Metadata Servers.
    ceph fs add_data_pool FS_NAME POOL_NAME
    • Replace FS_NAME with the name of the file system.
    • Replace POOL_NAME with the name of the pool.
    For example,
    [ceph: root@host01 /]# ceph fs add_data_pool cephfs cephfs_data_ssd
    
    added data pool 6 to fsmap
  3. Verify that the pool was successfully added.
    For example,
    [ceph: root@host01 /]# ceph fs ls
    
    name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data cephfs_data_ssd]
  4. Optional: Remove a data pool from the file system.
    ceph fs rm_data_pool FS_NAMEPOOL_NAME
    For example,
    [ceph: root@host01 /]# ceph fs rm_data_pool cephfs cephfs_data_ssd
    
    removed data pool 6 from fsmap
    After removing a data pool, verify that the pool was successfully removed.
    For example,
    [ceph: root@host01 /]# ceph fs ls
    
    name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data]
  5. If you use the cephx authentication, make sure that clients can access the new pool.