修復損壞的 Xsan 檔案系統
本文說明如何使用 cvfsck 修復 Xsan 檔案系統。
請先卸除並停止你的 Xsan 檔案系統,再進行檢查或修復。在已裝載的檔案系統上執行 cvfsck,可能會導致系統發出檔案系統已損毀的錯誤指示。
判斷 Xsan 檔案系統是否已損毀
在「終端機」中使用下列指令:
sudo cvfsck -j VolumeName
sudo cvfsck -nv VolumeName
以 Xsan 卷宗的實際名稱取代 VolumeName。
cvfsck 執行時,會產生關於檔案系統狀態的統計數據。統計數據顯示後,你可能會看到提示,表示檔案系統已修改。出現這個提示代表你的檔案系統需要修復。如果看到此訊息,你應該針對你的 Xsan 版本繼續執行後續的步驟。
如果你對狀態回報為「Clean」或「Dirty」的檔案系統有疑慮,請在此了解如何使用 cvfsck 判斷是否需要修復。如果 cvfsck 回報檔案系統為「Dirty」,並不代表檔案系統一定需要修復。
修復損壞的 Xsan 檔案系統
如果你使用的是 Xsan 1.2 或之前的版本,請使用這些步驟。
卸除所有用戶端和後設資料控制器上的 Xsan 卷宗。
停止 Xsan 卷宗。
在 Xsan 4 和以上版本中,如果你在 Server App 中停止卷宗,該卷宗就會卸除。在之前的版本中,請先使用 Xsan Admin 卸除卷宗,然後再停止該卷宗。
在後設資料控制器上開啟「終端機」。
執行下列指令,並在出現提示時進行認證:
sudo cvfsck -wv VolumeNameWhen cvfsck exits, it will report that the filesystem was modified.
執行下列指令,確認修復程序已完成:
sudo cvfsck -nv VolumeNameAt this point, if cvfsck reports that the filesystem was modified or would've been modified, you should contact Apple support.
針對 Xsan 1.2 或之前版本
使用 Xsan Admin 從後設資料控制器及 Xsan 用戶端設備卸除卷宗。
在 Xsan Admin 中停止 Xsan 卷宗。
在後設資料控制器上開啟「終端機」。
一次執行下列指令,並在出現提示時進行認證:
cd /Library/Filesystems/Xsan/binsudo ./cvfsck -j VolumeNamesudo ./cvfsck VolumeNameWhen cvfsck exits, it will report that the filesystem was modified.
執行下列指令,確認修復程序已完成:
sudo cvfsck -nv VolumeNameAt this point, if cvfsck reports that the filesystem was modified or would've been modified, you should contact Apple support.