2021-05-12 14:32:11
partproble在RHEL 6下無法更新分割區資訊
2020-06-16 17:38:30
在RHEL5.x版本下面,在新增磁碟分割區等操作後,一直使用partproble命令使核心重新讀取分割區表資訊,從而不用重新啟動。但是最近在RHEL 6(Red Hat Enterprise Linux Server release 6.6 (Santiago))下,使用partprobe出現錯誤。
[root@localhost ~]# lsof /dev/sda
[root@localhost ~]# partprobe /dev/sda
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.
後面查了一下資料發現,在官方文件How to use a new partition in RHEL6 without reboot中有如下介紹
partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it will only trigger the OS to update the partitions on a disk that none of its partitions are in use (e.g. mounted). If any partition on a disk is in use, partprobe will not trigger the OS to update partitions in the system because it is considered unsafe in some situations.
相關文章