Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbd: do not try to run resizefs on an encrypted BlockMode volume (backport #3958) #3964

Merged
merged 1 commit into from
Jul 4, 2023

Commits on Jul 4, 2023

  1. rbd: do not try to run resizefs on an encrypted BlockMode volume

    When a volume has AccessType=Block and is encrypted with LUKS, a resize
    of the filesystem on the (decrypted) block-device is attempted. This
    should not be done, as the application that requested the Block volume
    is the only authoritive reader/writer of the data.
    
    In particular VirtualMachines that use RBD volumes as a disk, usually
    have a partition table on the disk, instead of only a single filesystem.
    The `resizefs` command will not be able to resize the filesystem on the
    block-device, as it is a partition table.
    
    When `resizefs` fails during NodeStageVolume, the volume is unstaged and
    an error is returned.
    
    Resizing an encrypted block-device requires `cryptsetup resize` so that
    the LUKS header on the RBD-image is updated with the correct size. But
    there is no need to call `resizefs` in this case.
    
    Fixes: #3945
    Signed-off-by: Niels de Vos <ndevos@ibm.com>
    (cherry picked from commit f60a358)
    nixpanic committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    e1fa20d View commit details
    Browse the repository at this point in the history