NTFS 损坏:Windows 启动时 Linux 中创建的文件损坏

NTFS 损坏:Windows 启动时 Linux 中创建的文件损坏

我的 Win7/Ubuntu 12.04 双启动设置中出现了一些文件丢失和损坏的情况。我有一个很大的共享 NTFS 分区。该文件上有我的 Windows Docs/Music/etc. 目录,并且 Linux 设置中类似的目录是作为符号链接的。我在 Linux 端使用 ntfs-3g 来管理 ntfs 分区。共享分区与我的 Linux /home / 和 /swap 分区一起位于逻辑分区上。ntfs 分区在启动时通过 fstab 使用以下选项挂载:

 ntfs-3g     users,nls=utf8,locale=en_US.UTF-8,exec,rw

问题似乎仅限于新创建和最近编辑的文件。在 Windows 中创建/编辑文件然后转移到 Ubuntu 时,我没有看到数据丢失或损坏。我一直在 Ubuntu 中积极使用同步命令,试图确保所有内容都写入硬盘。我没有在 Windows 中使用休眠模式,所以我知道这不是由于休眠问题导致的通常文件丢失。我没有在 dmesg 上看到任何与挂载相关的问题。最近,我有一组与 LaTeX 文档相关的文件出现问题。其中一些显示在 Ubuntu 中,但我无法删除它们。在 GUI 文件浏览器中,它们会显示与我上次启动 Windows 时创建的文件相关联的缩略图。更具体地说:我在 Windows 中创建了一些 png 文件。该 Windows 启动损坏的文件与在文件上运行 PdfLatex 有关,而不是图像文件。但是,两个损坏的文件显示为前面提到的 png 文件之一的缩略图。 png 文件与 latex 文件不在同一目录中,但它们都位于文档文件夹树中。

我过去曾成功使用 NTFS 共享数据,希望这里是我忽略了一些问题,而不仅仅是运气不好。一方面,这似乎是某种 Windows 问题,因为在 Ubuntu 上工作了一段时间后,当我启动 Windows 时会发生数据丢失。然而,我认为这更多的是 Ubuntu 的问题,因为它需要特殊的 NTFS 驱动程序。

编辑以获取更多信息:这是一台联想 Thinkpad L430。上个月购买的新产品。因此这是一个相当新的安装。共享分区上的许多文件都是从另一台硬盘上以前的 NTFS 格式的共享分区复制过来的。

根据要求:这是 chkdsk 日志示例。其中提到的一些文件是在 Ubuntu 中从分区中删除的文件。其他文件是创建/编辑的,但未被删除。

Checking file system on D:
Volume dismounted.  All opened handles to this volume are now invalid.
Volume label is Files.

CHKDSK is verifying files (stage 1 of 3)...
Attribute record of type 0x80 and instance tag 0x2 is cross linked
starting at 0x789f47 for possibly 0x21 clusters.
Some clusters occupied by attribute of type 0x80 and instance tag 0x2
in file 0x42 is already in use.
Deleting corrupt attribute record (128, "")
from file record segment 66.
  86496 file records processed.                                         

File verification completed.
  385 large file records processed.                                   

  0 bad file records processed.                                     

  0 EA records processed.                                           

  0 reparse records processed.                                      

