I can enlarge the root (/
) partition with fdisk
without rebooting (deleting an recreating it with the same 1st sector, but greater last sector).
However, I cannot make the kernel to re-read the partition table :
# partx -va /dev/vda
partx: /dev/vda: adding partition #5 failed: Device or resource busy
partx: /dev/vda: error adding partition 5
# kpartx -va /dev/vda
device-mapper: reload ioctl on vda5 failed: Invalid argument
add map vda5 : 0 41492480 linear 0:0 2048
# hdparm -z /dev/vda
/dev/vda:
re-reading partition table
BLKRRPART failed: Device or resource busy
# sfdisk -R /dev/vda
BLKRRPART: Device or resource busy
This disk is currently in use.
I know what I am doing, and the ext filesystems within the partitions support online enlargement.
Is there a way forcing the kernel to update its partition table?
EDIT: I know about LVM, but it is not an answer for this question.