<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>www.LinuxGeek.net &#187; LVM</title>
	<atom:link href="http://www.linuxgeek.net/tag/lvm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxgeek.net</link>
	<description>Open Source and Linux Opinions and Reviews</description>
	<lastBuildDate>Sat, 10 Dec 2011 02:42:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Three Virtual Machines, one host</title>
		<link>http://www.linuxgeek.net/2011/04/06/three-virtual-machines/</link>
		<comments>http://www.linuxgeek.net/2011/04/06/three-virtual-machines/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 17:17:22 +0000</pubDate>
		<dc:creator>pacneil</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.linuxgeek.net/?p=915</guid>
		<description><![CDATA[Just a word about this post:
<p>If this seems disjointed, illogical with more than a few misspelled words, come back later. This started out as my notes on configuring a set of virtual servers inside a client&#8217;s network. So I started writing as I went along. Eventually I&#8217;ll have it edited and make it final, but <p>keep reading <a href="http://www.linuxgeek.net/2011/04/06/three-virtual-machines/">Three Virtual Machines, one host</a></p>]]></description>
			<content:encoded><![CDATA[<h3>Just a word about this post:</h3>
<p>If this seems disjointed, illogical with more than a few misspelled words, come back later. This started out as my notes on configuring a set of virtual servers inside a client&#8217;s network. So I started writing as I went along. Eventually I&#8217;ll have it edited and make it final, but for now it&#8217;s just my notes. When it&#8217;s finished, I&#8217;ll remove this note.</p>
<p>Just sayin.</p>
<p>I have been tasked with setting up three virtual machines on a single host. These hosts will each have only one basic function on the company intranet. They will be a cvs server, a ftp server and a samba server. This will be a place to keep my notes.</p>
<p>Since I&#8217;m working with x86-64 hardware and all guest OS&#8217;s will be Linux, KVM seems the best choice. What I&#8217;ve read says it imposes very low overhead, and I like the ability to use a logical volume directly. I planned to install each virtual host into a separate logical volume, with the intention of being able to adjust the size of the hard drive inside the virtual machine, as needed by a changing business. We chose CentOS 5.5 as it seems a good choice for the standard on all this company&#8217;s servers. Most of their servers are RH or clones thereof.</p>
<h3>Hardware</h3>
<p>Dell PowerEdge R210 Intel® Core™ I3 540 3.06GHz, 4M Cache, 2C/4T 16 Gb Memory (4x4Gb) 2 x 2TB 7.2K RPM SATA 3.5in Cabled Hard Drive mirrored, DVD-ROM Drive and BMC.</p>
<p>On some Dell hardware, you also need to disable &#8220;Trusted Execution&#8221;, otherwise VT will not be enabled. That was not the case on this hardware. The CPU does have the VT extensions.</p>
<p>ftp server<br />
200 Gb<br />
1 CPU<br />
4 Gb RAM</p>
<p>cvs server<br />
300Gb<br />
1 CPU<br />
4 Gb RAM</p>
<p>samba server<br />
800Gb<br />
1 CPU<br />
4 Gb RAM</p>
<p>The machine came with 2 drives so that we could mirror them. The system came with software raid controller, so I just chose to use Linux built in software raid. I configured most of the the drive space in RAID I. To install the system I needed to create a 100M partition outside the raid, because <strong><em>/boot</em></strong> cannot be within the software raid.</p>
<p>Raid Devices</p>
<p>/boot  100MB<br />
/opt 100MB</p>
<p>After the install, I changed the options in fstab to ro,noauto,nouser,sync and then did a poor mans mirror</p>
<blockquote><p><code>dd if=/dev/sda1 of=/dev/sdb1</code></p></blockquote>
<p>The unexpected result was that this changed the label so the partition would no longer mount on /opt. I&#8217;ll have to relabel the partition and then add the entry back to the fstab file. I wonder what happens when you have two disks with the same disk label?</p>
<p>I found later one consequence, when I got in a state where I needed to try to upgrade to fix some things. The boot CD found two partitions /dev/sda1 and /dev/sdb1 with disklabel /boot. It refused to continue, telling me to fix that first. When I do this next time I will use tune2fs to relabel the partition. If we ever lose the drive with /boot, my hope is that it will allow us to continue running the system. This is a mirrored drive setup, and with a bootable partition, it can be recovered more simply.</p>
<p>The rest of the 2 terrabyte drive  became the Volume Group <em>System</em>. I&#8217;m not a fan of the default names used during the install. Which logical volume inside <em>VOL_GROUP00</em> contains the <em>/usr</em> partiton? Is it <em>VOL00</em> or <em>VOL01</em> or <em>VOL05</em>? I override the names and give them names that will help me identify the data, when I have to boot from a rescue CD and start copying the data off a failing system, or make a change to the fstab to get the system to boot from the still good drive in a mirrored pair.</p>
<p>Inside that I created logical volumes</p>
<p>logical volume <em>root</em> mounted on<em> /</em></p>
<p>logical volume <em>swap</em></p>
<p>Since the installer always wants a mount point for each partition and logical volume, I wait until after the install of the host system to create:</p>
<p>logical volume ftp for the ftp server</p>
<blockquote><p><code>lvcreate -L 200G -n ftp System</code></p></blockquote>
<p>logical volume cvs for the cvs server</p>
<blockquote><p><code>lvcreate -L 200G -n cvs System</code></p></blockquote>
<p>logical volume samba for the samba server</p>
<blockquote><p><code>lvcreate -L 200G -n samba System</code></p></blockquote>
<h3>Resizing logical volumes inside logical volumes</h3>
<p>1. shutdown virtual machine<br />
use kparx to add the logical volumes</p>
<blockquote><p><code>kpartx -a /dev/System/ftp</code></p>
<p>lvs</p>
<p>LV            VG      Attr    LSize     Origin  Snap%  Move  Log Copy% Convert<br />
samba      System    -wi-a-     1.00T<br />
cvs           System    -wi-a-  198.00G<br />
ftp           System     -wi-ao 248.00G<br />
root         System     -wi-ao    3.91G<br />
swap        System    -wi-ao    1.94G<br />
LogVol00 VolGroup00 -wi&#8212; 192.22G<br />
LogVol101 VolGroup00 -wi&#8211;    5.66G</p></blockquote>
<p>2. extend HOST logical volume</p>
<blockquote><p><code>lvextend --L+50G /dev/mapper/System-ftp<br />
Extending logical volume ftp to 248.00 GB<br />
Logical volume ftp successfully resized</code></p></blockquote>
<blockquote><p><code>vgdisplay -v</code></p></blockquote>
<p>3. resize the physical volume on the virtual machine</p>
<blockquote><p><code>pvresize --setphysicalvolumesize 248G /dev/vda2</code></p></blockquote>
<blockquote><p><code>lvextend -L+50G /dev/VolGroup00/LogVol00</code></p></blockquote>
<p><strong>This failed</strong>. I was able to resize the logical volumes on the host, but I kept getting errors similar to:</p>
<blockquote><p><code>device-mapper: reload ioctl failed: Invalid argument Failed to suspend LogVol00</code></p></blockquote>
<p>I found plenty of links to other people who&#8217;ve encountered this problem, but no solution. So we decided to fix the size of the logical volumes for each host and move on.</p>
<p>So I set fixed sizes for the logical volumes.</p>
<p>400G for the ftp server</p>
<p>557G for the cvs server</p>
<p>900G for the samba server</p>
<p>Then I installed CentOS 5.5 on each.</p>
<h3>Networking</h3>
<p>Getting the machines to connect to the LAN with addresses on that LAN was another challenge. The default CentOS install set up a virtual network between the hosts with an outbound NAT connection. I wanted each machine to have a discreet IP address and be as separated as possible. Same reason I had them running in their own logical volumes.</p>
<p>I found lots of descriptions of what I needed to do, but they all seemed to lacking a small piece of information. I discovered you must create the bridge device on the host first, before you install the virtual hosts. At least for me, I wasn&#8217;t able to install and then change the network configuration. I may not have understood the required modifications well enough.</p>
<p>I used the instructions from this site:</p>
<p><a title="CentOS / Redhat: KVM Bridged Network Configuration" href="http://www.cyberciti.biz/faq/rhel-linux-kvm-virtualization-bridged-networking-with-libvirt/" target="_blank">CentOS / Redhat: KVM Bridged Network Configuration</a></p>
<p>I first created the bridge device. I made backups of original files before I started. Remember to use prefix, not postfix notation. bak.ifcfg. The scripts look for any file that starts with ifcfg and then acts upon them. First a new file for the bridge device.</p>
<blockquote><p><code>vi /etc/sysconfig/network-scripts/ifcfg-br0</code></p>
<p>DEVICE=br0<br />
TYPE=Bridge<br />
BOOTPROTO=static<br />
IPADDR=192.168.1.5<br />
NETMASK=255.255.255.0<br />
GATEWAY=192.168.1.1<br />
ONBOOT=yes</p></blockquote>
<p>Then edit the ethernet configuration file, after making a backup:</p>
<blockquote><p><code><br />
vi /etc/sysconfig/network-scripts/ifcfg-eth0</code></p>
<p>DEVICE=eth0<br />
BOOTPROTO=none<br />
HWADR=12:34:56:78:91:23<br />
BRIDGE=br0<br />
ONBOOT=yes</p></blockquote>
<h3>Other interesting links:</h3>
<p><a title="Libvirt" href="http://cooker.techsnail.com/index.php/XEN,_KVM,_Libvirt_and_IPTables" target="_blank">Libvirt overwrites the existing iptables rules</a></p>
<p><a title="Redhat Hypervisor Deployment Guid" href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/chap-Virtualization-Storage_Pools-Storage_Pools.html" target="_blank">Redhat Hypervisor Deployment Guide</a></p>
<p><a title="Xen Cloud Platform" href="http://www.xen.org/products/cloudxen.html" target="_blank">Xen Cloud Platform</a></p>
<p><a title="Setting Guest Network KVM" href="http://www.linux-kvm.org/page/Networking" target="_blank">Setting guest network</a></p>
<p><a title="VLAN bridge config" href="http://lists.centos.org/pipermail/centos-virt/2009-November/001422.html" target="_blank">VLAN bridge config</a></p>
<p><a title="How to Get Maximum Network Performance using paravirtual drivers and bridged networking" href="http://www.linux-kvm.com/content/tip-how-get-maximum-network-performance-using-paravirtual-drivers-and-bridged-networking" target="_blank">How to Get Maximum Network Performance using paravirtual drivers and bridged networking</a></p>
<p><a title="Using bridged networking with Virt-manager" href="http://www.linux-kvm.com/content/using-bridged-networking-virt-manager" target="_blank">Using bridged networking with Virt-manager</a></p>
<p><a title="A Quick Guide to Using KVM with CentOS-5.1" href="http://home.roadrunner.com/~computertaijutsu/centoskvm.html" target="_blank">A Quick Guide to Using KVM with CentOS-5.1</a></p>
<p><a title="Virtual Networking" href="http://people.gnome.org/~markmc/virtual-networking.html" target="_blank">Virtual Networking</a></p>
<p><a title="KVM is interesting again.. and how I setup my virtual network... " href="http://arstechnica.com/civis/viewtopic.php?f=16&amp;t=123445" target="_blank">KVM is interesting again.. and how I setup my virtual network&#8230;</a></p>
<p><a title="KVM Bridged Network - solutions and problems" href="http://ubuntuforums.org/showthread.php?t=888903"><strong>KVM Bridged Network &#8211; solutions and problems</strong></a></p>
<p><a title="CentOS / Redhat: KVM Bridged Network Configuration" href="http://www.cyberciti.biz/faq/rhel-linux-kvm-virtualization-bridged-networking-with-libvirt/" target="_blank">CentOS / Redhat: KVM Bridged Network Configuration</a></p>
<p><a title="How to setup Windows guest paravirtual network drivers" href="http://www.linux-kvm.com/content/tip-how-setup-windows-guest-paravirtual-network-drivers" target="_blank">How to setup Windows guest paravirtual network drivers</a></p>
<p><a title="CentOS 5.x Samba Domain Controller With LDAP Backend" href="http://www.howtoforge.com/centos-5.x-samba-domain-controller-with-ldap-backend" target="_blank">CentOS 5.x Samba Domain Controller With LDAP Backend</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxgeek.net/2011/04/06/three-virtual-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redhat Enterprise 5.4 Released</title>
		<link>http://www.linuxgeek.net/2009/09/03/redhat-enterprise-5-4-released/</link>
		<comments>http://www.linuxgeek.net/2009/09/03/redhat-enterprise-5-4-released/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 19:26:34 +0000</pubDate>
		<dc:creator>pacneil</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[GFS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[openoffice]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[RHEL 5.4]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.linuxgeek.net/?p=716</guid>
		<description><![CDATA[<p>This is at it&#8217;s heart an update to RHEL 5. But Redhat is promoting it as &#8220;the first product to deliver commercial quality open source virtualization featuring Kernel-based Virtual Machine (KVM) hypervisor technology.&#8221; The kernel version is still 2.6.18, with backported patches. Redhat is promoting upcoming Red Hat Enterprise Virtualization products along with RHEL 5.4 <p>keep reading <a href="http://www.linuxgeek.net/2009/09/03/redhat-enterprise-5-4-released/">Redhat Enterprise 5.4 Released</a></p>]]></description>
			<content:encoded><![CDATA[<p>This is at it&#8217;s heart an update to RHEL 5. But Redhat is promoting it as &#8220;the first product to deliver commercial quality open source virtualization featuring Kernel-based Virtual Machine (KVM) hypervisor technology.&#8221; The kernel version is still 2.6.18, with backported patches. Redhat is promoting upcoming Red Hat Enterprise Virtualization products along with RHEL 5.4 on the <a href="http://www.redhat.com/rhel/virtualization/" target="_blank"> announcement page </a>. </p>
<p>The server release is touted as providing &#8220;the most cost-effective, flexible, and scalable environment&#8221;. There are two flavors, Red Hat Enterprise Linux and Red Hat Enterprise Linux Advanced Platform. The number of guests on Advanced Platform is unlimited while the standard release is limited to four guests. </p>
<p>Redhat Enterprise Linux is certified as a guest OS on the following platforms: </p>
<ul>
<li>VMware ESX and VMware ESXi</li>
<li>BM POWER LPARs</li>
<li>IBM System z</li>
</ul>
<p>Redhat Enterprise Linux supports three distributed system technologies:</p>
<ul>
<li>Logical Volume Manager (LVM)</li>
<li>Global File System (GFS)</li>
<li>Distributed Lock Manager (DLM)</li>
</ul>
<p>Redhat also has new managment tools for managing virtualized environments. And of course it provides tools like Samba for integration into Windows environments, Apache Web server, MySQL and Postgresql databases. And of course all the enterprise network services such as DNS, dhcp, and firewall capabilities are included. </p>
<p>Redhat is also promoting Redhat Enterprise Desktop as an alternative to &#8220;proprietary&#8221; desktop operating systems. They&#8217;re selling the &#8220;security&#8221; features and cost benefits of managing their system. And if you must run one of those &#8220;proprietary&#8221; systems, they offer virtualization to run it as a guest OS. </p>
<p>While not everything on RHEL 5.4 is the latest release, it does provide the kind of system and support that will make management comfortable. </p>
<p>Subscribers to RHEL 5 will get the updates automatically for free. New subscribers will pay about $349 for the server version and prices start at $80 for the desktop version. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxgeek.net/2009/09/03/redhat-enterprise-5-4-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

