Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-43144

GNU parted uses wrong sector size causing LUKS to break

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Undefined Undefined
    • None
    • rhel-9.4
    • parted
    • None
    • None
    • None
    • image-builder-1
    • ssg_front_door
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      expand physical partition with GNU parted when LUKS is present within partition

      Please provide the package NVR for which bug is seen:

      parted-3.5-2.el9.x86_64

      How reproducible:

      reproducible

      Steps to reproduce

      1. default RHEL9 minimal install using GUI with LUKS enabled and custom LVM sizes so entire disk is not used
      2. after install, expand LVM partition (/dev/sda3 on EFI device with SATA drive) using GNU parted with: parted -> resizepart 3 100% -> quit
      3. notify LUKS with: cryptsetup resize luks-<random>
      4. reboot
      5. system will no longer be able to open LUKS device with error: 
        device-mapper: reload ioctl on cryptdevice  failed: Invalid argument

      Expected results

      system should boot and be ready for pvresize and LVM grow

      Actual results

      system is unbootable and LUKS is broken

       

      exact issue and solution found here: Can't open LUKS volume after cryptsetup resize / Newbie Corner / Arch Linux Forums

       

      GNU parted or LUKS or RHEL GUI installer is doing something wrong. With RHEL7, I have done this operation hundreds of times with various physical hardware configs and disks and virtual machines as well. GNU parted resizepart 100% has always worked until now, now in this case the only working solution is to specify raw sector number during partition resize and to use a multiple of 4096 (the sector size for this particular disk). 

              brlane@redhat.com Brian Lane
              alecpicard Alec Picard (Inactive)
              Brian Lane Brian Lane
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: