Configuring LVM for Ubuntu Server 12.04
After you have the RAID set to be used for LVM, you’ll need to configure the logical volumes. From the main partitioning screen, select the third option: Configure the Logical Volume Manager.
Before you continue, the installer wants to confirm if you want to make the changes you have selected so far. If you are satisfied with what you’ve done so far, select “Yes” and press enter.
We are finally at the Logical Volume Manager screen. Before we can create any volumes, we have to make a volume group, so select Create volume group and press enter.
Enter a name for your volume group. When the partition manager is automatically partitioning the LVM, it creates a group with the same name as the system. That’s what I’m doing here, but you can choose whatever name you want.
Next select which physical devices you want to use for the the volume group. Here I’m using md0 as the /boot partition, so I select md1.
With our volume group created, it’s time to create the volumes themselves. Select “Create logical volume” from the LVM configuration menu and press enter.
To create the volume, we have to tell the partitioner what volume group to use. We only have one at this point, so there isn’t much to choose from. Press enter to continue.
Next we enter the volume name. I’m creating the swap volume first, so I enter “swap” and press enter.
The partitioner will assume we want to create a volume that spans the entire size of the volume group. This is not what we want to do. Here we need to enter the size of the swap space we’re creating. I’m using 1.5 GB for swap space, but you might decide on a different size. Enter whatever size you decide to use and press enter.
That’s all it takes to create a volume.
Now we need to make another one for our root filesystem, so select “Create logical volume” again and press enter.
Once again we select the volume group and press enter. (The available space has been updated since we already used part of it on the first volume.)
We’re using this volume for the root filesystem, so I’m using the name “root” for this volume. I find this to be the most practical name, and it leaves less room for error, but if you want to name it something else, feel free.
Press enter to continue.
Next select how much of the remaining available space in the volume group you want to use for this volume. I’m not creating any additional volumes, so I keep the default size and press enter.
That’s all we need to do in this area, so select “Finish” and press enter to return to the main partitioning screen.