Results 1 to 2 of 2

Thread: Resizing a crypt-luks partition.

  1. #1

    Default Resizing a crypt-luks partition.

    Hi, I hope this is the correct place for this post.I would like to shrink my main partition to create space on my HDD for another installation. As the title says my main partition is encrypted with the Opensuse default full disc encryption.I tried and failed with G-Parted. Is there a command line approach a relative newb could use ?Thanks in advance.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,673
    Blog Entries
    3

    Default Re: Resizing a crypt-luks partition.

    Quote Originally Posted by snaggle View Post
    Hi, I hope this is the correct place for this post.I would like to shrink my main partition to create space on my HDD for another installation. As the title says my main partition is encrypted with the Opensuse default full disc encryption.I tried and failed with G-Parted. Is there a command line approach a relative newb could use ?Thanks in advance.
    I would not expect "gparted" to be able to do this.

    Here's the picture:

    • You have some raw disk space which is encrypted, to give a virtual disk space.
    • A file system is created in that virtual disk space.


    What you would need to do is:

    1. Resize the file system. For an "ext2", "ext3" or "ext4" file system, the "resize2fs" command is supposed to be usable for this purpose.
    2. Once the file system is resized to a smaller size, you would need to shrink the virtual encrypted disk space. The man pages for "cryptsetup" give some information on this.


    Personally, my advice would be to backup the partition, presumably to an encrypted archive of some kind, then delete a reallocate the partition to the desired size, then restore from backup. You might need to reinstall grub or other boot software.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •