GNU World Order Linux Cast

GNU, Linux, coffee, and subversion. This podcast is founded in the ideals of anarcho-syndacalism, anti-facism, and human rights. I stand in solidarity with all people of colour, of marginalised communities, and the oppressed around the globe.

http://www.gnuworldorder.info

subscribe
share






gnuWorldOrder_12x17


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: 1. Partition your un-used hard drive. Assuming you have only two drives in your machine, let's call the first /dev/sdX and the second /dev/sdY (in reality, the values are probably sda and sdb, but to protect you from copy-paste disasters, I use placeholders). First, find out how big your disk is: ` # parted /dev/sdY print | grep Disk ` 2. For the sake of this example, let's say your drive is 1200100MB (1TB) in size. Create a partition that spans the whole drive: ` # parted /dev/sdY mkpart primary 1 1200100 ` 3. Flag it as an available entity in your storage pool. ` # pvcreate /dev/sdY1 ` 4. OK, now you have a drive prepped for use, but we should pause and look at our imaginary setup. In order to add this new drive to an LVM volume group, we need to know what volume groups we have. Your OS installer might have created this for you, or it might be something you very consciously designed yourself. Either way, you can see what you have available: ` # vgdisplay storage ` 5. OK, so we have a volume group called storage. Currently, we happen to know that storage contains only your first drive; the one that you installed your OS onto. But you want to make that bigger by adding a second drive to it. This is called extending your volume group. ` # vgextend storage /dev/sdY1 ` 6. Now we have a pool that has access to two partitions, but we are still not actually using the second partition. 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 ` 7. Armed with a mental map of how your partitions and system are each laid out, you can now extend the logical volume. Let's say that your installer placed /home into its own partition. You would see it as a logical volume, and you can extend its size: ` # 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. 8. Well, almost anyway. It has extended the space available to the logical volume, but it has not actually stretched the file system across all that new space yet. 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


fyyd: Podcast Search Engine
share








 April 23, 2018  n/a