VMWare/Linux Add New Disk CHEATSHEET

Add the disk via vSphere/VirtualCenter

Reboot (if you have scsitools you can also run ‘rescan-scsi-bus.sh’ instead of rebooting

Commands

fdisk -l # Display new disks w/o partition tables
fdisk /dev/<newdisk>
n (for new partition)
p (for primary partition)
1 (partition number)
(keep the other values default)
w (write changes)
fdisk /dev/<newdisk>
 (change partition type)
8e (for Linux LVM)
w (write changes)
pvcreate /dev/<newdisk>
vgcreate <NewVolGrpName> <newdisk> OR vgextend <VolGrpName> /dev/<newdisk>

lvdisplay # shows all logical volumes
lvextend -L +10G /dev/<VolGroupName>/Name

Leave a Reply

You must be logged in to post a comment.