This article addresses an issue where orphaned LVM snapshots on the vCenter Server prevent standard maintenance tasks. This issue typically presents with one of the following two symptoms:
Warning: LVM Snapshot based auto-backup of vCenter Server will not be taken during vCenter patchingResolution: Please ensure a valid LVM snapshot disk and altroot disk is present on the vCenter Server and LVM snapshot disk has sufficient space available on it to take the backupautogrow.sh script fails to extend the logical volumes because they are locked by an active snapshot. The script returns output similar to the following:<Timestamp> Disk Util: INFO: LV Resizing /dev/vtsdblog_vg/vtsdblog Snapshot origin volumes can be resized only while inactive: try lvchange -an.<Timestamp> Disk Util: INFO: LV Resizing /dev/vtsdblog_vg/vtsdblog_vg_vtsdblog_snapfsck from util-linux 2.37.4/dev/mapper/vtsdblog_vg-vtsdblog_vg_vtsdblog_snap: clean, 15/565248 files, 65189/2246656 blocks Size of logical volume vtsdblog_vg/vtsdblog_vg_vtsdblog_snap unchanged from 8.57 GiB (1097 extents). Logical volume vtsdblog_vg/vtsdblog_vg_vtsdblog_snap successfully resized.resize2fs 1.46.5 (<Timestamp>)The filesystem is already 2246656 (4k) blocks long. Nothing to do!
<Timestamp> Disk Util: INFO: LV Resizing /dev/updatemgr_vg/updatemgr Snapshot origin volumes can be resized only while inactive: try lvchange -an.<Timestamp> Disk Util: INFO: LV Resizing /dev/updatemgr_vg/updatemgr_vg_updatemgr_snapfsck from util-linux 2.37.4/dev/mapper/updatemgr_vg-updatemgr_vg_updatemgr_snap: clean, 4704/1564672 files, 4480727/6248448 blocks Size of logical volume updatemgr_vg/updatemgr_vg_updatemgr_snap unchanged from <23.84 GiB (3051 extents). Logical volume updatemgr_vg/updatemgr_vg_updatemgr_snap successfully resized.resize2fs 1.46.5 (<Timestamp>)The filesystem is already 6248448 (4k) blocks long. Nothing to do!
When run the command "lsblk -o NAME,HCTL,MOUNTPOINT,SIZE", following the instructions of KB Increasing the disk space for the vCenter Server Appliance in vSphere 6.5, 6.7, 7.0 and 8.0 it returns logical volumes snapshots for each volume.
NAME HCTL MOUNTPOINT SIZE
sda 2:0:0:0 48.6G
|-sda1 4M
|-sda2 /boot/efi 10M
|-sda3 /boot 512M
|-sda4 48G
|-vg_root_0-lv_root_0-real 48G
|-vg_root_0-lv_root_0 / 48G
|-vg_root_0-vg_root_0_lv_root_0_snap 48G
sdb 2:0:1:0 6.8G
sdc 2:0:2:0 25G
|-swap_vg-swap1 [SWAP] 25G
sdd 2:0:3:0 50G
|-core_vg-core-real 50G
|-core_vg-core /storage/core 50G
|-core_vg-core_vg_core_snap 50G
sde 2:0:4:0 10G
|-log_vg-log /storage/log 10G
sdf 2:0:5:0 10G
|-db_vg-db-real 10G
|-db_vg-db /storage/db 10G
|-db_vg-db_vg_db_snap 10G
sdg 2:0:6:0 50G
|-dblog_vg-dblog-real 15G
|-dblog_vg-dblog /storage/dblog 15G
|-dblog_vg-dblog_vg_dblog_snap 15G
sdh 2:0:8:0 25G
|-seat_vg-seat-real 25G
|-seat_vg-seat /storage/seat 25G
|-seat_vg-seat_vg_seat_snap 25G
VMware vCenter Server
lvm_snapshot logical volume. When this process fails, the orphaned snapshots remain locked on the disks. Consequently, subsequent patching attempts (e.g., updating to 8.0 U2a) or disk expansion scripts will fail because they cannot manipulate the locked volumes.To resolve this issue, clear the orphaned logical volume snapshots manually using the Python script 'performVMCleanup.py' provided in this article.
Note: Take a Snapshot of the vCenter Server appliance before following the workaround.
performLVMCleanup.py script attached to this KB article.scp command line tool, upload the performLVMCleanup.py file to the /tmp directory on the vCenter Server Appliance.root.python performLVMCleanup.py