[CALUG] repartitioning on the fly

Dave Dodge dododge at dododge.net
Wed Nov 9 00:03:32 CST 2005

On Mon, Nov 07, 2005 at 06:16:04PM -0500, Lee Sheridan wrote:
> 2.)  Shrinking one filesystem is easy, but the problem is growing the
> other one, because you can only append to the filesystem, therefore you
> can't use the space that freed up before it.  You MIGHT be able to play
> some INSANE 'dd' tricks to move the whole partition back some arbitrary
> number of blocks, but I'd only try that for fun.

If the partition is small enough (or you have a 64-bit system), you
could mmap() the block device and then memmove() the old filesystem to
the front.  It'd be reliable, _if_ you get the memmove arguments
right.  If you get them wrong, kiss your data goodbye.

                                                  -Dave Dodge

More information about the lug mailing list