partproble Unable to update partition information under Rhel 6

Source: Internet
Author: User

Under the rhel5.x version, after adding operations such as disk partitioning, the kernel is used to re-read the partition table information using the partproble command so that it does not have to be restarted. However, there was a recent error using Partprobe under Rhel 6 (Red Hat Enterprise Linux Server Release 6.6 (Santiago)).

[[Email protected] ~] # LSOF/DEV/SDA
[[Email protected] ~] # 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 be reflect all of the your changes until after reboot.

Look back at the information found in the official document how to use a new partition in RHEL6 without reboot has the following introduction

Partprobe was commonly used in RHEL 5 to inform the OS of partition table changes on the disk. In RHEL 6, it would only be trigger the OS to update the partitions on a disk this none of its partitions is in use (e.g. MOU nted). If any partition on a disk was in use, Partprobe would not trigger the OS to update partitions in the system because it is C onsidered unsafe in some situations.

Translate as follows:

Partprobe is typically used in Rhel 5 to notify the operating system of partition table changes or changes on the disk. In Rhel 6, only if any partition on those disks is not under the disk used (for example, mounted) it triggers the OS to update the partition table of the disk. If any partition on the disk is in use, the Partprobe command does not trigger the operating system to update the partition table information, because in some cases it is considered unsafe.

Solution:

1: Restart the operating system. Omnipotent restart, haha, however, in many cases is unrealistic, because restarting will disrupt business, restart can only be the next worst.

2: Use the PARTX command to resolve this.

[[Email protected] ~] # partx-l/dev/sdb
# 1:63-314568764 (314568702 sectors, 161059 MB)
# 2:314568765-356514479 (41945715 sectors, 21476 MB)
# 3:0--1 (0 sectors, 0 MB)
# 4:0--1 (0 sectors, 0 MB)
[[Email protected] ~]
[[Email protected] ~] # partx-v-a/dev/sdb
Device/dev/sdb:start 0 Size 356515840
gpt:0 slices
Dos:4 slices
# 1:63-314568764 (314568702 sectors, 161059 MB)
# 2:314568765-356514479 (41945715 sectors, 21476 MB)
# 3:0--1 (0 sectors, 0 MB)
# 4:0--1 (0 sectors, 0 MB)
Blkpg:device or resource busy
Error adding partition 1

Blkpg:device or resource busy this hint message is normal, indicating that partition 1 already existed before Partition 2 was added.

Read disk and try to add all partitions to the system:

Raw

# partx -v -a /dev/sdb                                         device /dev/sdb: start 0 size 2097152  gpt: 0 slices  dos: 4 slices  # 1:        63-   505007 (   504945 sectors,    258 MB)  # 2:    505008-  1010015 (   505008 sectors,    258 MB)  # 3:         0-       -1 (        0 sectors,      0 MB)  # 4:         0-       -1 (        0 sectors,      0 MB)  BLKPG: Device or resource busyerror adding partition 1

(These last 2 lines was normal in this case because partition 1 was already added in the system before partition 2 is added )

For example, after adding, reading, and then executing the following command, Partition 2 is also reported as "Blkpg:device or resource busy error adding partition 2"

Check the partition node information.

[[Email protected] ~] # ls/dev/sdb*
/dev/sdb/dev/sdb1/dev/sdb2

In addition, I found in the test can also be resolved using the following methods, such as the new partition is/dev/sdc2//dev/sdb2//dev/sda4, then you can execute the following command to solve the problem.

[[Email protected] ~] # partx-a/DEV/SDC2/DEV/SDC
[[Email protected] ~] # partx-a/dev/sdb2/dev/sdb
[Email protected] ~]# partx-a/DEV/SDA4/DEV/SDA

Resources:

https://access.redhat.com/node/57542

partproble Unable to update partition information under Rhel 6

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.