All of lore.kernel.org
 help / color / mirror / Atom feed
* request for sfdisk --no-blkrrpart
@ 2016-09-01 17:08 Scott Moser
  2016-09-01 23:22 ` Karel Zak
  2016-09-02  9:23 ` Karel Zak
  0 siblings, 2 replies; 3+ messages in thread
From: Scott Moser @ 2016-09-01 17:08 UTC (permalink / raw)
  To: util-linux

Hi,

I maintain 'growpart' in cloud-utils, which handles growing partitions to
fill up extra space.  Its common that disk images in vms will have
additional space added to the end, and growpart just resizes the partition
to take advantage of that if it is present.

Ubuntu just updated to 2.28.1 and cloud-utils and that caused bug
http://pad.lv/1619285.  I see that we are now now running with this in
place:
  commit e0d30ef4c sfdisk: exit with error if rereading partition table fails

Then i see in trunk that that is reverted:

  commit 78e7f7889 Revert "sfdisk: exit with error if rereading partition table fails"

In the past I had put some hacky error message output string matching
handle failure due only to BLKRRPART having failed, since the partition
i'm resizing usually is mounted as /.

Long story short, could you add a '--no-blkrrpart' flag that growpart
could add in its usage.  Then it wouldn't have to deal with ignoring an
expected failure.  Growpart handles calling
   partx --update --nr <PART> <DEVICE>
when it can.

Scott

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: request for sfdisk --no-blkrrpart
  2016-09-01 17:08 request for sfdisk --no-blkrrpart Scott Moser
@ 2016-09-01 23:22 ` Karel Zak
  2016-09-02  9:23 ` Karel Zak
  1 sibling, 0 replies; 3+ messages in thread
From: Karel Zak @ 2016-09-01 23:22 UTC (permalink / raw)
  To: Scott Moser; +Cc: util-linux

On Thu, Sep 01, 2016 at 01:08:46PM -0400, Scott Moser wrote:
> Hi,
> 
> I maintain 'growpart' in cloud-utils, which handles growing partitions to
> fill up extra space.  Its common that disk images in vms will have
> additional space added to the end, and growpart just resizes the partition
> to take advantage of that if it is present.
> 
> Ubuntu just updated to 2.28.1 and cloud-utils and that caused bug
> http://pad.lv/1619285.  I see that we are now now running with this in
> place:
>   commit e0d30ef4c sfdisk: exit with error if rereading partition table fails
> 
> Then i see in trunk that that is reverted:
> 
>   commit 78e7f7889 Revert "sfdisk: exit with error if rereading partition table fails"

Yes, already reported for Fedora. It was mistake to add the patch to
2.28.1, I'm going to release 2.28.2 without this patch next week.

> 
> In the past I had put some hacky error message output string matching
> handle failure due only to BLKRRPART having failed, since the partition
> i'm resizing usually is mounted as /.
> 
> Long story short, could you add a '--no-blkrrpart' flag that growpart
> could add in its usage.  Then it wouldn't have to deal with ignoring an
> expected failure.  Growpart handles calling
>    partx --update --nr <PART> <DEVICE>

I'd like to add more smart re-read partition code to libfdisk to avoid
global re-read ioctl and use per-partition BLKPG_{ADD,RESIZE,DEL}
ioctls, so call "partx --update" will be unnecessary.

And yes, --no-blkrrpart makes sense too.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: request for sfdisk --no-blkrrpart
  2016-09-01 17:08 request for sfdisk --no-blkrrpart Scott Moser
  2016-09-01 23:22 ` Karel Zak
@ 2016-09-02  9:23 ` Karel Zak
  1 sibling, 0 replies; 3+ messages in thread
From: Karel Zak @ 2016-09-02  9:23 UTC (permalink / raw)
  To: Scott Moser; +Cc: util-linux

On Thu, Sep 01, 2016 at 01:08:46PM -0400, Scott Moser wrote:
> Long story short, could you add a '--no-blkrrpart' flag that growpart
> could add in its usage.  Then it wouldn't have to deal with ignoring an
> expected failure.  Growpart handles calling
>    partx --update --nr <PART> <DEVICE>
> when it can.

I have added --no-tell-kernel option (we already have --no-reread for
another purpose).

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-02  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 17:08 request for sfdisk --no-blkrrpart Scott Moser
2016-09-01 23:22 ` Karel Zak
2016-09-02  9:23 ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.