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 #3958

Merged
merged 1 commit into from
Jul 3, 2023

Commits on Jul 3, 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: ceph#3945
    Signed-off-by: Niels de Vos <ndevos@ibm.com>
    nixpanic committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    819e2b7 View commit details
    Browse the repository at this point in the history