概述

由于机房异常停电,导致服务器启动后系统分区异常。无法识别之前挂载的磁盘分区,并且无法使用fdisk命令重置分区。

[root@db2 ~]# cat /etc/fstab
/dev/mapper/data10p1    /data                    ext4    defaults       0 0
[root@db2 ~]# ll /dev/mapper/data10
lrwxrwxrwx 1 root root 8 9月   6 17:37 /dev/mapper/data10 -> ../dm-16
[root@db2 ~]# fdisk /dev/mapper/data10

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: 无效的参数.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

处理办法

使用partprobe命令重读分区表

[root@db2 ~]# partprobe /dev/mapper/data10
[root@db2 ~]# ll /dev/mapper/data10*
lrwxrwxrwx 1 root root 8 9月   6 17:37 /dev/mapper/data10 -> ../dm-16
lrwxrwxrwx 1 root root 8 10月 29 15:39 /dev/mapper/data10p1 -> ../dm-17
END

本文标题:服务器重启后Re-reading the partition table failed with error 22

本文作者:宇宙最帅的男人

本文链接:https://lolicp.com/linux/202129298.html

版权声明:转载或者引用本文内容请注明来源及原作者,本文著作权归作者 (宇宙最帅的男人) 所有。

除非另有说明,本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

最后修改:2021 年 10 月 29 日
如果觉得我的文章对你有用,请随意赞赏