为什么我的硬盘驱动器空间显示已占用 78%,因为我已格式化 500GB 的硬盘并将其设置为 /home

为什么我的硬盘驱动器空间显示已占用 78%,因为我已格式化 500GB 的硬盘并将其设置为 /home

今天我安装了 ubuntu 22.04 LTS,之前我一直在使用 20.04LTS。

我有 2 个 128 GB 的 SSD 驱动器和 500 GB 的 HDD。在安装 22.04 之前,我的分区是 SSD /root = 30GB、/boot = 1GB、/swap = 4GB,其余 (128 - 30 - 1 - 4) 用于 SSD 上的 /home。我仅将 500 GB HDD 用于 /usr/local。之前我使用 timeshift 将我的系统备份到该 HDD 驱动器。

现在,在今天安装 22.04 之后,我已将我的 SSD 设置为 /swap = 12GB、/boot = 1GB、/efi = 1GB 和 /root = 114GB,并将我的 HDD 设置为 /home = 500GB

现在我发现我的 500GB 硬盘中只有 107GB 是空闲的。这些空间是从哪里塞满的? SSD 磁盘使用情况HDD 的磁盘使用情况 如果您有任何解决方案来释放或格式化我的硬盘,请帮助我,因为我没有使用 /home 来存储任何文件。

答案1

使用gparted,在您的硬盘上放置一个新的 MBR 分区表。这将擦除驱动器。然后创建一个新的 500G ext4 分区。添加适当的 /home/username 目录。编辑 /etc/fstab 中的 /home 行,因为 UUID 已更改。

因为你此磁盘上有坏块,驱动器出现坏块...

注意:不要中止坏块扫描!

注意:不要对 SSD 造成坏块

注意:请先备份您的重要文件!

注意:这可能需要几个小时

注意:您可能面临硬盘故障

在“尝试 Ubuntu”模式下启动 Ubuntu Live DVD/USB。

terminal...

sudo fdisk -l# 识别所有“Linux 文件系统”分区

sudo e2fsck -fcky /dev/sdXX# 只读测试

或者

sudo e2fsck -fccky /dev/sdXX# 非破坏性读写测试(受到推崇的)

-k 很重要,因为它会保存之前的坏块表,并将任何新的坏块添加到该表中。如果没有 -k,您将丢失所有之前的坏块信息。

-fccky 参数...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do
         a read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block scan
         will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.

相关内容