AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1197866
Accepted
AdLinux
AdLinux
Asked: 2019-12-23 04:54:40 +0800 CST2019-12-23 04:54:40 +0800 CST 2019-12-23 04:54:40 +0800 CST

是什么导致文件系统损坏?

  • 772

最近我的一个驱动器拒绝安装,显示以下错误消息:

在此处输入图像描述

现在幸运的是,我能够解决这个问题,这要归功于 Ask Ubuntu 上的另一个问题,您可以在这里找到:“结构需要清理”错误 - 无法挂载分区

基本上我只需要修复系统,我输入了命令:

sudo fsck.ext4 /dev/sda[NUMBER]

正如该帖子的答案所述。那行得通,我驱动器中的所有内容都已恢复。

然而,我的问题是:这样的事情首先是如何发生的?我想知道,这样我就可以尝试防止这种情况在未来再次发生。

我将提供我的设置作为我可能做错了什么的指南。我正在使用 Ubuntu Studio 19.10。这个硬盘驱动器不是我的引导驱动器,它也不包含我的主分区。我将其设置为在启动时挂载。我通过在 GNOME 磁盘中启用它来做到这一点。该驱动器也被格式化为 ext4。

尽管我使用的是 Xfce,但我主要使用 Nemo 作为我的文件管理器,而不是 Thunar。

我将它的状态设置为出现在我的 Conky 中,但除此之外,它仅在我专门运行、打开或保存其中的东西时才会使用。我从不卸下它。当我关闭我的系统时,我只是点击关机,通常一切都很好。

那么什么会导致这样的错误呢?只是运气不好?还是我正在做的事情?

如果我不够具体,请随时提出问题。

先感谢您 :)

编辑:在下面添加请求的信息。

$ cat /etc/fstab
# / was on /dev/sda1 during installation
UUID=346ba1d4-efe5-4435-87cc-178b90845c65 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
/dev/sdb        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
LABEL=LinuxHDD /mnt/LinuxHDD auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=LinuxHDD 0 0
$ sudo blkid
/dev/sdc1: UUID="346ba1d4-efe5-4435-87cc-178b90845c65" TYPE="ext4" PARTUUID="e437d520-01"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: LABEL="HDD 2" UUID="46A4A2A1A4A2934B" TYPE="ntfs" PARTUUID="50e732f7-01"
/dev/sdb1: LABEL="LinuxHDD" UUID="44417cbc-3321-43b1-9487-119740d01959" TYPE="ext4" PARTUUID="00033300-01"
/dev/sdd1: LABEL="System Reserved" UUID="5612B79912B77D15" TYPE="ntfs" PARTUUID="f0c3841b-01"
/dev/sdd2: UUID="86E6B86DE6B85EDD" TYPE="ntfs" PARTUUID="f0c3841b-02"
/dev/sdd3: UUID="AAD2DEECD2DEBBAF" TYPE="ntfs" PARTUUID="f0c3841b-03"
/dev/sde1: LABEL="HDD" UUID="865243EE5243E193" TYPE="ntfs" PARTUUID="37ab496d-01"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
$ sudo fdisk -l
Disk /dev/loop0: 140.8 MiB, 146882560 bytes, 286880 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 44.18 MiB, 46325760 bytes, 90480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 168.46 MiB, 176631808 bytes, 344984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 140.32 MiB, 147128320 bytes, 287360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 89.9 MiB, 93417472 bytes, 182456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 146.5 MiB, 153600000 bytes, 300000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 89.1 MiB, 93429760 bytes, 182480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 146.54 MiB, 153649152 bytes, 300096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes




Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-00B
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x50e732f7

Device     Boot Start        End    Sectors   Size Id Type
/dev/sda1        2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT


Disk /dev/sdb: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: SAMSUNG HD502HJ 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00033300

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1  *     2048 976773119 976771072 465.8G 83 Linux


