无法在分区上运行 e2fsck。声称该分区“正在使用中”

无法在分区上运行 e2fsck。声称该分区“正在使用中”

我的系统声称我的分区正在使用中,但我不知道原因:

root@racknerd-05beb8:~# e2fsck -fvy /dev/vda1
e2fsck 1.46.2 (28-Feb-2021)
/dev/vda1 is in use.
e2fsck: Cannot continue, aborting.

root@racknerd-05beb8:~# mount 
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=483632k,nr_inodes=120908,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=99984k,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=99980k,nr_inodes=24995,mode=700)
none on / type tmpfs (rw,relatime,size=614400k)

root@racknerd-05beb8:~# df  
Filesystem     1K-blocks   Used Available Use% Mounted on
udev              483632      0    483632   0% /dev
tmpfs              99984    364     99620   1% /run
tmpfs             499908      0    499908   0% /dev/shm
tmpfs              99980      0     99980   0% /run/user/0
none              614400 438456    175944  72% /

root@racknerd-05beb8:~# fdisk -l
Disk /dev/vda: 12 GiB, 12884901888 bytes, 25165824 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
Disklabel type: dos
Disk identifier: 0xcaec3c75

Device     Boot Start      End  Sectors Size Id Type
/dev/vda1        2048 25165823 25163776  12G 83 Linux

root@racknerd-05beb8:~# lsof /dev/vda1
<blank>

root@racknerd-05beb8:~# umount /dev/vda1
umount: /dev/vda1: not mounted.

root@racknerd-05beb8:~# fuser -v /dev/vda1
<blank>

root@racknerd-05beb8:~# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1 1024M  0 rom  
vda    254:0    0   12G  0 disk 
`-vda1 254:1    0   12G  0 part 

root@racknerd-05beb8:~# lsof -n|grep vda1
jbd2/vda1   298                       root  cwd       DIR               0,39      480          1 /
jbd2/vda1   298                       root  rtd       DIR               0,39      480          1 /
jbd2/vda1   298                       root  txt   unknown                                        /proc/298/exe

答案1

您需要使用 Live CD 启动机器,因为正常启动时,驱动器会在启动过程中被挂载,从而导致出现此使用错误。或者使用第三方工具转换文件系统。转换文件系统时要小心谨慎,并确保您有备份。

另一个选择是使用 clonezilla 克隆磁盘,然后尝试转换文件系统

相关内容