宜信同城网交流论坛

 找回密码
 立即注册
开启左侧

WARNING: Re-reading the partition table failed with error 16: Device or resource

[复制链接]
发表于 2023-3-2 19:25:43 | 显示全部楼层 |阅读模式 来自 LAN

在 mkfs.ext4 /dev/sda2 格式化硬盘空间时,可能出现这样的错误。

had this situation at office where I was told to re-partition an already existing partition. The situation was to get the below schema

/dev/sdb1 1 3040 24418768+ 83 Linux

/dev/sdb2 3041 6080 24418800 83 Linux
/dev/sdb3 6081 30515 196274137+ 83 Linux

to

/dev/sdb1 1 3040 24418768+ 83 Linux
/dev/sdb2 3041 6080 24418800 83 Linux
/dev/sdb3 6081 30515 196274137+ 5 Extended
/dev/sdb5 6081 18239 97667136 83 Linux
/dev/sdb6 18240 30515 98606938+ 83 Linux

Alright, now the partition /dev/sdb2 was in use and cannot be unmounted. So what happens when you finish the partitioning with fdisk ?

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

This happends, if you are using/mounted any partitions of the HDD which you just re-partitioned. Normally we do reboot the machine to get this right. But this is not always the easy way out, when you have something running on the machine/multiple users are on the machine working etc. So there comes the “parted” for rescue.

The package “parted” provides a tool called “partprobe“. This will do the magic for you, you just type in the command (see the man page for more info on partprobe) and this will give the information needed about your newly created partition to your kernel.

解决方法:执行下partprobe命令

partprobe包含在parted的rpm软件包中。partprobe可以修改kernel中分区表,使kernel重新读取分区表。 因此,使用该命令就可以创建分区并且在不重新启动机器的情况下系统能够识别这些分区。

查看是否安装该命令:

[root@db1 dev]# rpm -q parted

parted-1.8.1-23.el5

接下来就可以执行该命令了:

[root@db1 dev]# partprobe

 

转自CSDN博客
原文链接:https://blog.csdn.net/yusiguyuan/article/details/25396123

未经允许不得转载:王超博客 » WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

宜信网交流论坛 - 版权声明 1、在发表言论时,请遵守当地法律法规。主题所有言论纯属个人意见,与本站立场无关。
2、本站所有主题由作者发表,作者享有帖子相关版权,其他单位或个人使用、转载或引用本文时必须征得作者同意并注明来源于宜信网
3、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意。
4、帖子不遵守当地法律法规、广告、人身攻击等情况时,宜信网管理人员有权不事先通知发贴者而删除本文。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|宜信同城网交流论坛 ( 闽ICP备19021048号 )|站点地图

GMT+8, 2026-3-27 08:33 , Processed in 0.128076 second(s), 12 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表