WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
Posted zsychanpin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WARNING: Re-reading the partition table failed with error 16: Device or resource busy.相关的知识,希望对你有一定的参考价值。
在 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又一次读取分区表。 因此。使用该命令就行创建分区而且在不又一次启动机器的情况下系统可以识别这些分区。
查看是否安装该命令:
[[email protected] dev]# rpm -q parted
parted-1.8.1-23.el5
我们运行一下该命令:
[[email protected] dev]# partprobe
Warning: Unable to open /dev/hdc read-write (Read-only file system). /dev/hdc has been opened read-only.
假设还有错误。能够从错误中看出来,须要reboot重新启动然后再mkfs格式化硬盘空间就能够了。
以上是关于WARNING: Re-reading the partition table failed with error 16: Device or resource busy.的主要内容,如果未能解决你的问题,请参考以下文章
fdisk时WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
[转帖]Warning:detected "cgroupfs" as the Docker cgroup driver. The recommended driver is &qu
关于fastapi开启多个服务实例时遇到WARNING: You must pass the application as an import string to enable 'reloa
warning C4819 解决方案 warning C4819: The file contains a character that cannot be represented in the cu
WARNING: The TCP backlog setting of 511.解决
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.