Expanding your LVM with a new disk

Our Debian LVM was getting a bit full so we got two new 2TB drives. We’ll add one of these to our LVM to increase the space.

First of all check to see if your new disk has been seen by the  BIOS.

If it has great! If not might be worth rebooting to check if a SATA port needs turning on for instance.

Once the disk has been recognised by the system it will show up with the above command.

We now know that the disk is /dev/sdb. Thats good. We can now prepare it for use.

Hit ‘n’ to create a new partition. It should be primary (p)
choose the default partition number (usually 1)
I hit enter twice to use the full space.

Press ‘p’ and you should see something similar to this:

Press ‘t’ to change the partitions id. Use 8e as it’s going to be a Linux LVM.

Hit ‘w’ to write the changes.

Now lets create a volume:

Now we need to find the name of our existing volume group to add this volume too:

 

Great! Lets extend the id05 LVM to use /dev/sdb1 as well:

pvscan should now show us the physical volumes to confirm:

Now lets find the logical volume that we want to increase. The lvdisplay command will show them all:

Here we have 2 (the other one is a swap)  The one we want to make bigger is /dev/id05/root.

Now lets resize the filesystem (this may take some time!)

All done! Check your new lovely space out!

VM Management with Archipel

zoom-controls
For a while now I’ve been experimenting with virtual machines on a variety of software & hardware solutions. The one issue which always bugged me was finding a nice web tool (or even writing one) where I could manage all my VM’s in one place. This last week I found the product: Archipel

Building a KVM host on Debian

As a continuing project I always love playing with virtulisation. This is some notes for installing and configuring KVM on Debian. Its mainly for my own reference, but if you find it useful please leave a comment!

1. Create a Debian ‘base system’ and fully update it. I use Debian stable, and a minimal install.

Hardware Requirements for KVM

KVM works best if your processor supports virtulisation extensions. It WILL still work if you dont, but dont expect any decent performance! Installations of virtual hosts are sometimes painfully slow without this!

I like my virtualmachines to get their own proper IP address from my LAN or be configured with a static. For this to work and get past the default NAT setup, you will need to setup a network bridge. Follow the link here: http://wiki.debian.org/BridgeNetworkConnections#Setting_up_your_Bridge on how to set that up.

2. Now you should have a fully patched and updated Debian system, we’re now going to install KVM:
apt-get install qemu-kvm libvirt-bin

Revisiting Virtulization

Its time to revisit virtulization. My home server homer is in dire need of some more diskspace, RAM and general cleaning up. It would probably help if the roles were split across a couple of VM’s. A bit of my development work requires a windows server or 2 and the rest, which is mainly web development is fine with running on Debian.

However, these days homer is showing his age. He is an old Dell, running only a P4 2.8 GHz chip. Hardware vitulization is not supported and previous attempts at running Vmware hasnt worked that well. I think its time to build a new server:

Requirements
1. Its got to be as quiet as possible (currently its in the bedroom, between our desks)
2. Low power consumption
3. Loads of diskspace (main house fileserver for movies) preferably in an LVM or maybe even some kind of RAID.
4. Enough RAM to run a few VM’s for various roles.
5. Low cost – its almost Xmas man!