Setting up an LVM filesystem is quite easy assuming you have the right tools installed and a recent kernel. LVM has a lot of advantages, most notably the ability to take snapshots of the current filesystem – this is why LVM is often used in live database environments.
Assuming a Debian Lenny machine, get the relevant packages. Some may already be installed: apt-get install lvm2 dmsetup mdadm
In this example, we will assuming that /dev/sda is your boot drive, and that you want to leave it out of your LVM array, but include /dev/sdb and /dev/sdc. Both /dev/sdb and /dev/sdc should be of equal sizes.
Firstly, using fdisk, remove any existing partitions with ‘d’, on /dev/sdb and /dev/sdc, and create one new partition to span the drive. Change the partition type to ’8e’ which is the LVM type.
Now prepare your physical disk for LVM with the ‘pvcreate’ tool:
pvcreate /dev/sdb1 /dev/sdc1
Note that you can reverse this with pvremove. You can also use pvdisplay now to display information on all physical volumes.
Oh – you do realie that you can use /dev/mdX just as easily to create LVM on your RAID devices?
Now, we need to create a ‘volume group’: vgcreate myvg /dev/sdb1 /dev/sdc1
Tags: dd, ext3, kernel, Linux, lvcreate, lvdisplay, lvm, lvremove, mkfs, mount, pvcreate, pvdisplay, pvremove, resize, tar, vgcreate, vgdisplay, vgremove, xen
Grub (and LILO too for that matter) has a useful ‘failsafe’ feature that can be configured. This proves especially useful for remote kernel upgrades, where a failed boot will render your machine offline and unavailable.
Here is my standard grub config. I have just added my new 2.6.28 kernel.
(more…)
Tags: 2.6.18, 2.6.28, boot, color, debian, default, failsafe, grub, initrd, kernel, kernel panic, kernel upgrade, network interface, panic, reboot, root, title, uname
Here’s a quick guide that I write as I’m setting up PPTP/MPPE/MPPC on a Linux server. My preferred VPN technology is OpenVPN mainly because it’s so quick and easy to set up and use, however in some cases PPTP is required chiefly when the Client wants to use the inbuilt Windows VPN capabilities rather than having to deploy 3rd party software.
My server is a Debian (of course) etch machine, with 2.6.24 (from source) kernel. My client is Windows XP Pro SP3.
(more…)
Tags: 2.6.24, debian, iptables, kernel, Linux, masquerade, mppc, mppe, patch, ppp, pppd, pptp, pptpd, VPN
Follow on from 01 Oct 08 APNIC Box – Linux on a Mikrotik 532a, Part 2
The device runs a 2.4.30 kernel on a debian woody (mipsel) environment. If anyone can contribute anything for 2.6.x and debian etch, that would be great.
In this part, I’m going to provide a download link to a prebuilt image which you can write directly onto your own CF card with dd or similar tool. I’m also going to provide a step by step to installing debian yourself without my prebuilt disk image.
Prebuilt image is here:
The prebuilt image also contains a number of scripts and tools that I’ll comment on and come to in later parts.
Now installation instructions:
(more…)
Tags: 532a, apnicbox, apt-get, atftpd, CF, compile, cross compile, Custom Kernel, dd, debian, dhcpd, dhcpd.conf installer, forward, initrd, initrd.gz, iptables, ip_forward, kernel, Linux, linuxrc, masquerade, mikrotik, mipsel, mkfs, mknod, mount, partition, prebuild image, routerboard, routerboard 532a, scripts, sed, tftpd, vmlinux, wget
I’d guess that 90% of hosting providers ‘oversell’. This essentially means that should they have 1,000GB allocated, they might offer 15 packages of 100Gb to 15 of their customers, banking on the fact that no one will fully use their 100GB allocation – Selling 5 Virtual Machines with 256MB RAM on a 1GB host, assuming that no one will use their full RAM allocation. This is bad, because you’ll generally be able to confirm that you’ve been allocated the resources, but nonetheless benchmark tests will show that you’re just not getting them, and your environment will be sluggish and unresponsive. This is the same as airlines selling 110 seats on a 100 seat plane. When that 101st paying customer does show up to claim his seat, he’s stuck without a flight.
The general consensus is that a VPS is a cheaper and lower-grade option than a dedicated service, however VPSs have a number of undisputable advantages over dedicated servers and I’m going to discuss why almost all the dedicated machines I manage are hosts for a range of VPSs.
(more…)
Tags: 10mbit, adamsinfo.com, advantages, allocation, apache2, backup service, benchmark, bind, cheap, client, co-locate, colocate, config, CPU, datacenter, debian, dedicated, dedicated servers, disk access, disk IO, endpoint, environment, exim, host, Hosting, hosting providers, Intel, kernel, kernel upgrade, mailserver, mppc, mppe, MySQL, named, noc, oversell, packages, php5, pptp, processor type, Quad Core, racks, reboot, remote services, routing, seek time, spamassassin, system administrator, tick speed, virtualization, vmware, vmware free server, vmware gsx, VPN, vps, xen, Xeon