2
GPT > Partition2 > LUKS > btrfs

I need some additional space for my boot volume, so far I did:

  • Shrink my btrfs volume by 250MB. btrfs resize -250M /
  • Shrink the LUKS root volume cryptsetup resize --size sector_calc luks_mapper_desc_root

How to actually move the whole LUKS container back by 250MB? (without using a secondary disk, so I guess this excludes dd)

  • Future steps: Delete GPT Partition 1 and 2 and create the first bigger and the second one with a higher start sector and less spanning sectors.
4
  • Assuming that your current setup is working. You can overwrite your backup (you do of course have one) with the now shrunken LUKS data, partition and restore from backup. If things go wrong then you can always roll-back the partitioning and restore the LUKS-data to the current location.
    – Anthon
    May 4, 2014 at 12:39
  • I did a backup. Any yes - that would be an option, but what I hoped for to get was a hint/link to a inplace procedure/tool. but maybe no such thing exists...
    – drahnr
    May 4, 2014 at 13:00
  • dd indeed doesn't know about overlap if you do if=/dev/sdx1 of=/dev/sdx1 seek=(equivalent of 250M blocks). You can do that kind of stuff calling dd multiple times from a script starting from the back with 250Mb blocks at a time, the overhead of starting dd is probably minimal compared to the actual reading+write.
    – Anthon
    May 4, 2014 at 13:49
  • @Anthon But dd_rescue knows --reverse. May 6, 2014 at 15:07

1 Answer 1

0

KDE Partition Manager 2.2 can move/resize file systems encrypted with LUKS.

To avoid data loss, KPM imposes the following restriction: LUKS partition can only be moved when locked, but it can only be resized when unlocked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .