Link to home
Start Free TrialLog in
Avatar of mickt
micktFlag for Ireland

asked on

Must I reboot after altering / partition in CentOS7

I'm trying to script the resize of VMs.  Is there a way to continue without a reboot of the VM after altering the partition table?

It seems that partprobe doesn't work on CentOS7 as with previous versions, so partprobe then pvresize etc. will not work.


It's a real bugbear of mine the way things are changed to "protect" us form ourselves.
Avatar of Zephyr ICT
Zephyr ICT
Flag of Belgium image

I haven't tested this but wouldn't partx be an option?

You create the partition via fdisk for example and add the new partition using partx, for example:

partx -v -a /dev/sdb 

Open in new window


This would add the partition to the system...
Avatar of mickt

ASKER

I tried it but it didn't work.  At least with / partition.
It doesn't work with partitions that already exist and are altered, that's true ... It worked with new partitions in previous versions, can't say for CentOS7 though...
Avatar of mickt

ASKER

I think behavior changed around CentOs6.
ASKER CERTIFIED SOLUTION
Avatar of Zephyr ICT
Zephyr ICT
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mickt

ASKER

I didn't but I expect it would work.  It is a safety precaution to protect existing partitions.  It's very inconvenient.

I'm hopeful though that there is a workaround out there.
I've been looking for a solution as well, but since they changed it there hasn't been much out there ... If you find a way I'd love to know :)

Anyway, thanks!