CentOS 7磁盘寻找不到,卡在sulogin,造成的开机失败问题--Error getting authority...

摘要:
今天早上使用内网gitlab仓库的时候,发现页面无法打开,ssh也无法连接。按照提示,使用命令查看日志#journalctl-xb-p3--LogsbeginatTue2017-09-0509:34:14CST,endatTue2017-09-0510:15:57CST.--....省略部分内容Sep0509:34:18localhost.localdomainkernel::megaswr[ahci]:pollingforinterruptstatustimedoutforport=1,slot=0Sep0509:34:18localhost.localdomainkernel::megasr[ahci]:warningPortResetcalledforport[1]Sep0509:34:18localhost.localdomainkernel::megasr[ahci]:deviceonport:[1]online:[0x133][0]millisecondsafterresetSep0509:34:25localhost.localdomainkernel::megaswr[ahci]:pollingforinterruptstatustimedoutforport=1,slot=0Sep0509:34:25localhost.localdomainkernel::megaswr[ahci]:Troubleport=1,slot=0Sep0509:34:25localhost.localdomainkernel::megaswr[osl]:breakpointcalledSep0509:34:25localhost.localdomainkernel::megasr[ahci]:Device:[2:INTELSSDSC2BW48]NCQ:[Yes]QueueDepth:[0x20]capacity=0x37e436b0Sep0509:34:25localhost.localdomainkernel::megasr[ahci]:Device:[3:INTELSSDSC2BW48]NCQ:[Yes]QueueDepth:[0x20]capacity=0x37e436b0Sep0509:34:25localhost.localdomainkernel::megasr[ahci]:Device:[4:ST9500620NS]NCQ:[Yes]QueueDepth:[0x20]capacity=0x3a386030Sep0509:34:25localhost.localdomainkernel::megasr[ahci]:Device:[5:ST9500620NS]NCQ:[Yes]QueueDepth:[0x20]capacity=0x3a386030Sep0509:34:25localhost.localdomainkernel::megasr:raid10logicaldriveisdegraded,isnotinitialized,has2spans,andhasasizeof0x6f869000sectorsSep0509:34:25localhost.localdomainkernel::megasr:raid1logicaldriveisonline,isnotinitialized,has2drives,andhasasizeof0x3a175800sectors.Sep0509:34:25localhost.localdomainkernel::megasr[raid_key]:[]RAID5support[]SASdrivesupportSep0509:35:57localhost.localdomainsystemd[1]:Timedoutwaitingfordevicedev-sdc1.device.在日志中看到,dev-sdc1设备出现问题。查看磁盘分区情况#fdisk-lDisk/dev/sdb:499.0GB,498999492608bytes,974608384sectorsUnits=sectorsof1*512=512bytesSectorsize:512bytes/512bytesI/Osize:512bytes/512bytesDisklabeltype:dosDiskidentifier:0xfcae2784DeviceBootStartEndBlocksIdSystem/dev/sdb12048194921676797460736083LinuxWARNING:fdiskGPTsupportiscurrentlynew,andthereforeinanexperimentalphase.Useatyourowndiscretion.Disk/dev/sda:958.0GB,957997907968bytes,1871089664sectorsUnits=sectorsof1*512=512bytesSectorsize:512bytes/512bytesI/Osize:512bytes/512bytesDisklabeltype:gpt#StartEndSizeTypeName12048411647200MEFISystemEFISystemPartition2411648821247200MMicrosoftbasic38212481871087615891.8GLinuxLVMDisk/dev/mapper/cl-root:946.8GB,946834767872bytes,1849286656sectorsUnits=sectorsof1*512=512bytesSectorsize:512bytes/512bytesI/Osize:512bytes/512bytesDisk/dev/mapper/cl-swap:10.7GB,10737418240bytes,20971520sectorsUnits=sectorsof1*512=512bytesSectorsize:512bytes/512bytesI/Osize:512bytes/512bytes很明显,sdc没了,这才记起,当时安装系统的时候,因为多插了一块U盘,当时U盘被识别为sdb,这块磁盘被识别成了sdc。查看fstab,证明了这一点。

今天早上使用内网gitlab仓库的时候,发现页面无法打开,ssh也无法连接。

到机房接上显示器,发现如下错误:

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

CentOS 7磁盘寻找不到,卡在sulogin,造成的开机失败问题--Error getting authority...第1张

输入root密码,进入shell界面。

按照提示,使用命令查看日志

# journalctl -xb -p3
-- Logs begin at Tue 2017-09-05 09:34:14 CST, end at Tue 2017-09-05 10:15:57 CST. --
....省略部分内容
Sep 05 09:34:18 localhost.localdomain kernel: :megaswr[ahci]: polling for interrupt status timed out for port=1, slot=0
Sep 05 09:34:18 localhost.localdomain kernel: :megasr[ahci]: warning PortReset called for port[1]
Sep 05 09:34:18 localhost.localdomain kernel: :megasr[ahci]: device on port:[1] online:[0x133] [0] milliseconds after reset
Sep 05 09:34:25 localhost.localdomain kernel: :megaswr[ahci]: polling for interrupt status timed out for port=1, slot=0
Sep 05 09:34:25 localhost.localdomain kernel: :megaswr[ahci]:Trouble port=1, slot=0
Sep 05 09:34:25 localhost.localdomain kernel: :megaswr[osl]: breakpoint called
Sep 05 09:34:25 localhost.localdomain kernel: :megasr[ahci]: Device:[2:INTEL SSDSC2BW48] NCQ:[Yes] Queue Depth:[0x20] capacity=0x37e436b0
Sep 05 09:34:25 localhost.localdomain kernel: :megasr[ahci]: Device:[3:INTEL SSDSC2BW48] NCQ:[Yes] Queue Depth:[0x20] capacity=0x37e436b0
Sep 05 09:34:25 localhost.localdomain kernel: :megasr[ahci]: Device:[4:ST9500620NS     ] NCQ:[Yes] Queue Depth:[0x20] capacity=0x3a386030
Sep 05 09:34:25 localhost.localdomain kernel: :megasr[ahci]: Device:[5:ST9500620NS     ] NCQ:[Yes] Queue Depth:[0x20] capacity=0x3a386030
Sep 05 09:34:25 localhost.localdomain kernel: :megasr: raid 10 logical drive is degraded, is not initialized, has 2 spans, and has a size of 0x6f869000 sectors
Sep 05 09:34:25 localhost.localdomain kernel: :megasr: raid 1 logical drive is online, is not initialized, has 2 drives, and has a size of 0x3a175800 sectors.
Sep 05 09:34:25 localhost.localdomain kernel: :megasr[raid_key]: [ ] RAID5 support    [ ] SAS drive support
Sep 05 09:35:57 localhost.localdomain systemd[1]: Timed out waiting for device dev-sdc1.device.

在日志中看到,dev-sdc1设备出现问题。

查看磁盘分区情况

# fdisk  -l
Disk /dev/sdb: 499.0 GB, 498999492608 bytes, 974608384 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
Disk label type: dos
Disk identifier: 0xfcae2784
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  1949216767   974607360   83  Linux
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Disk /dev/sda: 958.0 GB, 957997907968 bytes, 1871089664 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
Disk label type: gpt
#         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2       411648       821247    200M  Microsoft basic 
 3       821248   1871087615  891.8G  Linux LVM       
Disk /dev/mapper/cl-root: 946.8 GB, 946834767872 bytes, 1849286656 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
Disk /dev/mapper/cl-swap: 10.7 GB, 10737418240 bytes, 20971520 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

很明显,sdc没了,这才记起,当时安装系统的时候,因为多插了一块U盘,当时U盘被识别为sdb,这块磁盘被识别成了sdc。

查看fstab,证明了这一点。

# cat /etc/fstab 
#
# /etc/fstab
# Created by anaconda on Tue Aug  8 13:10:48 2017
#
# 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/cl-root     /                       xfs     defaults        0 0
UUID=a51fd6f8-a756-4e8f-ba44-5589fb99861e /boot                   xfs     defaults        0 0
UUID=7D74-6C54          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/cl-swap     swap                    swap    defaults        0 0
/dev/sdc1 /data ext4 defaults 0 0

看来要把写死的磁盘名称更改为UUID。

# blkid 
/dev/sdc1: UUID="ab4c28b5-1708-483c-973a-40f91d320a9d" TYPE="ext4" 
...

修改后的fstab为

# cat /etc/fstab 
#
# /etc/fstab
# Created by anaconda on Tue Aug  8 13:10:48 2017
#
# 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/cl-root     /                       xfs     defaults        0 0
UUID=a51fd6f8-a756-4e8f-ba44-5589fb99861e /boot                   xfs     defaults        0 0
UUID=7D74-6C54          /boot/efi               vfat    umask=0077,shortname=winnt 0 0
/dev/mapper/cl-swap     swap                    swap    defaults        0 0
UUID=ab4c28b5-1708-483c-973a-40f91d320a9d /data ext4 defaults 0 0

尝试重启daemon,仍然弹出同样错误。

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

exit退出shell,再次弹出该错误。

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

不用管,等待几秒,系统已经可以正常启动。

免责声明:文章转载自《CentOS 7磁盘寻找不到,卡在sulogin,造成的开机失败问题--Error getting authority...》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇3D(Game等)引擎的六大部分关于Linux的软链接和硬链接的一些概念下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

常用CentOS 6/7 扩展源

1、系统自带 baseextrasupdates 2、epel yum install epel-release https://fedoraproject.org/wiki/EPEL 3、el(用于升级内核) rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http:...

c#dev操作读取excel方法

一:使用spreadsheetControl1 方法 1:打开excel; private void barButtonItem1_ItemClick(objectsender, DevExpress.XtraBars.ItemClickEventArgs e) { //if (Convert.ToInt32...

sqlmap介绍与使用案例

作者:虫儿飞ZLEI链接:https://www.jianshu.com/p/3d3656be3c60来源:简书著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 sqlmap介绍与使用案例 1.sqlmap简介 最白话的介绍就是sqlmap是一个工具,一个用来做sql注入攻击的工具 2.windows安装python2 这个sqlmap...

yum 安装 Mysql error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 开启远程连接 修改登入密码 忘记root密码 配置防火墙规则 随手mark

yum 安装 MYsql:        yum install mysql mysql-server mysql-devel -y 1.1 登入报错: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决办法:# service...

Android平台根目录文件

> 系统分区 # adb shell # mount rootfs / rootfs ro 0 0tmpfs /dev tmpfs rw,mode=755 0 0devpts /dev/pts devpts rw,mode=600 0 0proc /proc proc rw 0 0sysfs /sys sysfs rw 0 0none /acct...

基于335X的Linux网口驱动分析

基于335X的linux网口驱动分析 一、 系统构成 1、  硬件平台 AM335X 2、  LINUX内核版本 4.4.12 二、 网口驱动构架(mdio部分) mdio网口驱动部分 使用 总线、设备、驱动模型,总结如下:          若设备和驱动匹配,则执行 davinci_mdio_probe   --> mdiobus_register...