Klaatu continues his tour of all the little packages that are installed on your Linux box. In this episode: JFS, kbd utils, kmod, less, lha and lrzip compression showdown, libcgroup, libgudev, lilo, logrotate, and LVM.
Since setting up an array of drives often happens when you are installing an OS, it's worth noting up front that I recommend not attempting to use your installer's LVM setup tool, since, as far as I have seen, they are generally unholy messes. What I do is install the OS on a single LVM-enabled drive, and then add more drives with LVM post facto.
Therefore, the starting point of this tutorial is:
You have Linux installed on a drive, which is a single LVM volume group. If you have that, boot into your OS, and begin:
First, find out how big your disk is:
`
# parted /dev/sdY print | grep Disk
`
Create a partition that spans the whole drive:
`
# parted /dev/sdY mkpart primary 1 1200100
`
`
# pvcreate /dev/sdY1
`
`
# vgdisplay storage
`
`
# vgextend storage /dev/sdY1
`
A volume group contains logical volumes, and it is to those volumes that you can add disk space by drawing from the available disks in the group.
To check what logical volumes you have:
`
# lvdisplay
`
To check physical volumes for size:
`
# pvdisplay
`
`
# lvextend -L +999G /dev/storage/home
`
That would, as you can probably guess from the command itself, extend the logical volume containing your home folders by 999Gb.
To make all that extra space readable and writable, you must resize it:
`
# resize2fs /dev/storage/home
`
Verify what you have just done:
`
# df -h /home 1889T
`
Your home directory is now nearly 2TB in size, and the fact that the file system spans two separate physical volumes is entirely transparent to the OS.
shasum -a256=27e164d61163394c5db669002b14237a87a58f8dfbe01e5b8dfcbc36f265a341