1. 错误描述

启动CentOS7系统,发现进步了图形界面,并报如下错误:

Error getting authority: Error initializing authority:
Could not connect: No such file or directory (g-io-error-quark, 1)

根据系统提示:先登录系统,然后使用journalctl -xb查看系统日志。

使用journalctl -xb命令

# journalctl -xb

#看到错误上是有关I/O的错误,首先想到是不是磁盘问题,搜索/mount,按n逐步搜索,看下有没有错误

错误信息:Failed to /mount /dev/sdb1

肯定是磁盘上坏块等原因,导致mount失败,所以我们可以先在/etc/fstab中,把该块磁盘自动mount注释掉

2. 解决方法

2.1 修改/etc/fstab配置文件

# vi /etc/fstab

#
# /etc/fstab
# Created by anaconda on Mon Jul 30 21:52:27 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=18e49f02-2719-4b91-aae0-dfb73e36d6bc /boot xfs defaults 0 0
/dev/mapper/centos-swap swap swap defaults 0 0
#/dev/sdb1 /data xfs defaults 0 0

2.2 重启操作系统,让系统能够进入图形界面

2.3 手动mount磁盘

# mount /dev/sdb1 /data
mount: /dev/sdb1 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error In some cases useful info is found in syslog - try
dmesg | tail or so.

2.4 根据报错信息,修复磁盘(xfs_repair)

由于磁盘是xfs_repair格式,所以对应的修复命令是xfs_repair

# xfs_repair /dev/sdb1
Phase 1 - find and verify superblock...
bad primary superblock - bad magic number !!! attempting to find secondary superblock...
..............................................

执行一会儿后…

verified secondary superblock...
writing modified primary superblock
sb realtime bitmap inode 18446744073709551615 (NULLFSINO) inconsistent with calculated value 65
resetting superblock realtime bitmap ino pointer to 65
sb realtime summary inode 18446744073709551615 (NULLFSINO) inconsistent with calculated value 66
resetting superblock realtime summary ino pointer to 66
Phase 2 - using internal log
- zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed. Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair. If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.

提示修复失败,可以尝试使用xfs_repair -L,但可能会造成数据丢失。

2.5 执行xfs_repair -L

# xfs_repair -L /dev/sdb1
Phase 1 - find and verify superblock...
sb realtime bitmap inode 18446744073709551615 (NULLFSINO) inconsistent with calculated value 65
resetting superblock realtime bitmap ino pointer to 65
sb realtime summary inode 18446744073709551615 (NULLFSINO) inconsistent with calculated value 66
resetting superblock realtime summary ino pointer to 66
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...
agi unlinked bucket 1 is 6368769 in ag 2 (inode=73477633)
agi unlinked bucket 2 is 6368770 in ag 2 (inode=73477634)
agi unlinked bucket 3 is 6368771 in ag 2 (inode=73477635)
agi unlinked bucket 4 is 6368772 in ag 2 (inode=73477636)
agi unlinked bucket 15 is 53775 in ag 2 (inode=67162639)
agi unlinked bucket 16 is 53776 in ag 2 (inode=67162640)
agi unlinked bucket 17 is 53777 in ag 2 (inode=67162641)
agi unlinked bucket 21 is 53781 in ag 2 (inode=67162645)
sb_icount 0, counted 1024
sb_ifree 0, counted 185
sb_fdblocks 13100529, counted 9976617
- 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 = 1
- agno = 2
- agno = 3
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 ...
disconnected inode 67162639, moving to lost+found
disconnected inode 67162640, moving to lost+found
disconnected inode 67162641, moving to lost+found
disconnected inode 67162645, moving to lost+found
disconnected inode 73477633, moving to lost+found
disconnected inode 73477634, moving to lost+found
disconnected inode 73477635, moving to lost+found
disconnected inode 73477636, moving to lost+found
Phase 7 - verify and correct link counts...
Maximum metadata LSN (1:39499) is ahead of log (1:2).
Format log to cycle 4.
done

2.6 执行xfs_repair

# xfs_repair /dev/sdb1
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
- scan filesystem freespace and inode maps...
- 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 = 1
- agno = 2
- agno = 3
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...
done

修复成功

2.7 手动mount,修改/etc/fstab文件

# mount /dev/sdb1 /data

# vi /etc/fstab
#
# /etc/fstab
# Created by anaconda on Mon Jul 30 21:52:27 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=18e49f02-2719-4b91-aae0-dfb73e36d6bc /boot xfs defaults 0 0
/dev/mapper/centos-swap swap swap defaults 0 0
/dev/sdb1 /data xfs defaults 0 0

