#71 Issue closed: Swap partitions should not be resized

Labels: bug, waiting for info

kpieth opened issue at 2012-04-20 12:28:

The swap partition also gets shrunk in auto_resize_disks.sh. In my case it's a little 1GB partition and I want to work with a minimum of 1GB of swap on all my systems because I dont want to have the OOM Killer killing my processes too early :-)

dagwieers commented at 2012-06-26 10:10:

I have been looking at the implementation. It is not going to be easy to do this without an almost complete rewrite. That is why I am moving this out of the v1.14 milestone.

kpieth commented at 2012-10-15 12:36:

Here is the workaround i am using, i think it will not work when there are multiple swap partitons per device and it does not log anything like "will not resize swap partiton":

/usr/share/rear/layout/prepare/default/40_autoresize_disks.sh
line 45 new:
done < <(grep "^part $device" $LAYOUT_FILE | grep -v $(grep "^swap $device" $LAYOUT_FILE | cut -d' ' -f 2))

original:
done < <(grep "^part $device" $LAYOUT_FILE)

gdha commented at 2014-04-04 12:23:

@jhoekx Jeroen - is the above solution the way to go for this issue? Or, is it too quick and dirty?

jhoekx commented at 2014-04-04 12:31:

It's a creative workaround :-)

It looks like it doesn't cause any problems in other cases once you add a space after swap $device, so if it solves this particular issue...

gdha commented at 2014-04-14 10:57:

@kpieth any feedback is welcome
@jhoekx adding an extra space character after swap $device result in an error as the grep -v is empty.

gdha commented at 2014-05-06 07:32:

rear-1.16 is out and fix is included


[Export of Github issue for rear/rear.]