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

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

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

Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 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)

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

时间: 2024-08-26 15:55:07

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

CentOS 7磁盘分区及文件系统管理

一.CentOS 7磁盘及文件系统特性 在CentOS 7,不管是IDE硬盘还是SATA硬盘,在linux里面的硬盘设备文件标识都为/dev/sd[a-z].(当然这一特性在CentOS 6中就已经实现) CentOS 7默认使用的文件系统为xfs. 二.磁盘分区管理工具 磁盘分区管理工具有很多,在CentOS 7上也支持传统的fdisk工具,还有parted,sfdisk,本文以fdisk介绍,如果对parted.sfdisk等工具有兴趣可以看我的另外一篇博客:http://xinzong.b

linux Centos下磁盘分区及文件系统创建与挂载

linux Centos下磁盘分区及文件系统创建与挂载 MBR(Master Boot Record)是传统的分区机制,应用于绝大多数使用BIOS的PC设备. 1.MBR支持32bit和64bit系统 2.MBR支持分区数量有限 3.MBR只支持不超过2T的硬盘,超过2T的硬盘只能使用2T空间(使用其他方法) 1.主分区:最多只能创建4个主分区(可使用) 2.扩展分区:一个扩展分区会占用一个主分区位置(不可使用,可化为逻辑分区) 3.逻辑分区:Linux最多支持63个IDE分区和15个SCSI分

详解Centos默认磁盘分区

对于有经验的Linux系统管理员,在安装系统之前都会对系统的分区进行规划:针对这一需求,下面就通过默认的Centos分区与大家分享一些关于Linux系统的知识.Linux系统的磁盘命名规范:硬盘类型标记:第一个SCSI磁盘记为/dev/sda,第二个SCSI磁盘记为/dev/sdb:第一个SATA磁盘记为/dev/hda,第二个为/dev /hdb,以此类推.硬盘分区标记:Linux系统中,每一个磁盘的各个分区编号是从1开始的,例如,第一个SCSI磁盘的第一个分区为/dev/sda1,第二分区为

Centos 使用Systemctl报Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24) 在使用centos7.4 安装服务的

[[email protected] ~]# systemctl restart zabbix-agent Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24) Failed to restart zabbix-agent.se

寻找实体上SaleOrgId对应的属性描述符失败,实体不存在此属性!

表达式计算出错: FSaleOrgId.FNumber == '105' ( 寻找实体上SaleOrgId对应的属性描述符失败,实体不存在此属性![EntityType:SaleOrderFinance Propeyties:Id LocalCurrId_Id LocalCurrId ExchangeTypeId_Id ExchangeTypeId ExchangeRate PayAdvanceRate PayAdvanceAmount DiscountListId_Id DiscountLis

Linux CentOS 7 磁盘格式化mke2fs、mkfs.ext4、磁盘挂载及手动增加swap空间

一. 磁盘格式化 查看系统支持的分区类型: cat /etc/filesystems [[email protected] ~]# cat /etc/filesystems  xfs ext4 ext3 ext2 nodev  procnodev  devpts iso9660 vfat hfs hfsplus* [[email protected] ~]# mountsysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)proc o

VirtualBox下Linux(centos)扩展磁盘空间

最近在Linux里做文件合并,做分词,磁盘空间不够,把扩展磁盘空间方法记录一下. 1.在VirtualBox安装路径下(例如C:\Program Files\Oracle\VirtualBox>)打开windows小黑窗 执行: VBoxManage modifyhd e:\vbox\Ubuntu12.04\Ubuntu1204-201310-disk1.vdi --resize 30000(30000是想要增加的容量, 以M为单位,可根据自己实际情况决定) 如果虚拟机用的是vmdk格式,可以执

【CentOS】磁盘管理与vim编译器

一.查看硬盘或目录容量 1.df  [-hmkiT] -h  查看系统磁盘使用情况 -m  使用MBytes显示结果 -k  使用KBytes显示结果 -i  查看inode -T  查看Type 2.du  [-abhkms] [目录名称] -s  只列出最后计算的总值 -k  用kb为单位显示(默认) -m  用mb为单位显示 -h  用合适的单位显示 -b  用b为单位显示 -a   列出所有的文件与目录,默认值是列出目录的值 注意:一个块里面只允许有一个文件,一个块得默认文件大小为4K

centOS的磁盘管理

总结一下学习的磁盘方面的知识: 文件系统的查看:df(默认查看已挂载的所有分区),参数有: -a 列出所有文件系统 -h 用较容易的阅读方式显示,如G,M,K -T 显示文件系统名称 -i 使用inode来显示 文件系统的评估:du,参数有 -a  列出所有的文件与文件目录,默认是只统计目录 -h 用较容易的阅读方式显示,如G,M,K -s 显示总量,不列出来 磁盘的分区 查看所有的挂载分区,fdisk -l  显示出所有的挂载文件系统, 如果不知道要分区的盘,建议先使用df来查看下所有的分区