Linux系统中删除文件时出现“读取标志时无效参数”问题

Linux系统中删除文件时出现“读取标志时无效参数”问题

最近,我在 Linux 系统中删除文件时收到“读取标志时无效参数”问题。

我无法删除 Linux 文件系统上的一些(非常大的文件)。我不知道该怎么办!

id
uid=1000(elias) gid=1000(elias) ομάδες=1000(elias),4(adm),24(cdrom),27(sudo),29(audio),30(dip),46(plugdev),116(lpadmin),122(sambashare)

ls -ld . ..
drwxrwxrwx 1 elias elias 4096 Feb 17 17:04 .
drwxrwxrwx 1 elias elias 4096 Jul 14 18:33 ..

须藤 rm *

rm: cannot remove '01st - O Basikos.avi': Input/output error
rm: cannot remove '02nd - The Pigs.avi': Input/output error
rm: cannot remove '02nd - The Pigs - short2.AVI': Input/output error
rm: cannot remove '03rd - O Glaros.avi': Input/output error
rm: cannot remove '04rth - Gio-Gio.avi': Input/output error
rm: cannot remove '07th - To Paixnidi tis Sfagis.avi': Input/output error
rm: cannot remove '08th - I Drakaina.avi': Input/output error
rm: cannot remove '09th - O Zitianos.avi': Input/output error
rm: cannot remove '10th - Troades.avi': Input/output error
rm: cannot remove '69082056_498303567665424_7547131835499675648_n.png': Input/output error
rm: cannot remove '69507971_2418284725052'$'\350\243\260''78_7036264017014292480_o.jpg': No such file or directory
rm: cannot remove '69515885_2418284525052598_830424852870463488_o.jpg': Input/output error
rm: cannot remove '69584492_2418284805052570_8494867853135052800_o.jpg': Input/output error
rm: cannot remove '69868065_2418284518385932_7450056396264964096_o.jpg': No such file or directory
rm: cannot remove '69936932_2418284865052564_2431600811281743872_o.jpg': No such file or directory
rm: cannot remove '69'$'\350\243\260''37965_2418284665052584_6232500998267469824_o.jpg': No such file or directory
rm: cannot remove '6th - Ta Frouta tou Pneumatos.avi': Input/output error
rm: cannot remove '70447879_2418284535052597_6811504792116920320_o.jpg': Input/output error
rm: cannot remove '70615044_2418284641719253_3543323980268044288_o.jpg': Input/output error
rm: cannot remove 'Ektos - O Epitheoritis.avi': Input/output error
rm: cannot remove 'Melina Tanagri.avi': Input/output error
rm: cannot remove 'Vraveia.avi': Input/output error

和lsattr...

 elias@eliasc:/media/elias/MyPassport/Events - Personal - Vids/Theatrikoi Diagonismoi 33oi-Zografou-2019a$ lsattr
lsattr: Invalid argument While reading flags on ./01st - O Basikos.avi
lsattr: Invalid argument While reading flags on ./02nd - The Pigs - short2.AVI
lsattr: Invalid argument While reading flags on ./02nd - The Pigs.avi
lsattr: Invalid argument While reading flags on ./03rd - O Glaros.avi
lsattr: Invalid argument While reading flags on ./04rth - Gio-Gio.avi
lsattr: Invalid argument While reading flags on ./07th - To Paixnidi tis Sfagis.avi
lsattr: Invalid argument While reading flags on ./08th - I Drakaina.avi
lsattr: Invalid argument While reading flags on ./09th - O Zitianos.avi
lsattr: Invalid argument While reading flags on ./10th - Troades.avi
lsattr: Invalid argument While reading flags on ./69082056_498303567665424_7547131835499675648_n.png
lsattr: Invalid argument While reading flags on ./69507971_2418284725052裰78_7036264017014292480_o.jpg
lsattr: Invalid argument While reading flags on ./69515885_2418284525052598_830424852870463488_o.jpg
lsattr: Invalid argument While reading flags on ./69584492_2418284805052570_8494867853135052800_o.jpg
lsattr: Invalid argument While reading flags on ./69裰37965_2418284665052584_6232500998267469824_o.jpg
./69868065_2418284518385932_7450056396264964096_o.jpg: No such file or directory
./69936932_2418284865052564_2431600811281743872_o.jpg: No such file or directory
lsattr: Invalid argument While reading flags on ./6th - Ta Frouta tou Pneumatos.avi
lsattr: Invalid argument While reading flags on ./70447879_2418284535052597_6811504792116920320_o.jpg
lsattr: Invalid argument While reading flags on ./70615044_2418284641719253_3543323980268044288_o.jpg
lsattr: Invalid argument While reading flags on ./Ektos - O Epitheoritis.avi
lsattr: Invalid argument While reading flags on ./Melina Tanagri.avi
./Vraveia.avi: Input/output error

