1 partition arch-linux mount parted
我使用 parted 程序来调整我的/home(挂载的)分区的大小。/home有 420 GB(使用了 60 GB),我调整到 320 GB(现在有 100 GB 免费)。当我重新启动计算机时,我无法启动文件系统检查并在 arch 上启动紧急模式。所以我 umount /dev/sda4(home) run fsck /dev/sda4,当我尝试挂载时,我有错误的 fs 类型、错误的选项、/dev/sda4 上的错误超级块,系统仍然不想启动。
编辑:我需要来自这个分区的数据,也许可以访问并复制其他分区上最重要的数据并删除 sda4 ?但我不知道如何访问这些数据。
lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
|-sda1 8:1 0 256M 0 part /boot
|-sda2 8:2 0 6G 0 part [SWAP]
|-sda3 8:3 0 40G 0 part /
`-sda4 8:4 0 419.4G 0 part
sr0 11:0 1 742M 0 rom
Run Code Online (Sandbox Code Playgroud)
dmesg | tail
[ 67.769679] xor: using function: prefetch64-sse (6108.000 MB/sec)
[ 67.828384] Btrfs loaded
[ 140.029658] sda: sda1 sda2 sda3 sda4
[ 348.916444] sda: sda1 sda2 sda3 sda4
[ 731.875551] EXT4-fs (sda4): bad geometry: block count 109972230 exceeds size of device (85531834 blocks)
[ 737.760531] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
[ 737.805255] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[ 767.421212] EXT4-fs (sda4): bad geometry: block count 109972230 exceeds size of device (85531834 blocks)
[ 769.639095] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 2340.076115] EXT4-fs (sda4): bad geometry: block count 109972230 exceeds size of device (85531834 blocks)
Run Code Online (Sandbox Code Playgroud)
日记本
-- Logs begin at Tue 2015-10-27 15:56:01 CET, end at Mon 2016-10-17 17:16:55 CEST. --
Oct 17 17:16:46 iam systemd-journald[146]: Runtime journal (/run/log/journal/) is 8.0M, max 285.7M, 277.7M free.
-- Subject: Disk space used by the journal
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Runtime journal (/run/log/journal/) is currently using 8.0M.
-- Maximum allowed usage is set to 285.7M.
-- Leaving at least 428.6M free (of currently available 2.7G of disk space).
-- Enforced usage limit is thust 17 17:16:47 iam kernel: Urtc0
-- The start-up result is done.
Oct 17 17:16:54 iam systemd-fsck[374]: /dev/sda4: The filesystem size (according to the superblock) is 109972230 blocks
Oct 17 17:16:54 iam systemd-fsck[374]: The physical size of the device is 109945896 blocks
Oct 17 17:16:54 iam systemd-fsck[374]: Either the superblock or the partition table is likely to be corrupt!
Oct 17 17:16:54 iam systemd-fsck[374]: /dev/sda4: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
Oct 17 17:16:54 iam systemd-fsck[374]: (i.e., without -a or -p options)
Oct 17 17:16:54 iam systemd-fsck[374]: fsck failed with error code 4.
Oct 17 17:16:54 iam systemd-fsck[374]: Running request emergency.target/start/replace
Oct 17 17:16:54 iam systemd[1]: Mounting /boot...
-- Subject: Unit boot.mount has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit boot.mount has begun starting up.
Oct 17 17:16:54 iam systemd[1]: systemd-fsck@dev-sda4.service: Main process exited, code=exited, status=1/FAILURE
Oct 17 17:16:54 iam systemd[1]: Failed to start File System Check on /dev/sda4.
-- Subject: Unit systemd-fsck@dev-sda4.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-fsck@dev-sda4.service has failed.
--
-- The result is failed.
Oct 17 17:16:54 iam systemd[1]: Dependency failed for /home.
-- Subject: Unit home.mount has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit home.mount has failed.
-- The result is dependency.
Oct 17 17:16:54 iam systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
Oct 17 17:16:54 iam systemd[1]: local-fs.target: Triggering OnFailure= dependencies.
Oct 17 17:16:54 iam systemd[1]: home.mount: Job home.mount/start failed with result 'dependency'.
Oct 17 17:16:54 iam systemd[1]: systemd-fsck@dev-sda4.service: Unit entered failed state.
Oct 17 17:16:54 iam systemd[1]: systemd-fsck@dev-sda4.service: Failed with result 'exit-code'.
Oct 17 17:16:54 iam systemd[1]: Reached target Network.
-- Subject: Unit network.target has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Userspace start-up required 11995553 microseconds.
Oct 17 17:16:55 iam systemd[468]: emergency.service: Failed at step EXEC spawning /bin/plymouth: No such file or directory
-- Subject: Process /bin/plymouth could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /bin/plymouth could not be executed and failed.
--
-- The error number returned by this process is 2.
Run Code Online (Sandbox Code Playgroud)
blkid
/dev/sda1: UUID="a60f7835-d787-4794-889e-1229c3788b5a" TYPE="ext2" PARTUUID="e10910a7-01"
/dev/sda2: UUID="4d2bdad8-2c4f-45de-bc11-c02a690d2bdf" TYPE="swap" PARTUUID="e10910a7-02"
/dev/sda3: UUID="a17f1309-204d-4aea-abda-7ef7e1dcae05" TYPE="ext4" PARTUUID="e10910a7-03"
/dev/sda4: UUID="af1e2c37-517c-4d5c-8a0e-76d67b1b84ca" TYPE="ext4" PARTUUID="e10910a7-04"
/dev/sr0: UUID="2016-08-01-16-33-35-00" LABEL="ARCH_201608" TYPE="iso9660" PTUUID="38ab083f" PTTYPE="dos"
/dev/sdb1: UUID="2016-06-11-19-19-51-00" LABEL="MJRO1606" TYPE="iso9660" PTUUID="62cadc67" PTTYPE="dos" PARTUUID="62cadc67-01"
/dev/sdb2: SEC_TYPE="msdos" LABEL="MISO_EFI" UUID="F6E9-DC96" TYPE="vfat" PARTUUID="62cadc67-02"
Run Code Online (Sandbox Code Playgroud)
问题是你在没有先调整文件系统的情况下调整了分区大小,所以你砍掉了文件系统的一部分,现在它处于文件系统记录说它比实际大的状态,并开始思考其余的是错误的,而实际上并不存在。
一种可能的解决方案是将您的分区恢复到原来的大小,但我不是在谈论 GiB 大小,它必须是e2fsck实际工作的块大小,所以如果分区的其余部分是,这应该没问题仍然没有改变,只需再次将其增长到最大值。
一旦分区达到它的原始大小e2fsck -f /dev/sda4,现在该工具应该修复您的文件系统。现在修复后首先使用缩小文件系统resize2fs,在 FS 缩小后,您可以将分区缩小到与缩小 FS 完全相同的大小。
但是我有一些坏消息要告诉您,因为您调整了分区而不是文件系统的大小,因此某些文件可能已在擦除部分中,并且可能会丢失。
| 归档时间: |
|
| 查看次数: |
4502 次 |
| 最近记录: |