Updating partition table in Linux


When you use the "fdisk" to handle the partitions of a disk, depending on the disc, the "fdisk" will bring the following message:

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

No, you do not have to restart the server for the changes are applied, simply use the following command (example):
kpartx -a /dev/sda

This will re-read the partition table on /dev/sda and create the mapping of the system partitions (/dev/sda1, /dev/sda2, etc).

, , ,