和 ls -lQ *

    elias@eliasc:/media/elias/MyPassport/Events - Personal - Vids/Theatrikoi Diagonismoi 33oi-Zografou-2019a$ ls -lQ *
ls: cannot access '69868065_2418284518385932_7450056396264964096_o.jpg': No such file or directory
ls: cannot access '69936932_2418284865052564_2431600811281743872_o.jpg': No such file or directory
ls: cannot access 'Vraveia.avi': Input/output error
-rwxrwxrwx 1 elias elias 15053658390 Sep  6  2019 "01st - O Basikos.avi"
-rwxrwxrwx 1 elias elias   458762716 Sep  6  2019 "02nd - The Pigs - short2.AVI"
-rwxrwxrwx 1 elias elias 10775490376 Sep  7  2019 "02nd - The Pigs.avi"
-rwxrwxrwx 1 elias elias 12010358308 Sep  9  2019 "03rd - O Glaros.avi"
-rwxrwxrwx 1 elias elias  7789788922 Sep  9  2019 "04rth - Gio-Gio.avi"
-rwxrwxrwx 1 elias elias  7377647868 Sep 12  2019 "07th - To Paixnidi tis Sfagis.avi"
-rwxrwxrwx 1 elias elias  7289683606 Sep 16  2019 "08th - I Drakaina.avi"
-rwxrwxrwx 1 elias elias  8526826412 Oct 14  2019 "09th - O Zitianos.avi"
-rwxrwxrwx 1 elias elias  9300601002 Oct 14  2019 "10th - Troades.avi"
-rwxrwxrwx 1 elias elias     1343557 Sep  6  2019 "69082056_498303567665424_7547131835499675648_n.png"
-rwxrwxrwx 1 elias elias      143518 Sep 11  2019 "69507971_2418284725052\350\243\26078_7036264017014292480_o.jpg"
-rwxrwxrwx 1 elias elias      151257 Sep 11  2019 "69515885_2418284525052598_830424852870463488_o.jpg"
-rwxrwxrwx 1 elias elias           0 Feb 18 00:43 "69584492_2418284805052570_8494867853135052800_o.jpg"
-rwxrwxrwx 1 elias elias      159896 Sep 11  2019 "69\350\243\26037965_2418284665052584_6232500998267469824_o.jpg"
-rwxrwxrwx 1 elias elias 13958209594 Sep 11  2019 "6th - Ta Frouta tou Pneumatos.avi"
-rwxrwxrwx 1 elias elias      145183 Sep 11  2019 "70447879_2418284535052597_6811504792116920320_o.jpg"
-rwxrwxrwx 1 elias elias           0 Feb 18 00:44 "70615044_2418284641719253_3543323980268044288_o.jpg"
-rwxrwxrwx 1 elias elias 11083624324 Sep 14  2019 "Ektos - O Epitheoritis.avi"
-rwxrwxrwx 1 elias elias  7974938232 Sep 16  2019 "Melina Tanagri.avi"

和 dmseg....

    [   84.158595] audit: type=1400 audit(1594676419.746:51): apparmor="ALLOWED" operation="file_mmap" profile="snap.anbox.container-manager//null-/usr/sbin/aa-exec" name="/usr/sbin/aa-exec" pid=1582 comm="aa-exec" requested_mask="rm" denied_mask="rm" fsuid=0 ouid=0
[   84.158602] audit: type=1400 audit(1594676419.746:52): apparmor="ALLOWED" operation="file_mmap" profile="snap.anbox.container-manager//null-/usr/sbin/aa-exec" name="/lib/x86_64-linux-gnu/ld-2.23.so" pid=1582 comm="aa-exec" requested_mask="rm" denied_mask="rm" fsuid=0 ouid=0
[   84.159084] audit: type=1400 audit(1594676419.746:53): apparmor="ALLOWED" operation="open" profile="snap.anbox.container-manager//null-/usr/sbin/aa-exec" name="/etc/ld.so.cache" pid=1582 comm="aa-exec" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   84.159152] audit: type=1400 audit(1594676419.746:54): apparmor="ALLOWED" operation="open" profile="snap.anbox.container-manager//null-/usr/sbin/aa-exec" name="/lib/x86_64-linux-gnu/libpthread-2.23.so" pid=1582 comm="aa-exec" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   84.159157] audit: type=1400 audit(1594676419.746:55): apparmor="ALLOWED" operation="file_mmap" profile="snap.anbox.container-manager//null-/usr/sbin/aa-exec" name="/lib/x86_64-linux-gnu/libpthread-2.23.so" pid=1582 comm="aa-exec" requested_mask="rm" denied_mask="rm" fsuid=0 ouid=0
[   84.159326] audit: type=1400 audit(1594676419.746:56): apparmor="ALLOWED" operation="open" profile="snap.anbox.container-manager//null-/usr/sbin/aa-exec" name="/lib/x86_64-linux-gnu/libc-2.23.so" pid=1582 comm="aa-exec" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[   84.159330] audit: type=1400 audit(1594676419.746:57): apparmor="ALLOWED" operation="file_mmap" profile="snap.anbox.container-manager//null-/usr/sbin/aa-exec" name="/lib/x86_64-linux-gnu/libc-2.23.so" pid=1582 comm="aa-exec" requested_mask="rm" denied_mask="rm" fsuid=0 ouid=0
[   84.195823] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[   84.203002] IPv6: ADDRCONF(NETDEV_UP): lxcbr0: link is not ready
[   84.243401] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[   93.236203] kauditd_printk_skb: 7 callbacks suppressed
[   93.236204] audit: type=1326 audit(1594676428.826:65): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1582 comm="anbox" exe="/snap/anbox/158/usr/bin/anbox" sig=0 arch=c000003e syscall=165 compat=0 ip=0x7f718849fb9a code=0x7ffc0000
[   93.284036] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000d0000-0x000d3fff window]
[   93.284203] caller os_map_kernel_space.part.8+0x10b/0x150 [nvidia] mapping multiple BARs
[   93.497901] audit: type=1326 audit(1594676429.086:66): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1582 comm="anbox" exe="/snap/anbox/158/usr/bin/anbox" sig=0 arch=c000003e syscall=165 compat=0 ip=0x7f718849fb9a code=0x7ffc0000
[   93.500379] audit: type=1326 audit(1594676429.090:67): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1582 comm="anbox" exe="/snap/anbox/158/usr/bin/anbox" sig=0 arch=c000003e syscall=165 compat=0 ip=0x7f718849fb9a code=0x7ffc0000
[   93.505450] audit: type=1326 audit(1594676429.094:68): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=1582 comm="anbox" exe="/snap/anbox/158/usr/bin/anbox" sig=0 arch=c000003e syscall=165 compat=0 ip=0x7f718849fb9a code=0x7ffc0000
[12326.801458] perf: interrupt took too long (2538 > 2500), lowering kernel.perf_event_max_sample_rate to 78750
[17231.226813] perf: interrupt took too long (3213 > 3172), lowering kernel.perf_event_max_sample_rate to 62250
[23067.074788] perf: interrupt took too long (4030 > 4016), lowering kernel.perf_event_max_sample_rate to 49500
[24415.334432] audit: type=1400 audit(1594700750.025:69): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/snap/core/9436/usr/lib/snapd/snap-confine" pid=21658 comm="apparmor_parser"
[24415.334440] audit: type=1400 audit(1594700750.025:70): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="/snap/core/9436/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=21658 comm="apparmor_parser"
[24415.630792] audit: type=1400 audit(1594700750.321:71): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.hugo.hugo" pid=21660 comm="apparmor_parser"
[24415.804123] audit: type=1400 audit(1594700750.493:72): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.hugo" pid=21662 comm="apparmor_parser"
[24415.815070] audit: type=1400 audit(1594700750.505:73): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.core" pid=21663 comm="apparmor_parser"
[24415.833547] audit: type=1400 audit(1594700750.521:74): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap.core.hook.configure" pid=21664 comm="apparmor_parser"
[30198.603216] usb 3-9: new high-speed USB device number 6 using xhci_hcd
[30198.752148] usb 3-9: New USB device found, idVendor=058f, idProduct=6366
[30198.752150] usb 3-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[30198.752151] usb 3-9: Product: Mass Storage Device
[30198.752153] usb 3-9: Manufacturer: Generic
[30198.752154] usb 3-9: SerialNumber: 058F63666433
[30198.752667] usb-storage 3-9:1.0: USB Mass Storage device detected
[30198.752757] scsi host8: usb-storage 3-9:1.0
[30199.887649] scsi 8:0:0:0: Direct-Access     Multiple Card  Reader     1.00 PQ: 0 ANSI: 0
[30199.888108] sd 8:0:0:0: Attached scsi generic sg3 type 0
[30201.023835] sd 8:0:0:0: [sdc] 31387648 512-byte logical blocks: (16.1 GB/15.0 GiB)
[30201.024168] sd 8:0:0:0: [sdc] Write Protect is off
[30201.024169] sd 8:0:0:0: [sdc] Mode Sense: 03 00 00 00
[30201.024469] sd 8:0:0:0: [sdc] No Caching mode page found
[30201.024472] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[30201.028920]  sdc: sdc1
[30201.030266] sd 8:0:0:0: [sdc] Attached SCSI removable disk
[30219.804093] FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

dmesg | grep EXT4 .....

 dmesg | grep EXT4 
   [    6.161317] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null) [   14.696792] EXT4-fs (sdb2): re-mounted. Opts: errors=remount-ro 

正如建议的那样,我做了:

sudo gedit /etc/default/grub  

添加: GRUB_CMDLINE_LINUX="fsck.mode=force fsck.repair=yes" 然后,我跑了update-grub

我的硬盘在启动时没有自动安装。我根本没看到fsck检查过它。

DISKS 实用程序以 NTFS 形式查找该 HDD 上的数据。如何在不使用 Windows 的情况下检查其文件系统的完整性?

答案1

截至 2020 年 7 月 15 日,没有选项可以检查 Linux 下格式化为 NTFS 的硬盘的文件系统完整性。

我做了什么?

  • 我下载了 Windows Enterprise 的免费试用版 ISO
  • sudo apt-get remove virtualbox virtualbox-dkms virtualbox*
  • 从以下位置安装最新的 Virtualbox这里
  • 下载Virtualbox extpack的匹配版本
  • 添加到磁盘组,我,作为用户,由于访问拒绝硬盘错误
    • sudo usermod -a -G disk $USER
    • sudo usermod -a -G vboxusers $USER
  • 跑步sudo /sbin/vboxconfig
  • 运行 VirtualBox,并在 File -> Preferences -> Extentions 添加 Virtualbox extpack
  • 重启你的电脑
  • 使用以下命令创建到 NTFS 物理硬盘(无论 USB 或非 USB)的链接VBoxManage internalcommands createrawvmdk -filename "</path/to/file>.vmdk" -rawdisk /dev/sdX
  • 创建机器 -> 新建 -> Windows 10(64 位)(无论匹配) -> 创建虚拟磁盘
  • 附上下载的 Windows Enterprise 免费试用版 ISO 映像
  • 在您新创建的虚拟 Windows 映像 --> 首选项 -> 存储 -> 附加 ntfs 硬盘的 vmdk 映像
  • 它可能会失败。不用担心。对我来说也失败了。我参考它,因为我找到了它。它可能对你有用。
  • 转到虚拟 Windows 映像 --> 首选项 -> USB,选中 USB 3,添加您的 NTFS HDD
  • 运行您的虚拟“Windows Enterprise 免费试用”计算机。
  • 单击继续、修复计算机(位于左下侧)、故障排除、运行命令提示符
  • 通过写入例如转到您的磁盘。 C:
  • 检查它是否是您的磁盘,例如。目录
  • 当您在磁盘上时运行 chkdsk /f

此过程修复了我的 NTFS 文件系统的错误。我希望它也对你有帮助。

如果您发现任何更简单的解决方案,仅在Linux下,请发布。

相关内容