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

Avoid vgcfgrestore on thin volumes/pools and any other unsupported volume types. #3210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 29, 2024

  1. Avoid vgcfgrestore on thin volumes/pools

    and any other unsupported volume types.
    
    vgcfgrestore is not supposed to be able to restore any logical volumes
    that use kernel metadata. All volume types except linear and striped use
    kernel metadata. Main purpose of vgcfgrestore (with mandatory --force
    option) is to let users fix existing thin-pool, not to recreate the pool
    on empty disks. Do not even try vgcfgrestore on VGs that need any kernel
    metadata, because it might lead to an inconsistent state (if there are
    data that the kernel might interpret as LV metadata present on the disks).
    
    For VGs that have any volume with kernel metadata and are thus
    unsupported by vgcfgrestore, switch automatically to LV creation using
    lvcreate, similarly to MIGRATION_MODE.
    
    Avoid vgcfgrestore --force entirely, since it should not be needed now.
    
    This mostly reverts changes in commits
    311bfb3 and
    1b779ab. The former code is preserved
    and gets enabled if FORCE_VGCFGRESTORE=y. This option is on purpose
    undocumented though and may be removed in the future.
    pcahyna authored and lzaoral committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    0b3e1f6 View commit details
    Browse the repository at this point in the history