<?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>That Chris Brown's Blog &#187; lvm</title>
	<atom:link href="http://www.thatchrisbrown.com/tag/lvm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thatchrisbrown.com</link>
	<description>Another Chris Brown &#38; another blog</description>
	<lastBuildDate>Sat, 03 Apr 2010 13:05:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>USB CentOS to the rescue!</title>
		<link>http://www.thatchrisbrown.com/2009/usb-centos-to-the-rescue/</link>
		<comments>http://www.thatchrisbrown.com/2009/usb-centos-to-the-rescue/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 22:44:07 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://www.thatchrisbrown.com/?p=115</guid>
		<description><![CDATA[I stupidly broke a host and managed to recover it with CentOS Live CD running from a USB stick, which was refreshingly easy to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.thatchrisbrown.com%2F2009%2Fusb-centos-to-the-rescue%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.thatchrisbrown.com%2F2009%2Fusb-centos-to-the-rescue%2F&amp;source=thatchrisbrown&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>OK, OK &#8211; I was stupid.</p>
<p>As part of my ongoing move from Xen to KVM for VM hosting, I fireed up a server that had been sitting about too long switched off under the desk, thinkig that it would make an ideal machine to try KVM out on.  A <strong>yum groupremove Virtualization</strong> seemed to produce no issues, so I was looking good to go with a bit fo repo cleanup and then an update before upgrading from CentOS 5.2 to 5.3 with yum.  Then I did something stupid.</p>
<p>I renamed the logical volume that / is mounted from, becuase I thought the name wasn&#8217;t descriptive enough.  Then I rebooted the box.  Oh yes.</p>
<p>Cue a kernel panic when grub couldn&#8217;t find the root partition.  Oh Chris, how SMRT!  The physical box doesn&#8217;t have a CD/DVD drive (it&#8217;s meant to be a headless box) but luckily it does have USB ports, and I had a spare screen and keyboard about, and I happeend to have a 4GB USB thumb drive in my laptop bag.  A quick Google search turned up Pendrivelinux.com and a handy <a href="http://www.pendrivelinux.com/usb-centos-5-live-install-via-windows/" target="_blank">guide</a> to getting CentOS 5 working on USB.  I already had a CentOS 5.2 Live CD image on my hard drive, so a quick upload of the thumb drive contents, a quick download of the <a href="https://fedorahosted.org/liveusb-creator/" target="_blank">Fedora LiveUSB Creator</a> and I was in business!</p>
<p>It was a pretty simple recovery.  I had to unmount and remount the LVs becuase CentOS Live CD mounted them read-only, but that was easy enough &#8211; the device mapper nodes were all there and sensibly named too, so it was pretty intuitive.  The I just had to edit the LV names in /boot/grub/grub.conf, /etc/fstab and /etc/mtab.  For good measure I removed the duplicate entry in /etc/blkid/blkid.tab too.</p>
<p>Reboot, pull out the USB drive at the BIOS screen and a few moment later, there was my host back in the land of the serving. Phew!</p>
<p>A lucky escape this time, but it shows the risk of unintended consequences.  The sooner I get KVM sorted out, and all the real work done in VM guests in LVs, the better, because at least then I&#8217;ll be able to make a snapshot before I try anything like a sysadmin task!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatchrisbrown.com/2009/usb-centos-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LVM saves the day, possibly&#8230;</title>
		<link>http://www.thatchrisbrown.com/2009/lvm-saves-the-day-possibly/</link>
		<comments>http://www.thatchrisbrown.com/2009/lvm-saves-the-day-possibly/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 18:53:42 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[virtualisation]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://www.thatchrisbrown.com/?p=112</guid>
		<description><![CDATA[Using LVM for Xen guests virtual disks might have made KVM migration easier than I first [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.thatchrisbrown.com%2F2009%2Flvm-saves-the-day-possibly%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.thatchrisbrown.com%2F2009%2Flvm-saves-the-day-possibly%2F&amp;source=thatchrisbrown&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>OK, so I&#8217;m mulling the move from <a href="http://www.thatchrisbrown.com/2009/in-theory-migrating-from-xen-to-kvm-under-centos-5-3/" target="_blank">Xen to KVM</a>.  This initially looked like I&#8217;d have to make duplicate virtual disks in KVM for my Xen guests, then shut the guests down, block copy content across and patch up MBR and boot my physical box into a stock kernel and hope KVM comes up with the goods.</p>
<p>Well, a little bit of experimentation with a rarely-used VM and I&#8217;ve found much to my joy that because I used LVM logical volumes to create my Xen guests virtual disks, I can use kpartx to add device mapping for them and (when the guest is safely shut down!) mount them up in my dom0 and read/write to them.  Thi sis good news because it means they have a full virtual disk setup, with a /boot partition, a root partition and a swap partition all living in a single logical volume.  This means KVM should pick them straight up and work with them unmodified.</p>
<p>Which hopefully means all I have to do is set a stock kernel to be the boot default in my guests, shut them down, set my dom0 to boot from a stock kernel, load up the KVM kernel module and add some guests from the logical volumes.</p>
<p>If it&#8217;s that easy, I&#8217;ll be a happy person indeed!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatchrisbrown.com/2009/lvm-saves-the-day-possibly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
