How to partition drives in Ubuntu Server using Webmin

NOTE: If you have not been following this guide from the start but instead are jumping in here then you may need to tweak these instructions to suit your environment. This guide has been tested on Ubuntu versions Trusty 14.04, Lucid 10.04, Karmic 9.10, Jaunty 9.04 and Intrepid 8.10 although it may work on earlier or later versions than this.

Using the remainder of the system drive

If you've been following this guide from the start you'll have a 30GB "system partition" and the rest of the "system drive" will be free to use as you wish. To be able to put this space to good use we need to create a volume on it and once we've created the volume we need to format the volume.

Creating a volume using Webmin

So, using Webmin go to Hardware -> Logical Volume Management and click on the Logical Volumes tab. Click the Create a logical volume in MyMediaServer option (where MyMediaServer is the name of your Server).

Give the volume a name eg. UserData, leave the Absolute size asis and click the Create button. This should take you back to the previous screen.

Now click on the new volume you just created and ensure the dropdown box next to the Create Filesystem of Type: button says New Linux Native (ext4) and click the Create filesystem of type: button. Leave everything as the default and click the Create button. This should take a while to run through and when it's finished you'll have a shiny new empty partition.

Mount a volume using Webmin

To start using this newly formatted partition we need to "mount" it. So, again using Webmin, click on the System -> Disk and Network Filesystems option.

From the Add mount Type drop-down select New Linux Native Filesystem (ext4) and click the Add mount button.

Click the button next to Mounted As and then double-click on the media folder (some people use the mnt folder. either one will do).

Then in the edit box at the bottom, which currently reads "/media" (or "/mnt") add another slash and then give the mount point a name e.g. UserData. So, the final string should read something along the lines of "/media/UserData".

Click the OK button.

Then in the Linux Native Filesystem or Linux Native Filesystem section (depending on your choice earlier) ensure the LVM logical volume option is checked and select the new Logical Volume you've just created (LV UserData).

Leave all other options as is and click the Create button. You now have the rest of your drive ready for use.

How to add additional drives

The procedure for adding additional physical drives is quite similar to the above procedure.

When a new drive is added it will have no partitions at all. So let's create one using Webmin once again. Click on Hardware -> Partitions on Local Disks and select the new "Disk name" e.g. SCSI device B. How you actually split your drive up into partitions (or chunks) is up to you. Personally, apart from the System drive, I just use one partition for each drive.

So, click on the Add primary partition button and then leaving all options asis click on the Create button. This will take you back to the previous screen where you can see the partition you've just created.

Now we need to format it and mount it. So, click on the partition you've just created then click the Create Filesystem: button ensuring the option is Linux Native. Leave all options intact and click the Create Filesystem button. On the next screen leave all settings asis and click the Create Filesystem button. Once it's done it's thing we can now mount it. You mount additional drives in the same way we mounted our "UserData" volume above. This time tho we select from the Partition with ID option instead of the LVM logical volume option. 

Still stuck? Not what you were looking for? Then head over to the Discussion Forum