For Linux Mint 13 and 14: http://forums.linuxmint.com/viewtopic.php?f=42&t=108442#p610315.
For Linux Mint 16: http://forums.linuxmint.com/viewtopic.php?f=42&t=108442#p793203
For those who want to use UEFI boot (EFI), have a look here: http://forums.linuxmint.com/viewtopic.php?f=46&t=107620#p608123.
The how-to was inspired by this how-to http://forums.linuxmint.com/viewtopic.php?f=197&t=71159 and uses some of it's steps.
The following how-to should work on most PCs or laptops without issues. It should also work with different Linux Mint releases and desktops - Gnome, KDE, or whatever. I've done this installation at least 10-15 times, including some modified installation procedure for UEFI. UEFI can be a pain in the neck, so unless you really need it, choose the MBR method below.
If you need encryption as well, check the above mentioned how-to or use the new Linux Mint 16 that comes with an encryption option.
You can skip the introduction and follow the installation part below if you are familiar with LVM!
Why use LVM?
LVM stands for Logical Volume Manager. LVM virtualizes your hard disk drives. Ever ran out of hard disk space? If you did you probably know what that means: Installing a new (usually larger) drive and copying your stuff to the new drive, or creating new partitions to hold the data. In most cases people want to keep their data organized into folders. If the disk is full your folder can't store any more files. Unless you have some spare space on your disk and can resize the partitions, you're forced to add a new drive and copy your folder to that drive. And what if that folder or drive fills up?
Well, you could put your data on RAID using several disks. But eventually these will fill up and then you need to add additional storage. Of course you can expand your RAID and add a new disk, but that procedure may be challenging. If you need to backup all your data, you may need lots of disk space to do that. My old PC holds somewhere around 5-6TB of data on 5 hard disks, plus external storage for backup of the critical data.
LVM is the solution.
What does LVM do?
LVM virtualizes disks. First you create a PV or Physical Volume. This is the hard drive or partition layer. Then you create a VG or Volume Group which is the logical layer for one or multiple drives or partitions. Then you create the LV or Logical Volume, which is the equivalent of a partition. The beautiful thing about LVM is that you can expand VGs and LVs over several drives or partitions. Sounds difficult? It isn't. Let's see an example:
Disk 1 has 3 partitions: /dev/sda1 for /boot, /dev/sda2 for swap, and /dev/sda3 formatted to LVM to hold / and /home. Let's say the disk has 60GB (like a small modern SSD). If your /home folder/partition runs out of disk space, you just add another disk, create a PV (physical volume), add it to the same VG (volume group) as the one that contains the /home partition, and expand the LV (logical volume) to include that disk. Let's say the new disk has a size of 2TB. Now you have a LV mounted as /home with a size of 2TB plus the space you reserved on your original LV. Once that fills up, you add another disk, for example a 3TB disk. Now you have the original disk space you reserved for /home on /dev/sda3 plus the 2TB drive plus the 3TB drive, so somewhere around 5TB+ of disk space on a single logical volume (like a single partition). Not enough, just add disks.
You can even stripe disks (LVs) to get similar performance improvements to RAID. And you can use RAID in combination with LVs.
The beautiful thing about LVM is that you don't need to worry about disk size or type. Hard drive technology and size develops very quickly. My old PC from 5 years ago had 2 250GB drives. Today it holds 5-6TB of data, unfortunately without LVM. I'll move the drives the to the new PC, copy the data onto the new LVM formatted disks, and format these "old" drives to LVM. At the end I will have 10TB on 6 drives. My PC can hold 8 internal drives. If the old drives are too small, I'll copy their data onto external media and copy the data back onto larger LVM drives.
By the way, this does not only pertain to data drives. If your / partition runs out of space, just add a partition on the same or other drive to the LV, or increase the LV to include some empty space of the drive or other drives. Remember, your drive space is virtual and you add as much storage space as your disks or computer allow.
Last not least LVM is the preferred storage option for Xen. With Xen it provides increased read/write speed compared to normal ext4 or other formats.
With LVM you want to assign a reasonable but conservative size to each LV. Why? Because if you leave spare room you can always increase a volume that fills up. For reference, a typical LM13/LM14 installation will use somewhere around 6GB on the / volume (given that you created a separate /home volume).
I suggest 15GB for / unless your are tight on disk space. /boot should be somewhere around 512MB to 1GB, depending on how many kernels you like to install. The size of /home depends on your data structure and needs - it can be anything between ~10GB to several Terabyte.
Increasing the size of logical volumes
Increasing the size of a logical volume is quite easy. Here are the steps involved:
a) Add a physical volume (disk or partition) to the volume group. This is only necessary if your VG runs out of disk space.
b) Extend the logical volume using the "lvextend" command.
Code: Select all
lvextend -L+50G /dev/vg1/lv1
c) Resize the file system using resize2fs (for ext2, ext3, and ext4 file systems).
A concise description of the LVM commands can be found here: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/.
For more information on LVM administration, look here: http://www.centos.org/docs/5/html/5.1/Cluster_Logical_Volume_Manager/index.html.