autogrow.sh fails to increase partition size due to LVM logical volumes snapshot
search cancel

autogrow.sh fails to increase partition size due to LVM logical volumes snapshot

book

Article ID: 370818

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

On vCenter Server Appliance, the autogrow script is unable to extend the partitions and return similar following lines:

Wed Jun 26 11:24:52 CEST 2024 Disk Util: INFO: LV Resizing /dev/vtsdblog_vg/vtsdblog
  Snapshot origin volumes can be resized only while inactive: try lvchange -an.
Wed Jun 26 11:24:52 CEST 2024 Disk Util: INFO: LV Resizing /dev/vtsdblog_vg/vtsdblog_vg_vtsdblog_snap
fsck 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 (30-Dec-2021)
The filesystem is already 2246656 (4k) blocks long.  Nothing to do!

Wed Jun 26 11:24:52 CEST 2024 Disk Util: INFO: LV Resizing /dev/vtsdb_vg/vtsdb
  Snapshot origin volumes can be resized only while inactive: try lvchange -an.
Wed Jun 26 11:24:52 CEST 2024 Disk Util: INFO: LV Resizing /dev/vtsdb_vg/vtsdb_vg_vtsdb_snap
fsck from util-linux 2.37.4
/dev/mapper/vtsdb_vg-vtsdb_vg_vtsdb_snap: clean, 1370/393216 files, 75063/1560576 blocks
  Size of logical volume vtsdb_vg/vtsdb_vg_vtsdb_snap unchanged from 5.95 GiB (762 extents).
  Logical volume vtsdb_vg/vtsdb_vg_vtsdb_snap successfully resized.
resize2fs 1.46.5 (30-Dec-2021)
The filesystem is already 1560576 (4k) blocks long.  Nothing to do!

Wed Jun 26 11:24:52 CEST 2024 Disk Util: INFO: LV Resizing /dev/updatemgr_vg/updatemgr
  Snapshot origin volumes can be resized only while inactive: try lvchange -an.
Wed Jun 26 11:24:52 CEST 2024 Disk Util: INFO: LV Resizing /dev/updatemgr_vg/updatemgr_vg_updatemgr_snap
fsck 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 (30-Dec-2021)
The filesystem is already 6248448 (4k) blocks long.  Nothing to do!

.

Environment

When run the command "lsblk -o NAME,HCTL,MOUNTPOINT,SIZE", following the instructions of KB https://knowledge.broadcom.com/external/article?legacyId=2145603 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

 

Cause

Issue can happen when LVM snapshot clean-up workflow is not automatically executed after upgrade from 7.0U3 to 8.0U1b, then when attempting to patch to 8.0U2a pre-update check failed to find lvm_snapshot logical volume.

LVM snapshot clean-up workflow: clears all the created snapshot volumes and re-creates the lvm_snapshot logical volume

Resolution

Run the script performLVMCleanup.py attached to this article to remove the logical volumes snapshots

  • python performLVMCleanup.py

Attachments

performLVMCleanup.py get_app