[Toybox] [New toy] partprobe

Rob Landley rob at landley.net
Sun May 25 18:51:59 PDT 2014



On 05/25/14 19:18, Samuel Holland wrote:
> On 05/25/2014 06:15 PM, Rob Landley wrote:
>> Could you give me an example use case? (You resize the partitions
>> without calling fdisk which would already call this ioctl...?)
> 
> 1. You make changes to partitions with fdisk while they are in use
> (forgot to umount, vgchange -an, etc.), so after remedying the
> situation, you run partprobe to apply the already written changes.
> 
> 2. You copy the partition table from another disk or restore from a
> backup using dd.
> 
> Those are the times I've specifically used it. Another command that does
> the same thing is partx from util-linux. It gives you more control over
> adding/updating/removing individual partitions, though, so it's not
> entirely duplicate.

hmmm... sadly, partx doesn't rescan all disks, you have to specify the
device(s). It also has a list of columns, so not the kind of command I
could just sit down and knock out this evening without any study.
(To be honest, partx looks like something that wants to share a file
with sfdisk, which we also haven't got yet.)

Except... looking at partprobe, it doesn't rescan all either. Its help
text looks like it does with the [optional...] list, and running the
host one with no arguments wasn't considered an error, but this one
checks for zero arguments and fails.

Which gets us back to "maybe partx would be better"?

Sorry, being a bit picky adding commands not in the roadmap. (Note: I
got lists from Ashwini Sharma and Kyungwan Han a couple months back of
the stuff they're planning to add, which I should add to the "roadmap"
page's "requests" section. Dealt with that in email, should have cc'd
the list but it was during my Completely Swamped period (as opposed to
my current Mostly Swamped status).)

Yes we need this functionality, I'm trying to make sure we're adding it
the right way because it's a much bigger deal to remove it once it's in
there.

Sigh. Ok, I've been convinced it's a thing worth doing, and bird in the
hand. If somebody does a partx in future (and/or sfdisk) we can merge
this with that, until then...

Applied.

Rob

 1401069119.0


More information about the Toybox mailing list