Disk /dev/sdc: 55.92 GiB, 60022480896 bytes, 117231408 sectors
Disk model: Corsair Force LS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe437d520

Device     Boot Start       End   Sectors  Size Id Type
/dev/sdc1  *     2048 117229567 117227520 55.9G 83 Linux


Disk /dev/sdd: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 850 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf0c3841b

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdd1  *         2048    718847    716800   350M  7 HPFS/NTFS/exFAT
/dev/sdd2          718848 487473151 486754304 232.1G  7 HPFS/NTFS/exFAT
/dev/sdd3       487473152 488394751    921600   450M 27 Hidden NTFS WinRE


Disk /dev/sde: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-08M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x37ab496d

Device     Boot Start        End    Sectors   Size Id Type
/dev/sde1        2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT


Disk /dev/loop8: 167.62 MiB, 175751168 bytes, 343264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 54.64 MiB, 57274368 bytes, 111864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 54.64 MiB, 57274368 bytes, 111864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

我希望这有帮助!

filesystem mount ext4 gnome-disk-utility 19.10
  • 1 1 个回答
  • 981 Views

1 个回答

  • Voted
  1. Best Answer
    heynnema
    2019-12-23T13:14:48+08:002019-12-23T13:14:48+08:00

    是什么导致文件系统损坏?

    • 不当下马

    • 从外部操作系统访问(即:Windows 驱动程序)

    • 磁盘(预)故障

    • 主存故障

    • 事情刚刚发生(我希望很少发生)

    解决损坏文件系统的最常用方法?

    对于 18.04 或更新版本...

    • 启动到 Ubuntu Live DVD/USB
    • terminal按Ctrl+ Alt+打开一个窗口T
    • 类型sudo fdisk -l
    • 识别“Linux 文件系统”的 /dev/sdXX 设备名称
    • 键入sudo fsck -f /dev/sdXX,替换sdXX为您之前找到的数字
    • fsck如果有错误,请重复该命令
    • 类型reboot

    注意:或卸下实时 HDD/SSD 和sudo fsck -f /dev/sdXX

    在你/etc/fstab我推荐...

    改变:

    /dev/sdb        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    LABEL=LinuxHDD /mnt/LinuxHDD auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=LinuxHDD 0 0
    

    至:

    # sdb used by HDD/SSD, floppy disks probably auto mount on insertion
    # /dev/sdb        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    #
    # added boot time fsck (see 2 at the end of line)
    # prefer UUID=44417cbc-3321-43b1-9487-119740d01959 over LABEL=LinuxHDD
    UUID=44417cbc-3321-43b1-9487-119740d01959 /mnt/LinuxHDD auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=LinuxHDD 0 2
    
    • 并为其他两个 ext4 磁盘添加挂载,并以“0 2”结束该行

    更新#1:

    以“0 2”结尾的磁盘实际上有什么作用?

    从man fstab...

      The fifth field (fs_freq).
              This field is used by dump(8)  to  determine  which  filesystems
              need  to  be  dumped.   Defaults  to  zero  (don't  dump) if not
              present.
    
       The sixth field (fs_passno).
              This field is used by fsck(8) to determine the  order  in  which
              filesystem  checks  are  done at boot time.  The root filesystem
              should be specified with a fs_passno of  1.   Other  filesystems
              should  have  a fs_passno of 2.  Filesystems within a drive will
              be checked sequentially, but  filesystems  on  different  drives
              will  be  checked at the same time to utilize parallelism avail‐
              able in the hardware.  Defaults to  zero  (don't  fsck)  if  not
              present.
    
    • 2

相关问题

  • 当另一个文件系统安装在路径上时是否可以删除文件?

  • “/var/lib/dpkg/updates”文件夹中存储了什么?

  • 如何使文件夹与外部 USB 硬盘保持同步?

  • 为什么 Ubuntu 不再将文件大小单位测量为字节、兆字节、千兆字节等?

  • 如何避免启动时出现“S to Skip”消息?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve