Hot-add of VMware virtual disks in RHEL
From Brandonhutchinson.com
In this example, I add two 20G virtual disks to a RHEL 5 x64 VM and get the disks recognized by the OS without a reboot.
- List current disks on the virtual SCSI bus.
# lsscsi [0:0:0:0] disk VMware Virtual disk 1.0 /dev/sda [0:0:1:0] disk VMware Virtual disk 1.0 /dev/sdb
- Re-scan the SCSI bus.
# echo "- - -" > /sys/class/scsi_host/host0/scan
- The new virtual disks now appear.
# lsscsi [0:0:0:0] disk VMware Virtual disk 1.0 /dev/sda [0:0:1:0] disk VMware Virtual disk 1.0 /dev/sdb [0:0:2:0] disk VMware Virtual disk 1.0 /dev/sdc [0:0:3:0] disk VMware Virtual disk 1.0 /dev/sdd
- You may now partition the disks (fdisk), create file systems (mkfs), label file systems (e2label), and mount and file systems to /etc/fstab as appropriate.
