我收到以下錯誤:
[root@mediaserv ~]# mount /dev/mapper/media1 /media
mount: /media: can't read superblock on /dev/mapper/media1.
這是 Fedora 33。我上面有一個 GPT 分割區 /dev/sdc1,該分割區使用 XFS 檔案系統使用 LUKSv2 進行加密。
[root@mediaserv ~]# lsblk /dev/sdc
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdc 8:32 1 50.9T 0 disk
└─sdc1 8:33 1 50.9T 0 part
└─media1 253:0 0 50.9T 0 crypt
[root@mediaserv ~]#
RAID 最終處於降級模式。我很可能在安裝新風扇時撞到了第一個驅動器上的電纜。不管怎樣,在我發現它之前,在降級模式下啟動幾個小時後。我將其關閉,從救援映像啟動到單一用戶模式,然後讓它運行以重建陣列。這花了大約 14 個小時。
重新啟動它時,系統會提示我輸入分割區的 LUK 密碼,但它就在那裡。我讓它運行了大約 8 個小時,不確定後台是否修復了某些問題。
我再次從救援啟動。從/etc/crypttab
和中註解掉檔案系統/etc/fstab
,並且能夠在/media
未安裝檔案系統的情況下登入系統。
我能夠cryptsetup luksOpen /dev/sdc1 media1
成功運行;該分區似乎解密沒有錯誤。
當我運行 mount 命令(上面)時,我得到以下內容/var/log/messages
:
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#340 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#340 Sense Key : Hardware Error [current]
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#340 Add. Sense: Internal target failure
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#340 CDB: Read(16) 88 00 00 00 00 00 00 00 11 00 00 00 00 01 00 00
Jan 5 10:23:00 mediaserv kernel: blk_update_request: critical target error, dev sdc, sector 34816 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#341 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#341 Sense Key : Hardware Error [current]
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#341 Add. Sense: Internal target failure
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#341 CDB: Read(16) 88 00 00 00 00 00 00 00 11 00 00 00 00 01 00 00
Jan 5 10:23:00 mediaserv kernel: blk_update_request: critical target error, dev sdc, sector 34816 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Jan 5 10:23:00 mediaserv kernel: Buffer I/O error on dev dm-0, logical block 0, async page read
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#342 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#342 Sense Key : Hardware Error [current]
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#342 Add. Sense: Internal target failure
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#342 CDB: Read(16) 88 00 00 00 00 00 00 00 11 00 00 00 00 01 00 00
Jan 5 10:23:00 mediaserv kernel: blk_update_request: critical target error, dev sdc, sector 34816 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Jan 5 10:23:00 mediaserv kernel: EXT4-fs (dm-0): unable to read superblock
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#343 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#343 Sense Key : Hardware Error [current]
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#343 Add. Sense: Internal target failure
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#343 CDB: Read(16) 88 00 00 00 00 00 00 00 11 00 00 00 00 01 00 00
Jan 5 10:23:00 mediaserv kernel: blk_update_request: critical target error, dev sdc, sector 34816 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Jan 5 10:23:00 mediaserv kernel: EXT4-fs (dm-0): unable to read superblock
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#344 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#344 Sense Key : Hardware Error [current]
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#344 Add. Sense: Internal target failure
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#344 CDB: Read(16) 88 00 00 00 00 00 00 00 11 00 00 00 00 01 00 00
Jan 5 10:23:00 mediaserv kernel: blk_update_request: critical target error, dev sdc, sector 34816 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Jan 5 10:23:00 mediaserv kernel: EXT4-fs (dm-0): unable to read superblock
Jan 5 10:23:00 mediaserv kernel: ISOFS: unsupported/invalid hardware sector size 4096
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#345 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#345 Sense Key : Hardware Error [current]
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#345 Add. Sense: Internal target failure
Jan 5 10:23:00 mediaserv kernel: sd 12:0:0:0: [sdc] tag#345 CDB: Read(16) 88 00 00 00 00 00 00 00 11 00 00 00 00 01 00 00
Jan 5 10:23:00 mediaserv kernel: blk_update_request: critical target error, dev sdc, sector 34816 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Jan 5 10:23:00 mediaserv kernel: FAT-fs (dm-0): unable to read boot sector
我已嘗試運行xfs_repair
,但尚未嘗試該-L
選項。
[root@mediaserv ~]# xfs_repair /dev/mapper/media1
Phase 1 - find and verify superblock...
superblock read failed, offset 0, size 524288, ag 0, rval -1
fatal error -- Remote I/O error
我不確定下一步應該去哪裡,我擔心我可能會運行錯誤的命令並造成更多損壞。任何幫助都將不勝感激。
謝謝!
-麥克風
編輯:
經過更多調查後,我認為這不是超級塊問題,我認為該錯誤是因為我沒有在掛載命令中指定檔案系統類型。更正確地重新運行它,我得到:
[root@mediaserv ~]# mount -t xfs /dev/mapper/media1 /media
mount: /media: mount(2) system call failed: Remote I/O error.
它將以下內容放入我的/var/log/messages
:
Jan 5 12:15:43 mediaserv kernel: sd 12:0:0:0: [sdc] tag#838 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Jan 5 12:15:43 mediaserv kernel: sd 12:0:0:0: [sdc] tag#838 Sense Key : Hardware Error [current]
Jan 5 12:15:43 mediaserv kernel: sd 12:0:0:0: [sdc] tag#838 Add. Sense: Internal target failure
Jan 5 12:15:43 mediaserv kernel: sd 12:0:0:0: [sdc] tag#838 CDB: Read(16) 88 00 00 00 00 00 00 00 11 00 00 00 00 01 00 00
Jan 5 12:15:43 mediaserv kernel: blk_update_request: critical target error, dev sdc, sector 34816 op 0x0:(READ) flags 0x1000 phys_seg 1 prio class 0
Jan 5 12:15:43 mediaserv kernel: XFS (dm-0): SB validate failed with error -121.
我不知道如何解釋這一點。從扇區 34816 開始的壞資料?
編輯#2:
關於 RAID 陣列的運作狀況。正如我所提到的,它確實因驅動器丟失而進入降級模式。在重建 RAID 時,我將其停止服務並進入單一使用者模式。以下是重建後 Adaptec 工具的輸出(我已對其進行了精簡,以使其更加簡潔):
arcconf getconfig 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
Controller Status : Optimal
Controller Mode : RAID (Expose RAW)
Controller Model : Adaptec ASR7805Q
Performance Mode : Big Block Bypass
--------------------------------------------------------
RAID Properties
--------------------------------------------------------
Logical devices/Failed/Degraded : 1/0/0
Copyback : Disabled
Automatic Failover : Enabled
Background consistency check : Disabled
Background consistency check period : 0
----------------------------------------------------------------------
Logical device information
----------------------------------------------------------------------
Logical Device number 0
Logical Device name : media
Block Size of member drives : 4K Bytes
RAID level : 5
Status of Logical Device : Optimal
Size : 53387257 MB
Parity space : 7626751 MB
Stripe-unit size : 1024 KB
Interface Type : Serial ATA
Device Type : HDD
Read-cache setting : Enabled
Read-cache status : On
Write-cache setting : On when protected by battery/ZMM
Write-cache status : On
maxCache read cache setting : Enabled
maxCache read cache status : Off
maxCache write cache setting : Disabled
maxCache write cache status : Off
Partitioned : Yes
Protected by Hot-Spare : No
Bootable : Yes
Failed stripes : Yes
Power settings : Disabled
----------------------------------------------------------------------
Physical Device information
----------------------------------------------------------------------
Device #0
Device is a Hard drive
State : Online
Block Size : 4K Bytes
Device #1
Device is a Hard drive
State : Online
Block Size : 4K Bytes
Device #2
Device is a Hard drive
State : Online
Block Size : 4K Bytes
Device #3
Device is a Hard drive
State : Online
Block Size : 4K Bytes
Device #4
Device is a Hard drive
State : Online
Block Size : 4K Bytes
Device #5
Device is a Hard drive
State : Online
Block Size : 4K Bytes
Device #6
Device is a Hard drive
State : Online
Block Size : 4K Bytes
Device #7
Device is a Hard drive
State : Online
Block Size : 4K Bytes
這是陣列中每個磁碟機的 SMART 狀態:
[root@mediaserv ~]# smartctl -a -d "aacraid,0,0,0" /dev/sdc | grep health
SMART overall-health self-assessment test result: PASSED
[root@mediaserv ~]# smartctl -a -d "aacraid,0,0,1" /dev/sdc | grep health
SMART overall-health self-assessment test result: PASSED
[root@mediaserv ~]# smartctl -a -d "aacraid,0,0,2" /dev/sdc | grep health
SMART overall-health self-assessment test result: PASSED
[root@mediaserv ~]# smartctl -a -d "aacraid,0,0,3" /dev/sdc | grep health
SMART overall-health self-assessment test result: PASSED
[root@mediaserv ~]# smartctl -a -d "aacraid,0,0,4" /dev/sdc | grep health
SMART overall-health self-assessment test result: PASSED
[root@mediaserv ~]# smartctl -a -d "aacraid,0,0,5" /dev/sdc | grep health
SMART overall-health self-assessment test result: PASSED
[root@mediaserv ~]# smartctl -a -d "aacraid,0,0,6" /dev/sdc | grep health
SMART overall-health self-assessment test result: PASSED
[root@mediaserv ~]# smartctl -a -d "aacraid,0,0,7" /dev/sdc | grep health
SMART overall-health self-assessment test result: PASSED
然而,就在幾個小時前,我在查看日誌時發現了以下內容:
Jan 4 08:25:25 mediaserv kernel: sd 12:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=9s
Jan 4 08:25:25 mediaserv kernel: sd 12:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current]
Jan 4 08:25:25 mediaserv kernel: sd 12:0:0:0: [sdc] tag#0 Add. Sense: Internal target failure
Jan 4 08:25:25 mediaserv kernel: sd 12:0:0:0: [sdc] tag#0 CDB: Read(16) 88 00 00 00 00 01 60 2f 5c bf 00 00 00 20 00 00
Jan 4 08:25:25 mediaserv kernel: blk_update_request: critical target error, dev sdc, sector 47269471736 op 0x0:(READ) flags 0x80700 phys_seg 5 prio class 0
以上五個依序仍在日誌中繼續,以及以下同時機器遺失檔案系統:
Jan 4 08:26:32 mediaserv kernel: aacraid: Host adapter abort request.#012aacraid: Outstanding commands on (12,0,0,0):
Jan 4 08:26:32 mediaserv kernel: aacraid: Host adapter abort request.#012aacraid: Outstanding commands on (12,0,0,0):
Jan 4 08:26:32 mediaserv kernel: aacraid: Host adapter abort request.#012aacraid: Outstanding commands on (12,0,0,0):
Jan 4 08:26:55 mediaserv kernel: aacraid: Host adapter abort request.#012aacraid: Outstanding commands on (12,0,0,0):
Jan 4 08:26:55 mediaserv kernel: aacraid: Host bus reset request. SCSI hang ?
Jan 4 08:26:55 mediaserv kernel: aacraid 0000:02:00.0: outstanding cmd: midlevel-0
Jan 4 08:26:55 mediaserv kernel: aacraid 0000:02:00.0: outstanding cmd: lowlevel-0
Jan 4 08:26:55 mediaserv kernel: aacraid 0000:02:00.0: outstanding cmd: error handler-0
Jan 4 08:26:55 mediaserv kernel: aacraid 0000:02:00.0: outstanding cmd: firmware-56
Jan 4 08:26:55 mediaserv kernel: aacraid 0000:02:00.0: outstanding cmd: kernel-0
Jan 4 08:26:55 mediaserv kernel: aacraid 0000:02:00.0: Controller reset type is 3
Jan 4 08:26:55 mediaserv kernel: aacraid 0000:02:00.0: Issuing IOP reset
Jan 4 08:27:30 mediaserv kernel: aacraid 0000:02:00.0: IOP reset succeeded
Jan 4 08:27:30 mediaserv kernel: aacraid: Comm Interface type2 enabled
Jan 4 08:27:56 mediaserv kernel: aacraid 0000:02:00.0: Scheduling bus rescan
值得注意的是,陣列進入降級模式,然後 10 小時 15 分鐘後發生了上述情況。所以陣列問題和 xfs 檔案系統問題相隔幾個小時。儘管陣列和驅動器現在報告運行狀況良好,但我仍然接收上面的“FAILED Result”區塊。