用parted縮小分區後無法掛載外置硬碟
我通過縮小外部硬碟驅動器中的 NTFS 分區的大小,然後從第一個分區的末尾開始創建了第二個 fat32 分區。我還將引導標誌從 NTFS 分區切換到 FAT32 分區。
退出 parted 後,新的 FAT32 分區在插入時會自動掛載,但第一個 NTFS 分區無法使用任一掛載
udisksctl
或手動掛載方式掛載。後者給了我:[user@host mnt]# mount /dev/sdd1 /mnt/volume ntfs_attr_pread_i: ntfs_pread failed: Input/output error Failed to calculate free MFT records: Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
我試圖
ntfsfix /dev/sdX
修復 ntfs 分區,下面的輸出說它解決了問題,但我仍然無法掛載它:[user@host mnt]# ntfsfix /dev/sdd1 Mounting volume... Failed to read last sector (976769198): Invalid argument HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or it was not setup correctly (e.g. by not using mdadm --build ...), or a wrong device is tried to be mounted, or the partition table is corrupt (partition is smaller than NTFS), or the NTFS boot sector is corrupt (NTFS size is not valid). FAILED Attempting to correct errors... Failed to read last sector (976769198): Invalid argument HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or it was not setup correctly (e.g. by not using mdadm --build ...), or a wrong device is tried to be mounted, or the partition table is corrupt (partition is smaller than NTFS), or the NTFS boot sector is corrupt (NTFS size is not valid). FAILED Failed to startup volume: Invalid argument Failed to read last sector (976769198): Invalid argument HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or it was not setup correctly (e.g. by not using mdadm --build ...), or a wrong device is tried to be mounted, or the partition table is corrupt (partition is smaller than NTFS), or the NTFS boot sector is corrupt (NTFS size is not valid). Trying the alternate boot sector The alternate bootsector is usable Set sector count to 937497952 instead of 976769199 Rewriting the bootsector The boot sector has been rewritten Processing $MFT and $MFTMirr... Reading $MFT... OK Reading $MFTMirr... OK Comparing $MFTMirr to $MFT... OK Processing of $MFT and $MFTMirr completed successfully. Setting required flags on partition... OK Going to empty the journal ($LogFile)... OK Checking the alternate boot sector... FIXED NTFS volume version is 3.1. NTFS partition /dev/sdd1 was processed successfully.
- 可能是我改變的標誌還是導致這個問題的縮小和增長?
- 顯示的最終尺寸與顯示的
parted
不同。後者是 465G,而顯示為 500G,所以跟哪一個有點混亂。我最終使用了 500G,因為我使用的是not 。fdisk``lsblk``parted``parted``fdisk
- 是否有任何已知的解決方案來恢復分區以便可以再次掛載?
更新
在windows
chkdisk /f
和.chkdisk /r``"I'm getting corrupt master file table, chkdsk aborted"
可能是我改變的標誌還是導致這個問題的縮小和增長?
你的問題是由縮小和增長引起的。這樣的操作總是很危險的,因此如果數據很重要,不應該在手頭沒有備份的情況下進行。
是否有任何已知的解決方案來恢復分區以便可以再次掛載?
最好的解決方案是不要費心恢復它,而是重新格式化分區並從備份中恢復文件。
如果這不可能,您的第二個最佳選擇是嘗試在 Windows 中修復分區。
您的第三個選擇是刪除 FAT 分區並將 NTFS 分區調整回原來的大小。也許在那之後第二劑
ntfsfix
會修復它,但到此為止不要指望任何奇蹟。ntfsfix 是一個修復一些常見 NTFS 問題的實用程序。ntfsfix 不是 chkdsk 的 Linux 版本。它只修復一些基本的 NTFS 不一致性,重置 NTFS 日誌文件,並為首次啟動到 Windows 時安排 NTFS 一致性檢查。
如果您認為 NTFS 卷被 Windows 或其他方式損壞並且無法掛載,您可以在 NTFS 卷上執行 ntfsfix。- https://linux.die.net/man/8/ntfsfix