😎
Docs
  • Tamm - Docs
  • Azure
    • Sentinel KQL Samples
    • Managed Identities
    • Deploy Sentinel with Terraform
  • Docker
    • Allow standard user to interact with Docker
    • Install Docker
    • Installing and working with Traefik
    • Installing specific version of Docker
    • Deploy Guacamole
    • Traefik geoblock
    • Unpoller Prometheus UCG Ultra
  • HomeAssistant
    • HAOS install on Proxmox
    • Zigbee2MQTT
    • HAOS Reverse Proxy
    • ZBDongle-E
  • Kali
    • Enable RDP
  • Kubernetes
    • Cert manager with Cloudflare
    • On prem loadbalancer metallb
    • Nginx ingress
    • Cloudinit Rancher ubuntu
    • Rancher Ubuntu 18.04 node template
    • Velero with minio backend
    • vsphere pvc (in-tree)
    • Velero cheat sheet
    • nginx annotations examples
  • Linux
    • Expand lvm disk vmware
    • Expand lvm disk fresh install
    • Disk usage
    • flush-dns
    • Netplan config example
    • Add user in photon OS
    • SSH-Keys
    • Set timezone
    • sudo nopasswd
    • Add custom alias
    • Rocky Linux commands
  • macOS
    • Uninstall System extensions
    • 1Password Github setup
  • Microsoft 365
    • Powershell Cheat sheet
  • Portainer
    • Install Portainer
    • Add docker node
  • Powershell
    • GenericList example
    • Mixed stuff n things
    • Synopsis Template
    • Powershell Oh-my-posh
    • Powershell Sync Profile
    • Cleanup and install MS Graph module
  • Proxmox
    • Disable No Subscription notification
    • Import from vmware error
    • Proxmox commands
    • Proxmox on Intel NUC
    • Proxmox E1000
  • Terraform
    • Getting started
    • Deploy Sentinel
  • Unifi
    • Unifi Network App (migration)
    • Slow vlan throughput
    • interface-explanation
  • Windows
    • Network settings access denied
    • Windows GVLK Keys
    • Windows Server 2025
Powered by GitBook
On this page

Was this helpful?

  1. Linux

Expand lvm disk vmware

In this guide the VM resides in Vmware and the operating system is Ubuntu 18.04, but should be somewhat applicable to other Linux OS’es

  1. Begin with connecting to your server and type in sudo fdisk -l If your disk has 4 partitions you cannot expand any more using this method (you can still attach a new disk and expand the existing LVM using this method)

  2. Sign on to your vCenter and edit settings of the virtual machine, increase the size of your disk

  3. Locate which SCSI devices you have sudo ls /sys/class/scsi_device/

  4. Then rescan the devices (or simply reboot the server if it is possible)

sudo echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/rescan
sudo echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan
  1. If you re-run fdisk -l /dev/sda you can now see that the size of the disc is now the size you set (If you get GPT errors, try sudo parted -l)

  2. Now run fdisk /dev/sda

  3. Type n and press enter Accept the default partition number 3 (or 2/4) (The default first sector should be OK but you may have to compare to earlier partitions so you dont overwrite. ie the first sector should not be inside an existing one If you get a GPT error with a missmatch error, you may run gdisk /dev/sda, w to write, press Y to correct the invalid sectors and write. Re-run fdisk /dev/sda)

  4. Write the changes by typing w, enter

  5. It is now time to extend the LVM with our new partition! Create the physical volume with the newly created partition: pvcreate /dev/sda3

  6. Type pvs and you should see the existing volumegroup, default in ubuntu is ubuntu-vg

  7. Extend the volumegroup with the new volume: vgextend ubuntu-vg /dev/sd3

  8. After that it’s time to extend the volume to it’s new size: lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv /dev/sda3 If you are having troubles finding the correct volumenames you can try lvdisplay

  9. Resize the volume to expand to max size: resize2fs /dev/ubuntu-vg/ubuntu-lv and then verify the new disksize with df -h

Previousnginx annotations examplesNextExpand lvm disk fresh install

Last updated 1 year ago

Was this helpful?