Hacker News new | ask | show | jobs
by lathiat 2961 days ago
Interesting I have used kpartx which uses device mapper instead of Partprobe.

Wonder why kpartx exists; will have to look into that. Maybe not everything can be partprobed.

2 comments

I'm not sure. All I can think is that partprobe is provided by parted and I have noticed people tend to gravitate towards using fdisk or parted and ignoring the other. Notice the author of the article is an fdisk guy.

I might be mis-remebering but I think parted used to be considered lame before fdisk lagged to support GPT.

Personally I’d call myself an fdisk/gdisk person - I like the safety net those programs provide by staging disk changes prior to committing to the MBR/GPT, if I’m doing things by hand this is my preferred tool.

I don’t like how parted will automatically commit your changes as you go, though this is useful for scripting your changes and is my preferred method for disk geometry modifications when preparing maintenances etc

Right tool for the job and all that.

From what I remember partprobe has had a history of occasional unreliable behaviour under RHEL - but I understand it works properly under RHEL 7.3+

kpartx is an older tool that was used with 2.6.xx-era Linux systems. partprobe/losetup are the newer mechanisms for doing this.

A lot of StackOverflow questions have answers that use kpartx, and those answers are out of date.