Linux
USB驅動器在一段時間後變為只讀
我們的備份“解決方案”包括將 USB 驅動器連接到備份伺服器,並執行自定義腳本
rsync
將數據儲存到 USB 驅動器上。但是,一段時間後,驅動器變為只讀。這是 dmesg 的輸出:[2502923.708171] sdb: sdb1 [2502923.742767] sd 36:0:0:0: [sdb] Attached SCSI disk [2502980.368020] kjournald starting. Commit interval 5 seconds [2502980.482705] EXT3 FS on sdb1, internal journal [2502980.482705] EXT3-fs: recovery complete. [2502980.488709] EXT3-fs: mounted filesystem with ordered data mode. [2590744.432168] usb 1-2: USB disconnect, address 36 [2590744.432655] sd 36:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK [2590744.432784] end_request: I/O error, dev sdb, sector 795108447 [2590744.432857] Buffer I/O error on device sdb1, logical block 99388548 [2590744.432925] lost page write due to I/O error on sdb1 [2590744.433002] Buffer I/O error on device sdb1, logical block 99388549 [2590744.433070] lost page write due to I/O error on sdb1 [2590744.433139] Buffer I/O error on device sdb1, logical block 99388550 [2590744.433207] lost page write due to I/O error on sdb1 [2590744.433275] Buffer I/O error on device sdb1, logical block 99388551 [2590744.433343] lost page write due to I/O error on sdb1 [2590744.433410] Buffer I/O error on device sdb1, logical block 99388552 [2590744.433478] lost page write due to I/O error on sdb1 [2590744.433545] Buffer I/O error on device sdb1, logical block 99388553 [2590744.433613] lost page write due to I/O error on sdb1 [2590744.433681] Buffer I/O error on device sdb1, logical block 99388554 [2590744.433749] lost page write due to I/O error on sdb1 [2590744.433817] Buffer I/O error on device sdb1, logical block 99388555 [2590744.433884] lost page write due to I/O error on sdb1 [2590744.433953] Buffer I/O error on device sdb1, logical block 99388556 [2590744.434021] lost page write due to I/O error on sdb1 [2590744.434089] Buffer I/O error on device sdb1, logical block 99388557 [2590744.434157] lost page write due to I/O error on sdb1 [2590744.443942] sd 36:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK [2590744.447945] end_request: I/O error, dev sdb, sector 795108687 [2590744.452065] Aborting journal on device sdb1. [2590744.452065] __journal_remove_journal_head: freeing b_committed_data [2590744.452410] EXT3-fs error (device sdb1) in ext3_ordered_writepage: IO failure [2590744.453795] __journal_remove_journal_head: freeing b_committed_data [2590744.454481] ext3_abort called. [2590744.454548] EXT3-fs error (device sdb1): ext3_journal_start_sb: Detected aborted journal [2590744.454697] Remounting filesystem read-only [2590744.457033] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #11968705 offset 0 [2590776.909451] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #122881 offset 0 [2590777.637030] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #30015490 offset 0 [2590949.026134] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 [2591121.070802] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 [2591211.109072] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 [2591300.269439] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 [2591357.322837] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 [2591418.664452] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 [2591572.792037] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 [2591667.952082] EXT3-fs error (device sdb1): ext3_find_entry: reading directory #2 offset 0 [2591669.639597] __ratelimit: 3981 messages suppressed [2591669.639658] Buffer I/O error on device sdb1, logical block 61014530 [2591669.639698] lost page write due to I/O error on sdb1
我沒有在我的腳本中解除安裝驅動器;任何人都可以提出什麼會導致這種情況,所以我可以解決它?
當我使用固定磁碟發生這種情況時,這意味著磁碟正在死去。這很可能就是這裡發生的事情。如果這是一個在位置之間反复連接/斷開/傳輸的備份驅動器,則很可能是衝擊或反复的熱變化導致了缺陷。這些 USB 驅動器中的大多數都沒有針對跌落/衝擊或熱變化進行特殊保護,它們只是 USB 到 SATA 塑膠外殼中的標準 SATA 驅動器。
我對磁碟的經驗法則,尤其是在備份方面,是:如果有疑問,就把它扔掉。
要排除 USB 基礎設施,您可以在另一台電腦上廣泛執行磁碟,這實際上並不能解決您的問題,因為您仍然需要備份電腦。