partprobe报错Device or resource busy

Warning: the kernel failed to re-read the partition table on /dev/vda (Device or resource busy)

我在初始化Linux数据盘时,执行将partprobe,新的分区表变更同步至操作系统,遇到了以下问题:

Warning: WARNING: the kernel failed to re-read the partition table on /dev/vda (Device or resource busy).
 As a result, it may not reflect all of your changes until after reboot.


我首先尝试了一个方法

假设新增的分区是/dev/sda9,那么执行partx -a /dev/sda9 /dev/sda就可以了

2019090215151759.png

宣布失败。


partprobe必须具体到新建的那个分区,否则无法成功重新读取分区表

如:

partprobe
Warning: WARNING: the kernel failed to
re-read the partition table on /dev/sda (Device or resource busy).
As a result, it may not reflect all of your changes until after reboot.

(错误信息,提示重启,但是重启之后也无法成功,因为partprobe需要针对单个新增分区才适当)

如:

partprobe /dev/sda9

/dev/sda9为刚用fdisk新建的分区,显示成功

partprobe这个命令执行完毕之后不会输出任何返回信息

成功debug√






猜你喜欢

转载自blog.51cto.com/sf1314/2483808
今日推荐