auto-maximize a logical partition with ext3

auto-maximize a logical partition with ext3

Amos Shapira amos.shapira at gmail.com
Thu Apr 7 08:14:50 IDT 2011


Ah and btw - sfdisk is king when it comes to scripting fdisk. Just pay
attention that if you delete/create partitions to resize them that it will
use the same beginning sector as whatever already exists on the image (e.g.
best way is to just use sfdisk to create the original image).

On 3 April 2011 03:43, Ira Abramov <Lists-Linux-IL at ira.abramov.org> wrote:

> Hello friends, last resort before I go and reinvent the wheel, badly.
>
> I have a system here that creates a dozen images for medias of different
> sizes, installing a few dozen machines every day. I would like to make
> the process more unified - install the same 4G image on all medias (dd)
> and then maximize sda6, the last ext3 partition, and naturally, the
> underlying extended partition sda4.
>
> The only tool that automates resizing like that is parted, and it still
> needs a precise partition length instead of "use all available space",
> and won't resize ext3 if I don't turn off the journaling first (make it
> ext2). I tried deducing the maximum partition size with fdisk -l and
> other sfdisk instead, but each uses different units and I have no idea
> how to convert them all correctly so I'm left with working, non
> overlapping partitions.
>
> I'm prepared to do it the hard way, I just wondered if there's a tool I
> missed or an existing script that already does this.
>
> Thanks.
>
> --
> His own worst enemy
> Ira Abramov
> http://ira.abramov.org/email/
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20110406/9bae7750/attachment-0001.html>


More information about the Linux-il mailing list