我們都擔心保持資料和檔案的安全和完整,但是否有可能資料被損壞,並且在沒有任何問題通知或警告的情況下被使用者訪問?今天的超級使用者問答帖子回答了一位憂心忡忡的讀者的問題。
今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。
圖片由通用公司(Flickr)提供。
超級使用者閱讀器topo morto想知道硬碟上的資料是否可以降級,是否可以在沒有損壞警告的情況下訪問:
Is it possible that physical degradation of a hard drive could cause bits to “flip” in a file’s contents without the operating system noticing the change and notifying the user about it when reading the file? For example, could a “p” (binary 01110000) in an ASCII text file change to a “q” (binary 01110001), then when a user opens the file, they see “q” without being aware that a failure has occurred?
I am interested in answers relating to FAT, NTFS, or ReFS (if it makes a difference). I want to know if operating systems protect users from this, or if we should be checking our data for variances between copies over time.
硬碟上的資料是否會降級,並且可以在沒有損壞警告的情況下訪問?
超級使用者貢獻者Guntram Blohm為我們提供了答案:
Yes, there is a thing called bit rot. But no, it will not affect a user unnoticed.
When a hard drive writes a sector to the platters, it does not just write the bits in the same way that they are stored in RAM, it uses an encoding to make sure there are no sequences of the same bit that are too long. It also adds ECC codes that allow it to repair errors that affect a few bits and detect errors that affect more than a few bits.
When the hard drive reads the sector, it checks these ECC codes and repairs the data if necessary (and if possible). What happens next depends on the circumstances and the firmware of the hard drive, which is influenced by the designation of the drive.
This is one of the main differences between hard drives that are sold as “desktop”, “NAS/RAID”, or “video surveillance” hard drives. A RAID hard drive can just give up quickly and make the controller repair the sector to avoid latency on the user’s side. A desktop hard drive will continue trying again and again because having the user wait a few seconds is probably better than telling them the data is lost. And a video hard drive values c***tant data rates more than error recovery as a damaged frame will typically not even be noticed.
At any rate, the hard drive will know if there has been bit rot, will typically recover from it, and if it cannot, it will tell the controller which will in turn tell the driver which will then tell the operating system. Then, it is up to the operating system to present the error to the user and act on it. This is why cybernard says:
The hard drive will know if there is something wrong with a sector, but it will not know which bits have failed. A single bit that has failed will always be caught by ECC.
Please note that chkdsk and file systems that automatically repair themselves do not address repairing data within files. These are targeted at corruption within the structure of the file system itself, like a difference in a file’s size between the directory entry and the number of allocated blocks. The self-healing feature of NTFS will detect structural damage and prevent it from affecting your data further, but it will not repair any data that is already damaged.
There are, of course, other reas*** why data may become damaged. For example, bad RAM on a controller may alter data before it is even sent to the hard drive. In that case, no mechani** on the hard drive will detect or repair the data, and this may be one reason why the structure of a file system is damaged. Other reas*** include software bugs, blackouts while writing to the hard drive (although this is addressed by file system journaling), or bad file system drivers (the NTFS driver on Linux defaulted to read-only for a long time since NTFS was reverse engineered, not documented, and the developers did not trust their own code).
These other reas*** are why some file systems, like ZFS, keep additional check sum information in order to detect errors. They are designed to protect you from a lot more things that can go wrong than just bit rot.
有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。
...net連線和連線速度,而不需要儲存。另一方面,下載需要硬碟儲存,但並不取決於你在哪裡或你的網際網路連線。 當影片、音樂或資料等檔案從一個裝置或internet複製到另一個裝置(如電話或計算機)時,稱為下載。下載檔案時...
... 過度清潔的最終形式是擦拭硬碟。當你重置windows10時,你可以選擇保持你的個人檔案完好無損,或者擦除所有內容以重新開始。 ...
...情況下刪除你的資料,也不會讓你有機會使用可用的谷歌硬碟儲存來儲存寶貴的備份。似乎這還不夠,無法恢復已刪除的備份。 ...
... 採用帶有序列ATA(SATA)聯結器的硬碟驅動器來取代IDE,以及增強型IDE(並行ATA)驅動器。SATA消除了並行硬碟驅動器之間的主從關係,每個驅動器都使用自己的SATA介面卡連線到主機板。 ...
...機的短期記憶體,它儲存著你的計算機正在使用的資料。硬碟是一種長期記憶體,用於儲存重啟之間需要訪問的內容。 ...
...的應用程式儲存到裝置的RAM中,而Hibernate則將它們儲存到硬碟中。睡眠類似於把電視置於待機狀態,而休眠則讓你的電腦完全關機。 ...
固態驅動器(SSD)比傳統的硬碟驅動器(HDD)更快、更穩定、功耗更低。但是固態硬碟並不是完美無缺的,在預期的5到7年的使用壽命之前就可能出現故障。 ...
把外接硬碟**電腦後,發現它比以前慢了?如果你經常使用這個驅動器,這很容易解釋:可能是因為它太舊了或者需要碎片整理。 ...