Which command forces the kernel to reread partition tables after disk changes?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command forces the kernel to reread partition tables after disk changes?

Explanation:
When you change a disk’s partition table, the kernel may still hold the old layout in memory. The way to make the system recognize the new or modified partitions without rebooting is to refresh the kernel’s view of the partition tables. The command that does exactly this is partprobe. It tells the kernel to reread the partition table information from the disk (for all disks or a specific one) and update the /dev entries accordingly, so newly created partitions become visible and usable again. Other tools exist for related tasks but in different contexts. partx -a can add partition devices to the kernel for partitions that are already described on disk but not yet exposed, which is a more targeted or manual way of exposing partitions. kpartx -a is primarily used with device-mapper setups to create device mappings for partitions, often in complex storage configurations. There isn’t a standard reloadpart command in common distributions. Therefore, partprobe is the best choice for forcing the kernel to reread partition tables after disk changes.

When you change a disk’s partition table, the kernel may still hold the old layout in memory. The way to make the system recognize the new or modified partitions without rebooting is to refresh the kernel’s view of the partition tables. The command that does exactly this is partprobe. It tells the kernel to reread the partition table information from the disk (for all disks or a specific one) and update the /dev entries accordingly, so newly created partitions become visible and usable again.

Other tools exist for related tasks but in different contexts. partx -a can add partition devices to the kernel for partitions that are already described on disk but not yet exposed, which is a more targeted or manual way of exposing partitions. kpartx -a is primarily used with device-mapper setups to create device mappings for partitions, often in complex storage configurations. There isn’t a standard reloadpart command in common distributions. Therefore, partprobe is the best choice for forcing the kernel to reread partition tables after disk changes.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy