易秋网络旗下全球VPS测评站
云主机测评/独立服务器测评/主机优惠码

磁盘挂载错误提示:mount: mount /dev/mapper/olddata-home on /data3 failed: Structure needs cleaning

Disk /dev/mapper/olddata-home: 176.9 GB, 176898965504 bytes, 345505792 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

客户的服务器,突然开不了机,大概是磁盘有问题。让机房重新找个磁盘,重装centos 7,装完后,把这个旧磁盘挂载上去。结果在挂载磁盘的过程中,提示:

[root@localhost /]# mount /dev/mapper/olddata-home /data3
mount: mount /dev/mapper/olddata-home on /data3 failed: Structure needs cleaning
客户有100多G的数据,没有备份,只能是活马当死马医了。其实这种情况的出现,很可能是机房意外断电,导致系统没有正常关机,系统日志有点问题,导致系统无法启动,修复下磁盘按说是可以解决问题的。
xfs_repair -L /dev/mapper/olddata-home

执行了上面的命令,修复文件系统,下面是执行过程:

[root@localhost /]# xfs_repair -L /dev/mapper/olddata-home
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
ALERT: The filesystem has valuable metadata changes in a log which is being
destroyed because the -L option was used.
        - scan filesystem freespace and inode maps...
Metadata CRC error detected at xfs_allocbt block 0xfaffc38/0x1000
btree block 3/507783 is suspect, error -74
bad magic # 0x340cb973 in btcnt block 3/507783
agf_freeblks 4963941, counted 4963401 in ag 3
agf_btreeblks 563, counted 562 in ag 3
sb_ifree 183157, counted 144647
sb_fdblocks 21552161, counted 21269479
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 3
        - agno = 2
        - agno = 1
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
Maximum metadata LSN (1329113463:-1024357339) is ahead of log (1:2).
Format log to cycle 1329113466.
done
[root@localhost /]#mount /dev/mapper/olddata-home /data3

然后就可以用命令挂载磁盘了,完美解决。

赞(3) 打赏
版权归求VPS所有,未经允许不准转载!求VPS » 磁盘挂载错误提示:mount: mount /dev/mapper/olddata-home on /data3 failed: Structure needs cleaning
【声明】:求VPS,易秋网络旗下专业VPS测评站,主要侧重筛选全球质量比较好的VPS、云主机以及独立服务器,并且进行简单测评,仅供参考。因为全国网络差异较大,求VPS的VPS以及独立服务器测评数据仅对当时的测评环境有效。求VPS不强制网友购买本站介绍的VPS以及独立服务器资源,如果网友购买了本站介绍的资源,风险自担!

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