Hot-add of VMware virtual disks in RHEL

From Brandonhutchinson.com

(Difference between revisions)
Jump to: navigation, search
(New page: 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:...)
Line 17: Line 17:
[0:0:3:0] disk VMware Virtual disk 1.0 /dev/sdd
[0:0:3:0] disk VMware Virtual disk 1.0 /dev/sdd
-
* Partition ('''fdisk'''), create file systems ('''mkfs'''), label file systems ('''e2label'''), and add the file systems to '''/etc/fstab''' as appropriate.
+
* 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.

Revision as of 22:07, 11 June 2008

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
# 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.
Personal tools