Overview
partprobe is a utility that forces the kernel to read new partition information without requiring a system reboot when the partition table has been modified. It is particularly useful in virtual machine or server environments after adding disks or adjusting partitions.
Key Features
- Applies partition changes without rebooting
- Forces recognition of new partitions
- Essential after disk management operations
Main Options
partprobe offers a few options primarily used to specify a particular disk or to check for changes.
Controlling Behavior
Generated command:
Try combining the commands.
Description:
`partprobe` Executes the command.
Combine the above options to virtually execute commands with AI.
Usage Examples
partprobe is primarily used to inform the system about partition changes after they have been made.
Notify kernel about partition changes on all disks
sudo partprobe
Informs the kernel about partition table changes on all disks connected to the system.
Notify kernel about partition changes on a specific disk
sudo partprobe /dev/sda
Informs the kernel about partition table changes only for the `/dev/sda` disk.
Check a summary of partition changes
sudo partprobe -s
Displays a summary of the partition information to be notified to the kernel without actually applying changes.
Simulate partition changes
sudo partprobe -d /dev/sdb
Simulates what operations would be performed for the `/dev/sdb` disk.
Tips & Precautions
Points to note and additional tips when using partprobe.
Key Understanding
- partprobe instructs the kernel to *re-read* the partition table; it is not a command that *modifies* partitions themselves. Partition modifications must be done first with tools like `fdisk` or `gdisk`.
- In some cases, partprobe may fail if partitions are in use or mounted. In such situations, unmounting the relevant partitions or rebooting may be necessary.
- If you are using LVM (Logical Volume Manager), you may need to use LVM-related commands such as `pvscan`, `vgscan`, and `lvscan` in conjunction to inform LVM about the changes.