分类: LINUX
2012-07-02 17:03:29
This howto is mostly built on the great tutorial available at . My spot tries to be more Ubuntu and LVM specific. This manual was tested on Ubuntu 9.04 (jaunty) Server edition guest OS.
Add Virtual Hard DiskA new hard disk can be added easily to a running virtual machine in VMWare Infrastructure Web Access by clicking Add Hardware and following the wizard.
Note: I assume that all of the commands given are run under superuser (root) rights. To become root type
Detect new SCSI Disk
The package provides the script rescan-scsi-bus.sh, which does exacly what we need. Install it and run it:
This should detect the newly added hard disk and make it available in /dev/ – /dev/sdb in the case you are adding a new drive for the first time. The output of fdisk -l should include the newly detected disk.
Format the new diskFormat the newly detected drive using fdisk
Change the type of the partition to LVM Linux:
List the Volume groups available at your machine.
Replace VolGroupName with what you read from the output of the last command.
After adding some free space to your Volume Group, you can distribute it to the Logical Volumes. The list of Logical Volumes can be obtained by running
The last step is to resize the ext3 filesystem (use different tool is you use different filesystem):