このコンテンツは選択した言語では利用できません。

19.3. Restore a bad file


When bad files are revealed by the scrubber, you can perform the following process to heal the file by recovering a copy from a replicate volume.

Important

The following procedure is easier if GFID-to-path translation is enabled.
Mount all volumes using the -oaux-gfid-mount mount option, and enable GFID-to-path translation on each volume by running the following command.
# gluster volume set VOLNAME build-pgfid on
Copy to Clipboard Toggle word wrap
Files created before this option was enabled must be looked up with the find command.

Procedure 19.1. Restoring a bad file from a replicate volume

  1. Note the identifiers of bad files

    Check the output of the scrub status command to determine the identifiers of corrupted files.
    # gluster volume bitrot VOLNAME scrub status
    Volume name: VOLNAME
    ...
    Node name: NODENAME
    ...
    Error count: 3
    Corrupted objects:
    5f61ade8-49fb-4c37-af84-c95041ff4bf5
    e8561c6b-f881-499b-808b-7fa2bce190f7
    eff2433f-eae9-48ba-bdef-839603c9434c
    Copy to Clipboard Toggle word wrap
  2. Determine the path of each corrupted object

    For files created after GFID-to-path translation was enabled, use the getfattr command to determine the path of the corrupted files.
    # getfattr -n glusterfs.ancestry.path -e text
    /mnt/VOLNAME/.gfid/GFID
    ...
    glusterfs.ancestry.path="/path/to/corrupted_file"
    Copy to Clipboard Toggle word wrap
    For files created before GFID-to-path translation was enabled, use the find command to determine the path of the corrupted file and the index file that match the identifying GFID.
    # find /rhgs/brick*/.glusterfs -name GFID
    /rhgs/brick1/.glusterfs/path/to/GFID
    Copy to Clipboard Toggle word wrap
    # find /rhgs -samefile /rhgs/brick1/.glusterfs/path/to/GFID
    /rhgs/brick1/.glusterfs/path/to/GFID
    /rhgs/brick1/path/to/corrupted_file
    Copy to Clipboard Toggle word wrap
  3. Delete the corrupted files

    Delete the corrupted files from the path output by the getfattr or find command.
  4. Delete the GFID file

    Delete the GFID file from the /rhgs/brickN/.glusterfs directory.
  5. Heal the file

    If you have client self-heal enabled, the file is healed the next time that you access it.
    If you do not have client self-heal enabled, you must manually heal the volume with the following command.
    # gluster volume heal VOLNAME
    Copy to Clipboard Toggle word wrap
    The next time that the bitrot scrubber runs, this GFID is no longer listed (unless it has become corrupted again).
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat