Storage exhaustion on vCenter Server Appliance caused by orphaned LVM Snapshot Disks
search cancel

Storage exhaustion on vCenter Server Appliance caused by orphaned LVM Snapshot Disks

book

Article ID: 435964

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • The datastore hosting the vCenter Server Appliance VM experiences sudden or gradual storage exhaustion, consuming significantly more space than expected.
  • Upon further reviewing the vCenter Server virtual machine's settings in the vSphere Client reveals multiple unusually large virtual hard disks named using the convention lvm-snapshot-disk-<timestamp>.vmdk
  • Running the lsblk command via an SSH session to the vCenter Server displays several raw block devices e.g., sdr, sds, sdt that lack a filesystem, mount point, or active LVM membership. Example below: 

    root@<vCenter_Server> [ ~ ]# lsblk
    NAME                                  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
    sda                                     8:0    0 48.6G  0 disk 
    ├─sda1                                  8:1    0    4M  0 part 
    ├─sda2                                  8:2    0   10M  0 part /boot/efi
    ├─sda3                                  8:3    0  512M  0 part /boot
    └─sda4                                  8:4    0   48G  0 part 
      └─vg_root_0-lv_root_0               254:1    0   48G  0 lvm  /
    sdb                                     8:16   0  6.9G  0 disk 
    sdc                                     8:32   0   50G  0 disk 
    └─swap_vg-swap1                       254:4    0   50G  0 lvm  [SWAP]
    sdd                                     8:48   0  100G  0 disk 
    └─core_vg-core                        254:16   0  100G  0 lvm  /storage/core
    sde                                     8:64   0   25G  0 disk 
    └─log_vg-log                          254:10   0   25G  0 lvm  /storage/log
    sdf                                     8:80   0   50G  0 disk 
    └─db_vg-db                            254:32   0   50G  0 lvm  /storage/db
    sdg                                     8:96   0   25G  0 disk 
    └─dblog_vg-dblog                      254:20   0   25G  0 lvm  /storage/dblog
    sdh                                     8:112  0  1.4T  0 disk 
    └─seat_vg-seat                        254:44   0  1.4T  0 lvm  /storage/seat
    sdi                                     8:128  0   10G  0 disk 
    └─netdump_vg-netdump                  254:24   0   10G  0 lvm  /storage/netdump
    sdj                                     8:144  0   25G  0 disk 
    └─autodeploy_vg-autodeploy            254:36   0   25G  0 lvm  /storage/autodeploy
    sdk                                     8:160  0   25G  0 disk 
    └─imagebuilder_vg-imagebuilder        254:40   0   25G  0 lvm  /storage/imagebuilder
    sdl                                     8:176  0  100G  0 disk 
    └─updatemgr_vg-updatemgr              254:28   0  100G  0 lvm  /storage/updatemgr
    sdm                                     8:192  0  200G  0 disk 
    └─archive_vg-archive                  254:6    0  200G  0 lvm  /storage/archive
    sdn                                     8:208  0  1.4T  0 disk 
    └─vtsdb_vg-vtsdb                      254:12   0  1.4T  0 lvm  /storage/vtsdb
    sdo                                     8:224  0   25G  0 disk 
    └─vtsdblog_vg-vtsdblog                254:48   0   25G  0 lvm  /storage/vtsdblog
    sdp                                     8:240  0  100G  0 disk 
    └─lifecycle_vg-lifecycle              254:9    0  100G  0 lvm  /storage/lifecycle
    sr0                                    11:0    1 1024M  0 rom  
    sdq                                    65:0    0 1000G  0 disk 
    └─vg_lvm_snapshot-lv_lvm_snapshot     254:0    0 1000G  0 lvm  /storage/lvm_snapshot
    sdr                                    65:16   0  1.1T  0 disk 
    sds                                    65:32   0  1.4T  0 disk 
    sdt                                    65:48   0  1.8T  0 disk 
    sdu                                    65:64   0  2.2T  0 disk 
    sdv                                    65:80   0  2.8T  0 disk

  • The legitimate snapshot volume disk mapped to vg_lvm_snapshot-lv_lvm_snapshot is present and healthy, indicating the additional disks are anomalies.

Environment

VMware vCenter Server

Cause

During native file-based backups via the VAMI interface or appliance patching/upgrade operations, vCenter dynamically provisions and attaches temporary virtual hard disks to perform consistent LVM snapshots.

If the backup or patching workflow fails abruptly, times out, or is manually cancelled, the workflow engine may fail to trigger the post-operation cleanup scripts. As a result, the temporary LVM snapshot VMDKs remain permanently attached to the VCSA virtual hardware. Repeated workflow failures over time causes these massive disks to accumulate, eventually leading to severe datastore space exhaustion.

Resolution

To resolve this issue, the orphaned VMDK files must be removed from the datastore and force the VCSA Guest OS to clear the disconnected SCSI targets.
Warning: Do not remove the active, healthy LVM snapshot disk. By default, this is a 1000GB disk actively mapped to the vg_lvm_snapshot-lv_lvm_snapshot volume. Only target the timestamped lvm-snapshot-disk-<timestamp>.vmdk files that show no mount points in the CLI.

  1. Log into the vSphere Client and locate the vCenter Server VM.
  2. Right-click the vCenter VM and select Edit Settings.
  3. Scroll through the virtual hardware list and identify the orphaned disks backed by the lvm-snapshot-disk-<timestamp>.vmdk files.
  4. Click the X icon next to each orphaned disk to mark it for removal.
  5. Check the box labeled "Delete files from datastore" for each removed disk, otherwise the large files continue to consume space on the underlying storage array.
  6. Click OK to reconfigure the VM and instantly reclaim the storage space.

After the VMDKs are deleted from the datastore, the Linux kernel inside the VCSA retains ghost entries of the disconnected SCSI devices, often displaying as 0B size when running lsblk. To clear the stale SCSI devices, perform the following:

  1. Do a graceful reboot of the vCenter Server Appliance. 
  2. Upon startup, the Linux kernel performs a fresh hardware rescan on the SCSI bus. This automatically clears the stale, phantom disk entries from the OS layer, fully normalizing the vCenter storage architecture.