matthew at linuxfromscratch.org
Tue Oct 7 15:30:19 PDT 2008
On Tue, 7 Oct 2008 14:47:33 -0600, Matthew Burgess <matthew at linuxfromscratch.org> wrote:
> On Tue, 07 Oct 2008 14:52:24 -0500, Bruce Dubbs <bruce.dubbs at gmail.com>
>> partprobe is very useful. If you create a new partition, you can use
>> partprobe to make the current system recognize it without rebooting.
> But partprobe comes from parted, not util-linux :)
>> One determining factor is if those programs are required by the LSB or
>> not. I
>> don't have time to check today. I'd have to install the test suite and
>> run it.
> I've done a search of the LSB-Core-Generic-3.2 and LSB-Core-IA32-3.2 PDFs
> and didn't find any mention of 'addpart', 'delpart' or 'partx'.
> Looking at the man pages for each, I'm having a hard time understanding
> the use-cases for each of these programs. Why would one need to tell Linux
> about partitions if no changes have been made? Likewise, if one is making
> changes to partition tables, why would the program that is making those
> changes not inform Linux about those changes?
So, googling around I came across: http://www.cyberciti.biz/tips/re-read-the-partition-table-without-rebooting-linux-system.html
Apparently the use case is that after using fdisk to edit the partition table, one would normally reboot so that Linux knows about the new partition and one can run 'mkfs' on the new /dev node. Instead of rebooting, one can in fact use partprobe, or partx. I've not tried it, but I'd be surprised if Linux didn't just do this detection automatically now with things like Udev & HAL, though having low-level utilities around in case those aren't available for whatever reason would seem eminently sensible.
'addpart' and 'delpart' don't look overly useful as they require duplication of arguments one would have just specified in fdisk and are very prone to user error, but as they come along for the ride with --enable-partx I've no problem with them being installed.
So, yeah, +1 on adding --enable-partx.
More information about the lfs-dev