<?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>Daniel P. Berrangé &#187; qnap</title>
	<atom:link href="http://berrange.com/tags/qnap/feed/" rel="self" type="application/rss+xml" />
	<link>http://berrange.com</link>
	<description>Writing about photography, open source software, virtualization &#38; more</description>
	<lastBuildDate>Tue, 03 Apr 2012 20:26:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Provisioning KVM virtual machines on iSCSI with QNAP + virt-manager (Part 1 of 2)</title>
		<link>http://berrange.com/posts/2010/05/04/provisioning-kvm-virtual-machines-on-iscsi-with-qnap-virt-manager-part-1-of-2/</link>
		<comments>http://berrange.com/posts/2010/05/04/provisioning-kvm-virtual-machines-on-iscsi-with-qnap-virt-manager-part-1-of-2/#comments</comments>
		<pubDate>Tue, 04 May 2010 18:31:43 +0000</pubDate>
		<dc:creator>Daniel Berrange</dc:creator>
				<category><![CDATA[libvirt]]></category>
		<category><![CDATA[Virt Tools]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[qnap]]></category>

		<guid isPermaLink="false">http://berrange.com/?p=326</guid>
		<description><![CDATA[I recently got a rather nice QNAP NAS to replace my crufty, cobbled together home fileserver. Unpack the NAS, insert 4 SATA disks and turn it on. The first time it starts up, it prompts to set up RAID5 across the disks by default (overridable to any other RAID config or no RAID) and after [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got a rather nice <a href="http://qnap.com">QNAP NAS</a> to replace my crufty, cobbled together home fileserver. Unpack the NAS, insert 4 SATA disks and turn it on. The first time it starts up, it prompts to set up RAID5 across the disks by default (overridable to any other RAID config or no RAID) and after a few minutes formatting the disks, it is up and running ready todo work. It exposes storage shares via all commonly used protocols such as SAMBA, NFS, FTP, SSH/SCP, WebDAV, Web UI, and most interestingly to this post, iSCSI. The QNAP marketing material is strongly pushing iSCSI as a solution for use in combination with VMWare but here in Fedora &amp; the open source virt world it is KVM we&#8217;re interested in. <a href="http://libvirt.org">libvirt</a> has a fairly generic set of APIs for managing storage which allows impls for many different types of storage, including iSCSI. The <a href="http://virt-manager.org">virt-manager</a> app provides a UI for nearly all of the libvirt storage capabilities, again including iSCSI. This blog posting will graphically illustrate how to deploy a new guest on Fedora 12 using virt-manager and the QNAP iSCSI service.</p>
<h3>iSCSI Service Enablement</h3>
<p>In the QNAP administration UI, navigate to the &#8220;Disk Management -&gt; iSCSI&#8221; panel. Ensure the iSCSI Target Service is enabled and running on the default TCP port 3260. libvirt currently has no need for iSNS, so that can be left disabled unless you have other reasons for requiring its use.</p>
<div id="attachment_327" class="wp-caption aligncenter" style="width: 610px"><a href="http://berrange.com/wp-content/uploads/2010/05/01-qnap-iscsi-enable.png"><img class="size-full wp-image-327 " title="iSCSI Service Enablement" src="http://berrange.com/wp-content/uploads/2010/05/01-qnap-iscsi-enable.png" alt="iSCSI Service Enablement" width="600" height="380" /></a><p class="wp-caption-text">iSCSI Service Enablement</p></div>
<h3>iSCSI Targets</h3>
<p>An iSCSI target is simply a means to group a set of LUNs (storage volumes). There are many ways to organize your targets + LUNs, but to keep things simple I&#8217;m going to keep all my KVM guest storage volumes in a single target and enable this target on all my virtualization hosts. Some people like the other extreme of one target per guest, and only enabling the guest&#8217;s target on the host currently running the guest. In this screengrab I&#8217;ve already got one iSCSI target for other experimentation and intend to use the &#8216;Quick Configuration Wizard&#8217; to add a new one for my KVM guests.</p>
<p style="text-align: center;">
<div id="attachment_328" class="wp-caption aligncenter" style="width: 610px"><a href="http://berrange.com/wp-content/uploads/2010/05/02-qnap-iscsi-target-list.png"><img class="size-full wp-image-328  " title="iSCSI target list" src="http://berrange.com/wp-content/uploads/2010/05/02-qnap-iscsi-target-list.png" alt="iSCSI target list" width="600" height="380" /></a><p class="wp-caption-text">iSCSI target list</p></div>
<h3 style="text-align: left;">iSCSI Target + LUN creation</h3>
<p style="text-align: left;">Since this is my first guest, I need to create both he iSCSI target and a LUN. For future guests I can create the iSCSI LUN only and associate it with the previously created target.</p>
<div id="attachment_329" class="wp-caption aligncenter" style="width: 610px"><a href="http://berrange.com/wp-content/uploads/2010/05/03-qnap-iscsi-wizard-start.png"><img class="size-full wp-image-329 " title="iSCSI target/LUN creation wizard" src="http://berrange.com/wp-content/uploads/2010/05/03-qnap-iscsi-wizard-start.png" alt="iSCSI target/LUN creation wizard" width="600" height="380" /></a><p class="wp-caption-text">iSCSI target/LUN creation wizard</p></div>
<h3 style="text-align: left;">Setting the iSCSI target name</h3>
<p style="text-align: left;">Every iSCSI target needs a unique identifier, known as the IQN. For reasons I don&#8217;t want to understand, the typical IQN format is a rather unpleasant looking string, but fortuitously the QNAP admin UI only expects you to enter a short name, which it then uses to form the full IQN. In this example I&#8217;m giving my new iSCSI target the name &#8220;<code>kvmguests</code>&#8221; which results in the adorable IQN &#8220;<code>iqn.2004-04.com.qnap:ts-439proii:iscsi.kvmguests.bf6d84</code>&#8220;. Remember this IQN, you&#8217;ll need it later in virt-manager.</p>
<div id="attachment_330" class="wp-caption aligncenter" style="width: 610px"><a href="http://berrange.com/wp-content/uploads/2010/05/04-qnap-iscsi-wizard-names.png"><img class="size-full wp-image-330 " title="iSCSI target naming" src="http://berrange.com/wp-content/uploads/2010/05/04-qnap-iscsi-wizard-names.png" alt="iSCSI target naming" width="600" height="380" /></a><p class="wp-caption-text">iSCSI Target naming</p></div>
<h3>iSCSI target authentication</h3>
<p>iSCSI includes support for an authentication scheme known as CHAP. Unfortunately libvirt does not yet support configuration of iSCSI storage using CHAP, so this has to be left disabled. This sucks if you&#8217;re using a shared/untrusted local network between your virt hosts &amp; iSCSI server, but if you&#8217;ve got a separate network or VLAN dedicated to storage traffic this isn&#8217;t so much of a problem. I also don&#8217;t care for home usage.</p>
<div id="attachment_331" class="wp-caption aligncenter" style="width: 610px"><a href="http://berrange.com/wp-content/uploads/2010/05/05-qnap-iscsi-wizard-chap.png"><img class="size-full wp-image-331 " title="iSCSI target authentication" src="http://berrange.com/wp-content/uploads/2010/05/05-qnap-iscsi-wizard-chap.png" alt="iSCSI target authentication" width="600" height="380" /></a><p class="wp-caption-text">iSCSI target authentication</p></div>
<h3>iSCSI LUN allocation</h3>
<p>Now the iSCSI target is configured, it is time to allocate storage for the LUN. This is what will provide the guest&#8217;s virtual disk. Each LUN configured via the QNAP admin UI ends up being backed by a plain file on the NAS&#8217; (ext4) filesystem. If you choose the &#8220;Thin Provisioning&#8221; option at this stage, the LUN&#8217;s backing file will be a sparse file with no storage allocated upfront. It will grow on demand as data is written to it. This allows you to over-commit allocation of storage on the NAS, with the expectation that should you actually reach the limit on the NAS some time later, you can simply swap in larger disks to the RAID array or attach some extra external SATA devices. &#8220;Instant allocation&#8221; meanwhile, fully allocates the LUN at time of creation so there is never a problem of running out of disk space at runtime. The LUN name is just an aid-memoir for the admin. I name my LUNs to match the KVM guest name, so this one is called &#8220;rhel6x86_64&#8243;. The size of 10 GB will be more than enough for the basic RHEL6 install I plan.</p>
<div id="attachment_332" class="wp-caption aligncenter" style="width: 610px"><a href="http://berrange.com/wp-content/uploads/2010/05/06-qnap-iscsi-wizard-size.png"><img class="size-full wp-image-332 " title="iSCSI LUN allocation" src="http://berrange.com/wp-content/uploads/2010/05/06-qnap-iscsi-wizard-size.png" alt="iSCSI LUN allocation" width="600" height="380" /></a><p class="wp-caption-text">iSCSI LUN allocation</p></div>
<h3>iSCSI setup confirmation</h3>
<p>Before actually creating the iSCSI target and LUN, the QNAP wizard allows a chance to review the configuration choices just made.</p>
<div id="attachment_333" class="wp-caption aligncenter" style="width: 610px"><a href="http://berrange.com/wp-content/uploads/2010/05/07-qnap-iscsi-wizard-summary.png"><img class="size-full wp-image-333 " title="iSCSI target + LUN creation summary" src="http://berrange.com/wp-content/uploads/2010/05/07-qnap-iscsi-wizard-summary.png" alt="iSCSI target + LUN creation summary" width="600" height="380" /></a><p class="wp-caption-text">iSCSI target + LUN creation summary</p></div>
<h3>iSCSI target list (updated)</h3>
<p>After completing the wizard, the browser returns to the list of iSCSI targets. The newly created target is visible, with one LUN beneath it. The status of &#8216;Processing&#8217; just means that storage for the LUN is still being allocated &amp; goes away pretty much immediately for LUNs using &#8216;Thin provisioning&#8217; since there&#8217;s no data to allocate upfront. In theory full allocation should be pretty much <a href="http://log.amitshah.net/2009/03/comparison-of-file-systems-and-speeding.html">instantaneous on ext4</a> too, if QNAP is using posix_fallocate, but I&#8217;ve not had time to check that yet.</p>
<div id="attachment_334" class="wp-caption aligncenter" style="width: 610px"><a href="http://berrange.com/wp-content/uploads/2010/05/08-qnap-iscsi-target-list.png"><img class="size-full wp-image-334 " title="iSCSI target list (updated)" src="http://berrange.com/wp-content/uploads/2010/05/08-qnap-iscsi-target-list.png" alt="iSCSI target list (updated)" width="600" height="380" /></a><p class="wp-caption-text">iSCSI target list (updated)</p></div>
<p>With the iSCSI target and LUN created, it is now time to provision a new KVM guest using this storage. This is <a href="http://berrange.com/posts/2010/05/04/provisioning-kvm-virtual-machines-on-iscsi-with-qnap-virt-manager-part-2-of-2/">the topic of Part II</a></p>
]]></content:encoded>
			<wfw:commentRss>http://berrange.com/posts/2010/05/04/provisioning-kvm-virtual-machines-on-iscsi-with-qnap-virt-manager-part-1-of-2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

