Questo contenuto non è disponibile nella lingua selezionata.

Chapter 8. Ceph File System snapshots


As a storage administrator, you can take a point-in-time snapshot of a Ceph File System (CephFS) directory. CephFS snapshots are asynchronous, and you can choose which directory snapshots are created in.

Prerequisites

  • A running, and healthy Red Hat Ceph Storage cluster.
  • Deployment of a Ceph File System.

8.1. Ceph File System snapshots

The Ceph File System (CephFS) snapshotting feature is enabled by default on new Ceph File Systems, but must be manually enabled on existing Ceph File Systems. CephFS snapshots create an immutable, point-in-time view of a Ceph File System. CephFS snapshots are asynchronous and are kept in a special hidden directory in the CephFS directory named .snap. You can specify snapshot creation for any directory within a Ceph File System. When specifying a directory, the snapshot also includes all the subdirectories beneath it.

Warning

Each Ceph Metadata Server (MDS) cluster allocates the snap identifiers independently. Using snapshots for multiple Ceph File Systems that are sharing a single pool causes snapshot collisions, and results in missing file data.

8.2. Creating a snapshot for a Ceph File System

You can create an immutable, point-in-time view of a Ceph File System (CephFS) by creating a snapshot.

Note

For a new Ceph File System, snapshots are enabled by default.

Prerequisites

  • A running, and healthy Red Hat Ceph Storage cluster.
  • Deployment of a Ceph File System.
  • Root-level access to a Ceph Metadata Server (MDS) node.

Procedure

  1. Log into the Cephadm shell:

    Example

    [root@mds ~]# cephadm shell
    Copy to Clipboard Toggle word wrap

  2. For existing Ceph File Systems, enable the snapshotting feature:

    Syntax

    ceph fs set FILE_SYSTEM_NAME allow_new_snaps true
    Copy to Clipboard Toggle word wrap

    Example

    [ceph: root@mds ~]# ceph fs set cephfs01 allow_new_snaps true
    Copy to Clipboard Toggle word wrap

  3. Create a new snapshot subdirectory under the .snap directory:

    Syntax

    mkdir NEW_DIRECTORY_PATH
    Copy to Clipboard Toggle word wrap

    Example

    [ceph: root@mds ~]# mkdir /.snap/new-snaps
    Copy to Clipboard Toggle word wrap

    This example creates the new-snaps subdirectory, and this informs the Ceph Metadata Server (MDS) to start making snapshots.

    1. To delete snapshots:

      Syntax

      rmdir NEW_DIRECTORY_PATH
      Copy to Clipboard Toggle word wrap

      Example

      [ceph: root@mds ~]# rmdir /.snap/new-snaps
      Copy to Clipboard Toggle word wrap

      Important

      Attempting to delete root-level snapshots, which might contain underlying snapshots, will fail.

Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat