SDDC Manager Appliance pre-check failing as root partition /dev/sda4 left with not enough space
search cancel

SDDC Manager Appliance pre-check failing as root partition /dev/sda4 left with not enough space

book

Article ID: 316101

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

This article outlines the steps to increase the partition containing /dev/sda4

Pre-check failing - Minimal disk space is available in SDDC Manager directory. Available disk space is 2 GB. Recommended disk space is 6.0 GB or more. Clean up unused files from the directory 

Environment

VMware Cloud Foundation 4.0.x
VMware Cloud Foundation 4.2
VMware Cloud Foundation 4.1
VMware Cloud Foundation 4.3

Cause

audit.log grows to consume all free space on root partition /dev/sda4 and hence pre-check fails

Checking the space utilization using "df -h" shows root partition usage
 
root@afsc-vcf [ ~ ]# df -h
Filesystem                          Size  Used Avail Use% Mounted on
devtmpfs                            7.9G     0  7.9G   0% /dev
tmpfs                               7.9G   20K  7.9G   1% /dev/shm
tmpfs                               7.9G  1.1M  7.9G   1% /run
tmpfs                               7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/sda4                              28G      25G 1.6G  95% /
tmpfs                               7.9G  9.4M  7.9G   1% /tmp
/dev/sda2                           120M   27M   85M  24% /boot
/dev/mapper/data_vg-vcf             181G  1.7G  170G   1% /opt/vmware/vcf
/dev/mapper/data_vg-vmware           63G  2.3G   58G   4% /var/log/vmware
/dev/mapper/data_vg-data            7.9G  160M  7.3G   3% /data
/dev/mapper/lcmmount_vg-nfs--mount  503G  165G  313G  35% /nfs/vmware/vcf/nfs-mount
tmpfs                               1.6G     0  1.6G   0% /run/user/1000

Resolution

To clean up unwanted or large files
  1. Open an SSH session to the SDDC Manager appliance
  2. Login as vcf and switch to root with "su -"
  3. Run the command to check for large files
    • du -h / --max-depth 1
    • Locate the large files and delete / clear if unwanted
  4. If messages log or audit.log or auth.log is over 1GB then follow the KB for Message log is not rotating on SDDC Manager

If the above steps do not clear the space and you need to increase the partition size follow the below steps

NoteFor SDDC Manager 4.5 and 5.0, the below steps will not work. Please contact VMware Support to assist with cleaning up the space or extending the partition
  1. Power off the SDDC Manager appliance
  2. Edit the settings of the SDDC Manager appliance from vCenter to change the "Hard disk 1" from 32 GB to 50 GB
  3. Take a snapshot of the SDDC Manager appliance
  4. Power on the SDDC Manager appliance
  5. Open an SSH session to the SDDC Manager appliance
  6. Login as vcf and switch to root with "su -"
  7. Run "parted" command -
    • root@afsc-vcf [ ~ ]# parted
      GNU Parted 3.2
      Using /dev/sda
      Welcome to GNU Parted! Type 'help' to view a list of commands.
      (parted)
  8. Run "print" in parted command prompt as shown below -
    • (parted) print
      print
      Model: VMware Virtual disk (scsi)
      Disk /dev/sda: 53.7GB             // Please note this size, it'll be used in the following step
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Disk Flags:
      
      Number  Start   End     Size    File system     Name  Flags
       1      1049kB  3146kB  2097kB                        bios_grub
       2      3146kB  137MB   134MB   ext4
       3      137MB   4432MB  4295MB  linux-swap(v1)
       4      4432MB  34.4GB  29.9GB  ext4
  9. Run "resizepart" as shown below -
    • (parted) resizepart
      resizepart
      Partition number? 4
      4
      Warning: Partition /dev/sda4 is being used. Are you sure you want to continue?
      Yes/No? yes
      yes
      End?  [34.4GB]? 53.7GB        // Please input the size as shown in step 8
      53.7GB
  10. Run "print" again to check the partition is changed -
    • (parted) print
      print
      Model: VMware Virtual disk (scsi)
      Disk /dev/sda: 53.7GB
      Sector size (logical/physical): 512B/512B
      Partition Table: gpt
      Disk Flags:
      
      Number  Start   End     Size    File system     Name  Flags
       1      1049kB  3146kB  2097kB                        bios_grub
       2      3146kB  137MB   134MB   ext4
       3      137MB   4432MB  4295MB  linux-swap(v1)
       4      4432MB  53.7GB  49.3GB  ext4
  11. Run "quit" to exit parted
  12. Run "resize2fs /dev/sda4" to extend the file system
    • root@afsc-vcf [ ~ ]# resize2fs /dev/sda4
      resize2fs 1.45.5 (07-Jan-2020)
      Filesystem at /dev/sda4 is mounted on /; on-line resizing required
      old_desc_blocks = 4, new_desc_blocks = 6
      The filesystem on /dev/sda4 is now 12025083 (4k) blocks long.
  13. Confirm free space on partition with "df -h" -
    • root@afsc-vcf [ ~ ]# df -h
      Filesystem                          Size  Used Avail Use% Mounted on
      devtmpfs                            7.9G     0  7.9G   0% /dev
      tmpfs                               7.9G   20K  7.9G   1% /dev/shm
      tmpfs                               7.9G  1.1M  7.9G   1% /run
      tmpfs                               7.9G     0  7.9G   0% /sys/fs/cgroup
      /dev/sda4                            46G   16G   28G  36% /
      tmpfs                               7.9G  9.4M  7.9G   1% /tmp
      /dev/sda2                           120M   27M   85M  24% /boot
      /dev/mapper/data_vg-vcf             181G  1.7G  170G   1% /opt/vmware/vcf
      /dev/mapper/data_vg-vmware           63G  2.3G   58G   4% /var/log/vmware
      /dev/mapper/data_vg-data            7.9G  158M  7.3G   3% /data
      /dev/mapper/lcmmount_vg-nfs--mount  503G  165G  313G  35% /nfs/vmware/vcf/nfs-mount
      tmpfs                               1.6G     0  1.6G   0% /run/user/1000