auto-maximize a logical partition with ext3

auto-maximize a logical partition with ext3

Ira Abramov Lists-Linux-IL at ira.abramov.org
Sun Apr 3 13:43:55 IDT 2011


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/



More information about the Linux-il mailing list