live adding a new disk to linux running in VMware

  • In VMware create a new disk (we assume this is the 2nd disk ~ sdb here)
  • Let’s rescan the bus so linux recognizes it

    # echo “- – -” > /sys/class/scsi_host/host0/scan

  • Now we partition the new disk

    # fdisk /dev/sdb

  • set the type to be 8e (lvm)
  • Then we check what the name is of the volumegroup

    # vgdisplay

  • and we add the disk to the volumegroup

    vgextend vg00 /dev/sdb1

  • then we add the new space to a certain logical volume (say var)

    # lvextend /dev/vg00/lv_var /dev/sdb1

  • and we resize the filesystem in this logical volume

    # resize2fs /dev/vg00/lv_var

This entry was posted in CentOS, VMware. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.