是否能對檔案系統的資料塊進行校驗?

時間 2021-06-18 01:17:25

1樓:

在linux下,目前只有ZFS和Btrfs提供了對資料塊實時效驗的功能,校驗是預設開啟的。windows的ReFS也提供資料塊的效驗,不過要手動開啟。蘋果最新的APFS不提供資料塊效驗功能。

2樓:長軍

以xfs來舉例,還有乙個xfs_repair命令可以修復檔案系統。不僅僅是元資料。

Checks Performed

Inconsistencies corrected include the following:

1. Inode and inode blockmap (addressing) checks: bad magic number in inode, bad magic numbers in inode blockmap blocks, extents out of order, incorrect number of records ininode blockmap blocks, blocks claimed that are not in a legal data area of the filesystem, blocks that are claimed by more than one inode.

3. Size checks: number of blocks claimed by inode inconsistent with inode size, directory size not block aligned, inode size not consistent with inode format.

5. Pathname checks: files or directories not referenced by a pathname starting from the filesystem root, illegal pathname components.

6. Link count checks: link counts that do not agree with the number of directory references to the inode.

8. Super Block checks: total free block and/or free i-node count incorrect, filesystem geometry inconsistent, secondary and primary superblocks contradictory.

Orphaned files and directories (allocated, in-use but unreferenced) are reconnected by placing them in the lost+found directory. The name assigned is the inode number.

另外,你說的「資料塊損壞」具體是指什麼情況?如果是指檔案資料丟失的話,如果沒有高可用設定,或者備份的話,資料就會永遠丟失,因為無法從現有的情報推算出你丟失的資料是什麼。

所以人們要養成勤備份的好習慣。

資料庫和檔案系統是什麼關係?

榮記 早期電腦程式通過檔案系統的程式設計介面管理資料有很多不方便的地方,比如資料很容易冗餘 資料格式和讀寫的應用程式繫結緊密,不方便共享 需要程式自己保證資料的一致性等等。而當時很多資料都是屬於有關係的資料,所以在上層做一層關聯式資料庫概念的抽象封裝,通過統一標準的資料庫介面訪問資料。關聯式資料庫提...

SSD 是否需要使用特別的檔案系統?

簡要地回答 不需要 原因 SSD內部存在乙個FTL Flash Translation Layer 這個FTL向上提供block介面 這的block是指塊裝置的block 向下操作SSD內的儲存單元 Package 這些操作包括但不限於 位址翻譯 損耗均衡 GC等等 所以在作業系統看來,SSD與HD...

通過資料庫實現檔案系統與直接使用作業系統的檔案系統各有哪些優勢和劣勢?

liujunsong 這是個很好的問題。如果要摳字眼的話,首先要定義問題裡面的第乙個檔案系統是乙個什麼概念。一般的理解,這個檔案系統是指實現了類似作業系統檔案管理功能的檔案訪問介面。可想而知,如果要在資料庫上直接全部實現這些,其工作量是相當驚人的。這種情況下,在資料量比較小的時候,是沒有什麼問題的,...