合 Linux挂载磁盘报错failed Structure needs cleaning
现象
linux下挂载磁盘报错“Structure needs cleaning”。系统之前一直正常,突然掉盘后无法挂载,尝试手动挂载后报错:
1 2 | root@pbs:~# mount -a mount: /mnt/data/1: mount(2) system call failed: Structure needs cleaning. |
对于重装linux系统或者掉盘的用户常常遭遇挂载磁盘报Structure needs cleaning的问题。
排查
首先查看磁盘是什么文件系统?
1 2 3 4 5 6 7 8 | root@pbs:~# blkid /dev/sda2: UUID="C350-74AC" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="2b815f26-9d57-4576-bd46-c2ac96a061a4" /dev/sda3: UUID="NvwYCd-nRPj-MZC3-b1ab-5189-H8d4-L4GC54" TYPE="LVM2_member" PARTUUID="f67d1946-e13d-46a0-828c-e693c74f1f05" /dev/mapper/pbs-swap: UUID="a466b56a-75a8-482a-a082-5c9edf8aed69" TYPE="swap" /dev/mapper/pbs-root: UUID="b4e03bb0-4a97-4f56-a71b-726d62bccad5" BLOCK_SIZE="4096" TYPE="ext4" /dev/sda1: PARTUUID="c6c5beb9-52ca-4139-8575-4dede116105b" /dev/sdc1: UUID="8c6d2538-3673-4733-afc2-3fbce8cf06f4" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d3c972c3-9ad6-5f45-af24-bbc797a35830" /dev/sdb1: UUID="e83baf39-e63b-4a8e-888e-44b8b0eb6065" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="38c59ede-7835-4c57-8579-f58f1714811f" |
ext4文件系统,使用命令 fsck.ext4 /dev/sdb1修复,