用了一个500G的硬盘做了系统盘,openmediavault系统在安装的时候用掉了整个硬盘。借用GParted 划分出来了一个磁盘可以用于挂载,挂载的时候报如下错误。
解决办法:首先虽然报这个错误,当时磁盘已经挂载了。
root@openmediavault:~# df -h
文件系统 容量 已用 可用 已用% 挂载点
udev 1.6G 0 1.6G 0% /dev
tmpfs 334M 2.2M 332M 1% /run
/dev/sda2 19G 2.2G 16G 12% /
tmpfs 1.7G 0 1.7G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda1 511M 152K 511M 1% /boot/efi
tmpfs 1.7G 116K 1.7G 1% /tmp
/dev/sda4 437G 40K 415G 1% /srv/dev-disk-by-uuid-6403f476-10b6-4251-bb71-a47e940edea2
先取消挂载
umount /srv/dev-disk-by-uuid-6403f476-10b6-4251-bb71-a47e940edea2
然后执行修复命令
fsck.ext4 -f /dev/sda4
全程一路按y
执行到最近再返回网页点击提交。即可
root@openmediavault:~# fsck.ext4 -f /dev/sda4
e2fsck 1.46.2 (28-Feb-2021)
Resize inode not valid. Recreate<y>? yes
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Directory inode 2, block #0, offset 0: directory corrupted
Salvage<y>? yes
Missing '.' in directory inode 2.
Fix<y>? yes
Setting filetype for entry '.' in ??? (2) to 2.
Missing '..' in directory inode 2.
Fix<y>? yes
Setting filetype for entry '..' in ??? (2) to 2.
Directory inode 11, block #0, offset 0: directory corrupted
Salvage<y>? yes
Missing '.' in directory inode 11.
Fix<y>? yes
Setting filetype for entry '.' in ??? (11) to 2.
Missing '..' in directory inode 11.
Fix<y>? yes
Setting filetype for entry '..' in ??? (11) to 2.
Directory inode 11, block #1, offset 0: directory corrupted
Salvage<y>? yes
Directory inode 11, block #2, offset 0: directory corrupted
Salvage<y>? yes
Directory inode 11, block #3, offset 0: directory corrupted
Salvage<y>? yes
Pass 3: Checking directory connectivity
'..' in / (2) is <The NULL inode> (0), should be / (2).
Fix<y>? yes
Unconnected directory inode 11 (/???)
Connect to /lost+found<y>? yes
/lost+found not found. Create<y>? yes
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Inode 11 ref count is 3, should be 2. Fix<y>? yes
Pass 5: Checking group summary information
Block bitmap differences: +9255
Fix<y>? yes
Free blocks count wrong for group #0 (23514, counted=23515).
Fix<y>? yes
Free blocks count wrong (114364450, counted=114364451).
Fix<y>? yes
/dev/sda4: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda4: 12/29122560 files (0.0% non-contiguous), 2107869/116472320 blocks