xfs文件系统修复的更多相关文章

  1. Centos 7 LVM xfs文件系统修复

    Centos 7 LVM xfs文件系统修复 今天一大早,zabbix开始报警了,一台linux主机出现问题. 登陆控制台查看,报如下错误. 解决方法如下: ls -l /dev/mapper xfs ...

  2. xfs 文件系统修复

    pvcreate /dev/sdb1 pvcreate /dev/sdc1 pvcreate /dev/sdd1 vgcreate vg_bricks /dev/sdb1 vgcreate vg_br ...

  3. xfs文件系统修复方法

    1. 前言首先尝试mount和umount文件系统,以便重放日志,修复文件系统,如果不行,再进行如下操作.fdisk -l 查看硬盘分区情况mount -l 查看文件系统挂载情况df -h 查看文件系 ...

  4. xfs文件系统修复方法https://blog.csdn.net/yuanfang_way/article/details/78700089

    首先尝试mount和umount文件系统,以便重放日志,修复文件系统,如果不行,再进行如下操作. 1.检查文件系统:先确保umount xfs_check /dev/sdd(盘符); echo $?  ...

  5. 由异常掉电问题---谈xfs文件系统

    由异常掉电问题---谈xfs文件系统 本文皆是作者自己的学习总结或感悟(linux环境),如有不对,欢迎提出一起探讨!! 目录结构 一.相关知识 二.问题提出 三.处理方法 四.最终结果 一.相关知识 ...

  6. centos8平台使用xfs文件系统

    一,xfs文件系统的特点 XFS是一种高性能的日志文件系统, 它是由SGI公司设计的,被称为业界最先进的.最具可升级性的文件系统技术. 最初是从unix(irix)移植到linux系统上的. 从cen ...

  7. xfs文件系统

    引用http://blog.chinaunix.net/uid-522675-id-4665059.html xfs文件系统使用总结 1.3 xfs相关常用命令xfs_admin: 调整 xfs 文件 ...

  8. 16_用LVM扩展xfs文件系统(当分区空间不够时)

    1. 查看当前卷组空间(volume group)使用情况 [root@localhost ~]# vgdisplay 从下面的代码中发现剩余空间为0 --- Volume group --- VG ...

  9. xfs文件系统磁盘配额

    引言 这篇文章简单介绍一下xfs文件系统的磁盘配额配置. 文章目录 0×1.开启分区磁盘配额 0×2.使用xfs_quota命令配置磁盘配额 0×1.开启分区磁盘配额 对于ext4文件以前的文件系统, ...

随机推荐

  1. python int对象的方法

    1.求绝对值 >>> a = -10 >>> a.__abs__() 10 >>> abs(10) 10 2.加法 >>> a ...

  2. 分层图初探 By cellur925

    因为最近测试遇到了分层图的题目,所以稍微学了一下==. 这种题目一般是来解决最短路边权有变化/有k条免费路的问题的.他们基本都一般有两种实现方式:dp+最短路/分层图+最短路 当然你如果非要说他们是一 ...

  3. nginx用户统计

    1 概念 PV:页面访问量,即PageView,用户每次对网站的访问均被记录,用户对同一页面的多次访问,访问量累计. UV:独立访问用户数:即UniqueVisitor,访问网站的一台电脑客户端为一个 ...

  4. hdu 4442 Physical Examination (2012年金华赛区现场赛A题)

    昨天模拟赛的时候坑了好久,刚开始感觉是dp,仔细一看数据范围太大. 题目大意:一个人要参加考试,一共有n个科目,每个科目都有一个相应的队列,完成这门科目的总时间为a+b*(前面已完成科目所花的总时间) ...

  5. Codeforces 1108F(克鲁斯卡尔的理解)

    最小生成树会多样的情况是:两个或多个边等长且连通同样的两个并查集块. 所以可以跑一遍克鲁斯卡尔,每次把当前等长的边数出来,注意不要边找边并查,因为有一部分边是正常跑生成树我们也不会要他的,这种直接跳了 ...

  6. Input对象2(貌似是独立标签)

    6.hidden隐藏域的样式表单:Hidden属性可以创建一个隐藏域,数据会被隐藏起来,因此用户是无法操作的.这样说来hidden好像没有什么用,事实上,正是出于安全的考虑,在多步操作数据的同时,用h ...

  7. [已读]JavaScript编程精解

    译者汤姆大叔,应该很多人都知道,他写了一系列的关于闭包与作用域理解的文章,但是由于创建了一些我不理解的新名词,我不爱看. <JavaScript编程精解>算是买得比较早的一本书,那会大肆搜 ...

  8. json字符串和字典类型的相互转换

    在开发过程中,有时候需要将json字符串转为字典类型,反之亦然,通常采用.Net的开源类库Newtonsoft.Json进行序列化,这里我也是采用这个,不过我更喜欢写扩展方法方便在项目的调用. 首先新 ...

  9. C# 修改DataTable 列的 DataType

    /// <summary> ///当DataTable中有值时,是不允许修改列的DataType /// 修改数据表DataTable某一列的数据类型和记录值 /// </summa ...

  10. ABP教程(四)- 开始一个简单的任务管理系统 - 实现UI端的增删改查

    接上一篇:ABP教程(三)- 开始一个简单的任务管理系统 – 后端编码 1.实现UI端的增删改查 1.1添加增删改查代码 打开SimpleTaskSystem.sln解决方案,添加一个“包含视图的MV ...