CHKDSK is verifying indexes (stage 2 of 3)...
Deleted invalid filename Screenshot from 2012-09-09 09:51:27.png (72) in directory 46.
The NTFS file name attribute in file 0x48 is incorrect.
53 00 63 00 72 00 65 00 65 00 6e 00 73 00 68 00  S.c.r.e.e.n.s.h.
6f 00 74 00 20 00 66 00 72 00 6f 00 6d 00 20 00  o.t. .f.r.o.m. .
32 00 30 00 31 00 32 00 2d 00 30 00 39 00 2d 00  2.0.1.2.-.0.9.-.
30 00 39 00 20 00 30 00 39 00 3a 00 35 00 31 00  0.9. .0.9.:.5.1.
3a 00 32 00 37 00 2e 00 70 00 6e 00 67 00 0d 00  :.2.7...p.n.g...
00 00 00 00 00 00 90 94 49 1f 5e 00 00 80 d4 00  ......I.^....
File 72 has been orphaned since all its filenames were invalid
Windows will recover the file in the orphan recovery phase.
Correcting minor file name errors in file 72.
Index entry found.000 of index $I30 in file 0x5 points to unused file 0x11.
Deleting index entry found.000 in index $I30 of file 5.
Index entry found.001 of index $I30 in file 0x5 points to unused file 0x16.
Deleting index entry found.001 in index $I30 of file 5.
Index entry found.002 of index $I30 in file 0x5 points to unused file 0x15.
Deleting index entry found.002 in index $I30 of file 5.
Index entry DOWNLO~1 of index $I30 in file 0x28 points to unused file 0x2b6.
Deleting index entry DOWNLO~1 in index $I30 of file 40.
Unable to locate the file name attribute of index entry Screenshot from 2012-09-09 09:51:27.png
of index $I30 with parent 0x2e in file 0x48.
Deleting index entry Screenshot from 2012-09-09 09:51:27.png in index $I30 of file 46.
An index entry of index $I30 in file 0x32 points to file 0x151e8
which is beyond the MFT.
Deleting index entry latexsheet.tex in index $I30 of file 50.
An index entry of index $I30 in file 0x58bc points to file 0x151eb
which is beyond the MFT.
Deleting index entry D8CZ82PK in index $I30 of file 22716.
An index entry of index $I30 in file 0x58bc points to file 0x151f7
which is beyond the MFT.
Deleting index entry EGA4QEAX in index $I30 of file 22716.
An index entry of index $I30 in file 0x58bc points to file 0x151e9
which is beyond the MFT.
Deleting index entry NGTB469M in index $I30 of file 22716.
An index entry of index $I30 in file 0x58bc points to file 0x151fb
which is beyond the MFT.
Deleting index entry WU5RKXAB in index $I30 of file 22716.
Index entry comp220-lab3.synctex.gz of index $I30 in file 0xda69 points to unused file 0xd098.
Deleting index entry comp220-lab3.synctex.gz in index $I30 of file 55913.
Unable to locate the file name attribute of index entry comp220-numberGrammars.aux
of index $I30 with parent 0xda69 in file 0xa276.
Deleting index entry comp220-numberGrammars.aux in index $I30 of file 55913.
The file reference 0x500000000cd43 of index entry comp220-numberGrammars.out of index $I30
with parent 0xda69 is not the same as 0x600000000cd43.
Deleting index entry comp220-numberGrammars.out in index $I30 of file 55913.
The file reference 0x500000000cd45 of index entry comp220-numberGrammars.pdf of index $I30
with parent 0xda69 is not the same as 0xc00000000cd45.
Deleting index entry comp220-numberGrammars.pdf in index $I30 of file 55913.
An index entry of index $I30 in file 0xda69 points to file 0x15290
which is beyond the MFT.
Deleting index entry gram.aux in index $I30 of file 55913.
An index entry of index $I30 in file 0xda69 points to file 0x15291
which is beyond the MFT.
Deleting index entry gram.out in index $I30 of file 55913.
An index entry of index $I30 in file 0xda69 points to file 0x15292
which is beyond the MFT.
Deleting index entry gram.pdf in index $I30 of file 55913.
Unable to locate the file name attribute of index entry comp230-quiz1.synctex.gz
of index $I30 with parent 0xda6f in file 0xd183.
Deleting index entry comp230-quiz1.synctex.gz in index $I30 of file 55919.
An index entry of index $I30 in file 0xf3cc points to file 0x15283
which is beyond the MFT.
Deleting index entry require-transform.rkt in index $I30 of file 62412.
An index entry of index $I30 in file 0xf3cc points to file 0x15284
which is beyond the MFT.
Deleting index entry set.rkt in index $I30 of file 62412.
An index entry of index $I30 in file 0xf497 points to file 0x15280
which is beyond the MFT.
Deleting index entry logger.rkt in index $I30 of file 62615.
An index entry of index $I30 in file 0xf497 points to file 0x15281
which is beyond the MFT.
Deleting index entry misc.rkt in index $I30 of file 62615.
An index entry of index $I30 in file 0xf497 points to file 0x15282
which is beyond the MFT.
Deleting index entry more-scheme.rkt in index $I30 of file 62615.
An index entry of index $I30 in file 0xf5bf points to file 0x15285
which is beyond the MFT.
Deleting index entry core-layout.rkt in index $I30 of file 62911.
An index entry of index $I30 in file 0xf5e0 points to file 0x15286
which is beyond the MFT.
Deleting index entry ref.scrbl in index $I30 of file 62944.
An index entry of index $I30 in file 0xf6f0 points to file 0x15287
which is beyond the MFT.
Deleting index entry base-render.rkt in index $I30 of file 63216.
An index entry of index $I30 in file 0xf6f0 points to file 0x15288
which is beyond the MFT.
Deleting index entry html-properties.rkt in index $I30 of file 63216.
An index entry of index $I30 in file 0xf6f0 points to file 0x15289
which is beyond the MFT.
Deleting index entry html-render.rkt in index $I30 of file 63216.
An index entry of index $I30 in file 0xf6f0 points to file 0x1528b
which is beyond the MFT.
Deleting index entry latex-prefix.rkt in index $I30 of file 63216.
An index entry of index $I30 in file 0xf6f0 points to file 0x1528c
which is beyond the MFT.
Deleting index entry latex-render.rkt in index $I30 of file 63216.
An index entry of index $I30 in file 0xf6f0 points to file 0x1528e
which is beyond the MFT.
Deleting index entry scribble.tex in index $I30 of file 63216.
An index entry of index $I30 in file 0xf717 points to file 0x1528a
which is beyond the MFT.
Deleting index entry lang.rkt in index $I30 of file 63255.
An index entry of index $I30 in file 0xf721 points to file 0x1528d
which is beyond the MFT.
Deleting index entry lang.rkt in index $I30 of file 63265.
An index entry of index $I30 in file 0xf764 points to file 0x1528f
which is beyond the MFT.
Deleting index entry lang.rkt in index $I30 of file 63332.
An index entry of index $I30 in file 0x14261 points to file 0x15270
which is beyond the MFT.
Deleting index entry fddff3ae9ae2221207f144821d475c08ec3d05 in index $I30 of file 82529.
An index entry of index $I30 in file 0x14621 points to file 0x15268
which is beyond the MFT.
Deleting index entry FETCH_HEAD in index $I30 of file 83489.
An index entry of index $I30 in file 0x14650 points to file 0x15272
which is beyond the MFT.
Deleting index entry 86 in index $I30 of file 83536.
An index entry of index $I30 in file 0x14651 points to file 0x15266
which is beyond the MFT.
Deleting index entry pack-7f54ce9f8218d2cd8d6815b8c07461b50584027f.idx in index $I30 of file 83537.
An index entry of index $I30 in file 0x14651 points to file 0x15265
which is beyond the MFT.
Deleting index entry pack-7f54ce9f8218d2cd8d6815b8c07461b50584027f.pack in index $I30 of file 83537.
An index entry of index $I30 in file 0x146f1 points to file 0x15275
which is beyond the MFT.
Deleting index entry master in index $I30 of file 83697.
An index entry of index $I30 in file 0x146f6 points to file 0x15276
which is beyond the MFT.
Deleting index entry remotes in index $I30 of file 83702.
An index entry of index $I30 in file 0x1477d points to file 0x15278
which is beyond the MFT.
Deleting index entry pad.rkt in index $I30 of file 83837.
An index entry of index $I30 in file 0x14797 points to file 0x1527c
which is beyond the MFT.
Deleting index entry pad1.rkt in index $I30 of file 83863.
An index entry of index $I30 in file 0x14810 points to file 0x1527d
which is beyond the MFT.
Deleting index entry cm.rkt in index $I30 of file 83984.
An index entry of index $I30 in file 0x14926 points to file 0x1527e
which is beyond the MFT.
Deleting index entry multi-file-search.rkt in index $I30 of file 84262.
An index entry of index $I30 in file 0x149ef points to file 0x1527f
which is beyond the MFT.
Deleting index entry com.rkt in index $I30 of file 84463.
An index entry of index $I30 in file 0x14b47 points to file 0x15202
which is beyond the MFT.
Deleting index entry COMMIT_EDITMSG in index $I30 of file 84807.
An index entry of index $I30 in file 0x14b47 points to file 0x15279
which is beyond the MFT.
Deleting index entry index in index $I30 of file 84807.
An index entry of index $I30 in file 0x14b4c points to file 0x15274
which is beyond the MFT.
Deleting index entry master in index $I30 of file 84812.
An index entry of index $I30 in file 0x14b61 points to file 0x1520b
which is beyond the MFT.
Deleting index entry 02 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x1525a
which is beyond the MFT.
Deleting index entry 28 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x15208
which is beyond the MFT.
Deleting index entry 29 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x1521f
which is beyond the MFT.
Deleting index entry 2c in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x15261
which is beyond the MFT.
Deleting index entry 2e in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x151f0
which is beyond the MFT.
Deleting index entry 45 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x1523e
which is beyond the MFT.
Deleting index entry 47 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x151e5
which is beyond the MFT.
Deleting index entry 49 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x15214
which is beyond the MFT.
Deleting index entry 58 in index $I30 of file 84833.
Index entry 6e of index $I30 in file 0x14b61 points to unused file 0xd182.
Deleting index entry 6e in index $I30 of file 84833.
Unable to locate the file name attribute of index entry a0
of index $I30 with parent 0x14b61 in file 0xd29c.
Deleting index entry a0 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x1521b
which is beyond the MFT.
Deleting index entry cd in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x15249
which is beyond the MFT.
Deleting index entry d6 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x15242
which is beyond the MFT.
Deleting index entry df in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x15227
which is beyond the MFT.
Deleting index entry ea in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x1522e
which is beyond the MFT.
Deleting index entry f3 in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b61 points to file 0x151f2
which is beyond the MFT.
Deleting index entry ff in index $I30 of file 84833.
An index entry of index $I30 in file 0x14b62 points to file 0x15254
which is beyond the MFT.
Deleting index entry 1ed39b36ad4bd48c91d22cbafd7390f1ea38da in index $I30 of file 84834.
An index entry of index $I30 in file 0x14b75 points to file 0x15224
which is beyond the MFT.
Deleting index entry 96260247010fe9811fea773c08c5f3a314df3f in index $I30 of file 84853.
An index entry of index $I30 in file 0x14b79 points to file 0x15219
which is beyond the MFT.
Deleting index entry 8f689724ca23528dd4f4ab8b475ace6edcb8f5 in index $I30 of file 84857.
An index entry of index $I30 in file 0x14b7c points to file 0x15223
which is beyond the MFT.
Deleting index entry 1df17cf850656be42c947cba6295d29c248d94 in index $I30 of file 84860.
An index entry of index $I30 in file 0x14b7c points to file 0x15217
which is beyond the MFT.
Deleting index entry 31db8a3c72a3e44769bbd8db58d36f8298242c in index $I30 of file 84860.
An index entry of index $I30 in file 0x14b7c points to file 0x15267
which is beyond the MFT.
Deleting index entry 8e1254d755ff1882d61c07011272bac3612f57 in index $I30 of file 84860.
An index entry of index $I30 in file 0x14b82 points to file 0x15246
which is beyond the MFT.
Deleting index entry f959bfaf9643c1b9e78d5ecf8f669133efdbf3 in index $I30 of file 84866.
An index entry of index $I30 in file 0x14b88 points to file 0x151fe
which is beyond the MFT.
Deleting index entry 7e9aa15b1196b2c60116afa4ffa613397f2185 in index $I30 of file 84872.
An index entry of index $I30 in file 0x14b8a points to file 0x151ea
which is beyond the MFT.
Deleting index entry 73cb0cd248e494bb508f41b55d862e84cdd6e0 in index $I30 of file 84874.
An index entry of index $I30 in file 0x14b8e points to file 0x15264
which is beyond the MFT.
Deleting index entry bd555d9f0383cc14c317120149e9376a8094c4 in index $I30 of file 84878.
An index entry of index $I30 in file 0x14b96 points to file 0x15212
which is beyond the MFT.
Deleting index entry 630dba40562d991bc6cbb6fed4ba638542e9c5 in index $I30 of file 84886.
An index entry of index $I30 in file 0x14b99 points to file 0x151ec
which is beyond the MFT.
Deleting index entry 478be31ca8e538769246e22bba3330d81dc3c8 in index $I30 of file 84889.
An index entry of index $I30 in file 0x14b99 points to file 0x15258
which is beyond the MFT.
Deleting index entry 66c60c0a0f3253bc9a5112697e4cbb0dfc0c78 in index $I30 of file 84889.
An index entry of index $I30 in file 0x14b9c points to file 0x15238
which is beyond the MFT.
Deleting index entry 1c7ceeddc2953496f9ffbfc0b6fb28846e3fe3 in index $I30 of file 84892.
An index entry of index $I30 in file 0x14b9c points to file 0x15247
which is beyond the MFT.
Deleting index entry ae6e32ffc49d897d8f8aeced970a90d3653533 in index $I30 of file 84892.
An index entry of index $I30 in file 0x14ba0 points to file 0x15233
which is beyond the MFT.
Deleting index entry f71c7d874e45179a32e138b49bf007e5bbf514 in index $I30 of file 84896.
Index entry 2e04fefbd794f050d45e7a717d009e39204431 of index $I30 in file 0x14ba7 points to unused file 0xd097.
Deleting index entry 2e04fefbd794f050d45e7a717d009e39204431 in index $I30 of file 84903.
An index entry of index $I30 in file 0x14baa points to file 0x15241
which is beyond the MFT.
Deleting index entry 0dda7dec1c635cd646dfef308e403c2843d5dc in index $I30 of file 84906.
An index entry of index $I30 in file 0x14baa points to file 0x151fc
which is beyond the MFT.
Deleting index entry 98151e654dd546edcfdec630bc82d90619ac8e in index $I30 of file 84906.
An index entry of index $I30 in file 0x14bb1 points to file 0x151e9
which is beyond the MFT.
Deleting index entry 1997c5be62ffeebc99253cced7608415e38e4e in index $I30 of file 84913.
An index entry of index $I30 in file 0x14bb1 points to file 0x1521d
which is beyond the MFT.
Deleting index entry 6bf3aedefd3ac62d9c49cad72d05e8c0ad242c in index $I30 of file 84913.
An index entry of index $I30 in file 0x14bb1 points to file 0x151f4
which is beyond the MFT.
Deleting index entry 907b755afdca14c00be0010962d0861af29264 in index $I30 of file 84913.
An index entry of index $I30 in file 0x14bb3 points to file 0x15218
which is beyond the MFT.
Deleting index entry

答案1

我通过避免这个问题并使用 FAT32 分区而不是 NTFS 解决了这个问题。我使用 FAT32 分区时没有遇到任何问题。我不知道这是否一定能解决问题,但它是一种解决方法,但如果你发现自己

答案2

Ubuntu 不负责 ntfs 驱动程序。Linux 中的 ntfs 对我来说一直存在问题 - 可以使用一段时间,但最终会出现损坏。Ntfs 不是开源的,在 Linux 上的实现只是让它工作的最佳尝试。我现在将 ntfs 安装为只读,如果我需要两者之间共享驱动器的大文件支持,我会使用 exFAT。exFAT 在两者上都运行良好,并且不需要在 Ubuntu 或 Windows 上进行额外设置即可使用。

相关内容