Repair a damaged Xsan filesystem

Learn how to repair Xsan filesystems using cvfsck.

Unmount and stop your Xsan filesystem before checking or repairing it. Running cvfsck on filesystems that are mounted may result in incorrect indications that the filesystem is corrupted.

Determine if an Xsan filesystem is damaged

Use these commands in Terminal:

sudo cvfsck -j VolumeName 
sudo cvfsck -nv VolumeName

Replace VolumeName with the actual name of the Xsan volume.

While cvfsck is running, it produces statistics about the state of the filesystem. After the statistics appear, there might be an alert that the filesystem has been modified. This alert means that your filesystem needs to be repaired. If you see this message, you should continue with the next set of steps for your version of Xsan.

If you're concerned that the filesystem status is reported as "Clean" or "Dirty", learn how to use cvfsck to decide if you need to make a repair. If cvfsck reports that a filesystem is "Dirty", this doesn't necessarily mean the filesystem needs repair. 

Repair a damaged Xsan filesystem

Use these steps if you are using Xsan 1.2 or earlier.

  1. Unmount the Xsan volume on all clients and metadata controllers.
  2. Stop the Xsan volume.
    In Xsan 4 and later, if you stop the volume in Server app, it unmounts the volume. In earlier versions, use Xsan Admin to unmount the volume before stopping it.
  3. On a Metadata Controller, open Terminal.
  4. Execute the following command, and authenticate when prompted:
    sudo cvfsck -wv VolumeName
    

    When cvfsck exits, it will report that the filesystem was modified.

  5. Run the following command to ensure that the repair process was complete:
    sudo cvfsck -nv VolumeName
    

    At this point, if cvfsck reports that the filesystem was modified or would've been modified, you should contact Apple support.

For Xsan 1.2 or earlier

  1. Use Xsan Admin to unmount the volume from the Metadata Controllers and from the Xsan client units.
  2. In Xsan Admin, stop the Xsan volume.
  3. On a Metadata Controller, open Terminal.
  4. Execute the following commands one at a time, and authenticate when prompted:
    cd /Library/Filesystems/Xsan/bin
    
    sudo ./cvfsck -j VolumeName
    
    sudo ./cvfsck VolumeName
    

    When cvfsck exits, it will report that the filesystem was modified.

  5. Run the following command to ensure that the repair process was complete:
    sudo cvfsck -nv VolumeName
    

    At this point, if cvfsck reports that the filesystem was modified or would've been modified, you should contact Apple support.

Last Modified: