<?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"
	>

<channel>
	<title>Latest Posts / News</title>
	<atom:link href="http://www.microdevsys.com/WordPress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.microdevsys.com/WordPress</link>
	<description>Microcomputers - Development - Systems</description>
	<pubDate>Thu, 26 Apr 2012 02:24:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>WordPress: 500 Internal Server Error</title>
		<link>http://www.microdevsys.com/WordPress/2012/04/06/wordpress-500-internal-server-error/</link>
		<comments>http://www.microdevsys.com/WordPress/2012/04/06/wordpress-500-internal-server-error/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 12:43:01 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<category><![CDATA[.htaccess]]></category>

		<category><![CDATA[500]]></category>

		<category><![CDATA[access_log]]></category>

		<category><![CDATA[addtype]]></category>

		<category><![CDATA[error]]></category>

		<category><![CDATA[error_log]]></category>

		<category><![CDATA[httpd]]></category>

		<category><![CDATA[internal]]></category>

		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[X 1and1.com]]></category>

		<category><![CDATA[X WordPress]]></category>

		<category><![CDATA[x-mapp-php5]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1359</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/04/06/wordpress-500-internal-server-error/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'WordPress: 500 Internal Server Error';
digg_bodytext = 'So I received this 500 internal Server Error when trying to save my long posts on my WordPress 2.6.2.&nbsp; In my case I have 1and1.com hosting and at first impressions, the problem appeared to be with MySQL and the time it took to save a post.&nbsp;...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
So I received this 500 internal Server Error when trying to save my long posts on my WordPress 2.6.2.&#160; In my case I have 1and1.com hosting and at first impressions, the problem appeared to be with MySQL and the time it took to save a post.&#160; On top of this, my host doesn&#39;t allow access [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/04/06/wordpress-500-internal-server-error/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'WordPress: 500 Internal Server Error';
digg_bodytext = 'So I received this 500 internal Server Error when trying to save my long posts on my WordPress 2.6.2.&nbsp; In my case I have 1and1.com hosting and at first impressions, the problem appeared to be with MySQL and the time it took to save a post.&nbsp;...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>So I received this <strong>500 internal Server Error</strong> when trying to save my long posts on my WordPress 2.6.2.&nbsp; In my case I have <a href="http://1and1.com" rel="nofollow">1and1.com</a> hosting and at first impressions, the problem appeared to be with MySQL and the time it took to save a post.&nbsp; On top of this, my host doesn&#39;t allow access to the error_log files (HTTPD Error Log files) and only to the Access Log files (access_log) so I can&#39;t really see what the real issue is.&nbsp; Here&#39;s how I solved the problem in my case:</p>
<p><span id="more-1359"></span>I edited my <strong>.htaccess</strong> file in the root folder of my site to add this line to the end of it.&nbsp; This directive tells the web server that files with .php extension should be handled by the PHP module:</p>
<p>&quot;AddType x-mapp-php5 .php&quot;</p>
<p>And the <strong>500 Internal Server Error</strong> went away when I tried to save again.</p>
<p>	Cheers!<br />
	TK.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2012/04/06/wordpress-500-internal-server-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux: HTPC / Home Backup: MDADM, RAID6, LVM, XFS, CIFS and NFS</title>
		<link>http://www.microdevsys.com/WordPress/2012/04/02/linux-htpc-home-backup-mdadm-raid6-lvm-xfs-cifs-and-nfs/</link>
		<comments>http://www.microdevsys.com/WordPress/2012/04/02/linux-htpc-home-backup-mdadm-raid6-lvm-xfs-cifs-and-nfs/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 05:44:09 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<category><![CDATA[Network]]></category>

		<category><![CDATA[Perl]]></category>

		<category><![CDATA[Web]]></category>

		<category><![CDATA[6.1]]></category>

		<category><![CDATA[6450]]></category>

		<category><![CDATA[add]]></category>

		<category><![CDATA[AHCI]]></category>

		<category><![CDATA[allocsize]]></category>

		<category><![CDATA[amd]]></category>

		<category><![CDATA[assemble]]></category>

		<category><![CDATA[backup]]></category>

		<category><![CDATA[bitmap]]></category>

		<category><![CDATA[blockdev]]></category>

		<category><![CDATA[bond]]></category>

		<category><![CDATA[bonnie]]></category>

		<category><![CDATA[byte]]></category>

		<category><![CDATA[cache]]></category>

		<category><![CDATA[chunk]]></category>

		<category><![CDATA[cifs]]></category>

		<category><![CDATA[configure]]></category>

		<category><![CDATA[create]]></category>

		<category><![CDATA[Current_Pending_Sector]]></category>

		<category><![CDATA[delete]]></category>

		<category><![CDATA[getra]]></category>

		<category><![CDATA[hd]]></category>

		<category><![CDATA[hdparm.conf]]></category>

		<category><![CDATA[home]]></category>

		<category><![CDATA[hot]]></category>

		<category><![CDATA[htpc]]></category>

		<category><![CDATA[internal]]></category>

		<category><![CDATA[iostat]]></category>

		<category><![CDATA[logbufs]]></category>

		<category><![CDATA[lvm]]></category>

		<category><![CDATA[max_sectors]]></category>

		<category><![CDATA[md0]]></category>

		<category><![CDATA[mdadm]]></category>

		<category><![CDATA[mdadm.conf]]></category>

		<category><![CDATA[messages]]></category>

		<category><![CDATA[nfs]]></category>

		<category><![CDATA[noatime]]></category>

		<category><![CDATA[nodiratime]]></category>

		<category><![CDATA[OnChip]]></category>

		<category><![CDATA[plug]]></category>

		<category><![CDATA[queue_depth]]></category>

		<category><![CDATA[radeon]]></category>

		<category><![CDATA[raid5]]></category>

		<category><![CDATA[raid6]]></category>

		<category><![CDATA[read]]></category>

		<category><![CDATA[rebuild]]></category>

		<category><![CDATA[resync]]></category>

		<category><![CDATA[rhel]]></category>

		<category><![CDATA[sata]]></category>

		<category><![CDATA[Scan]]></category>

		<category><![CDATA[seagate]]></category>

		<category><![CDATA[sector]]></category>

		<category><![CDATA[setra]]></category>

		<category><![CDATA[setup]]></category>

		<category><![CDATA[smartctl]]></category>

		<category><![CDATA[spare]]></category>

		<category><![CDATA[stop]]></category>

		<category><![CDATA[stripe_cache_size]]></category>

		<category><![CDATA[terabyte]]></category>

		<category><![CDATA[test]]></category>

		<category><![CDATA[udev]]></category>

		<category><![CDATA[udev.conf]]></category>

		<category><![CDATA[write]]></category>

		<category><![CDATA[Write Cache]]></category>

		<category><![CDATA[write_cache]]></category>

		<category><![CDATA[xfs]]></category>

		<category><![CDATA[xfs_bmap]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1346</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/04/02/linux-htpc-home-backup-mdadm-raid6-lvm-xfs-cifs-and-nfs/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux: HTPC / Home Backup: MDADM, RAID6, LVM, XFS, CIFS and NFS';
digg_bodytext = 'Overview: 	HTPC / Home Backup: MDADM, RAID6, LVM, XFS, CIFS and NFS	In this post we&#39;ll take a look at setting up a 4TB storage, HTPC, and active backup using basic components that can be bought from the local PC store and freely available software.&nbsp;&nbsp;...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
Overview: 
	
HTPC / Home Backup: MDADM, RAID6, LVM, XFS, CIFS and NFS
	
In this post we&#39;ll take a look at setting up a 4TB storage, HTPC, and active backup using basic components that can be bought from the local PC store and freely available software.&#160;&#160; Here I set out to try and consolidate my storage to [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/04/02/linux-htpc-home-backup-mdadm-raid6-lvm-xfs-cifs-and-nfs/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux: HTPC / Home Backup: MDADM, RAID6, LVM, XFS, CIFS and NFS';
digg_bodytext = 'Overview: 	HTPC / Home Backup: MDADM, RAID6, LVM, XFS, CIFS and NFS	In this post we&#39;ll take a look at setting up a 4TB storage, HTPC, and active backup using basic components that can be bought from the local PC store and freely available software.&nbsp;&nbsp;...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p><span style="font-size: 16px;"><strong>Overview: </strong><br />
	</span></p>
<p><strong>HTPC / Home Backup: MDADM, RAID6, LVM, XFS, CIFS and NFS<br />
	</strong></p>
<p>In this post we&#39;ll take a look at setting up a 4TB storage, HTPC, and active backup using basic components that can be bought from the local PC store and freely available software.&nbsp;&nbsp; Here I set out to try and consolidate my storage to something central running RHEL Linux (Or a clone, such as the Scientific Linux that&#39;s freely available) that could also serve as a makeshift entertainment center in replacement of my current one.&nbsp; In other words, upgrade my HTPC and turn it into an HTPC+B, if you will, with the following statistics:</p>
<ul>
<li>4TB usable storage (6TB HDD - 2 HDD for RAID6).</li>
<li>XFS Filesystem</li>
<li>317MB/s WRITES.</li>
<li>300 MB/s READS.</li>
<li>A Wireless N card + 1GIG ETH in a bonding configuration. (Redundancy in case of failure)</li>
<li>Scientific Linux 6.1 (RHEL 6.1).</li>
</ul>
<p><span id="more-1346"></span></p>
<p>So here is what a goal would be to achieve with this central storage server:</p>
<ol>
<li>HTPC: Have it function as a media center.</li>
<li>Backup. (Single drives backup up to a RAID 6 setup within the same box)</li>
<li>File Server (NFS, CIFS, Mountable from my other windows systems etc)</li>
<li>Flash storage center for the most critical files.</li>
<li>(Optional) Authentication server using something like kerberos.</li>
</ol>
<p>There are a few good posts out there that would <a href="http://storagemojo.com/2010/02/27/does-raid-6-stops-working-in-2019/" rel="nofollow">suggest or argue against using RAID</a>, but I still need a backup.&nbsp; The other thing that I wanted to do is to find out how reliable this thing could be.&nbsp; (As we&#39;ll see, it turned out to be quite an eye opener.)&nbsp; A good read as well is the <a href="http://queue.acm.org/detail.cfm?id=1670144" rel="nofollow">Triple Parity RAID and Beyond</a> article.</p>
<p><strong>So why not use a store baught backup solution?<br />
	</strong></p>
<p>That seamed like a good idea sometime back if it were not an episode a colleague of mine had with one of those.&nbsp; Based on the noises and symptoms he describes as one having while he couldn&#39;t access his data was enough for me.&nbsp; So this brings us to the most real question here:</p>
<p><strong>What is a backup in the true sense given today&#39;s technology?<br />
	</strong></p>
<p>This is a loaded question and there&#39;s no right or wrong answer.&nbsp; With today&#39;s estimates that neither RAID5 nor RAID6 would be enough in the upcoming years (see the link above), the word backup would appear to start to take on the meaning:&nbsp; <strong>Storage media that would be <u>available</u> when needed to restore a copy from</strong> rather then <strong>storage that would hold a copy of my data</strong>. At first glance there doesn&#39;t appear to be a difference yet the first statement doesn&#39;t suggest a promise that the backup would be there at all.&nbsp; YMMV or YOMV.</p>
<p><strong>So what does that mean for RAID 6?</strong>&nbsp; Let&#39;s illustrate with an example given the following to determine the likelihood of an unrecoverable data failure:</p>
<ul>
<li>A home laptop (contains one HDD)</li>
<li>The HTPC+B setup (contains 6 HDD in a RAID 6 configuration)</li>
</ul>
<p>If my laptop is being backed up to my HTPC+B server, the point at which one would loose data is when both the laptop HDD and 3 of the RAID 6 disks failed at the same time.&nbsp; So in essence, a 4 disk failure at the same time which is highly unlikely.&nbsp; So what this means is that, which would be more likely, when my laptop disk fails, my HTPC+B would likely still be around for me to restore from.&nbsp; Likewise, if my backup fails, my PC would still be running along fine long enough to fix up my backup outage.&nbsp; In either case, I would still have my data.</p>
<p>The flipside of the argument would suggest that the more hardware in a configuration, the more maintenance it would require over the same time frame.</p>
<p><strong><span style="font-size: 16px;">Setup Summary:</span></strong></p>
<p><span style="font-size: 12px;"><strong>A quick note.&nbsp; </strong>The hardware used here is a combination of old and new and where price was right vs other options.&nbsp; Other hardware should work just as well but your mileage may vary and my pocket book isn&#39;t that deep at all:</span></p>
<ul>
<li>LS ULTRA 600W ATX Power Supply (Reused from another PC)</li>
<li><a href="http://ca.gigabyte.com/products/product-page.aspx?pid=3376#ov" rel="nofollow">GA-890XA-UD3 Motherboard</a> ( 333 - SATA 3, USB Power 3.0, USB 3.0).&nbsp; 6x SATA 3 for our software RAID 6.</li>
<li>Seagate 1TB Green Barracuda&nbsp; HDD x 6&nbsp; ( <a href="http://www.seagate.com/ww/v/index.jsp?vgnextoid=9d373f15020b0210VgnVCM1000001a48090aRCRD#tTabContentOverview" rel="nofollow">ST31000520AS</a> )</li>
<li>( Optional - Failed drive replacement ) <span class="productInfo" id="ProductInterface">Barracuda&reg; Green SATA 6Gb/s 1.5TB Hard Drive ( </span><a href="http://www.seagate.com/ww/v/index.jsp?name=st1500dl003-bcuda-green-sata-6gb-1.5tb-hd&amp;vgnextoid=2035439d45c0b210VgnVCM1000001a48090aRCRD" rel="nofollow"><span id="ProductSKU">ST1500DL003 </span></a><span class="productInfo" id="ProductInterface">)<br />
		</span></li>
<li><a href="http://www.amd.com/us/products/desktop/graphics/amd-radeon-hd-6000/hd-6450/pages/amd-radeon-hd-6450-overview.aspx#2" rel="nofollow">AMD RADEON HD 6450 1GB<br />
		</a></li>
<li>TP-LINK TL-WN821N (V2) Wireless USB stick.</li>
<li>AMD Athlon(tm) 5200 Dual-Core Processor</li>
<li>A Western Digital Caviar Green drive ( <a href="http://support.wdc.com/product/install.asp?wdc_lang=en&amp;fid=wdsfCaviar_Green" rel="nofollow">WD15EADS</a> ) for the root FS.</li>
</ul>
<p>For this setup, the motherboard is the most powerful item I got.&nbsp; Lot&#39;s of room for upgrades here as a result.&nbsp; I wasn&#39;t looking to break the bank and at about $50 per HDD in Aug of 2011, it made perfect sense, before a <a href="http://www.computerworld.com/s/article/9222871/Hard_drive_prices_slide_as_Thai_flood_aftermath_subsides" rel="nofollow">certain flood in Thailand</a>.&nbsp; I hope cheap doesn&#39;t transfer to the hardware but only time will tell.&nbsp; All hooked up, it looked like this:</p>
<p>&nbsp;</p>
<p>(&nbsp; <strong>NOTE:</strong> The makeshift fan under the video card PCI card.&nbsp; Turned out the heatsink of the AMD RADEON was getting too hot even though it is sold as a fanless GPU.&nbsp; )</p>
<p>Once the hardware is hooked up, it&#39;s time for the software.&nbsp; The steps below are the base commands I needed after a rather lengthy, trial and error setup of the <strong>HTPC+B</strong>: </p>
<p>	&nbsp;</p>
<table border="1" cellpadding="1" cellspacing="1" style="width: 100%;">
<tbody>
<tr>
<td align="left" valign="top"><strong>ITEM #:<br />
				</strong></td>
<td align="left" style="width: 128px;" valign="top"><strong>DESCRIPTION</strong></td>
<td><strong>COMMAND(S)</strong></td>
</tr>
<tr>
<td align="left" valign="top">1</td>
<td align="left" style="width: 128px;" valign="top">Enable HOT-SWAP in BIOS.</td>
<td>
<p>The below will enable HOT PLUG in BIOS.&nbsp; Enter BIOS and enable the following:</p>
<p>					OnChip SATA Type = AHCI<br />
					OnChip SATA Port 4/5 Type = As SATA Type</p>
<p>Once this is set, removing and readding SDD devices has the following effect:</p>
<p>					<span style="color: rgb(0, 128, 0);"><strong>DISCONNECT MESSAGES:</strong></span><br />
					Oct 23 10:48:01 mbpc kernel: ata6: exception Emask 0&#215;10 SAct 0&#215;0 SErr 0&#215;90202 action 0xe frozen<br />
					Oct 23 10:48:01 mbpc kernel: ata6: irq_stat 0&#215;00400000, PHY RDY changed<br />
					Oct 23 10:48:01 mbpc kernel: ata6: SError: { RecovComm Persist PHYRdyChg 10B8B }<br />
					Oct 23 10:48:01 mbpc kernel: ata6: hard resetting link<br />
					Oct 23 10:48:02 mbpc kernel: ata6: SATA link down (SStatus 0 SControl 300)<br />
					Oct 23 10:48:07 mbpc kernel: ata6: hard resetting link<br />
					Oct 23 10:48:07 mbpc kernel: ata6: SATA link down (SStatus 0 SControl 300)<br />
					Oct 23 10:48:07 mbpc kernel: ata6: limiting SATA link speed to 1.5 Gbps<br />
					Oct 23 10:48:12 mbpc kernel: ata6: hard resetting link<br />
					Oct 23 10:48:13 mbpc kernel: ata6: SATA link down (SStatus 0 SControl 310)<br />
					Oct 23 10:48:13 mbpc kernel: ata6.00: disabled<br />
					Oct 23 10:48:13 mbpc kernel: ata6: EH complete<br />
					Oct 23 10:48:13 mbpc kernel: ata6.00: detaching (SCSI 5:0:0:0)<br />
					Oct 23 10:48:13 mbpc kernel: sd 5:0:0:0: [sda] Synchronizing SCSI cache<br />
					Oct 23 10:48:13 mbpc kernel: sd 5:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK<br />
					Oct 23 10:48:13 mbpc kernel: sd 5:0:0:0: [sda] Stopping disk<br />
					Oct 23 10:48:13 mbpc kernel: sd 5:0:0:0: [sda] START_STOP FAILED<br />
					Oct 23 10:48:13 mbpc kernel: sd 5:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK</p>
<p>					<span style="color: rgb(0, 128, 0);"><strong>CONNECT:</strong></span><br />
					Oct 23 10:49:10 mbpc kernel: ata6: exception Emask 0&#215;10 SAct 0&#215;0 SErr 0&#215;40d0002 action 0xe frozen<br />
					Oct 23 10:49:10 mbpc kernel: ata6: irq_stat 0&#215;00000040, connection status changed<br />
					Oct 23 10:49:10 mbpc kernel: ata6: SError: { RecovComm PHYRdyChg CommWake 10B8B DevExch }<br />
					Oct 23 10:49:10 mbpc kernel: ata6: hard resetting link<br />
					Oct 23 10:49:10 mbpc kernel: ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)<br />
					Oct 23 10:49:10 mbpc kernel: ata6.00: ATA-8: ST31000520AS, CC32, max UDMA/133<br />
					Oct 23 10:49:10 mbpc kernel: ata6.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32)<br />
					Oct 23 10:49:10 mbpc kernel: ata6.00: configured for UDMA/133<br />
					Oct 23 10:49:10 mbpc kernel: ata6: EH complete<br />
					Oct 23 10:49:10 mbpc kernel: scsi 5:0:0:0: Direct-Access&nbsp;&nbsp;&nbsp;&nbsp; ATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ST31000520AS&nbsp;&nbsp;&nbsp;&nbsp; CC32 PQ: 0 ANSI: 5<br />
					Oct 23 10:49:10 mbpc kernel: sd 5:0:0:0: Attached scsi generic sg0 type 0<br />
					Oct 23 10:49:10 mbpc kernel: sd 5:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)<br />
					Oct 23 10:49:10 mbpc kernel: sd 5:0:0:0: [sda] Write Protect is off<br />
					Oct 23 10:49:10 mbpc kernel: sd 5:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn&#39;t support DPO or FUA<br />
					Oct 23 10:49:10 mbpc kernel: sda: unknown partition table<br />
					Oct 23 10:49:10 mbpc kernel: sd 5:0:0:0: [sda] Attached SCSI disk</p>
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td align="left" valign="top">2</td>
<td align="left" style="width: 128px;" valign="top"><strong>(Optional)</strong> Setup UDEV rules for the newly installed SDD devices.</td>
<td>Follow the link <a href="http://www.microdevsys.com/WordPress/2012/04/01/linux-persistent-naming-of-sata-devices-through-udev-rules/" rel="nofollow">LINUX: Persistent naming of SATA devices through UDEV rules</a> to potentially setup UDEV naming rules for the RAID 6 devices.&nbsp; This will help with the rest of the steps and uniquely name the RAID6 devices we&#39;ll be working with and using in various commands.</td>
</tr>
<tr>
<td align="left" valign="top">3</td>
<td align="left" style="width: 128px;" valign="top">Start another session to monitor <strong>/var/log/messages </strong>before we create the array using <strong>mdadm</strong>.</td>
<td>
<p>Before we create the array, we want to be monitoring the log files.&nbsp; The result of the creation in the next step is:</p>
<p><strong># tail -f /var/log/messages</strong><br />
					Jan 30 00:22:17 mbpc kernel: md: bind&lt;sdf&gt;<br />
					Jan 30 00:22:17 mbpc kernel: md: bind&lt;sde&gt;<br />
					Jan 30 00:22:17 mbpc kernel: md: bind&lt;sdd&gt;<br />
					Jan 30 00:22:17 mbpc kernel: md: bind&lt;sdc&gt;<br />
					Jan 30 00:22:17 mbpc kernel: md: bind&lt;sdb&gt;<br />
					Jan 30 00:22:17 mbpc kernel: md: bind&lt;sda&gt;<br />
					Jan 30 00:22:17 mbpc kernel: async_tx: api initialized (async)<br />
					Jan 30 00:22:17 mbpc kernel: xor: automatically using best checksumming function: generic_sse<br />
					Jan 30 00:22:17 mbpc kernel:&nbsp;&nbsp; generic_sse:&nbsp; 3260.000 MB/sec<br />
					Jan 30 00:22:17 mbpc kernel: xor: using function: generic_sse (3260.000 MB/sec)<br />
					Jan 30 00:22:17 mbpc kernel: raid6: int64&#215;1&nbsp;&nbsp;&nbsp; 687 MB/s<br />
					Jan 30 00:22:17 mbpc kernel: raid6: int64&#215;2&nbsp;&nbsp;&nbsp; 960 MB/s<br />
					Jan 30 00:22:17 mbpc kernel: raid6: int64&#215;4&nbsp;&nbsp;&nbsp; 718 MB/s<br />
					Jan 30 00:22:17 mbpc kernel: raid6: int64&#215;8&nbsp;&nbsp;&nbsp; 625 MB/s<br />
					Jan 30 00:22:17 mbpc kernel: raid6: sse2&#215;1&nbsp;&nbsp;&nbsp; 1210 MB/s<br />
					Jan 30 00:22:17 mbpc kernel: raid6: sse2&#215;2&nbsp;&nbsp;&nbsp; 2035 MB/s<br />
					Jan 30 00:22:17 mbpc kernel: raid6: sse2&#215;4&nbsp;&nbsp;&nbsp; 2355 MB/s<br />
					Jan 30 00:22:17 mbpc kernel: raid6: using algorithm sse2&#215;4 (2355 MB/s)<br />
					Jan 30 00:22:17 mbpc kernel: md: raid6 personality registered for level 6<br />
					Jan 30 00:22:17 mbpc kernel: md: raid5 personality registered for level 5<br />
					Jan 30 00:22:17 mbpc kernel: md: raid4 personality registered for level 4<br />
					Jan 30 00:22:17 mbpc kernel: bio: create slab &lt;bio-1&gt; at 1<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: not clean &#8212; starting background reconstruction<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: device sda operational as raid disk 5<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: device sdb operational as raid disk 4<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: device sdc operational as raid disk 3<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: device sdd operational as raid disk 2<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: device sde operational as raid disk 1<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: device sdf operational as raid disk 0<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: allocated 6386kB<br />
					Jan 30 00:22:17 mbpc kernel: md/raid:md0: raid level 6 active with 6 out of 6 devices, algorithm 2<br />
					Jan 30 00:22:17 mbpc kernel: md0: detected capacity change from 0 to 4000814792704<br />
					Jan 30 00:22:17 mbpc kernel: md: resync of RAID array md0<br />
					Jan 30 00:22:17 mbpc kernel: md: minimum _guaranteed_&nbsp; speed: 1000 KB/sec/disk.<br />
					Jan 30 00:22:17 mbpc kernel: md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync.<br />
					Jan 30 00:22:17 mbpc kernel: md: using 128k window, over a total of 976761424 blocks.<br />
					Jan 30 00:22:17 mbpc kernel: md0: unknown partition table</p>
</td>
</tr>
<tr>
<td align="left" valign="top">4</td>
<td align="left" style="width: 128px;" valign="top">Create the array:</td>
<td>
<p>The steps in order are as follows.&nbsp; Of course for your RAID6 type, # of disks and disk identifiers, you&#39;ll need to tweak these lines to suit your setup:<span style="font-family: courier new,courier,monospace;"><strong></p>
<p>					# mdadm &#8211;create &#8211;verbose&nbsp; /dev/md0 &#8211;level=raid6 &#8211;chunk=64K &#8211;auto=p &#8211;raid-devices=6&nbsp; &#8211;spare-devices=0&nbsp; &#8211;bitmap=internal /dev/rsd{a,b,c,d,e,f}</strong></span></p>
<p>We&#39;ll line up the chunk sizes to the <strong>XFS</strong> sizes below: <strong>64K</strong> for improved performance.&nbsp; The <strong>&#8211;bitmap=internal</strong> will allow for very very fast resync&#39;s when new disks are added to replace failed ones.&nbsp; Instead of 5 - 8 hours, the resyncs literally took only a few minutes during testing. Check the array using:</p>
<p><strong># cat /proc/mdstat </strong><br />
					<span style="font-family: courier new,courier,monospace;">Personalities : [raid6] [raid5] [raid4] <br />
					md0 : active raid6 sda[5] sdb[4] sdd[2] sdf[3] sdc[0] sde[1]<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3907045632 blocks super 1.2 level 6, 64k chunk, algorithm 2 [6/6] [UUUUUU]<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bitmap: 0/8 pages [0KB], 65536KB chunk</p>
<p>					unused devices: &lt;none&gt;</span><br />
					#</p>
<p>					In our case, the array should be building now:</p>
<p><strong># cat /proc/mdstat</strong><br />
					<span style="font-family: courier new,courier,monospace;">Personalities : [raid6] [raid5] [raid4] <br />
					md0 : active raid6 sda[5] sdb[4] sdc[3] sdd[2] sde[1] sdf[0]<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3907045696 blocks super 1.2 level 6, 16k chunk, algorithm 2 [6/6] [UUUUUU]<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [&gt;....................]&nbsp; resync =&nbsp; 1.5% (15464592/976761424) finish=183.1min speed=87454K/sec<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
					unused devices: &lt;none&gt;</span><br />
					<strong>#</strong></p>
<p><strong><span style="color: rgb(0, 0, 255);">(Optional)</span> # mdadm &#8211;grow /dev/md0 &#8211;bitmap=internal&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</strong> # To add an internal bitmap later.</p>
<blockquote>
<p><span style="color: rgb(0, 128, 0);"><strong>NOTES: </strong></span>To stop or start the array, issue one of the following commands:<br />
						<strong>STOP:</strong>&nbsp; mdadm &#8211;stop /dev/md0<br />
						<strong>START:</strong> mdadm &#8211;assemble &#8211;scan</p>
</blockquote>
<p><strong><span style="color: rgb(255, 0, 0);">IMPORTANT: </span></strong>To spin down the SDD platters and power off the individual disks, to simulate disks being taken out or prior to taking out the disks, issue the following:</p>
<blockquote>
<p>echo 1 &gt; /sys/block/sda/device/delete<br />
						echo 1 &gt; /sys/block/sdb/device/delete<br />
						echo 1 &gt; /sys/block/sdc/device/delete<br />
						echo 1 &gt; /sys/block/sdd/device/delete<br />
						echo 1 &gt; /sys/block/sdf/device/delete<br />
						echo 1 &gt; /sys/block/sdg/device/delete</p>
</blockquote>
<p>To rescan the system SATA connectors to detect and readd the removed disks (That were removed by the above method for example):</p>
<blockquote>
<p>echo &quot;0 0 0&quot; &gt;/sys/class/scsi_host/host0/scan<br />
						echo &quot;0 0 0&quot; &gt;/sys/class/scsi_host/host1/scan<br />
						echo &quot;0 0 0&quot; &gt;/sys/class/scsi_host/host2/scan<br />
						echo &quot;0 0 0&quot; &gt;/sys/class/scsi_host/host3/scan<br />
						echo &quot;0 0 0&quot; &gt;/sys/class/scsi_host/host4/scan<br />
						echo &quot;0 0 0&quot; &gt;/sys/class/scsi_host/host5/scan</p>
</blockquote>
<p>We will use the above methods during testing of the array prior to usage.&nbsp; Once built fully, our array should be marked as <strong>active</strong>:</p>
<p><span style="font-family: courier new,courier,monospace;"><strong># mdadm &#8211;detail /dev/raidmd0</strong><br />
					/dev/raidmd0:<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Version : 1.2<br />
					&nbsp; Creation Time : Mon Mar 26 00:06:24 2012<br />
					&nbsp;&nbsp;&nbsp;&nbsp; Raid Level : raid6<br />
					&nbsp;&nbsp;&nbsp;&nbsp; Array Size : 3907045632 (3726.05 GiB 4000.81 GB)<br />
					&nbsp; Used Dev Size : 976761408 (931.51 GiB 1000.20 GB)<br />
					&nbsp;&nbsp; Raid Devices : 6<br />
					&nbsp; Total Devices : 6<br />
					&nbsp;&nbsp;&nbsp; Persistence : Superblock is persistent</p>
<p>					&nbsp; Intent Bitmap : Internal</p>
<p>					&nbsp;&nbsp;&nbsp; Update Time : Mon Apr&nbsp; 2 00:59:01 2012<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; State : active<br />
					&nbsp;Active Devices : 6<br />
					Working Devices : 6<br />
					&nbsp;Failed Devices : 0<br />
					&nbsp; Spare Devices : 0</p>
<p>					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Layout : left-symmetric<br />
					&nbsp;&nbsp;&nbsp;&nbsp; Chunk Size : 64K</p>
<p>					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name : mbpc:0&nbsp; (local to host mbpc)<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UUID : 2f36ac48:5e3e4c54:72177c53:bea3e41e<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Events : 3213</p>
<p>					&nbsp;&nbsp;&nbsp; Number&nbsp;&nbsp; Major&nbsp;&nbsp; Minor&nbsp;&nbsp; RaidDevice State<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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;&nbsp;&nbsp;&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; active sync&nbsp;&nbsp; /dev/sda<br />
					<strong>#</strong><br />
					</span></p>
</td>
</tr>
<tr>
<td align="left" valign="top">5</td>
<td align="left" style="width: 128px;" valign="top">Create the PV, VG and LV&#39;s.</td>
<td>
<p>In our case, we&#39;ll only create a 2TB LV out of the 4TB we have.&nbsp; We will extend this in the future as need arises (These and following steps can be done while the array is building above).</p>
<p><strong># lvm pvcreate /dev/raidmd0<br />
					# lvm vgcreate MBPCStorage /dev/raidmd0<br />
					# lvm lvcreate -L3906254360S -n MBPCBackup MBPCStorage&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </strong># 2TB.&nbsp; Leaving the last 2TB for possible expansion and LVM / XFS resizing.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">6</td>
<td align="left" style="width: 128px;" valign="top">Create the XFS filesystem and mount the partition.</td>
<td>
<p>Create the XFS filesystem in this manner (The selection of <strong>size=64</strong> and <strong>agcount=64</strong> are the result of testing using various values that we did.&nbsp; For this configuration, 64 for both options for these 1TB X6 SDD&#39;s was optimal):<strong></p>
<p>					# mkfs.xfs -l size=64m -d agcount=64 -i attr=2,maxpct=5 -L MBPCBackupx /dev/MBPCStorage/MBPCBackup -f</strong></p>
<p><strong><br />
					# mount -t xfs -o logbufs=8,noatime,nodiratime,allocsize=512m /dev/MBPCStorage/MBPCBackup MBPCBackupx/<br />
					</strong></p>
<p>At this point the RAID6 array space is accessible and writes to it are possible however more tweaking is in order as per further steps below.&nbsp;</p>
</td>
</tr>
<tr>
<td align="left" valign="top">7</td>
<td align="left" style="width: 128px;" valign="top">
<p>Edit the<strong> /etc/fstab</strong> file to add the mount point and details so mounting can occur at boot time.</p>
<p>&nbsp;</p>
</td>
<td>
<p>The mount points and mount parameters can be specified in this manner in the <strong>/etc/fstab</strong> file:</p>
<p>					<strong># /etc/fstab</strong><br />
					.<br />
					.<br />
					.<br />
					/dev/MBPCStorage/MBPCBackup&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /mnt/MBPCBackupx/&nbsp;&nbsp;&nbsp; xfs&nbsp;&nbsp;&nbsp; logbufs=8,noatime,nodiratime,allocsize=512m 0 0<br />
					<strong>#</strong></p>
</td>
</tr>
<tr>
<td align="left" valign="top">8</td>
<td align="left" style="width: 128px;" valign="top">For XFS filesystems and RAID6, it&#39;s rather dangerous, according to readings, to have the <strong>write_cache</strong> enabled.&nbsp; There is the <a href="http://xfs.org/index.php/XFS_FAQ#Q:_What_is_the_problem_with_the_write_cache_on_journaled_filesystems.3F" rel="nofollow">potential of metadata corruption</a> on power failures.&nbsp; Disable write_cache on the disks participating in the RAID6 XFS array.</td>
<td>
<p>Add the following entries to the <strong>/etc/rc.local</strong> file to take effect on each reboot:</p>
<p><strong># /etc/rc.local</strong> file<br />
					hdparm -W 0 /dev/rsda;<br />
					hdparm -W 0 /dev/rsdb;<br />
					hdparm -W 0 /dev/rsdc;<br />
					hdparm -W 0 /dev/rsdd;<br />
					hdparm -W 0 /dev/rsde;<br />
					hdparm -W 0 /dev/rsdf;</p>
<p>An alternative is to add these lines to the hdparm.conf file, though it did not work in this scenario and Scientific Linux 6.1.&nbsp;</p>
<p><strong># cat /etc/hdparm.conf</strong><br />
					/dev/rsda {<br />
					&nbsp;&nbsp;&nbsp; write_cache = off<br />
					}<br />
					/dev/rsdb {<br />
					&nbsp;&nbsp;&nbsp; write_cache = off<br />
					}<br />
					/dev/rsdc {<br />
					&nbsp;&nbsp;&nbsp; write_cache = off<br />
					}<br />
					/dev/rsdd {<br />
					&nbsp;&nbsp;&nbsp; write_cache = off<br />
					}<br />
					/dev/rsde {<br />
					&nbsp;&nbsp;&nbsp; write_cache = off<br />
					}<br />
					/dev/rsdf {<br />
					&nbsp;&nbsp;&nbsp; write_cache = off<br />
					}<br />
					#</p>
<p>Confirm that the write cache is disabled:</p>
<p><strong># for rdn in $(ls /dev/rsd*); do hdparm -I $rdn|grep -i &quot;write cache&quot;; done</strong><br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write cache<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write cache<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write cache<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write cache<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write cache<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write cache<br />
					<strong>#</strong></p>
<p><span style="color: rgb(255, 140, 0);"><strong>NOTE: </strong></span>A * would be seen before each entry if the write_cache were enabled.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">9</td>
<td align="left" style="width: 128px;" valign="top">Setup the <strong>MDADM</strong> config file.</td>
<td>
<p>Setup the MDADM config file by issuing the following:</p>
<p><strong># mdadm &#8211;detail &#8211;scan &gt;&gt; /etc/mdadm.conf<br />
					</strong></p>
<p>Verify the config file:</p>
<p><strong># cat /etc/mdadm.conf</strong><br />
					<span style="font-family: courier new,courier,monospace;">ARRAY /dev/md/0 metadata=1.2 name=mbpc:0 UUID=2f36ac48:5e3e4c54:72177c53:bea3e41e</span><br />
					#</p>
</td>
</tr>
<tr>
<td align="left" valign="top">10</td>
<td align="left" style="width: 128px;" valign="top"><strong>GET</strong> the block device default optimization parameters for the <strong>RAID6</strong> array (<strong>md0</strong>), individual disks and filesystem.</td>
<td>
<p>Get the default parameters for the devices.&nbsp; In this case, for the hardware selected, the default detected are to the right behind the # (If your RAID6 array is NOT md0, substitute accordingly):</p>
<p># READ<br />
					<strong><span style="font-family: courier new,courier,monospace;">cat /sys/block/md0/md/stripe_cache_size&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # 256<br />
					blockdev &#8211;getra $(echo $(ls -al /dev/rsd*|awk &#39;{ print &quot;/dev/&quot;$NF }&#39;))&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # 256<br />
					blockdev &#8211;getra /dev/md0&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # 1024<br />
					blockdev &#8211;getra /dev/MBPCStorage/MBPCBackup&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # 1024<br />
					for mskb in $(ls -al /dev/rsd*|awk &#39;{ print $NF }&#39;); do cat /sys/block/$mskb/queue/max_sectors_kb; done&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # 512<br />
					for qdepth in $(ls -al /dev/rsd*|awk &#39;{ print $NF }&#39;); do cat /sys/block/$qdepth/device/queue_depth; done&nbsp;&nbsp;&nbsp; # 31</span></strong><br />
					&nbsp;</p>
<p>Record the parameters in case you&#39;ll want to put them back.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">11</td>
<td align="left" style="width: 128px;" valign="top"><strong>SET</strong> the block device default optimization parameters for the <strong>RAID6</strong> array (<strong>md0</strong>), individual disks and filesystem.</td>
<td>
<p>Again, as with the write_cache parameters, add these to the /etc/rc.local file on your system so they take effect on each reboot, restart and shutdown:</p>
<blockquote>
<p># SET (rc.local file)<br />
						<span style="font-family: courier new,courier,monospace;"><strong>echo 16384 &gt; /sys/block/md0/md/stripe_cache_size<br />
						blockdev &#8211;setra 32768 $(echo $(ls -al /dev/rsd*|awk &#39;{ print &quot;/dev/&quot;$NF }&#39;))<br />
						blockdev &#8211;setra 32768 /dev/md0<br />
						blockdev &#8211;setra 32768 /dev/MBPCStorage/MBPCBackup<br />
						for mskb in $(ls -al /dev/rsd*|awk &#39;{ print $NF }&#39;); do echo 8192 &gt; /sys/block/$mskb/queue/max_sectors_kb; done<br />
						for qdepth in $(ls -al /dev/rsd*|awk &#39;{ print $NF }&#39;); do echo 31 &gt; /sys/block/$qdepth/device/queue_depth; done<br />
						</strong></span></p>
</blockquote>
</td>
</tr>
<tr>
<td align="left" valign="top">11</td>
<td align="left" style="width: 128px;" valign="top">Test using <strong>bonnie++ </strong>and copying files from another drive to the targer <strong>XFS RAID 6</strong> array you&#39;ve just built.</td>
<td>
<p>Test the array using bonnie++ (If not available, can download using <strong>yum install bonnie++</strong>):</p>
<p><strong># cd /mnt/MBPCBackupx</strong><br />
					<strong># bonnie++ -u root:root -d /mnt/MBPCBackupx/ -s 8000m -m socrates -n 16:100000:16:64<br />
					</strong></p>
<p>Bonnie++ test results (best of the best) and <strong>iostat -xkd 10</strong> disk I/O metric tool (While NOT rebuilding or synchronizing the array):</p>
<p>Intelligent Writes (best so far):</p>
<blockquote>
<p><span style="font-family: courier new,courier,monospace;">Device:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rrqm/s&nbsp;&nbsp; wrqm/s&nbsp;&nbsp;&nbsp;&nbsp; r/s&nbsp;&nbsp;&nbsp;&nbsp; w/s&nbsp;&nbsp;&nbsp; rkB/s&nbsp;&nbsp;&nbsp; wkB/s avgrq-sz avgqu-sz&nbsp;&nbsp; await&nbsp; svctm&nbsp; %util<br />
						sda&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.90 19729.80&nbsp;&nbsp;&nbsp; 1.10&nbsp; 200.60&nbsp;&nbsp;&nbsp; 20.00 79543.45&nbsp;&nbsp; 788.93&nbsp;&nbsp;&nbsp;&nbsp; 9.58&nbsp;&nbsp; 47.54&nbsp;&nbsp; 4.27&nbsp; 86.13<br />
						sdc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.80 19719.90&nbsp;&nbsp;&nbsp; 0.90&nbsp; 208.40&nbsp;&nbsp;&nbsp; 14.80 78797.45&nbsp;&nbsp; 753.10&nbsp;&nbsp;&nbsp; 12.61&nbsp;&nbsp; 60.07&nbsp;&nbsp; 4.12&nbsp; 86.22<br />
						sdd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.10 19744.90&nbsp;&nbsp;&nbsp; 0.50&nbsp; 183.10&nbsp;&nbsp;&nbsp; 18.40 79303.05&nbsp;&nbsp; 864.07&nbsp;&nbsp;&nbsp; 12.02&nbsp;&nbsp; 65.66&nbsp;&nbsp; 4.92&nbsp; 90.40<br />
						sdb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.40 19714.10&nbsp;&nbsp;&nbsp; 0.80&nbsp; 213.60&nbsp;&nbsp;&nbsp; 16.80 79073.05&nbsp;&nbsp; 737.78&nbsp;&nbsp;&nbsp; 11.19&nbsp;&nbsp; 51.84&nbsp;&nbsp; 3.91&nbsp; 83.85<br />
						sde&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.40 19761.50&nbsp;&nbsp;&nbsp; 0.90&nbsp; 166.40&nbsp;&nbsp;&nbsp; 21.20 78847.05&nbsp;&nbsp; 942.84&nbsp;&nbsp;&nbsp; 14.34&nbsp;&nbsp; 85.33&nbsp;&nbsp; 5.47&nbsp; 91.51<br />
						sdf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.40 19768.40&nbsp;&nbsp;&nbsp; 1.00&nbsp; 160.30&nbsp;&nbsp;&nbsp; 17.60 78366.25&nbsp;&nbsp; 971.90&nbsp;&nbsp;&nbsp; 17.71&nbsp; 108.80&nbsp;&nbsp; 5.98&nbsp; 96.50<br />
						sdg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 9.10&nbsp;&nbsp; 54.60&nbsp;&nbsp;&nbsp; 1.80&nbsp; 1208.80&nbsp;&nbsp;&nbsp; 42.80&nbsp;&nbsp;&nbsp; 44.38&nbsp;&nbsp;&nbsp;&nbsp; 0.67&nbsp;&nbsp; 11.79&nbsp;&nbsp; 2.82&nbsp; 15.91<br />
						dm-0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbs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sp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00<br />
						dm-6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00 5033.90&nbsp;&nbsp;&nbsp;&nbsp; 0.00 <strong>317447.70</strong>&nbsp;&nbsp; 126.12&nbsp; 1192.91&nbsp; 238.58&nbsp;&nbsp; 0.20 100.00</span></p>
</blockquote>
<p>Intelligent ReWrites:</p>
<blockquote>
<p><span style="font-family: courier new,courier,monospace;">Device:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rrqm/s&nbsp;&nbsp; wrqm/s&nbsp;&nbsp;&nbsp;&nbsp; r/s&nbsp;&nbsp;&nbsp;&nbsp; w/s&nbsp;&nbsp;&nbsp; rkB/s&nbsp;&nbsp;&nbsp; wkB/s avgrq-sz avgqu-sz&nbsp;&nbsp; await&nbsp; svctm&nbsp; %util<br />
						sda&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 220.70&nbsp; 9655.70&nbsp;&nbsp; 77.20&nbsp;&nbsp; 72.30 17930.00 40553.55&nbsp;&nbsp; 782.39&nbsp;&nbsp;&nbsp; 27.64&nbsp; 186.63&nbsp;&nbsp; 6.44&nbsp; 96.22<br />
						sdb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 227.00&nbsp; 9628.50&nbsp;&nbsp; 83.90&nbsp; 101.10 18039.60 39713.55&nbsp;&nbsp; 624.36&nbsp;&nbsp;&nbsp; 11.55&nbsp;&nbsp; 63.16&nbsp;&nbsp; 4.45&nbsp; 82.25<br />
						sdc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 212.50&nbsp; 9642.80&nbsp;&nbsp; 80.00&nbsp;&nbsp; 83.90 17700.80 39390.35&nbsp;&nbsp; 696.66&nbsp;&nbsp;&nbsp; 15.31&nbsp;&nbsp; 93.13&nbsp;&nbsp; 5.38&nbsp; 88.22<br />
						sde&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp; 179.60&nbsp;&nbsp; 34.70&nbsp;&nbsp;&nbsp; 7.70&nbsp;&nbsp; 930.40&nbsp;&nbsp; 748.80&nbsp;&nbsp;&nbsp; 79.21&nbsp;&nbsp;&nbsp;&nbsp; 0.86&nbsp;&nbsp; 20.34&nbsp;&nbsp; 4.08&nbsp; 17.30<br />
						dm-0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp; 34.70&nbsp;&nbsp;&nbsp; 1.90&nbsp;&nbsp; 930.40&nbsp;&nbsp;&nbsp;&nbsp; 7.60&nbsp;&nbsp;&nbsp; 51.26&nbsp;&nbsp;&nbsp;&nbsp; 0.70&nbsp;&nbsp; 19.00&nbsp;&nbsp; 3.75&nbsp; 13.72<br />
						dm-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp; 185.30&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp; 741.20&nbsp;&nbsp;&nbsp;&nbsp; 8.00&nbsp;&nbsp;&nbsp;&nbsp; 6.88&nb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bsp; 0.00<br />
						dm-5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00<br />
						sdd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 221.40&nbsp; 9646.40&nbsp;&nbsp; 82.20&nbsp;&nbsp; 81.40 18012.40 38993.95&nbsp;&nbsp; 696.90&nbsp;&nbsp;&nbsp; 13.70&nbsp;&nbsp; 83.39&nbsp;&nbsp; 5.36&nbsp; 87.68<br />
						sdf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 218.50&nbsp; 9643.60&nbsp;&nbsp; 82.70&nbsp;&nbsp; 81.30 18012.40 39027.95&nbsp;&nbsp; 695.61&nbsp;&nbsp;&nbsp; 14.18&nbsp;&nbsp; 86.28&nbsp;&nbsp; 5.41&nbsp; 88.65<br />
						sdg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 230.70&nbsp; 9650.70&nbsp;&nbsp; 81.70&nbsp;&nbsp; 79.00 17785.20 39425.95&nbsp;&nbsp; 712.02&nbsp;&nbsp;&nbsp; 17.83&nbsp; 110.54&nbsp;&nbsp; 5.63&nbsp; 90.53<br />
						md0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00 1633.80 2460.90 104126.00 155635.20&nbsp;&nbsp; 126.88&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00<br />
						dm-6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00 1633.80 2460.80 104126.00 155628.80&nbsp;&nbsp; 126.88&nbsp; 1257.45&nbsp; 311.60&nbsp;&nbsp; 0.24&nbsp; 96.33<br />
						</span></p>
</blockquote>
<p>Intelligent Reads:</p>
<blockquote>
<p><span style="font-family: courier new,courier,monospace;">Device:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rrqm/s&nbsp;&nbsp; wrqm/s&nbsp;&nbsp;&nbsp;&nbsp; r/s&nbsp;&nbsp;&nbsp;&nbsp; w/s&nbsp;&nbsp;&nbsp; rkB/s&nbsp;&nbsp;&nbsp; wkB/s avgrq-sz avgqu-sz&nbsp;&nbsp; await&nbsp; svctm&nbsp; %util<br />
						sda&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 493.81&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp; 247.55&nbsp;&nbsp;&nbsp; 0.60 47351.45&nbsp;&nbsp;&nbsp;&nbsp; 1.20&nbsp;&nbsp; 381.64&nbsp;&nbsp;&nbsp; 12.14&nbsp;&nbsp; 48.94&nbsp;&nbsp; 3.76&nbsp; 93.38<br />
						sdc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 496.60&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp; 249.35&nbsp;&nbsp;&nbsp; 0.60 47153.25&nbsp;&nbsp;&nbsp;&nbsp; 1.20&nbsp;&nbsp; 377.31&nbsp;&nbsp;&nbsp;&nbsp; 9.56&nbsp;&nbsp; 38.09&nbsp;&nbsp; 3.10&nbsp; 77.44<br />
						sdb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 494.91&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp; 251.45&nbsp;&nbsp;&nbsp; 0.60 47236.36&nbsp;&nbsp;&nbsp;&nbsp; 1.20&nbsp;&nbsp; 374.83&nbsp;&nbsp;&nbsp;&nbsp; 8.76&nbsp;&nbsp; 34.67&nbsp;&nbsp; 2.88&nbsp; 72.49<br />
						sdd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 496.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp; 249.95&nbsp;&nbsp;&nbsp; 0.70 47184.82&nbsp;&nbsp;&nbsp;&nbsp; 1.60&nbsp;&nbsp; 376.51&nbsp;&nbsp;&nbsp;&nbsp; 8.99&nbsp;&nbsp; 35.73&nbsp;&nbsp; 2.98&nbsp; 74.69<br />
						sde&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 491.71&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp; 249.25&nbsp;&nbsp;&nbsp; 0.70 47312.69&nbsp;&nbsp;&nbsp;&nbsp; 1.60&nbsp;&nbsp; 378.59&nbsp;&nbsp;&nbsp;&nbsp; 9.08&nbsp;&nbsp; 36.25&nbsp;&nbsp; 3.02&nbsp; 75.57<br />
						sdf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00<br />
						dm-5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00&nbsp;&nbsp; 0.00<br />
						dm-6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.00&nbsp;&nbsp;&nbsp;&nbsp; 0.00 4467.23&nbsp;&nbsp;&nbsp; 0.10 <strong>284796.80</strong>&nbsp;&nbsp;&nbsp;&nbsp; 0.05&nbsp;&nbsp; 127.50&nbsp;&nbsp; 171.69&nbsp;&nbsp; 38.35&nbsp;&nbsp; 0.21&nbsp; 95.26<br />
						</span></p>
</blockquote>
<p><span style="font-family: courier new,courier,monospace;">Bonnie++ test results (While in active non-degraded status and NOT doing a resync):</span><br />
					&nbsp;</p>
<blockquote><p><span style="font-family: courier new,courier,monospace;">Version&nbsp; 1.96&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;Sequential <strong>Output</strong>&#8212;&#8212; &#8211;Sequential <strong>Input</strong>- &#8211;Random-<br />
					Concurrency&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; -Per Chr- &#8211;Block&#8211; -Rewrite- -Per Chr- &#8211;Block&#8211; &#8211;Seeks&#8211;<br />
					Machine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP&nbsp; /sec %CP<br />
					socrates&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8000M&nbsp;&nbsp; 450&nbsp; 94 <strong>290382</strong>&nbsp; 37 127824&nbsp; 24&nbsp; 2696&nbsp; 99 <strong>313146</strong>&nbsp; 26 423.1&nbsp; 24<br />
					Latency&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25833us&nbsp;&nbsp;&nbsp;&nbsp; 229ms&nbsp;&nbsp;&nbsp;&nbsp; 227ms&nbsp;&nbsp;&nbsp; 9175us&nbsp;&nbsp;&nbsp;&nbsp; 127ms&nbsp;&nbsp; 87525us<br />
					Version&nbsp; 1.96&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;Sequential Create&#8212;&#8212; &#8212;&#8212;&#8211;Random Create&#8212;&#8212;&#8211;<br />
					socrates&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -Create&#8211; &#8211;Read&#8212; -Delete&#8211; -Create&#8211; &#8211;Read&#8212; -Delete&#8211;<br />
					files:max:min&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /sec %CP&nbsp; /sec %CP&nbsp; /sec %CP&nbsp; /sec %CP&nbsp; /sec %CP&nbsp; /sec %CP<br />
					&nbsp;&nbsp;&nbsp; 16:100000:16/64&nbsp;&nbsp;&nbsp; 71&nbsp;&nbsp; 1 +++++ +++&nbsp; 7879&nbsp; 36&nbsp;&nbsp;&nbsp; 71&nbsp;&nbsp; 1 +++++ +++&nbsp; 6917&nbsp; 38<br />
					Latency&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28029ms&nbsp;&nbsp;&nbsp; 4218us&nbsp;&nbsp;&nbsp;&nbsp; 697us&nbsp;&nbsp; 40137ms&nbsp;&nbsp;&nbsp;&nbsp; 128us&nbsp;&nbsp;&nbsp;&nbsp; 194us<br />
					1.96,1.96,socrates,1,1332770295,8000M,,450,94,290382,37,127824,24,2696,99,313146,<br />
					26,423.1,24,16,100000,16,,64,71,1,+++++,+++,7879,36,71,1,+++++,+++,6917,38,25833us,<br />
					229ms,227ms,9175us,127ms,87525us,28029ms,4218us,697us,40137ms,128us,194us</span></p>
<p>&nbsp;</p>
</blockquote>
</td>
</tr>
<tr>
<td align="left" valign="top">12</td>
<td align="left" style="width: 128px;" valign="top">Check integrity and get statistics on the configuration.</td>
<td>
<p>Read static configuration data and check file integrity using the below test and commands:</p>
<blockquote>
<p><span style="font-family: courier new,courier,monospace;"><strong># xfs_bmap -v io.1.dat<br />
						# xfs_bmap -v io.2.dat<br />
						# mdadm &#8211;detail /dev/md127<br />
						# cat /proc/mdstat<br />
						# xfs_info /mnt/MBPCBackupx/<br />
						</strong></span></p>
</blockquote>
<p>Check and test disk status of each individual RAID6 member using:</p>
<blockquote>
<p><span style="font-family: courier new,courier,monospace;"><strong># for ddn in $(ls /dev/sd{a,b,c,d,e,f,g}); do DDN=$(smartctl -A $ddn|grep -i Current_Pending_Sector); echo $ddn&quot;: $DDN&quot;; done</strong><br />
						/dev/sda: 197 Current_Pending_Sector&nbsp; 0&#215;0012&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						/dev/sdb: 197 Current_Pending_Sector&nbsp; 0&#215;0012&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						/dev/sdc: 197 Current_Pending_Sector&nbsp; 0&#215;0012&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						/dev/sdd: 197 Current_Pending_Sector&nbsp; 0&#215;0012&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						/dev/sde: 197 Current_Pending_Sector&nbsp; 0&#215;0012&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						/dev/sdf: 197 Current_Pending_Sector&nbsp; 0&#215;0012&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						/dev/sdg: 197 Current_Pending_Sector&nbsp; 0&#215;0032&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						<strong>#</strong><br />
						</span></p>
</blockquote>
<p><span style="font-family: arial,helvetica,sans-serif;">Use the following to get health statistics on individual SDD&#39;s:<br />
					</span></p>
<blockquote>
<p><span style="font-family: courier new,courier,monospace;"><strong># smartctl -A /dev/sda</strong><br />
						smartctl 5.39.1 2010-01-28 r3054 [x86_64-redhat-linux-gnu] (local build)<br />
						Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net</p>
<p>						=== START OF READ SMART DATA SECTION ===<br />
						SMART Attributes Data Structure revision number: 10<br />
						Vendor Specific SMART Attributes with Thresholds:<br />
						ID# ATTRIBUTE_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FLAG&nbsp;&nbsp;&nbsp;&nbsp; VALUE WORST THRESH TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UPDATED&nbsp; WHEN_FAILED RAW_VALUE<br />
						&nbsp; 1 Raw_Read_Error_Rate&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;000f&nbsp;&nbsp; 114&nbsp;&nbsp; 100&nbsp;&nbsp; 006&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 75358912<br />
						&nbsp; 3 Spin_Up_Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0003&nbsp;&nbsp; 094&nbsp;&nbsp; 094&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						&nbsp; 4 Start_Stop_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 020&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7<br />
						&nbsp; 5 Reallocated_Sector_Ct&nbsp;&nbsp; 0&#215;0033&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 036&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						&nbsp; 7 Seek_Error_Rate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;000f&nbsp;&nbsp; 100&nbsp;&nbsp; 253&nbsp;&nbsp; 030&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 198931<br />
						&nbsp; 9 Power_On_Hours&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 44<br />
						&nbsp;10 Spin_Retry_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0013&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 097&nbsp;&nbsp;&nbsp; Pre-fail&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						&nbsp;12 Power_Cycle_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 020&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6<br />
						183 Runtime_Bad_Block&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						184 End-to-End_Error&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 099&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						187 Reported_Uncorrect&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						188 Command_Timeout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						189 High_Fly_Writes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;003a&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						190 Airflow_Temperature_Cel 0&#215;0022&nbsp;&nbsp; 063&nbsp;&nbsp; 058&nbsp;&nbsp; 045&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 37 (Lifetime Min/Max 25/42)<br />
						191 G-Sense_Error_Rate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						192 Power-Off_Retract_Count 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br />
						193 Load_Cycle_Count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0032&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7<br />
						194 Temperature_Celsius&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0022&nbsp;&nbsp; 037&nbsp;&nbsp; 042&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 37 (0 25 0 0)<br />
						195 Hardware_ECC_Recovered&nbsp; 0&#215;001a&nbsp;&nbsp; 024&nbsp;&nbsp; 024&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 75358912<br />
						197 Current_Pending_Sector&nbsp; 0&#215;0012&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						198 Offline_Uncorrectable&nbsp;&nbsp; 0&#215;0010&nbsp;&nbsp; 100&nbsp;&nbsp; 100&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						199 UDMA_CRC_Error_Count&nbsp;&nbsp;&nbsp; 0&#215;003e&nbsp;&nbsp; 200&nbsp;&nbsp; 200&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Always&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br />
						240 Head_Flying_Hours&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0000&nbsp;&nbsp; 100&nbsp;&nbsp; 253&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 68053756805161<br />
						241 Total_LBAs_Written&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0000&nbsp;&nbsp; 100&nbsp;&nbsp; 253&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 56966118<br />
						242 Total_LBAs_Read&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&#215;0000&nbsp;&nbsp; 100&nbsp;&nbsp; 253&nbsp;&nbsp; 000&nbsp;&nbsp;&nbsp; Old_age&nbsp;&nbsp; Offline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3844511940</p>
<p>						<strong>#</strong><br />
						</span></p>
</blockquote>
<p>Get the static config data of the XFS FS:</p>
<blockquote>
<p><span style="font-family: courier new,courier,monospace;"><strong># xfs_info /mnt/MBPCBackupx/<br />
						</strong>meta-data=/dev/mapper/MBPCStorage-MBPCBackup isize=256&nbsp;&nbsp;&nbsp; agcount=64, agsize=7629408 blks<br />
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sectsz=512&nbsp;&nbsp; attr=2<br />
						data&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsize=4096&nbsp;&nbsp; blocks=488282112, imaxpct=5<br />
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sunit=16&nbsp;&nbsp;&nbsp;&nbsp; swidth=64 blks<br />
						naming&nbsp;&nbsp; =version 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsize=4096&nbsp;&nbsp; ascii-ci=0<br />
						log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =internal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bsize=4096&nbsp;&nbsp; blocks=16384, version=2<br />
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sectsz=512&nbsp;&nbsp; sunit=16 blks, lazy-count=1<br />
						realtime =none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extsz=4096&nbsp;&nbsp; blocks=0, rtextents=0<br />
						You have new mail in /var/spool/mail/root<br />
						<strong>#</strong><br />
						</span></p>
</blockquote>
</td>
</tr>
</tbody>
</table>
<p>Your array should now be ready.&nbsp; However, before one is to put any data on the new storage, some brutal testing is in order.&nbsp; We need to know that the array can withstand some hard hits and still tick before you can trust your files to it.</p>
<p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2012/04/02/linux-htpc-home-backup-mdadm-raid6-lvm-xfs-cifs-and-nfs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LINUX: Persistent naming of SATA devices through UDEV rules.</title>
		<link>http://www.microdevsys.com/WordPress/2012/04/01/linux-persistent-naming-of-sata-devices-through-udev-rules/</link>
		<comments>http://www.microdevsys.com/WordPress/2012/04/01/linux-persistent-naming-of-sata-devices-through-udev-rules/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 03:34:04 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<category><![CDATA[64-md-raid.rules]]></category>

		<category><![CDATA[attribute-walk]]></category>

		<category><![CDATA[block]]></category>

		<category><![CDATA[boot]]></category>

		<category><![CDATA[control]]></category>

		<category><![CDATA[debug]]></category>

		<category><![CDATA[devices]]></category>

		<category><![CDATA[grub.conf]]></category>

		<category><![CDATA[hdparm]]></category>

		<category><![CDATA[ID_SCSI_COMPAT]]></category>

		<category><![CDATA[ID_SERIAL]]></category>

		<category><![CDATA[ID_SERIAL_SHORT]]></category>

		<category><![CDATA[info]]></category>

		<category><![CDATA[KERNEL]]></category>

		<category><![CDATA[log-priority]]></category>

		<category><![CDATA[model]]></category>

		<category><![CDATA[naming]]></category>

		<category><![CDATA[path]]></category>

		<category><![CDATA[persistent]]></category>

		<category><![CDATA[reboot]]></category>

		<category><![CDATA[restart]]></category>

		<category><![CDATA[rules.d]]></category>

		<category><![CDATA[sata]]></category>

		<category><![CDATA[scsi]]></category>

		<category><![CDATA[serial]]></category>

		<category><![CDATA[SerialNo]]></category>

		<category><![CDATA[shutdown]]></category>

		<category><![CDATA[storage]]></category>

		<category><![CDATA[system]]></category>

		<category><![CDATA[udev]]></category>

		<category><![CDATA[udev.conf]]></category>

		<category><![CDATA[udevadm]]></category>

		<category><![CDATA[udev_log]]></category>

		<category><![CDATA[UDEV_LOG=7]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1357</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/04/01/linux-persistent-naming-of-sata-devices-through-udev-rules/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'LINUX: Persistent naming of SATA devices through UDEV rules.';
digg_bodytext = 'Here we&#39;ll look at obtaining persistent naming rules for SATA devices so we can reference these hardware devices through a constant name.&nbsp; This is particularly useful when one needs a persistent name to a device through unique serial and model...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
Here we&#39;ll look at obtaining persistent naming rules for SATA devices so we can reference these hardware devices through a constant name.&#160; This is particularly useful when one needs a persistent name to a device through unique serial and model numbers that remains the same throughout reboots / restarts and shutdowns.&#160; 
	In this post, we&#39;ll [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/04/01/linux-persistent-naming-of-sata-devices-through-udev-rules/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'LINUX: Persistent naming of SATA devices through UDEV rules.';
digg_bodytext = 'Here we&#39;ll look at obtaining persistent naming rules for SATA devices so we can reference these hardware devices through a constant name.&nbsp; This is particularly useful when one needs a persistent name to a device through unique serial and model...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>Here we&#39;ll look at obtaining persistent naming rules for SATA devices so we can reference these hardware devices through a constant name.&nbsp; This is particularly useful when one needs a persistent name to a device through unique serial and model numbers that remains the same throughout reboots / restarts and shutdowns.&nbsp; </p>
<p>	In this post, we&#39;ll create six unique naming rules to uniquely identify those HDD we&#39;ll need for our <a href="http://www.microdevsys.com/WordPress/2012/04/02/linux-htpc-home-backup-mdadm-raid6-lvm-xfs-cifs-and-nfs/">RAID6 HTPC+B</a> configuration.&nbsp; Amongst other things, the rules would help to uniquely identify those devices that belong to the RAID6 array and those that don&#39;t to help prevent human error and remove confusion.</p>
<p><span id="more-1357"></span>The first order of business is, of course, to plug in your hardware that you&#39;re going to create the rules for.&nbsp; In this case, we&#39;ll be giving six Seagate HDD drives a unique name to help identify those that belong in a RAID6 array.&nbsp; A summary of steps follows.&nbsp; <span style="color: rgb(255, 140, 0);"><strong>CAUTION: </strong></span>Before reading the below steps, do have a look at the various issues / problems encountered at the end of this article to get a general idea of what to expect:</p>
<table border="1" cellpadding="1" cellspacing="1" style="height: 7388px; width: 100%;">
<tbody>
<tr>
<td><strong>Item #: <br />
				</strong></td>
<td><strong>Description:<br />
				</strong></td>
<td style="width: 300px;"><strong>Command:<br />
				</strong></td>
</tr>
<tr>
<td align="center" valign="top">1</td>
<td align="left" valign="top">Choose the disk you&#39;ll need the UDEV rules for.</td>
<td style="width: 300px;">
<p>A handy one liner in my case to use was (Copy and paste the three lines below):</p>
<p><span style="font-family: courier new,courier,monospace;"><strong># fdisk -sl 2&gt;&amp;1|awk &#39;BEGIN { pflg=0; } { if ( ( $0 ~ /sd[abcdefghijkl]/ || \<br />
					$0 ~ /Device/ ) ) pflg=1; if ( pflg == 1 &amp;&amp; $0 !~ /mapper/ &amp;&amp; $0 !~ /valid \<br />
					partition table/ ) print; if ( $0 ~ /^[ \r\t\n]*$/ ) pflg=0; }&#39;</strong><br />
					</span></p>
<p>This would list all the disks up to <strong>sdl</strong> including sizes.&nbsp; For a more brief look, the <strong>ls</strong> command is handy:</p>
<p><span style="font-family: courier new,courier,monospace;"><strong># ls -al /dev/sd*</strong><br />
					brw-rw&#8212;-. 1 root disk 8,&nbsp; 0 Mar 31 23:29 /dev/sda<br />
					brw-rw&#8212;-. 1 root disk 8, 16 Mar 31 23:29 /dev/sdb<br />
					brw-rw&#8212;-. 1 root disk 8, 32 Mar 31 23:29 /dev/sdc<br />
					brw-rw&#8212;-. 1 root disk 8, 48 Mar 31 23:29 /dev/sdd<br />
					brw-rw&#8212;-. 1 root disk 8, 64 Mar 31 23:29 /dev/sde<br />
					brw-rw&#8212;-. 1 root disk 8, 80 Mar 31 23:29 /dev/sdf<br />
					brw-rw&#8212;-. 1 root disk 8, 96 Mar 31 23:29 /dev/sdg<br />
					brw-rw&#8212;-. 1 root disk 8, 97 Mar 31 23:29 /dev/sdg1<br />
					brw-rw&#8212;-. 1 root disk 8, 98 Mar 31 23:29 /dev/sdg2<br />
					brw-rw&#8212;-. 1 root disk 8, 99 Mar 31 23:29 /dev/sdg3<br />
					<strong>#</strong><br />
					</span></p>
</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Start with the first disk you&#39;ll want to create a persistent name for.&nbsp; Issue the commands to the right to get unique identifiers for the HDD.</td>
<td style="width: 300px;">
<p>Our SDD details:</p>
<p><span><strong># udevadm info -a -p /sys/block/sda </strong></span><span><strong><br />
					# udevadm info &#8211;attribute-walk &#8211;path /block/sda&nbsp; # (Same as above)<br />
					</strong></span><span><strong># hdparm -i /dev/sda</strong></span><span><strong><br />
					# hdparm -I /dev/sda<br />
					</strong></span><strong># udevadm info &#8211;query all -n /dev/sda</strong><span><strong><br />
					</strong></span></p>
<p><span style="font-family: courier new,courier,monospace;">Sample output with the unique identifiers that can be used highlighted in <span style="color: rgb(0, 128, 0);"><strong>bold green</strong></span>:</span></p>
<p><span style="font-family: courier new,courier,monospace;"><strong># udevadm info -a -p /sys/block/sda</strong></p>
<p>					Udevadm info starts with the device specified by the devpath and then<br />
					walks up the chain of parent devices. It prints for every device<br />
					found, all possible attributes in the udev rules key format.<br />
					A rule to match, can be composed by the attributes of the device<br />
					and the attributes from one single parent device.</p>
<p>					&nbsp; looking at device &#39;/devices/pci0000:00/0000:00:11.0/host0/target0:0:0/0:0:0:0/block/sda&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNEL==&quot;sda&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEM==&quot;block&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVER==&quot;&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{range}==&quot;16&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{ext_range}==&quot;256&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{removable}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{ro}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{size}==&quot;2930277168&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{alignment_offset}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{discard_alignment}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{capability}==&quot;52&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{stat}==&quot; 3665783 240524730 1953525026 323734815&nbsp;&nbsp;&nbsp;&nbsp; 4346&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 140&nbsp;&nbsp;&nbsp; 16355&nbsp;&nbsp; 708391<br />
					&gt;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; 9095724 324441439&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{inflight}==&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00/0000:00:11.0/host0/target0:0:0/0:0:0:0&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;0:0:0:0&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;scsi&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;sd&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{device_blocked}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{type}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{scsi_level}==&quot;6&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{vendor}==&quot;ATA&nbsp;&nbsp;&nbsp;&nbsp; &quot;<br />
					&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 128, 0);"><span style="background-color: rgb(255, 240, 245);"><strong>ATTRS{model}==&quot;ST1500DL003-9VT1&quot;</strong></span></span></span><br />
					&nbsp;&nbsp;&nbsp; ATTRS{rev}==&quot;CC3C&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{state}==&quot;running&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{timeout}==&quot;30&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{iocounterbits}==&quot;32&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{iorequest_cnt}==&quot;0&#215;3803ba&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{iodone_cnt}==&quot;0&#215;3801e7&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{ioerr_cnt}==&quot;0xf8&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{modalias}==&quot;scsi:t-0&#215;00&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{evt_media_change}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{dh_state}==&quot;detached&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{queue_depth}==&quot;31&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{queue_ramp_up_period}==&quot;120000&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{queue_type}==&quot;simple&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00/0000:00:11.0/host0/target0:0:0&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;target0:0:0&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;scsi&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00/0000:00:11.0/host0&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;host0&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;scsi&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00/0000:00:11.0&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;0000:00:11.0&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;pci&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;ahci&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{vendor}==&quot;0&#215;1002&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{device}==&quot;0&#215;4391&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{subsystem_vendor}==&quot;0&#215;1458&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{subsystem_device}==&quot;0xb002&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{class}==&quot;0&#215;010601&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{irq}==&quot;28&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{local_cpus}==&quot;03&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{local_cpulist}==&quot;0-1&quot;<br />
					ATTRS{modalias}==&quot;pci:v00001002d00004391sv00001458sd0000B002bc01sc06i01&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{numa_node}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{enable}==&quot;1&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{broken_parity_status}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{msi_bus}==&quot;&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;pci0000:00&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;&quot;</p>
<p><span style="font-family: courier new,courier,monospace;"><strong># udevadm info &#8211;attribute-walk &#8211;path /block/sda</strong></p>
<p>					Udevadm info starts with the device specified by the devpath and then<br />
					walks up the chain of parent devices. It prints for every device<br />
					found, all possible attributes in the udev rules key format.<br />
					A rule to match, can be composed by the attributes of the device<br />
					and the attributes from one single parent device.</p>
<p>					&nbsp; looking at device &#39;/devices/pci0000:00/0000:00:11.0/host0/target0:0:0/0:0:0:0/block/sda&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNEL==&quot;sda&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEM==&quot;block&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVER==&quot;&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{range}==&quot;16&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{ext_range}==&quot;256&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{removable}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{ro}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{size}==&quot;2930277168&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{alignment_offset}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{discard_alignment}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{capability}==&quot;52&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{stat}==&quot; 3665783 240524730 1953525026 323734815&nbsp;&nbsp;&nbsp;&nbsp; 4346&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 140&nbsp;&nbsp;&nbsp; 16355&nbsp;&nbsp; 708391<br />
					&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; 9095724 324441439&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTR{inflight}==&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00/0000:00:11.0/host0/target0:0:0/0:0:0:0&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;0:0:0:0&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;scsi&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;sd&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{device_blocked}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{type}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{scsi_level}==&quot;6&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{vendor}==&quot;ATA&nbsp;&nbsp;&nbsp;&nbsp; &quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{model}==&quot;ST1500DL003-9VT1&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{rev}==&quot;CC3C&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{state}==&quot;running&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{timeout}==&quot;30&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{iocounterbits}==&quot;32&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{iorequest_cnt}==&quot;0&#215;3803c3&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{iodone_cnt}==&quot;0&#215;3801f0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{ioerr_cnt}==&quot;0&#215;100&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{modalias}==&quot;scsi:t-0&#215;00&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{evt_media_change}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{dh_state}==&quot;detached&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{queue_depth}==&quot;31&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{queue_ramp_up_period}==&quot;120000&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{queue_type}==&quot;simple&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00/0000:00:11.0/host0/target0:0:0&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;target0:0:0&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;scsi&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00/0000:00:11.0/host0&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;host0&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;scsi&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00/0000:00:11.0&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;0000:00:11.0&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;pci&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;ahci&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{vendor}==&quot;0&#215;1002&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{device}==&quot;0&#215;4391&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{subsystem_vendor}==&quot;0&#215;1458&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{subsystem_device}==&quot;0xb002&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{class}==&quot;0&#215;010601&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{irq}==&quot;28&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{local_cpus}==&quot;03&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{local_cpulist}==&quot;0-1&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{modalias}==&quot;pci:v00001002d00004391sv00001458sd0000B002bc01sc06i01&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{numa_node}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{enable}==&quot;1&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{broken_parity_status}==&quot;0&quot;<br />
					&nbsp;&nbsp;&nbsp; ATTRS{msi_bus}==&quot;&quot;</p>
<p>					&nbsp; looking at parent device &#39;/devices/pci0000:00&#39;:<br />
					&nbsp;&nbsp;&nbsp; KERNELS==&quot;pci0000:00&quot;<br />
					&nbsp;&nbsp;&nbsp; SUBSYSTEMS==&quot;&quot;<br />
					&nbsp;&nbsp;&nbsp; DRIVERS==&quot;&quot;<br />
					<strong>#</strong><br />
					</span></p>
<p><span style="font-family: courier new,courier,monospace;"><br />
					<strong># hdparm -i /dev/sda</strong></p>
<p>					/dev/sda:</p>
<p>					&nbsp;<span style="color: rgb(0, 128, 0);"><strong>Model=ST1500DL003-9VT16L</strong></span>, FwRev=CC3C, <span style="color: rgb(0, 128, 0);"><strong>SerialNo=5YD6GDZQ</strong></span><br />
					&nbsp;Config={ HardSect NotMFM HdSw&gt;15uSec Fixed DTR&gt;10Mbs RotSpdTol&gt;.5% }<br />
					&nbsp;RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4<br />
					&nbsp;BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=off<br />
					&nbsp;CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=2930277168<br />
					&nbsp;IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}<br />
					&nbsp;PIO modes:&nbsp; pio0 pio1 pio2 pio3 pio4 <br />
					&nbsp;DMA modes:&nbsp; mdma0 mdma1 mdma2 <br />
					&nbsp;UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 <br />
					&nbsp;AdvancedPM=no WriteCache=disabled<br />
					&nbsp;Drive conforms to: unknown:&nbsp; ATA/ATAPI-4,5,6,7</p>
<p>					&nbsp;* signifies the current active mode</p>
<p>					<strong># hdparm -I /dev/sda</strong></p>
<p>					/dev/sda:</p>
<p>					ATA device, with non-removable media<br />
					&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 128, 0);"><strong>Model Number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ST1500DL003-9VT16L</strong></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
					&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 128, 0);"><strong>Serial Number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5YD6GDZQ</strong></span><br />
					&nbsp;&nbsp;&nbsp; Firmware Revision:&nbsp; CC3C&nbsp;&nbsp;&nbsp; <br />
					&nbsp;&nbsp;&nbsp; Transport:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Serial, SATA Rev 3.0<br />
					Standards:<br />
					&nbsp;&nbsp;&nbsp; Used: unknown (minor revision code 0&#215;0029) <br />
					&nbsp;&nbsp;&nbsp; Supported: 8 7 6 5 <br />
					&nbsp;&nbsp;&nbsp; Likely used: 8<br />
					Configuration:<br />
					&nbsp;&nbsp;&nbsp; Logical&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; max&nbsp;&nbsp;&nbsp; current<br />
					&nbsp;&nbsp;&nbsp; cylinders&nbsp;&nbsp;&nbsp; 16383&nbsp;&nbsp;&nbsp; 16383<br />
					&nbsp;&nbsp;&nbsp; heads&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 16&nbsp;&nbsp;&nbsp; 16<br />
					&nbsp;&nbsp;&nbsp; sectors/track&nbsp;&nbsp;&nbsp; 63&nbsp;&nbsp;&nbsp; 63<br />
					&nbsp;&nbsp;&nbsp; &#8211;<br />
					&nbsp;&nbsp;&nbsp; CHS current addressable sectors:&nbsp;&nbsp; 16514064<br />
					&nbsp;&nbsp;&nbsp; LBA&nbsp;&nbsp;&nbsp; user addressable sectors:&nbsp; 268435455<br />
					&nbsp;&nbsp;&nbsp; LBA48&nbsp; user addressable sectors: 2930277168<br />
					&nbsp;&nbsp;&nbsp; Logical&nbsp; Sector size:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 512 bytes<br />
					&nbsp;&nbsp;&nbsp; Physical Sector size:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 bytes<br />
					&nbsp;&nbsp;&nbsp; Logical Sector-0 offset:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 bytes<br />
					&nbsp;&nbsp;&nbsp; device size with M = 1024*1024:&nbsp;&nbsp;&nbsp;&nbsp; 1430799 MBytes<br />
					&nbsp;&nbsp;&nbsp; device size with M = 1000*1000:&nbsp;&nbsp;&nbsp;&nbsp; 1500301 MBytes (1500 GB)<br />
					&nbsp;&nbsp;&nbsp; cache/buffer size&nbsp; = unknown<br />
					&nbsp;&nbsp;&nbsp; Nominal Media Rotation Rate: 5900<br />
					Capabilities:<br />
					&nbsp;&nbsp;&nbsp; LBA, IORDY(can be disabled)<br />
					&nbsp;&nbsp;&nbsp; Queue depth: 32<br />
					&nbsp;&nbsp;&nbsp; Standby timer values: spec&#39;d by Standard, no device specific minimum<br />
					&nbsp;&nbsp;&nbsp; R/W multiple sector transfer: Max = 16&nbsp;&nbsp;&nbsp; Current = ?<br />
					&nbsp;&nbsp;&nbsp; Recommended acoustic management value: 254, current value: 0<br />
					&nbsp;&nbsp;&nbsp; DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 <br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Cycle time: min=120ns recommended=120ns<br />
					&nbsp;&nbsp;&nbsp; PIO: pio0 pio1 pio2 pio3 pio4 <br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Cycle time: no flow control=120ns&nbsp; IORDY flow control=120ns<br />
					Commands/features:<br />
					&nbsp;&nbsp;&nbsp; Enabled&nbsp;&nbsp;&nbsp; Supported:<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; SMART feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Security Mode feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Power Management feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write cache<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Look-ahead<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Host Protected Area feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; WRITE_BUFFER command<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; READ_BUFFER command<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; DOWNLOAD_MICROCODE<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SET_MAX security extension<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Automatic Acoustic Management feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; 48-bit Address feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Device Configuration Overlay feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Mandatory FLUSH_CACHE<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; FLUSH_CACHE_EXT<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; SMART error logging<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; SMART self-test<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; General Purpose Logging feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; WRITE_{DMA|MULTIPLE}_FUA_EXT<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; 64-bit World wide name<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Write-Read-Verify feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; WRITE_UNCORRECTABLE_EXT command<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; {READ,WRITE}_DMA_EXT_GPL commands<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Segmented DOWNLOAD_MICROCODE<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Gen1 signaling speed (1.5Gb/s)<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Gen2 signaling speed (3.0Gb/s)<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; unknown 76[3]<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Native Command Queueing (NCQ)<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Phy event counters<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; unknown 76[15]<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Device-initiated interface power management<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; Software settings preservation<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; SMART Command Transport (SCT) feature set<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; SCT Long Sector Access (AC1)<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; SCT LBA Segment Access (AC2)<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; SCT Features Control (AC4)<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; *&nbsp;&nbsp;&nbsp; SCT Data Tables (AC5)<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; unknown 206[7]<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; unknown 206[12] (vendor specific)<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; unknown 206[13] (vendor specific)<br />
					Security: <br />
					&nbsp;&nbsp;&nbsp; Master password revision code = 65534<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; supported<br />
					&nbsp;&nbsp;&nbsp; not&nbsp;&nbsp;&nbsp; enabled<br />
					&nbsp;&nbsp;&nbsp; not&nbsp;&nbsp;&nbsp; locked<br />
					&nbsp;&nbsp;&nbsp; not&nbsp;&nbsp;&nbsp; frozen<br />
					&nbsp;&nbsp;&nbsp; not&nbsp;&nbsp;&nbsp; expired: security count<br />
					&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; supported: enhanced erase<br />
					&nbsp;&nbsp;&nbsp; 270min for SECURITY ERASE UNIT. 270min for ENHANCED SECURITY ERASE UNIT.<br />
					Logical Unit WWN Device Identifier: 5000c500463a5d9d<br />
					</span>&nbsp;&nbsp;&nbsp; NAA&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; : 5<br />
					&nbsp;&nbsp;&nbsp; IEEE OUI&nbsp;&nbsp;&nbsp; : 000c50<br />
					&nbsp;&nbsp;&nbsp; Unique ID&nbsp;&nbsp;&nbsp; : 0463a5d9d<br />
					Checksum: correct<br />
					<strong>#</strong></p>
<p><strong># udevadm info &#8211;query all -n /dev/sda</strong><br />
					P: /devices/pci0000:00/0000:00:11.0/host0/target0:0:0/0:0:0:0/block/sda<br />
					N: sda<br />
					W: 44<br />
					S: block/8:0<br />
					S: disk/by-id/ata-ST1500DL003-9VT16L_5YD6GDZQ<br />
					S: disk/by-id/scsi-SATA_ST1500DL003-9VT_5YD6GDZQ<br />
					S: rsdf<br />
					S: disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0<br />
					S: disk/by-id/wwn-0&#215;5000c500463a5d9d<br />
					E: UDEV_LOG=0<br />
					E: DEVPATH=/devices/pci0000:00/0000:00:11.0/host0/target0:0:0/0:0:0:0/block/sda<br />
					E: MAJOR=8<br />
					E: MINOR=0<br />
					E: DEVNAME=/dev/sda<br />
					<span style="color: rgb(255, 140, 0);">E: DEVTYPE=disk</span><br />
					E: SUBSYSTEM=block<br />
					E: ID_ATA=1<br />
					E: ID_TYPE=disk<br />
					E: ID_BUS=ata<br />
					E: <strong><span style="color: rgb(0, 128, 0);">ID_MODEL=ST1500DL003-9VT16L</span></strong><br />
					E: ID_MODEL_ENC=ST1500DL003-9VT16L\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<br />
					E: ID_REVISION=CC3C<br />
					E: <strong><span style="color: rgb(0, 128, 0);">ID_SERIAL=ST1500DL003-9VT16L_5YD6GDZQ</span></strong><br />
					E: <span style="color: rgb(0, 128, 0);"><strong>ID_SERIAL_SHORT=5YD6GDZQ</strong></span><br />
					E: ID_ATA_WRITE_CACHE=1<br />
					E: ID_ATA_WRITE_CACHE_ENABLED=1<br />
					E: ID_ATA_FEATURE_SET_HPA=1<br />
					E: ID_ATA_FEATURE_SET_HPA_ENABLED=1<br />
					E: ID_ATA_FEATURE_SET_PM=1<br />
					E: ID_ATA_FEATURE_SET_PM_ENABLED=1<br />
					E: ID_ATA_FEATURE_SET_SECURITY=1<br />
					E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0<br />
					E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=270<br />
					E: ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=270<br />
					E: ID_ATA_FEATURE_SET_SMART=1<br />
					E: ID_ATA_FEATURE_SET_SMART_ENABLED=1<br />
					E: ID_ATA_FEATURE_SET_AAM=1<br />
					E: ID_ATA_FEATURE_SET_AAM_ENABLED=1<br />
					E: ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE=254<br />
					E: ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE=0<br />
					E: ID_ATA_DOWNLOAD_MICROCODE=1<br />
					E: ID_ATA_SATA=1<br />
					E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1<br />
					E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1<br />
					E: ID_ATA_ROTATION_RATE_RPM=5900<br />
					E: ID_WWN=0&#215;5000c500463a5d9d<br />
					E: ID_WWN_WITH_EXTENSION=0&#215;5000c500463a5d9d<br />
					E: <strong><span style="color: rgb(0, 128, 0);">ID_SCSI_COMPAT=SATA_ST1500DL003-9VT_5YD6GDZQ</span></strong><br />
					E: ID_PATH=pci-0000:00:11.0-scsi-0:0:0:0<br />
					E: ID_FS_UUID=2f36ac48-5e3e-4c54-7217-7c53bea3e41e<br />
					E: ID_FS_UUID_ENC=2f36ac48-5e3e-4c54-7217-7c53bea3e41e<br />
					E: ID_FS_UUID_SUB=136eb8af-87a2-641f-be6c-5a482024b9ca<br />
					E: ID_FS_UUID_SUB_ENC=136eb8af-87a2-641f-be6c-5a482024b9ca<br />
					E: ID_FS_LABEL=mbpc:0<br />
					E: ID_FS_LABEL_ENC=mbpc:0<br />
					E: ID_FS_VERSION=1.2<br />
					E: ID_FS_TYPE=linux_raid_member<br />
					E: ID_FS_USAGE=raid<br />
					E: UDISKS_PRESENTATION_NOPOLICY=0<br />
					E: MD_LEVEL=raid6<br />
					E: MD_DEVICES=6<br />
					E: MD_NAME=mbpc:0<br />
					E: MD_UUID=2f36ac48:5e3e4c54:72177c53:bea3e41e<br />
					E: MD_UPDATE_TIME=1332826317<br />
					E: MD_DEV_UUID=136eb8af:87a2641f:be6c5a48:2024b9ca<br />
					E: MD_EVENTS=3210<br />
					E: UDISKS_ATA_SMART_IS_AVAILABLE=1<br />
					E: DEVLINKS=/dev/block/8:0 /dev/disk/by-id/ata-ST1500DL003-9VT16L_5YD6GDZQ <br />
					&gt; /dev/disk/by-id/scsi-SATA_ST1500DL003-9VT_5YD6GDZQ /dev/rsdf <br />
					&gt; /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0 /dev/disk/by-id/wwn-0&#215;5000c500463a5d9d</p>
<p>					<strong>#</strong></p>
</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Write the UDEV rules.</td>
<td style="width: 300px;">
<p>The UDEV rules are relatively self intuitive and for the purpose of this article, one was simply copied and modified for our <br />
					purpose from the <strong>/lib/udev/rules.d/60-persistent-storage.rules</strong> file (The entries, ie SUBSYSTEM&#8230;, should be all unbroken <br />
					one line entries): <strong></p>
<p>					# cat /lib/udev/rules.d/60-persistent-storage.rules</strong><br />
					# MY RULES<br />
					SUBSYSTEM==&quot;block&quot;,ACTION==&quot;add&quot;,<span style="color: rgb(255, 140, 0);">ENV{DEVTYPE}==&quot;disk&quot;</span>,PROGRAM=&quot;scsi_id &#8211;whitelisted &#8211;replace-whitespace -p0&#215;80 -d$tempnode&quot;,RESULT==&quot;?*&quot;,ENV{ID_SCSI_COMPAT}=&quot;$result&quot;,<br />
					<span style="color: rgb(0, 128, 0);"><strong>ENV{ID_SCSI_COMPAT}==&quot;SATA_ST1500DL003-9VT_5YD6GDZQ&quot;</strong></span>,SYMLINK+=&quot;rsdf&quot;<br />
					# OS<br />
					SUBSYSTEM==&quot;block&quot;,ACTION==&quot;add&quot;,ENV{DEVTYPE}==&quot;disk&quot;,PROGRAM=&quot;scsi_id &#8211;whitelisted &#8211;replace-whitespace -p0&#215;80 -d$tempnode&quot;,RESULT==&quot;?*&quot;,ENV{ID_SCSI_COMPAT}=&quot;$result&quot;,ENV{ID_SCSI_COMPAT}==&quot;SATA_WDC_WD15EADS-32_WD-WCAVY1065435&quot;,SYMLINK+=&quot;ossda&quot;<br />
					#</p>
<p>					Notice how the devices correspond to the actual output of the <strong>udevadm</strong> commands above.&nbsp; Similarly, we can use the MD_UUID <br />
					to uniquely add a name for our RAID6 array like this:</p>
<p><strong># cat /lib/udev/rules.d/64-md-raid.rules</strong><br />
					ENV{DEVTYPE}==&quot;disk&quot;, ENV{MD_NAME}==&quot;mbpc:0&quot;, ENV{MD_UUID}==&quot;2f36ac48:5e3e4c54:72177c53:bea3e41e&quot;, SYMLINK+=&quot;raidmd0&quot;, OPTIONS+=&quot;string_escape=replace&quot;<br />
					#</p>
<p><strong><span style="color: rgb(0, 0, 205);">NOTE:</span></strong> The UUID for Multi Disk (mdXX) devices can be obtained using:</p>
<p><strong># mdadm &#8211;detail /dev/md0 |grep -i UUID</strong><br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UUID : 2f36ac48:5e3e4c54:72177c53:bea3e41e<br />
					<strong>#</strong></p>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td>Adjust the UDEV rules files accordingly to add new entries. <strong><span style="color: rgb(255, 0, 0);">NOTE:</span> Do not remove any, just add and backup first.</strong>&nbsp; It is easy to make the system unbootable so be ware.</td>
<td style="width: 300px;">
<p>UDEV rule files are typically added to the<strong> /etc/udev/rules.d/</strong> and the <strong>/lib/udev/rules.d/</strong> folders.&nbsp; The rules in the <strong>/etc/udev/rules.d/</strong> folder would overwrite the rules in the <strong>/lib/udev/rules.d/</strong> folder.&nbsp; </p>
<p>					<span style="color: rgb(255, 0, 0);"><strong>NOTE:</strong></span> For the excercise here, the rules under<strong> /etc/udev/rules.d/</strong> failed to work since variables such as $tempnode were undefined by the time the system processed rules under <strong>/etc/udev/rules.d/</strong>.&nbsp; For the next step, the rules were added to </p>
<p>					<strong>/lib/udev/rules.d/60-persistent-storage.rules</strong><br />
					<strong>/lib/udev/rules.d/64-md-raid.rules</strong></p>
<p>instead.&nbsp; However the typical practice would be to add them to the <strong>/etc/udev/rules.d</strong> however this did NOT work for this example using the current rule configuration.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Check that logging on <strong>/etc/udev/udev.conf</strong> is set to <strong>0</strong> or at most <strong>err</strong>.</td>
<td style="width: 300px;">
<p><span style="color: rgb(255, 0, 0);"><strong>WARNING:</strong></span> If this is set to anything higher then <strong>0</strong> or <strong>err</strong>, the system may log so much that it would never boot up.<strong></p>
<p>					# cat /etc/udev/udev.conf </strong><br />
					# The initial syslog(3) priority: &quot;err&quot;, &quot;info&quot;, &quot;debug&quot; or its<br />
					# numerical equivalent. For runtime debugging, the daemons internal<br />
					# state can be changed with: &quot;udevadm control &#8211;log-priority=&lt;value&gt;&quot;.<br />
					<span style="color: rgb(0, 128, 0);">udev_log=0</span><br />
					<strong>#</strong></p>
<p>A safer way to set the logging higher temporarily until on next reboot udev.conf is read again, is to issue this command:</p>
<p><strong># udevadm control &#8211;log-priority=3<br />
					</strong></p>
<p>for example.&nbsp;</p>
</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Reload the UDEV rules.</td>
<td style="width: 300px;">
<p>Issue the command.&nbsp; Typically, it will return no results unless a log option is set to non 0 (see step 5 above):</p>
<p>					<strong># udevadm trigger 2&gt;&amp;1</strong><br />
					#</p>
<p>					Check the /var/log/messages files for messages from UDEV:</p>
<p><span style="font-size: 8px;"><span style="font-size: 12px;"><strong># tail -f /var/log/messages</strong></span><br />
					Apr&nbsp; 1 21:54:45 mbpc kernel: AMD64 EDAC driver v3.4.0<br />
					Apr&nbsp; 1 21:54:45 mbpc kernel: EDAC amd64: DRAM ECC disabled.<br />
					Apr&nbsp; 1 21:54:45 mbpc kernel: EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.<br />
					Apr&nbsp; 1 21:54:45 mbpc kernel: Either enable ECC checking or force module loading by setting &#39;ecc_enable_override&#39;.<br />
					Apr&nbsp; 1 21:54:45 mbpc kernel: (Note that use of the override may cause unknown side effects.)<br />
					Apr&nbsp; 1 21:54:45 mbpc kernel: microcode: AMD microcode update via /dev/cpu/microcode not supported</p>
<p>					</span></p>
<p>A more verbose output when using the <strong>&#8211;log-priority</strong> flag would look like this (filtered):</p>
<blockquote>
<p><span style="font-size: 8px;"><span style="font-family: courier new,courier,monospace;"><span style="font-size: 12px;"><strong># tail -f /var/log/messages|egrep -i &quot;error|warning|fatal|fail&quot;<br />
						</strong></span>Apr&nbsp; 1 21:58:28 mbpc udevd-work[27757]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:LNXSYSTM: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28342]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module pci:v00001002d00005958sv00001002sd00005958bc06sc00i00 not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28353]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0019v0000p0001e0000_e0,1,k74,ramlsfw not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28354]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:LNXSYBUS: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28355]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:LNXSYBUS: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28356]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:LNXTHERM: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28370]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module pci:v00001002d00004384sv00000000sd00000000bc06sc04i01 not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28368]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module pci:v00001002d0000439Dsv00001002sd0000439Dbc06sc01i00 not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[27758]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0C01: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[27757]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0501: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28342]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0700: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28344]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0C02: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28345]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0C02: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28347]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:device: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28348]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:device: not found.&#39;<br />
						Apr&nbsp; 1 21:58:28 mbpc udevd-work[28349]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:device: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28420]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0019v0000p0001e0000_e0,1,k74,ramlsfw not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28423]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0000v0000p0000e0000_e0,5,kramlsfw8, not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28455]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0000v0000p0000e0000_e0,5,kramlsfw2, not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28343]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:device: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28347]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0000: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28345]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:device: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28349]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0100: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28351]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0200: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28352]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0800: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28353]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0B00: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28355]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0C04: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28354]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:PNP0C02: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28367]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:device: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28365]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module pci:v00001102d00007003sv00001102sd00000040bc09sc80i00 not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28342]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:device: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28348]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module pci:v00001022d00001200sv00000000sd00000000bc06sc00i00 not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28349]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module pci:v00001022d00001201sv00000000sd00000000bc06sc00i00 not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28352]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Error inserting amd64_edac_mod (/lib/modules/2.6.32-220.4.1.el6.x86_64/kernel/drivers/edac/amd64_edac_mod.ko): No such device&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[27758]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module pci:v00001022d00001204sv00000000sd00000000bc06sc00i00 not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28353]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module platform:Fixed not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28344]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module platform:microcode not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28366]: error changing netif name &#39;wlan0&#39; to &#39;eth0&#39;: Device or resource busy<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28356]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module platform:pcspkr not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28359]: &#39;/sbin/modprobe&#39; (stderr) &#39;FAT+AL: Module platform:regulatory not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28362]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module platform:vesafb not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28351]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module acpi:device: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28343]: &#39;/lib/udev/udisks-part-id&#39; (stderr) &#39;read failed (No such file or directory)&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28342]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0003v046DpC00Ee0110_e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[27758]: &#39;/lib/udev/udisks-part-id&#39; (stderr) &#39;read failed (No such file or directory)&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28365]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0003v03F0p0024e0110_e0,1,4,11,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8C,8E,96,98,9E,9F,A1,A3,A4,A5,A6,AD,B0,B1,<br />
						B2,B3,B4,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,F0,ram4,l0,1,2,sfw not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28344]: &#39;/lib/udev/udisks-part-id&#39; (stderr) &#39;read failed (No such file or directory)&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28351]: &#39;/lib/udev/udisks-part-id&#39; (stderr) &#39;read failed (No such file or directory)&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28349]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module dmi:bvnAwardSoftwareInternational,Inc.:bvrFC:bd08/02/2010:svnGigabyteTechnologyCo.,Ltd.:pnGA_890XA_UD3:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnGA_890XA_UD3:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr: not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[28352]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0017v0001p0001e0100_e0,1,2,k110,111,112,r0,1,amlsfw not found.&#39;<br />
						Apr&nbsp; 1 21:58:29 mbpc udevd-work[27758]: &#39;/bin/bash&#39; (stderr) &#39;/bin/bash: line 0: echo: write error: Invalid argument&#39;<br />
						Apr&nbsp; 1 22:28:40 mbpc udevd-work[30117]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0003v046DpC00Ee0110_e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw not found.&#39;<br />
						Apr&nbsp; 1 22:28:41 mbpc udevd-work[30117]: &#39;/sbin/modprobe&#39; (stderr) &#39;FATAL: Module input:b0003v03F0p0024e0110_e0,1,4,11,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8C,8E,96,98,9E,9F,A1,A3,A4,A5,A6,AD,B0,B1,<br />
						B2,B3,B4,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,F0,ram4,l0,1,2,sfw not found.&#39;</span></span></p>
</blockquote>
</td>
</tr>
<tr>
<td align="center" valign="top">7</td>
<td align="left" valign="top">Check that the new rules are generating the expected links.</td>
<td style="width: 300px;">
<p>Repeat the same for any other disks you wish to create custom rules for.&nbsp; Issue the following commands to check that the new links are present:</p>
<p><strong># ls -al /dev/rsd*</strong><br />
					lrwxrwxrwx. 1 root root 3 Apr&nbsp; 1 21:40 /dev/rsda -&gt; sdc<br />
					lrwxrwxrwx. 1 root root 3 Apr&nbsp; 1 21:40 /dev/rsdb -&gt; sde<br />
					lrwxrwxrwx. 1 root root 3 Apr&nbsp; 1 21:40 /dev/rsdc -&gt; sdd<br />
					lrwxrwxrwx. 1 root root 3 Apr&nbsp; 1 21:40 /dev/rsdd -&gt; sdf<br />
					lrwxrwxrwx. 1 root root 3 Apr&nbsp; 1 21:40 /dev/rsde -&gt; sdb<br />
					lrwxrwxrwx. 1 root root 3 Apr&nbsp; 1 21:40 /dev/rsdf -&gt; sda<br />
					<strong>#</strong></p>
<p><strong># ls -al /dev/oss*</strong><br />
					lrwxrwxrwx. 1 root root 3 Apr&nbsp; 1 21:40 /dev/ossda -&gt; sdg<br />
					<strong># ls -al /dev/raid*</strong><br />
					lrwxrwxrwx. 1 root root 3 Apr&nbsp; 1 21:40 /dev/raidmd0 -&gt; md0<br />
					<strong>#</strong></p>
</td>
</tr>
</tbody>
</table>
<p>This gave numerous UDEV rules with which we could customize our naming.</p>
<p><strong>PROBLEMS</strong></p>
<p><strong>UDEV</strong> tweaking comes with it&#39;s own set of risks.&nbsp; For this, you may wish to either have a backup CD or a live Linux CD ready running the OS type you&#39;re modifying.&nbsp; Alternately, a <a href="http://www.microdevsys.com/WordPress/2011/09/26/linux-pxe-installing-and-network-booting-windows-7-linux-solaris-using-pxe/">good PXE installation</a> off of another server is a good way to go too where you can simply plug an ethernet cable to the secondary server and boot off the network.</p>
<table border="1" cellpadding="1" cellspacing="1" style="width: 100%;">
<tbody>
<tr>
<td style="width: 100px;"><strong>PROBLEM<br />
				</strong></td>
<td style="width: 400px;"><strong>SYMPTOMS<br />
				</strong></td>
<td><strong>SOLUTION<br />
				</strong></td>
</tr>
<tr>
<td align="left" valign="top">OS isn&#39;t booting up.&nbsp; The system is printing thousands if not hundreds of messages to the terminal windows as confirmed with SHIFT-F2 keys.</p>
<p>				&nbsp;</td>
<td>
<p>Log file messages are filled with entries such as the below and logging for UDEV is set to 7 automatically:</p>
<p><strong># tail -f /var/log/messages<br />
					</strong></p>
<p>Feb 26 10:51:23 mbpc udevd[629]: seq 2192 queued, &#39;add&#39; &#39;usb&#39;<br />
					Feb 26 10:51:23 mbpc udevd[629]: passed 282 bytes to monitor 0&#215;7f7e4823b7e0<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: seq 2192 running<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: device 0&#215;7f7e48224aa0 has devpath &#39;/devices/pci0000:00/0000:00:16.2/usb3/3-4&#39;<br />
					Feb 26 10:51:23 mbpc udevd[629]: seq 2193 queued, &#39;add&#39; &#39;usb&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: device 0&#215;7f7e48224cf0 has devpath &#39;/devices/pci0000:00/0000:00:16.2/usb3&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: device 0&#215;7f7e48224e00 has devpath &#39;/devices/pci0000:00/0000:00:16.2&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: device 0&#215;7f7e48224f30 has devpath &#39;/devices/pci0000:00&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: IMPORT &#39;usb_id &#8211;export /devices/pci0000:00/0000:00:16.2/usb3/3-4&#39; /lib/udev/rules.d/40-libgphoto2.rules:11<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;usb_id &#8211;export /devices/pci0000:00/0000:00:16.2/usb3/3-4&#39; started<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;/lib/udev/usb_id&#39; (stderr) <strong><span style="color: rgb(255, 0, 0);">&#39;libudev: udev_list_entry_add: &#39;UDEV_LOG=7&#39; added&#39;</span></strong><br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;/lib/udev/usb_id&#39; (stderr) &#39;libudev: udev_list_entry_add: &#39;UDEV_LOG&#39; is already in the list&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;/lib/udev/usb_id&#39; (stderr) &#39;libudev: udev_list_entry_add: &#39;UDEV_LOG&#39; value replaced with &#39;7&#39;&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;/lib/udev/usb_id&#39; (stderr) &#39;libudev: udev_new: context 0&#215;7fd21bf87010 created&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;/lib/udev/usb_id&#39; (stderr) &#39;libudev: udev_new: log_priority=7&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;/lib/udev/usb_id&#39; (stderr) &#39;libudev: udev_new: config_file=&#39;/etc/udev/udev.conf&#39;&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;/lib/udev/usb_id&#39; (stderr) &#39;libudev: udev_new: dev_path=&#39;/dev&#39;&#39;<br />
					Feb 26 10:51:23 mbpc udevd-work[18633]: &#39;/lib/udev/usb_id&#39; (stderr) &#39;libudev: udev_new: sys_path=&#39;/sys&#39;&#39;</p>
</td>
<td>After several days of debugging, it turned out that apparently, I had kernel-debug-devel installed which overwrote my <strong>/boot/grub/grub.conf</strong> and had .debug for any kernel level to boot.&nbsp; This resulted in a huge amount of UDEV rule messages being printed at boot to the point that the system simply wouldn&#39;t boot.&nbsp; <span style="color: rgb(0, 128, 0);">LESSONS LEARNED:</span> Always check your <strong>/boot/grub/grub.conf</strong> after kernel installs.&nbsp; Modifying values in <strong>/etc/udev/udev.con</strong>f to stop the logging had, obviously, no effect as the flag was reset at boot time by the .debug kernel:</p>
<p>				<strong>[ GOOD ]</strong><br />
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel /vmlinuz-2.6.32-220.4.1.el6.x86_64 ro root=/dev/mapper/mbpcvg-rootlv rd_LVM_LV=mbpcvg/rootlv rd_LVM_LV=VGEntertain/olv_swap rd_LVM_LV=mbpcvg/swaplv rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=128M rhgb quiet</p>
<p>				<strong>[ BAD ]</strong><br />
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel /vmlinuz-2.6.32-220.4.1.el6.x86_64.debug ro root=/dev/mapper/mbpcvg-rootlv rd_LVM_LV=mbpcvg/rootlv rd_LVM_LV=VGEntertain/olv_swap rd_LVM_LV=mbpcvg/swaplv rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=128M rhgb quiet</p>
<p>				The extra debugging looks like also had UDEV_LOG=7 causing the above.</td>
</tr>
</tbody>
</table>
<p>
	Cheers!<br />
	TK</p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2012/04/01/linux-persistent-naming-of-sata-devices-through-udev-rules/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux Networking: Persistent naming rules based on MAC for eth0 and wlan0</title>
		<link>http://www.microdevsys.com/WordPress/2012/02/27/linux-networking-persistent-naming-rules-based-on-mac-for-eth0-and-wlan0/</link>
		<comments>http://www.microdevsys.com/WordPress/2012/02/27/linux-networking-persistent-naming-rules-based-on-mac-for-eth0-and-wlan0/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 02:15:49 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<category><![CDATA[ACTION]]></category>

		<category><![CDATA[ATTR]]></category>

		<category><![CDATA[etc]]></category>

		<category><![CDATA[eth0]]></category>

		<category><![CDATA[KERNEL]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[naming rules based on MAC]]></category>

		<category><![CDATA[networking]]></category>

		<category><![CDATA[persistent]]></category>

		<category><![CDATA[r8169]]></category>

		<category><![CDATA[rules.d]]></category>

		<category><![CDATA[udev]]></category>

		<category><![CDATA[wlan0]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1356</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/02/27/linux-networking-persistent-naming-rules-based-on-mac-for-eth0-and-wlan0/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux Networking: Persistent naming rules based on MAC for eth0 and wlan0';
digg_bodytext = 'PROBLEM	You&#39;ve got a set of devices but their names, such as NIC / Network card names keep changing on each reboot or reconnect.&nbsp; This is a continuation of Linux Networking: device eth0 does not seem to be present, delaying initialization. &nbsp;where...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
PROBLEM
	
You&#39;ve got a set of devices but their names, such as NIC / Network card names keep changing on each reboot or reconnect.&#160; This is a continuation of Linux Networking: device eth0 does not seem to be present, delaying initialization. &#160;where we resolved a similar issue due to naming but here we&#39;ll make it persistent [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/02/27/linux-networking-persistent-naming-rules-based-on-mac-for-eth0-and-wlan0/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux Networking: Persistent naming rules based on MAC for eth0 and wlan0';
digg_bodytext = 'PROBLEM	You&#39;ve got a set of devices but their names, such as NIC / Network card names keep changing on each reboot or reconnect.&nbsp; This is a continuation of Linux Networking: device eth0 does not seem to be present, delaying initialization. &nbsp;where...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p><strong>PROBLEM<br />
	</strong></p>
<p>You&#39;ve got a set of devices but their names, such as NIC / Network card names keep changing on each reboot or reconnect.&nbsp; This is a continuation of <a href="../2008/01/13/linux-networking-device-eth0-does-not-seem-to-be-present-delaying-initialization/#comment-45591">Linux Networking: device eth0 does not seem to be present, delaying initialization.</a> &nbsp;where we resolved a similar issue due to naming but here we&#39;ll make it persistent using this simple naming system for Linux.&nbsp; At the end of this very short post, we&#39;ll have a constant name for our physical device on reboots.&nbsp; In particular, it is to make the line <strong>ip link set dev wlan1 name wlan0 </strong>permanent across reboots.</p>
<p><span id="more-1356"></span></p>
<p><strong>SOLUTION<br />
	</strong></p>
<p>To solve this, we&#39;ll use <strong>UDEV</strong> rules to give a certain device a persistent name. &nbsp;We&#39;ll use the <strong>70-persistent-net.rules</strong> file to do just that so our network interfaces keep coming up with the same name on reboots or replugging.</p>
<p><strong># cat /etc/udev/rules.d/70-persistent-net.rules </strong></p>
<p>	# PCI device 0&#215;10ec:0&#215;8168 (r8169)<br />
	SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;1c:6f:35:3f:da:14&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;</p>
<p>	# USB device 0&#215;0cf3:0&#215;1002 (usb) (custom name provided by external tool)<br />
	SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:15:86:f1:65:d5&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;wlan*&quot;, NAME=&quot;wlan0&quot;</p>
<p>	#</p>
<p>There&#39;s several ways to get parameters for the devices you have.&nbsp; Most notable is <strong>lspci</strong> that we can use here:</p>
<p><strong># lspci -s 03:00.0</strong><br />
	03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)<br />
	<strong>#</strong></p>
<p>Add some <strong>-v[v....]</strong> options for verbosity to see more details.&nbsp;&nbsp; Another way, which is probably the most common, is to use <strong>netstat</strong> or <strong>ifconfig</strong> to get your MAC address and other parameters you can use with which to uniquely define your rules:</p>
<p><strong># netstat -anevi</strong><br />
	Kernel Interface table<br />
	bond0&nbsp;&nbsp;&nbsp;&nbsp; Link encap:Ethernet&nbsp; HWaddr 1c:6f:35:3f:da:14&nbsp; <br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:192.168.0.8&nbsp; Bcast:192.168.0.255&nbsp; Mask:255.255.255.0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: fe80::1e6f:65ff:fe3f:fc14/64 Scope:Link<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP BROADCAST RUNNING MASTER MULTICAST&nbsp; MTU:1500&nbsp; Metric:1<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX packets:53255 errors:0 dropped:0 overruns:0 frame:0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX packets:41224 errors:0 dropped:0 overruns:0 carrier:0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collisions:0 txqueuelen:0 <br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX bytes:28013914 (26.7 MiB)&nbsp; TX bytes:4811379 (4.5 MiB)<br />
	&nbsp;</p>
<p>Or <strong>ifconfig bond0</strong> which would provide the exact same thing as above.&nbsp; Another way still is to use <strong>udev</strong> itself to get more information on your device in this manner:</p>
<p><strong># udevadm info -a -p /sys/class/net/eth0 2&gt;&amp;1|grep -i &quot;ATTR{address}&quot;</strong><br />
	&nbsp;&nbsp;&nbsp; ATTR{address}==&quot;1c:6f:35:3f:da:14&quot;<br />
	<strong>#</strong></p>
<p>Hope you found this useful.&nbsp; Feel free to leave a reply!</p>
<p>Cheers!<br />
	TK</p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2012/02/27/linux-networking-persistent-naming-rules-based-on-mac-for-eth0-and-wlan0/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AWK for Human Beings</title>
		<link>http://www.microdevsys.com/WordPress/2012/01/28/awk-for-human-beings/</link>
		<comments>http://www.microdevsys.com/WordPress/2012/01/28/awk-for-human-beings/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 05:49:56 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<category><![CDATA[awk]]></category>

		<category><![CDATA[function system]]></category>

		<category><![CDATA[getline]]></category>

		<category><![CDATA[guide]]></category>

		<category><![CDATA[learn]]></category>

		<category><![CDATA[quick]]></category>

		<category><![CDATA[study]]></category>

		<category><![CDATA[sub]]></category>

		<category><![CDATA[teach]]></category>

		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1355</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/01/28/awk-for-human-beings/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'AWK for Human Beings';
digg_bodytext = 'This is a quick and dirty AWK tutorial demonstrating the most common usages and features that one can use on a daily basis.&nbsp; Three variants: AWK standalone, integrated into ksh, and one-liner are provided.&nbsp;&nbsp;On my system, AWK pointed to...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
This is a quick and dirty AWK tutorial demonstrating the most common usages and features that one can use on a daily basis.&#160; Three variants: AWK standalone, integrated into ksh, and one-liner are provided.&#160;
&#160;
On my system, AWK pointed to GAWK.&#160; GAWK has an expanded command set but here we will only focus on specific to [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/01/28/awk-for-human-beings/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'AWK for Human Beings';
digg_bodytext = 'This is a quick and dirty AWK tutorial demonstrating the most common usages and features that one can use on a daily basis.&nbsp; Three variants: AWK standalone, integrated into ksh, and one-liner are provided.&nbsp;&nbsp;On my system, AWK pointed to...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>This is a quick and dirty AWK tutorial demonstrating the most common usages and features that one can use on a daily basis.&nbsp; Three variants: <strong>AWK standalone</strong>, <strong>integrated into ksh</strong>, and <strong>one-liner</strong> are provided.&nbsp;</p>
<p>&nbsp;</p>
<p>On my system, <strong>AWK</strong> pointed to <strong>GAWK</strong>.&nbsp; <strong>GAWK</strong> has an expanded command set but here we will only focus on specific to <strong>AWK</strong>.</p>
<p>&nbsp;</p>
<p>AWK is a powerful language rarely used beyond printing a few columns but often can stack up better in performance, then other scripting languages.&nbsp; AWK can also make for a relatively easy learn due to it&#39;s small set of functions.&nbsp; This is similar to C without the complexities of such things as pointers:</p>
<p><span id="more-1355"></span></p>
<blockquote>
<p><strong>[root@tom awk]# ./dfm.awk</strong><br />
		Filesystem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1M-blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Used Available Use% Mounted on<br />
		/dev/sdc2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 29526&nbsp;&nbsp;&nbsp;&nbsp; 26568&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1458&nbsp; 95% /<br />
		/dev/sdc5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19689&nbsp;&nbsp;&nbsp;&nbsp; 18226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 463&nbsp; 98% /home<br />
		/dev/sdb1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9538&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 459&nbsp; 96% /mnt/c<br />
		<strong>[root@tom awk]# cat dfm.awk</strong><br />
		#!/bin/awk -f</p>
<p>		function dfm ( USAGEL ) {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CMD=&quot;df -m&quot;;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (1) {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rvar = ( ( CMD | getline ) &gt; 0 );</p>
<p>		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( rvar == 0 )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</p>
<p>		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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/>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
		}</p>
<p>		BEGIN {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dfm(85);<br />
		}</p>
<p>		<strong>[root@tom awk]#</strong></p>
</blockquote>
<p>Below is a breakdown of the above commands.</p>
<table border="1" cellpadding="1" cellspacing="1" style="height: 112px; width: 100%;">
<tbody>
<tr>
<td style="width: 200px;">function dfm ( USAGEL ) {</td>
<td>This declares a function <strong>dfm</strong>.&nbsp; Since we want to pass a parameter to this function, we pick a name and enter it within the brackets <strong>()</strong> .&nbsp; The name will be how we will reference the parameter.</td>
</tr>
<tr>
<td style="width: 200px;">CMD=&quot;df -m&quot;;</td>
<td>Set a variable, <strong>CMD</strong> to the text we will execute as the command: <strong>df -m</strong></td>
</tr>
<tr>
<td>while(1)</td>
<td>This starts an infinite loop.&nbsp; The condition in this case, 1, is always true.</td>
</tr>
<tr>
<td>rvar = ( CMD | getline );</td>
<td>This command executes the text in the variable <strong>CMD</strong>.&nbsp; The output is piped to <strong>getline</strong>.&nbsp; The entire operation returns 1 if a row can be read.&nbsp; If no rows can be read, 0 is returned.&nbsp; The number of rows read is saved in our custom variable <strong>rvar</strong>.</p>
<p>				Behind the scenes of this command in AWK, $0 is set followed by $1, $2, $3 etc for each row read.&nbsp;</td>
</tr>
<tr>
<td>&nbsp; if ( rvar == 0 )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</td>
<td>Check if <strong>rvar</strong> is 0.&nbsp; If this is 0, it means no more rows can be read and <strong>break</strong> is called to exit the inner most loop.</td>
</tr>
<tr>
<td>DUSE=$5;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Set another variable to the fifth column.&nbsp; This is the percentage field such as 95%</td>
</tr>
<tr>
<td>sub(/[%]/, &quot;&quot;, DUSE);&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>Substitute the percentage in the usage field with a blank &quot;&quot; essentially removing it.&nbsp; This leaves only the number.</td>
</tr>
<tr>
<td>if ( DUSE &gt; USAGEL || $0 ~ /Filesystem/ )</td>
<td>Print the header and any line where the usage is greater then what we specify in the function parameter USAGEL.&nbsp; The <strong>OR</strong> operator is used <strong>||</strong> to indicate we want to match the header or any filesystem where usage is greater then what we specified in the function call.&nbsp;</td>
</tr>
<tr>
<td>print $0</td>
<td>If the above condition is met, print the entire line to the terminal.</td>
</tr>
<tr>
<td>dfm(85);</td>
<td>This is how the function is called.&nbsp; The 85 is assigned to the variable USAGEL above.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The below script demostrates how to embed the above <strong>AWK</strong> script into a <strong>KSH</strong> script.&nbsp; Notice how everything is the same with the exception of the parts in green which we add for <strong>KSH</strong>.&nbsp; We&#39;ll add a twist to the below by creating a thread from the KSH function that completes the task 5 seconds after the main thread exits.</p>
<blockquote>
<p>&nbsp;</p>
<p>[root@tom awk]# cat dfm.ksh<br />
		<span style="color: rgb(0, 100, 0);">#!/bin/ksh</p>
<p>
		function dfm {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; awk &#39;</span><br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function dfm ( USAGEL ) {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CMD=&quot;df -m&quot;;<br />
		&nbsp;&nbsp;&nbsp;&nbsp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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dfm(85);<br />
		<strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb(0, 100, 0);">&nbsp;&nbsp;&nbsp; close(SCMD);</span></strong><br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
		<span style="color: rgb(0, 100, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;;<br />
		}</p>
<p>		function main {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dfm <strong>&amp;;</strong><br />
		}<br />
		main;</span><br />
		&nbsp;</p>
</blockquote>
<p>A breakdown of the components:</p>
<table border="1" cellpadding="1" cellspacing="1" style="width: 100%;">
<tbody>
<tr>
<td style="width: 200px;">SCMD=&quot;sleep 5&quot;;</td>
<td>We are setting this variable to the text of the OS command we want to run.</td>
</tr>
<tr>
<td>system(SCMD);</td>
<td>The AWK system built-in function executes the text in the SCMD variable.&nbsp; In this case it is to sleep for 5 seconds.</td>
</tr>
<tr>
<td>dfm &amp;</td>
<td>The &amp; at the end of calling that function, makes the function run as a separate thread and detaches it from the currently running thread.&nbsp; The newly created thread will now be running in parallel and separate to the main thread.</td>
</tr>
</tbody>
</table>
<p>
	The thread created in the above sleeps for 5 seconds but the execution of the main function continues, due to use of the <strong>&amp;</strong> after the <strong>dfm</strong> function.&nbsp; After sleeping 5 seconds, the thread exits and prints the results:</p>
<blockquote>
<p><strong># ./dfm.ksh</strong><br />
		#&nbsp; (press enter a few times or run <strong>ps -aux|grep dfm.ksh</strong> to verify the thread is still there.)<br />
		# <br />
		# <br />
		# Filesystem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1M-blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Used Available Use% Mounted on<br />
		/dev/sdc2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 29526&nbsp;&nbsp;&nbsp;&nbsp; 26569&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1457&nbsp; 95% /<br />
		/dev/sdc5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19689&nbsp;&nbsp;&nbsp;&nbsp; 18226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 463&nbsp; 98% /home<br />
		/dev/sdb1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9538&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 459&nbsp; 96% /mnt/c<br />
		#</p>
<p>&nbsp;</p>
</blockquote>
<p>The below line is a one liner that does the same.&nbsp; It can simply be pasted to the CLI and ran.&nbsp; The result is the same in a more compact form:</p>
<blockquote>
<p><strong>[root@tom awk]# df -m|awk &#39;{ DUSE=$5; sub(/[%]/, &quot;&quot;, DUSE); if ( DUSE &gt; 85 || $0 ~ /Filesystem/ ) print; }&#39;</strong><br />
		Filesystem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1M-blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Used Available Use% Mounted on<br />
		/dev/sdc2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 29526&nbsp;&nbsp;&nbsp;&nbsp; 26569&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1457&nbsp; 95% /<br />
		/dev/sdc5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19689&nbsp;&nbsp;&nbsp;&nbsp; 18226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 463&nbsp; 98% /home<br />
		/dev/sdb1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9538&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 459&nbsp; 96% /mnt/c<br />
		<strong>[root@tom awk]#</strong></p>
</blockquote>
<p>Performance of a script can be tested using the date function as in the below example:</p>
<blockquote>
<p># <strong>date +&quot;%s:%N&quot;;</strong> df -m|awk &#39;{ DUSE=$5; sub(/[%]/, &quot;&quot;, DUSE); if ( DUSE &gt; 85 || $0 ~ /Filesystem/ ) print; }&#39;; <strong>date +&quot;%s:%N&quot;;</strong><br />
		1327730034:<strong><span style="color: rgb(0, 128, 0);">862739185</span></strong><br />
		Filesystem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1M-blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Used Available Use% Mounted on<br />
		/dev/sdc2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 29526&nbsp;&nbsp;&nbsp;&nbsp; 26569&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1457&nbsp; 95% /<br />
		/dev/sdc5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19689&nbsp;&nbsp;&nbsp;&nbsp; 18226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 463&nbsp; 98% /home<br />
		/dev/sdb1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9538&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 459&nbsp; 96% /mnt/c<br />
		1327730034:<span style="color: rgb(0, 100, 0);"><strong>873508735</strong></span><br />
		#</p>
</blockquote>
<p>Doing the math on the nanoseconds, we can see the code above took approx <strong>10.7ms</strong> to run to produce the output or essentially just a little over one time slice to complete.</p>
<p>&nbsp;</p>
<p><strong>UPDATE: </strong>Wed April 25nd 2012</p>
<p>Here&#39;s another handy example that someone has asked me about recently.&nbsp; The equivalent of the below is the <strong>UNIX</strong> <strong>comm</strong> command available on most distributions.&nbsp; Here&#39;s the equivalent in <strong>awk</strong> that the reader can tweak to suit their tastes:</p>
<blockquote>
<p><span style="font-size:12px;"><span style="font-family: courier new,courier,monospace;"><strong># cat scmp.awk</strong><br />
		#!/bin/awk -f</p>
<p>		function scmp ( SERVERF, HOSTF ) {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FIL=SERVERF;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (1) {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( FIL != &quot;&quot; )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rvar = ( ( getline &lt; FIL ) &gt; 0 );<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( rvar == 0 ) break;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SVR[$1]=1;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FIL=HOSTF;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (1) {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( FIL != &quot;&quot; )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rvar = ( ( getline &lt; FIL ) &gt; 0 );</p>
<p>		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( rvar == 0 ) break;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( SVR[$1] == 1 ) SVR[$1]++; else SVR[$1]=-1;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for ( key in SVR ) {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( SVR[key] == 2 )&nbsp;&nbsp;&nbsp; printf(&quot;%12s %12s %12s\n&quot;, key, key, &quot;=&quot;);<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( SVR[key] == -1 )&nbsp;&nbsp; printf(&quot;%12s %12s %12s\n&quot;, &quot; &quot;, key, &quot;&gt;&quot;)<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( SVR[key] == 1 )&nbsp;&nbsp;&nbsp; printf(&quot;%12s %12s %12s\n&quot;, key, &quot; &quot;, &quot;&lt;&quot;)<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
		}</p>
<p>		BEGIN {<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scmp( ARGV[1], ARGV[2] );<br />
		}</p>
<p>		</span></span></p>
</blockquote>
<p>And the output is:</p>
<blockquote>
<p><span style="font-size:14px;"><span style="font-family: courier new,courier,monospace;"><strong># ./scmp.awk server.txt host.txt</strong><br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<br />
		<strong>#<br />
		#<br />
		# cat server.txt<br />
		</strong>host1<br />
		host10<br />
		host3<br />
		host4<br />
		host7<br />
		host8<br />
		<strong># cat host.txt</strong><br />
		host2<br />
		host3<br />
		host4<br />
		host5<br />
		host6<br />
		host9<br />
		<strong>#</strong><br />
		</span></span></p>
</blockquote>
<p>&nbsp;</p>
<p>Cheers!<br />
	TK</p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2012/01/28/awk-for-human-beings/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux: Resetting an MD5 hash for ssh or ftp login.</title>
		<link>http://www.microdevsys.com/WordPress/2012/01/14/linux-resetting-an-md5-hash-for-ssh-or-ftp-login/</link>
		<comments>http://www.microdevsys.com/WordPress/2012/01/14/linux-resetting-an-md5-hash-for-ssh-or-ftp-login/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 18:54:03 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<category><![CDATA[ftp]]></category>

		<category><![CDATA[hash]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[localhost]]></category>

		<category><![CDATA[login]]></category>

		<category><![CDATA[MD5]]></category>

		<category><![CDATA[openssl]]></category>

		<category><![CDATA[passwd]]></category>

		<category><![CDATA[password]]></category>

		<category><![CDATA[reset]]></category>

		<category><![CDATA[Resetting]]></category>

		<category><![CDATA[salt]]></category>

		<category><![CDATA[specify]]></category>

		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1354</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/01/14/linux-resetting-an-md5-hash-for-ssh-or-ftp-login/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux: Resetting an MD5 hash for ssh or ftp login.';
digg_bodytext = 'Just happened to have forgotten a password for one of my user accounts on my workstation and remembered a handy little thing one can do to reset a pass.If you have root access, one can simply regenerate the MD5 hash with:	# openssl passwd -1 -salt mysalt	Password:...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
Just happened to have forgotten a password for one of my user accounts on my workstation and remembered a handy little thing one can do to reset a pass.
If you have root access, one can simply regenerate the MD5 hash with:

	# openssl passwd -1 -salt mysalt
	Password: 
	$1$mysalt$JyKGOJR1343sJ7N91hXVI/
	#

	# ftp localhost
	Connected to localhost (127.0.0.1).
	220 Welcome to the [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2012/01/14/linux-resetting-an-md5-hash-for-ssh-or-ftp-login/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux: Resetting an MD5 hash for ssh or ftp login.';
digg_bodytext = 'Just happened to have forgotten a password for one of my user accounts on my workstation and remembered a handy little thing one can do to reset a pass.If you have root access, one can simply regenerate the MD5 hash with:	# openssl passwd -1 -salt mysalt	Password:...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>Just happened to have forgotten a password for one of my user accounts on my workstation and remembered a handy little thing one can do to reset a pass.</p>
<p>If you have root access, one can simply regenerate the MD5 hash with:</p>
<p><span id="more-1354"></span></p>
<p>	<strong># openssl passwd -1 -salt mysalt</strong><br />
	Password: <br />
	$1$mysalt$JyKGOJR1343sJ7N91hXVI/<br />
	#</p>
<p>
	<strong># ftp localhost</strong><br />
	Connected to localhost (127.0.0.1).<br />
	220 Welcome to the Crazy Town .&nbsp; If you are not an authorized user, please logout now!<br />
	Name (localhost:root): tom<br />
	331 Please specify the password.<br />
	Password:<br />
	230 Login successful.<br />
	Remote system type is UNIX.<br />
	Using binary mode to transfer files.<br />
	ftp&gt; quit<br />
	221 Goodbye.<br />
	<strong>#</strong></p>
<p>
	and replace the existing hash string in proftpd or any other service with what ever is entered as a pass above.&nbsp; This should help to reset your pass.</p>
<p>Cheers!<br />
	TK</p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2012/01/14/linux-resetting-an-md5-hash-for-ssh-or-ftp-login/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LINUX PXE: Installing and Network Booting Windows 7, Linux, Solaris using PXE</title>
		<link>http://www.microdevsys.com/WordPress/2011/09/26/linux-pxe-installing-and-network-booting-windows-7-linux-solaris-using-pxe/</link>
		<comments>http://www.microdevsys.com/WordPress/2011/09/26/linux-pxe-installing-and-network-booting-windows-7-linux-solaris-using-pxe/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 05:07:16 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<category><![CDATA[.msg]]></category>

		<category><![CDATA[Apache]]></category>

		<category><![CDATA[boot]]></category>

		<category><![CDATA[booting]]></category>

		<category><![CDATA[bootp]]></category>

		<category><![CDATA[Configuring]]></category>

		<category><![CDATA[DHCP]]></category>

		<category><![CDATA[dhcpd]]></category>

		<category><![CDATA[Disk]]></category>

		<category><![CDATA[diskless]]></category>

		<category><![CDATA[environment]]></category>

		<category><![CDATA[eth0]]></category>

		<category><![CDATA[eth1]]></category>

		<category><![CDATA[execution]]></category>

		<category><![CDATA[http]]></category>

		<category><![CDATA[httpd]]></category>

		<category><![CDATA[ifcfg]]></category>

		<category><![CDATA[installing]]></category>

		<category><![CDATA[iso]]></category>

		<category><![CDATA[less]]></category>

		<category><![CDATA[mount]]></category>

		<category><![CDATA[Network]]></category>

		<category><![CDATA[nic]]></category>

		<category><![CDATA[pre]]></category>

		<category><![CDATA[pxe]]></category>

		<category><![CDATA[remote]]></category>

		<category><![CDATA[tftp]]></category>

		<category><![CDATA[tftpboot]]></category>

		<category><![CDATA[URL]]></category>

		<category><![CDATA[xinetd]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1352</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2011/09/26/linux-pxe-installing-and-network-booting-windows-7-linux-solaris-using-pxe/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'LINUX PXE: Installing and Network Booting Windows 7, Linux, Solaris using PXE';
digg_bodytext = 'In this post we&#39;ll configure network booting through PXE.&nbsp; PXE stands for Preboot eXecution Environment and has been available for Network Devices (or NIC&#39;s) for some time.&nbsp; Such a network boot setup has many uses in particular in OS...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
In this post we&#39;ll configure network booting through PXE.&#160; PXE stands for Preboot eXecution Environment and has been available for Network Devices (or NIC&#39;s) for some time.&#160; Such a network boot setup has many uses in particular in OS setup and deployment.&#160; In this post I&#39;ll introduce the steps to quickly set one up.&#160; The [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2011/09/26/linux-pxe-installing-and-network-booting-windows-7-linux-solaris-using-pxe/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'LINUX PXE: Installing and Network Booting Windows 7, Linux, Solaris using PXE';
digg_bodytext = 'In this post we&#39;ll configure network booting through PXE.&nbsp; PXE stands for Preboot eXecution Environment and has been available for Network Devices (or NIC&#39;s) for some time.&nbsp; Such a network boot setup has many uses in particular in OS...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>In this post we&#39;ll configure network booting through <strong>PXE</strong>.&nbsp; <strong>PXE</strong> stands for <strong>P</strong>reboot e<strong>X</strong>ecution <strong>E</strong>nvironment and has been available for Network Devices (or NIC&#39;s) for some time.&nbsp; Such a network boot setup has many uses in particular in OS setup and deployment.&nbsp; In this post I&#39;ll introduce the steps to quickly set one up.&nbsp; The only thing required is some patience, persistance and a second NIC (NIC also known as Network or Network Interface Card) card on the second PXE server together with a network cable.&nbsp; Some of the benefits are:</p>
<ol>
<li>The target environment where the OS will be installed does not need any external storage devices such as USB or CD/DVD drives.</li>
<li>There is no CD burning.&nbsp; It is all software based.</li>
<li>Most motherboards and computers support PXE today.</li>
<li>You are not limited to a single file size limit in place on some USB devices.</li>
<li>There&#39;s no OS size restrictions.&nbsp; The amount of data available to the boot software is only limited by the amount of free hard disk space on the PXE server.</li>
</ol>
<p>
	These are just a few advantages that <strong>PXE</strong> has and the cost of setup, as we will see, is only time and a little patience.</p>
<p><span id="more-1352"></span>For this post, I&#39;ll simply list the configuration files in place to be used.&nbsp; I&#39;ll highlight in each the section that can represent the addition of a new entry to the boot menu with a blue color.&nbsp; The highlighted section would represent the steps to take when adding a new OS to boot.&nbsp; All items in <span style="color: rgb(0, 0, 255);"><strong>BLUE</strong></span> below represent the changes that would be needed to add a new OS to the choices after this PXE setup is complete.</p>
<p>Here we also have the option of booting <strong>Windows 7</strong> but that will be left for another topic.</p>
<p><strong>PXE SETUP</strong></p>
<p>	We&#39;ll begin by setting up your Linux workstation as a <strong>PXE</strong> boot server.</p>
<table border="1" cellpadding="1" cellspacing="1" style="width: 100%;" width="100%">
<tbody>
<tr>
<td align="left" valign="top">Check for required packages.</td>
<td>
<p>Run these or install the latest <strong>DHCP</strong>, <strong>XINETD</strong>, <strong>HTTPD</strong> and <strong>TFTP</strong> packages for your environment.&nbsp; Most should already come with your distribution.&nbsp; If not, below are some examples to use:</p>
<p style="margin-left: 40px;"><strong># rpm -qa|grep -i dhcp</strong><br />
					<span style="color: rgb(0, 128, 0);">dhcp-4.1.0p1-13.fc12.i686</span><br />
					<strong># rpm -aq|grep -i tftp</strong><br />
					<span style="color: rgb(0, 128, 0);">tftp-server-0.49-5.fc12.i686<br />
					tftp-0.49-5.fc12.i686</span><br />
					<strong># rpm -aq|grep xinetd<br />
					</strong><span style="color: rgb(0, 128, 0);">xinetd-2.3.14-32.fc13.i686<br />
					</span><strong># rpm -aq|grep httpd</strong><span style="color: rgb(0, 128, 0);"><br />
					httpd-2.2.15-1.fc13.i686<br />
					</span></p>
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td align="left" valign="top">Install a second network card and configure it.</td>
<td>
<p><strong>PXE</strong> will need to connect to your server using ethernet.&nbsp; To that end, you need a <span style="color: rgb(51, 153, 102);">second network card</span> and a <span style="color: rgb(51, 153, 102);">straight through cable</span>.&nbsp; For this step you&#39;ll need to <u><span style="color: rgb(0, 0, 255);">install the second network card</span></u> (Preferrably 100Mbits or higher).&nbsp; The above links also contains instructions on debugging in case you are having problems.&nbsp; In the end, this is what the configuration we will need looks like and what the contents of <strong>ifcfg-eth1</strong> should be before proceeding to the next steps (if you already have <strong>ifcfg-eth1</strong> create <strong>ifcfg-eth2</strong> instead):</p>
<p style="margin-left: 40px;"><strong># ifconfig eth1</strong><br />
					eth1&nbsp; Link encap:Ethernet&nbsp; HWaddr 00:02:E3:17:E1:47&nbsp; <br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:<strong>192.168.1.1</strong>&nbsp; Bcast:192.168.1.255&nbsp; Mask:255.255.255.0<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: fe80::202:e3ff:fe17:e147/64 Scope:Link<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP BROADCAST MULTICAST&nbsp; MTU:1500&nbsp; Metric:1<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX packets:569836 errors:0 dropped:0 overruns:0 frame:0<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX packets:799910 errors:6 dropped:0 overruns:6 carrier:6<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collisions:0 txqueuelen:1000 <br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX bytes:206818639 (197.2 MiB)&nbsp; TX bytes:1090171901 (1.0 GiB)<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interrupt:17 Base address:0&#215;4000</p>
<p style="margin-left: 40px;">
					<strong># cd /etc/sysconfig/network-scripts</strong></p>
<p style="margin-left: 40px;"><strong># cat ifcfg-eth1<br />
					</strong># National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller<br />
					DEVICE=eth1<br />
					ONBOOT=yes<br />
					BOOTPROTO=none<br />
					IPADDR=192.168.1.1<br />
					NETMASK=255.255.255.0<br />
					HWADDR=00:02:E3:17:E1:47<br />
					NM_CONTROLLED=no<br />
					USERCTL=no<br />
					IPV6INIT=yes<br />
					TYPE=Ethernet<br />
					DNS1=192.168.0.1<br />
					<strong><br />
					</strong></p>
<p><strong>NOTE: It is assumed here that eth0 is your primary NIC you already have working and can browse the web with.&nbsp; This tends to be handy.</strong></p>
</td>
</tr>
<tr>
<td align="left" valign="top">Setup DHCP on the second NIC.</td>
<td>
<p>Below is the configuration we are going to use so the DHCP server can assign IP addresses to new machines that we will connect:</p>
<p style="margin-left: 40px;"><strong># cat /etc/dhcp/dhcpd.conf</strong><br />
					#<br />
					# DHCP Server Configuration file.<br />
					#&nbsp;&nbsp; see /usr/share/doc/dhcp*/dhcpd.conf.sample<br />
					#&nbsp;&nbsp; see &#39;man 5 dhcpd.conf&#39;<br />
					#<br />
					ddns-update-style interim;<br />
					ignore client-updates;<br />
					subnet 192.168.1.0 netmask 255.255.255.0 {</p>
<p>					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Set the default gateway / netmask / broadcast to be used by the PC clients<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option routers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.1.1;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option broadcast-address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.1.255;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option subnet-mask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255.255.255.0;</p>
<p>					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default-lease-time 43200;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max-lease-time 86400;</p>
<p>					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow booting;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow bootp;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default-lease-time 21600;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max-lease-time 43200;</p>
<p>					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; group {<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next-server 192.168.1.1;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This is the pxe bootloader file<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename &quot;pxelinux.0&quot;;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # One host block per client. This network only has one.<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host stb1 {<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # filename &quot;\\Boot\\WINSystem&quot;;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host stb2 {<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hardware ethernet 90:e6:ba:c6:7d:35;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fixed-address 192.168.1.2;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename &quot;FCSystem&quot;;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option root-path &quot;/tftpboot&quot;;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
					<span style="color: rgb(0, 0, 255);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host stb3 {<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hardware ethernet 00:0c:6e:53:9f:a6;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fixed-address 192.168.1.2;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename &quot;FCSystem&quot;;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option root-path &quot;/tftpboot&quot;;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p>					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host stb4 {<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hardware ethernet 1c:6f:65:3f:fc:14;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fixed-address 192.168.1.2;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename &quot;FCSystem&quot;;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; option root-path &quot;/tftpboot&quot;;<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>					}<br />
					&nbsp;</p>
<p>Issue:</p>
<p style="margin-left: 40px;"><strong># service dhcpd restart<br />
					</strong></p>
<p>There are a few important sections in each area:</p>
<ol>
<li>The <strong>hardware ethernet</strong> address, is the MAC address of the remote machine that we will connect to this server.&nbsp; You will need this from the remote server you are configuring.&nbsp; If unclear on how to obtain this, it could be retrieved either from the first boot attempt: the MAC may show up on the <strong>PXE</strong> server <strong>/var/log/messages</strong> file on first attempt, or from the boot up screens of the remote machine.<br />
						&nbsp;</li>
<li><strong>fixed-address:</strong> The address that will be assigned to the remote machine when it attempts to connect.<br />
						&nbsp;</li>
<li><strong>FCSystem</strong> is, in essence, the base boot system that will be loaded over the network.&nbsp; It is the kick start boot file chain link that will allow booting everything else.&nbsp; This file can be copied from the following files on your system.&nbsp; It can be renamed to whatever you like:
<p>						<strong># ll /usr/share/syslinux/pxelinux.0</strong><br />
						5965619 -rw-r&#8211;r&#8211; 1 root root 16466 Jan 12&nbsp; 2010 /usr/share/syslinux/pxelinux.0<br />
						<strong># ll /usr/share/syslinux/gpxelinux.0</strong><br />
						5966129 -rw-r&#8211;r&#8211; 1 root root 75564 Jan 12&nbsp; 2010 /usr/share/syslinux/gpxelinux.0<br />
						#</p>
<p>						The <strong>gpfxlinux.0</strong> is the open source <strong>gPXE</strong> boot loader and what we used here.&nbsp; I simply copied it as and to <strong>/tftpboot/FCsystem</strong>.<br />
						&nbsp;</li>
<li>The <strong>/tftpboot</strong> folder is where all the boot files reside in and where the boot environment will kick things off of.&nbsp; It can be any path of your naming choice but per convention, <strong>/tftpboot</strong> is used.</li>
</ol>
<p>&nbsp;</p>
<p>Ensure <strong>allow bootp</strong> and <strong>allow booting</strong> is also defined as per above.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">The <strong>/tftpboot</strong> menu files.&nbsp;</td>
<td>
<p>Below is a sample of how I setup mine on my own system:</p>
<p style="margin-left: 40px;"><strong># cat /tftpboot/fcboot.msg</strong> <strong><span style="color: rgb(0, 128, 0);">(Optional)</span></strong></p>
<p>
					▒splash.lss<br />
					&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
					&nbsp;-&nbsp; To install/upgrade F14(64) type 0f&#39;f14-64&#39;07.<br />
					<span style="color: rgb(0, 0, 255);">&nbsp;-&nbsp; To install/upgrade Scientific Linux (64) type 0f&#39;s6.1-64&#39;07.</span><br />
					&nbsp;-&nbsp; To install/upgrade Ubuntu 11.04 (64) type 0f&#39;u11.04-64&#39;07.<br />
					&nbsp;-&nbsp; To install/upgrade Ubuntu 10.04 (i386) type 0f&#39;u10.04-i386&#39;07.<br />
					&nbsp;-&nbsp; To install/upgrade Solaris 10 type 0f&#39;s10&#39;07.<br />
					&nbsp;-&nbsp; To install/upgrade Windows 7 type 0f&#39;w7&#39;07. <br />
					&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
					&nbsp;-&nbsp; You may add additional options such as 0f&#39;askmethod&#39;07 or <br />
					&nbsp;&nbsp;&nbsp; 0f&#39;text&#39;07 or 0f&#39;rescue&#39;07 or 0f&#39;dd&#39;07.&nbsp; For example<br />
					&nbsp;&nbsp;&nbsp; 0f&#39;f11 dd xfs text askmethod&#39;07.<br />
					&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
					02/F1-Main/F2-HTTP/F3-Final/F4-Lending/F5-Work 1/F6-Work 2/F7-Friend/07</p>
<p style="margin-left: 40px;">
					<strong># cat /tftpboot/pxelinux.cfg/default </strong><br />
					# prompt 1<br />
					default vesamenu.c32<br />
					timeout 600<br />
					# display fcboot.msg</p>
<p>					menu background splash.jpg<br />
					menu title PXE Network Installation Menu (F1 for Help &amp; Details)<br />
					menu color border 0 #ffffffff #00000000<br />
					menu color sel 7 #ffffffff #ff000000<br />
					menu color title 0 #ffffffff #00000000<br />
					menu color tabmsg 0 #ffffffff #00000000<br />
					menu color unsel 0 #ffffffff #00000000<br />
					menu color hotsel 0 #ff000000 #ffffffff<br />
					menu color hotkey 7 #ffffffff #ff000000<br />
					menu color scrollbar 0 #ffffffff #00000000</p>
<p>					F1 vesamenu.c32<br />
					F2 fcboot.msg<br />
					F3 http.msg<br />
					F4 final.msg<br />
					F5 lending.msg<br />
					F6 work-1.msg<br />
					F7 work-2.msg<br />
					F8 friend.msg</p>
<p>					label memtest<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu label Fedora 14 (64) System Memory Test<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel f14-64/isolinux/memtest</p>
<p>					<span style="color: rgb(0, 0, 255);">label s6.1-64<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu label Scientific Linux (RHEL) 6.1 (64)<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel s6.1-64/isolinux/vmlinuz<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append initrd=s6.1-64/isolinux/initrd.img<br />
					</span><br />
					label f14-64<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu label Fedora 14 (64) (Standard)<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel f14-64/isolinux/vmlinuz<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append initrd=f14-64/isolinux/initrd.img</p>
<p>					label u10.04-i386<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu label Ubuntu 10.04 (i386)<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel u10.04-i386/casper/vmlinuz<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append initrd=u10.04-i386/casper/initrd.lz</p>
<p>					label u11.04-64<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu label Ubuntu 11.04 (64)<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel u11.04-64/casper/vmlinuz<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append initrd=u11.04-64/casper/initrd.lz</p>
<p>					LABEL w7<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MENU LABEL Windows 7 (Beta / Pre release)<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KERNEL Boot/startrom.0<br />
					&nbsp;</p>
<p>Explanation for a few things is in order:</p>
<ol>
<li>These files define the boot menu that will be seen on the remote server.&nbsp; here we will use the <strong>vesamenu.c32</strong>, which is a more GUI oriented rather then text oriented.&nbsp; Just looks better.&nbsp; :)&nbsp; The alternative, currently commented, is the <strong>fcboot.msg</strong> file if a text menu is preferred.</li>
<li>The paths are relative to the <strong>/tftpboot</strong> folder.<br />
						&nbsp;</li>
</ol>
<p>				The boot menu, when loaded, will look like this:</p>
<p>				&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">The <strong>HTTPD</strong> server <strong>httpd.conf</strong> file.&nbsp;</td>
<td>
<p>The httpd.conf file should contain the locations the installation can retrieve the entire ISO image installation files once selections have been made:</p>
<p style="margin-left: 40px;"><strong># cat /etc/httpd/conf/httpd.conf|tail -n50 </strong></p>
<p>					.<br />
					.<br />
					.<br />
					.</p>
<p>					&lt;Directory /tftpboot/RHEL4-22B&gt;<br />
					&nbsp;&nbsp; Options Indexes<br />
					&nbsp;&nbsp; AllowOverride None<br />
					&lt;/Directory&gt;<br />
					Alias /rhel4-22b /tftpboot/RHEL4-22B</p>
<p>					&lt;Directory /tftpboot/f14-64&gt;<br />
					&nbsp;&nbsp; Options Indexes<br />
					&nbsp;&nbsp; AllowOverride None<br />
					&lt;/Directory&gt;<br />
					Alias /f14-64 /tftpboot/f14-64</p>
<p>					<span style="color: rgb(0, 0, 255);">&lt;Directory /tftpboot/s6.1-64&gt;<br />
					&nbsp;&nbsp; Options Indexes<br />
					&nbsp;&nbsp; AllowOverride None<br />
					&lt;/Directory&gt;<br />
					Alias /s6.1-64 /tftpboot/s6.1-64</span></p>
<p>					&lt;Directory /tftpboot/u11.04-64&gt;<br />
					&nbsp;&nbsp; Options Indexes<br />
					&nbsp;&nbsp; AllowOverride None<br />
					&lt;/Directory&gt;<br />
					Alias /u11.04-64 /tftpboot/u11.04-64</p>
<p>					&lt;Directory /tftpboot/u10.04-i386&gt;<br />
					&nbsp;&nbsp; Options Indexes<br />
					&nbsp;&nbsp; AllowOverride None<br />
					&lt;/Directory&gt;<br />
					Alias /u10.04-i386 /tftpboot/u10.04-i386</p>
<p>In order for the above new definitions to take effect, you&#39;ll need to restart the Apache HTTPD daemon:</p>
<p style="margin-left: 40px;"><strong># service httpd restart<br />
					</strong></p>
<p>Then test by typing the links below into a browser:</p>
<ol>
<li><strong>http://192.168.1.1/s6.1-64/</strong><br />
						OR</li>
<li><strong>http://192.168.0.1/s6.1-64/
<p>						</strong></li>
</ol>
<p>Either link should produce a list of files for the distribution.&nbsp; (You&#39;ll need to mount the ISO if nothing shows up.&nbsp; See further down for this.&nbsp; The below links even worked for me so would be a good test for your installation if everything is wroking correctly.)<br />
					&nbsp;</p>
<table>
<tbody>
<tr>
<td valign="top"><img alt="[DIR]" src="http://192.168.1.1/icons/back.gif" /></td>
<td><a href="http://192.168.1.1/" rel="nofollow">Parent Directory</a></td>
<td>&nbsp;</td>
<td align="right">-</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[DIR]" src="http://192.168.1.1/icons/folder.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/EFI/" rel="nofollow">EFI/</a></td>
<td align="right">27-Jul-2011 16:52</td>
<td align="right">-</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[TXT]" src="http://192.168.1.1/icons/text.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/GPL" rel="nofollow">GPL</a></td>
<td align="right">27-Jul-2011 16:53</td>
<td align="right">18K</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[DIR]" src="http://192.168.1.1/icons/folder.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/Packages/" rel="nofollow">Packages/</a></td>
<td align="right">27-Jul-2011 16:31</td>
<td align="right">-</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[   ]" src="http://192.168.1.1/icons/unknown.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/RPM-GPG-KEY-sl" rel="nofollow">RPM-GPG-KEY-sl</a></td>
<td align="right">27-Jul-2011 16:53</td>
<td align="right">1.8K</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[   ]" src="http://192.168.1.1/icons/unknown.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/RPM-GPG-KEY-sl3" rel="nofollow">RPM-GPG-KEY-sl3</a></td>
<td align="right">27-Jul-2011 16:53</td>
<td align="right">1.9K</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[   ]" src="http://192.168.1.1/icons/unknown.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/RPM-GPG-KEY-sl4" rel="nofollow">RPM-GPG-KEY-sl4</a></td>
<td align="right">27-Jul-2011 16:53</td>
<td align="right">1.9K</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[   ]" src="http://192.168.1.1/icons/unknown.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/RPM-GPG-KEY-sl5" rel="nofollow">RPM-GPG-KEY-sl5</a></td>
<td align="right">27-Jul-2011 16:53</td>
<td align="right">1.9K</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[   ]" src="http://192.168.1.1/icons/unknown.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/RPM-GPG-KEY-sl6" rel="nofollow">RPM-GPG-KEY-sl6</a></td>
<td align="right">27-Jul-2011 16:53</td>
<td align="right">1.9K</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[   ]" src="http://192.168.1.1/icons/unknown.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/TRANS.TBL" rel="nofollow">TRANS.TBL</a></td>
<td align="right">27-Jul-2011 17:00</td>
<td align="right">2.8K</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[DIR]" src="http://192.168.1.1/icons/folder.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/images/" rel="nofollow">images/</a></td>
<td align="right">27-Jul-2011 16:53</td>
<td align="right">-</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[DIR]" src="http://192.168.1.1/icons/folder.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/isolinux/" rel="nofollow">isolinux/</a></td>
<td align="right">27-Jul-2011 16:52</td>
<td align="right">-</td>
<td>&nbsp;</td>
</tr>
<tr>
<td valign="top"><img alt="[DIR]" src="http://192.168.1.1/icons/folder.gif" /></td>
<td><a href="http://192.168.1.1/s6.1-64/repodata/" rel="nofollow">repodata/</a></td>
<td align="right">27-Jul-2011 16:34</td>
<td align="right">-</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>Check the /var/log/httpd/ folder and files for any error messages if it is not working for you.&nbsp; Potentially, the firewall, if you have one, may be blocking content.&nbsp; Adjust it accordingly.&nbsp; You may also need to define which ports and interfaces the Apache HTTPD server listens on:</p>
<p>					Change /etc/httpd/conf/httpd.conf</p>
<p><strong>FROM<br />
					</strong></p>
<p style="margin-left: 40px;">Listen 80</p>
<p><strong>TO<br />
					</strong></p>
<p style="margin-left: 40px;">Listen 80<br />
					Listen 192.168.1.1:80</p>
<p>By default, <strong>httpd</strong> may already listen on all interfaces defined.</p>
</td>
</tr>
<tr>
<td align="left" valign="top">Check the <strong>/etc/xinetd.d/tftp</strong> config file.&nbsp;</td>
<td>
<p>Ensure that your <strong>tftp xinetd</strong> file is setup correctly.&nbsp; By default, it should already be defined as per below or similar so no changes should be necessary.&nbsp; Below is a sample configuration that worked with the setup in this post.&nbsp; Adjust accordingly to your tastes:</p>
<p style="margin-left: 40px;"><strong># cat /etc/xinetd.d/tftp</strong><br />
					# default: off<br />
					# description: The tftp server serves files using the trivial file transfer \<br />
					#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocol.&nbsp; The tftp protocol is often used to boot diskless \<br />
					#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workstations, download configuration files to network-aware printers, \<br />
					#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and to start the installation process for some operating systems.<br />
					service tftp<br />
					{<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; disable = no<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; socket_type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = dgram<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = udp<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wait&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = yes<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = root<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = /usr/sbin/in.tftpd<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; server_args&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = -s /tftpboot -vvvvvvvv &#8211;verbosity 10 -m /etc/tftpd.map<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per_source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 11<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cps&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 100 2<br />
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = IPv4<br />
					}</p>
<p>To ensure the file is taken into effect, issue:</p>
<p style="margin-left: 40px;"><strong># service xinetd restart<br />
					</strong></p>
<p>Pay close attention to the output messages to ensure everything has restarted and is working correctly.</p>
</td>
</tr>
<tr>
<td>Download and mount the ISO&#39;s you defined menu options for above.</td>
<td>
<p>For this step, I created a short script to mount my ISO&#39;s from various sources.&nbsp; I mounted them all under the /tftpboot but stored the ISO&#39;s elsewhere on the system:</p>
<p style="margin-left: 40px;"><strong># cat /tftpboot/mount.ksh</strong><br />
					#!/bin/ksh</p>
<p style="margin-left: 40px;">mount -o loop /Files/Ubuntu/ubuntu-11.04-desktop-amd64.iso <strong>/tftpboot/u11.04-64/</strong><br />
					mount -o loop /home/Files/u10.04.i386/ubuntu-10.04-desktop-i386.iso <strong>/tftpboot/u10.04-i386</strong><br />
					mount -o loop /home/Files/F14-64/Fedora-14-x86_64-DVD.iso <strong>/tftpboot/f14-64/</strong><br />
					<span style="color: rgb(0, 0, 255);">mount -o loop /home/Files/S6.1/SL-61-x86_64-2011-07-27-Install-DVD.iso <strong>/tftpboot/s6.1-64</strong></span></p>
<p>You&#39;ll need to create each of the mount points (<strong>BOLD BLACK</strong>) to each of the downloaded ISO&#39;s (<span style="color: rgb(0, 128, 0);"><strong>BOLD GREEN</strong></span>) you would like to use.&nbsp; All are mounted using the loopback device (-o loop).</p>
</td>
</tr>
<tr>
<td align="left" valign="top">Add <strong>.msg</strong> files to make for a user friendly informative menu. <span style="color: rgb(255, 140, 0);"><strong>(Optional)</strong></span></td>
<td>
<p>Below is a sample of a .msg file,<strong> /tftpboot/http.msg</strong>.&nbsp; The ^ NNN characters are special codes that highlight.&nbsp; They can be generated by pressing the CTRL (see below):</p>
<p style="margin-left: 40px;">^L<br />
					Once you start the installation, you can choose ^O0f&#39;HTTP&#39;^O07 as the install method. <br />
					Doing so the installation will prompt you for network parameters.&nbsp; Use the <br />
					following:</p>
<p style="margin-left: 40px;">^O0fIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 192.168.1.2^O07<br />
					^O0fMASK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 255.255.255.0^O07<br />
					^O0fGATEWAY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 192.168.1.1^O07<br />
					^O0fFIRST DNS&nbsp;&nbsp;&nbsp;&nbsp; : 192.168.1.1^O07</p>
<p style="margin-left: 40px;">Following this, the system will ask you for the location of the files.&nbsp; Use the <br />
					following:<br />
					^O0fHOST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 192.168.1.2^O07<br />
					^O0fLOCATION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : /&lt;FOLDER&gt;^O07</p>
<p style="margin-left: 40px;">where</p>
<p style="margin-left: 40px;">^O0f&lt;FOLDER&gt;^O07 is the same option that you selected on the opening screen such as <br />
					^O0f&#39;fc4&#39;^O07 or ^O0f&#39;rhel4-22&#39;^O07<br />
					&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
					^O02/F1-Main/F2-HTTP/F3-Final/F4-Lending/F5-Work 1/F6-Work 2/F7-Friend/^O07</p>
<p><strong>CUSTOMIZING THE .MSG FILES</strong></p>
<p>					There are a couple of characters in the <strong>.msg</strong> files you may be interested in (Press and hold all three down together or press O while holding ctrl-v down):</p>
<p style="margin-left: 40px;"><strong>CTRL-V-O<br />
					CTRL-V-L<br />
					</strong></p>
<p>The ctrl-v-o is followed by &#39;07&#39; or &#39;0f&#39; etc.&nbsp; In fcboot.msg, to display the splash.lss file, use:</p>
<p style="margin-left: 40px;">^L<br />
					^Xsplash.lss<br />
					(The rest of the message here)<br />
					.<br />
					.</p>
<p>This will create a customized boot menu for you with an image.</p>
</td>
</tr>
<tr>
<td>On the remote machine, enable <strong>PXE</strong> boot in the boot menu.</td>
<td>Visit your <strong>PC</strong> or <strong>Motherboard</strong> manual to enable <strong>PXE</strong> or pre boot execution on the machine.&nbsp;</td>
</tr>
<tr>
<td>Connect and test.</td>
<td>Ensure your new <strong>PC/Server</strong> is connected on it&#39;s primary <strong>NIC</strong> to the secondary <strong>NIC</strong> on your newly configured <strong>PXE</strong> server.</p>
<p>				When given a choice where to obtain installation files from, select HTTP then use one of the HTTP URL&#39;s you defined above, and tested with, in the <strong>httpd.conf</strong> part of the configuration.</td>
</tr>
</tbody>
</table>
<p>Inevitably, there is always problems with initial setup or any setup.&nbsp; The next page deals with some things you may encounter and their solutions. (<span style="color: rgb(255, 0, 0);"><strong>Work In Progress</strong></span>)</p>
<p>Cheers!<br />
	TK</p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2011/09/26/linux-pxe-installing-and-network-booting-windows-7-linux-solaris-using-pxe/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux Administration: Resetting the root password when forgotten.</title>
		<link>http://www.microdevsys.com/WordPress/2011/09/25/linux-administration-resetting-the-root-password-when-forgotten/</link>
		<comments>http://www.microdevsys.com/WordPress/2011/09/25/linux-administration-resetting-the-root-password-when-forgotten/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 03:54:22 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1342</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2011/09/25/linux-administration-resetting-the-root-password-when-forgotten/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux Administration: Resetting the root password when forgotten.';
digg_bodytext = 'So you&#39;ve lost the password to the root account.&nbsp; Worst, you&#39;ve had a boot password and it was the same.&nbsp; Here are some instructions on how to get back into your system:	Create a user on another Unix / Linux operating system.# useradd...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
So you&#39;ve lost the password to the root account.&#160; Worst, you&#39;ve had a boot password and it was the same.&#160; Here are some instructions on how to get back into your system:
	Create a user on another Unix / Linux operating system.
# useradd resetrootpass
	
then set the password on the new user:
# passwd resetrootpass
	

	once password is set, [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2011/09/25/linux-administration-resetting-the-root-password-when-forgotten/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux Administration: Resetting the root password when forgotten.';
digg_bodytext = 'So you&#39;ve lost the password to the root account.&nbsp; Worst, you&#39;ve had a boot password and it was the same.&nbsp; Here are some instructions on how to get back into your system:	Create a user on another Unix / Linux operating system.# useradd...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>So you&#39;ve lost the password to the root account.&nbsp; Worst, you&#39;ve had a boot password and it was the same.&nbsp; Here are some instructions on how to get back into your system:</p>
<p>	<span id="more-1342"></span>Create a user on another Unix / Linux operating system.</p>
<p style="margin-left: 40px;"><strong># useradd resetrootpass<br />
	</strong></p>
<p>then set the password on the new user:</p>
<p style="margin-left: 40px;"><strong># passwd resetrootpass<br />
	</strong></p>
<p>
	once password is set, edit the <strong>/etc/shadow</strong> file and copy the encrypted password text:</p>
<p style="margin-left: 40px;"><strong># cat /etc/shadow</strong><br />
	resetrootpass:<strong>$1$4K5.hqbH$lKPzvk8qbmBaK9TJi0p0</strong>:11675:101:88888:3:::</p>
<p>to the <strong>/etc/shadow</strong> root&#39;s password field on your OS where you&#39;ve forgotten your password too (You may need to use a boot CD like a Linux Live CD to mount the system with then mount the partition to get access to the <strong>/etc/</strong> folder).</p>
<p>Once you replace the root&#39;s encrypted string with the new one you created above for an arbitrary user, you should be able to boot and login with the new password.</p>
<p>Cheers!<br />
	TK</p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2011/09/25/linux-administration-resetting-the-root-password-when-forgotten/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux LVM: Resizing partitions.</title>
		<link>http://www.microdevsys.com/WordPress/2011/09/25/linux-lvm-resizing-partitions/</link>
		<comments>http://www.microdevsys.com/WordPress/2011/09/25/linux-lvm-resizing-partitions/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 02:18:48 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<category><![CDATA[fdisk]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[logical volumes]]></category>

		<category><![CDATA[lvcreate]]></category>

		<category><![CDATA[lvdisplay]]></category>

		<category><![CDATA[lvextend]]></category>

		<category><![CDATA[lvm]]></category>

		<category><![CDATA[lvremove]]></category>

		<category><![CDATA[lvresize]]></category>

		<category><![CDATA[mkpart]]></category>

		<category><![CDATA[mkswap]]></category>

		<category><![CDATA[mount]]></category>

		<category><![CDATA[parted]]></category>

		<category><![CDATA[primary]]></category>

		<category><![CDATA[pvcreate]]></category>

		<category><![CDATA[pvdisplay]]></category>

		<category><![CDATA[pvmove]]></category>

		<category><![CDATA[pvremove]]></category>

		<category><![CDATA[pvresize]]></category>

		<category><![CDATA[pvs]]></category>

		<category><![CDATA[resize2fs]]></category>

		<category><![CDATA[scp]]></category>

		<category><![CDATA[tags]]></category>

		<category><![CDATA[vgchange]]></category>

		<category><![CDATA[vgcreate]]></category>

		<category><![CDATA[vgreduce]]></category>

		<category><![CDATA[vgremove]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1349</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2011/09/25/linux-lvm-resizing-partitions/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux LVM: Resizing partitions.';
digg_bodytext = 'This post is designed as a blind test, meaning its sole purpose is for testing and learning LVM functionality.&nbsp; In this process we will work with an existing LVM that contains live data to grow, shrink and move it&#39;s contents around.&nbsp; Before...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
This post is designed as a blind test, meaning its sole purpose is for testing and learning LVM functionality.&#160; In this process we will work with an existing LVM that contains live data to grow, shrink and move it&#39;s contents around.&#160; Before we do anything, a disclaimer is in order:
	DISCLAIMER: Aside from the disclaimer already [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2011/09/25/linux-lvm-resizing-partitions/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux LVM: Resizing partitions.';
digg_bodytext = 'This post is designed as a blind test, meaning its sole purpose is for testing and learning LVM functionality.&nbsp; In this process we will work with an existing LVM that contains live data to grow, shrink and move it&#39;s contents around.&nbsp; Before...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>This post is designed as a blind test, meaning its sole purpose is for testing and learning LVM functionality.&nbsp; In this process we will work with an existing LVM that contains live data to grow, shrink and move it&#39;s contents around.&nbsp; Before we do anything, a disclaimer is in order:</p>
<p>	<span style="color: rgb(255, 0, 0);"><strong>DISCLAIMER:</strong></span> <strong>Aside from the disclaimer already present on the site at the bottom, I do not recommend you to follow these instructions.&nbsp; The exception exists where you wish to learn and test functionality on non PRODUCTION environments (ie meaning DEVELOPMENT or QUALITY ACCEPTANCE testing environments).&nbsp; Using these steps puts you at risk of loosing your data.&nbsp; BACKUP YOUR DATA BEFORE PROCEEDING.&nbsp; By reading the below and following any steps, you are agreeing to undertake any and all risks associated with the resulting consequences of following the steps on this site and post below.</strong></p>
<p>	Having said that, let&#39;s begin.&nbsp; First, we&#39;ll begin by getting some information and marking our LVM for change.&nbsp; The goal here is to eventually resize this partition that spans the entire 1.5TB to something much smaller (around 200GB) that we can copy to a smaller part of the hard drive to free space for a new installation and VG.&nbsp; <strong><span style="color: rgb(0, 128, 0);">NOTE:</span></strong> Only one hard drive will be used here to do this with:</p>
<p>	<span id="more-1349"></span></p>
<p>Before we begin, please note the version of LVM we are using here:</p>
<p>	&nbsp; LVM version:&nbsp;&nbsp;&nbsp;&nbsp; 2.02.83(2)-RHEL6 (2011-03-18)<br />
	&nbsp; Library version: 1.02.62-RHEL6 (2011-03-18)<br />
	&nbsp; Driver version:&nbsp; 4.20.6</p>
<p>The main goal, is to resize and shape our LVM to make room for another installation.&nbsp; The images below illustrate the goals for this post.&nbsp; The final image represents the setup, including a resized copy (backup) of the original <strong>VG VolGroup </strong>called <strong>VG VGEntertain</strong> sitting on <strong>/dev/sda3</strong> at the end of the partition:</p>
<p><img alt="LVM resizing.jpg" src="http://www.microdevsys.com/WordPressImages/LVM Resizing.jpg" /></p>
<p>If your version differs, these steps may not work the same way for you.&nbsp; The steps:</p>
<ol>
<li><strong>fdisk -l </strong>(Just root partitions should be listed)</li>
<li><strong>lvm vgchange -a y</strong></li>
<li><strong>fdisk -l</strong> (You should see the volume groups listed now.)</li>
<li>Run <strong>ll /dev/VolGroup/</strong> to locate and identify your partitions. &nbsp;Note the one you want to resize based on the fdisk and ll output above.</li>
<li>To check the partition, you may want to mount it first using these steps:<br />
		<strong>su<br />
		lvm vgchange -a y<br />
		lvm lvdisplay<br />
		mkdir /mnt/root<br />
		mount /dev/VolGroup/lv_root /mnt/root<br />
		</strong><br />
		This is good for any data recovery etc.</li>
<li>In this case I used it to verify that this is an <strong>ext4</strong> partition from the <strong>/mnt/root/etc/fstab</strong> file.</li>
<li>After verifying the usage on the partition from last boot to it, I ran
<p>		<strong>resize2fs -p /dev/VolGroup/lv_root 32G</strong></p>
<p>		from 500GB. &nbsp;This partition was only 3% full anyway and I needed the extra space. &nbsp;This step may take a while.</li>
<li>Next type:
<p>		<strong>lvm lvresize /dev/VolGroup/lv_root &#8211;size 32G</strong></p>
<p>		This step should be quick but will give you a warning message before you resize.<br />
		&nbsp;</li>
<li>Run and record the output of <strong>lvm pvs</strong> and <strong>lvm lvs</strong>. &nbsp;I booted with <a href="http://www.microdevsys.com/WordPress/2011/09/26/linux-pxe-installing-and-network-booting-windows-7-linux-solaris-using-pxe/"><strong><span style="color: rgb(0, 0, 205);">PXE</span></strong></a> so could scp the files to the server using <strong>scp lvm.pvs.lvs.txt 192.168.0.1:/home/Files/HTPC</strong> or equivalent for you.<br />
		&nbsp;</li>
<li>At this point we need to manually &#39;defragment&#39; by moving the other partitions next to each other in the volume group. &nbsp;We&#39;ll start with the swap. &nbsp;We&#39;ll delete it then recreate it.<br />
		&nbsp;</li>
<li>I&#39;ll recreate the swap in this manner to move it to the beginning right next to the root partition:<br />
		<strong>lvm lvremove /dev/VolGroup/lv_swap<br />
		lvm lvcreate &#8211;size 4G &#8211;name lv_swap VolGroup<br />
		mkswap /dev/VolGroup/lv_swap</p>
<p>		</strong></li>
<li>There is another volume in my volume group LogVol02 where /home resides. &nbsp;I&#39;ve got some files in there. &nbsp;It&#39;s 1TB and has about 100G of files on it. &nbsp;I&#39;ll extend this volume then shrink it down to a smaller size which should line it up with the above resized volumes. &nbsp;The steps are in reverse, somewhat, of the shrinking steps:<br />
		<strong>lvm lvextend -L+500G /dev/VolGroup/LogVol02</p>
<p>		</strong></li>
<li>This however, gave me an error saying I don&#39;t have that much space to extend by. &nbsp;So I have to use a smaller number.<br />
		Insufficient free space: 128000 extents needed, but only 116792 available.<br />
		&nbsp;</li>
<li>This message is telling us exactly how much we can extend it with:<br />
		500G/128000 * 116792=456.21875=NewSize<br />
		&nbsp;</li>
<li>I rerun the command like this:<strong><br />
		lvm lvextend -L+456218M /dev/VolGroup/LogVol02</p>
<p>		</strong>Rounding up size to full physical extent 445.53GiB<br />
		Extending logical volume LogVol02 to 1.32 TiB<br />
		Logical volume LogVol02 successfully resized</p>
<p>		&nbsp;</li>
<li>Now we need to extend the filesystem in this LV (You can get the actual size of this volume from <strong>fdisk -l</strong>):
<p>		<strong>resize2fs -p /dev/VolGroup/LogVol02 1450G</p>
<p>		</strong>But I got:<strong></p>
<p>		The containing partition (or device) is only 353992704 (4k) blocks.<br />
		You requested a new size of 380108800 blocks.<br />
		</strong><br />
		Doing the math 353992704 * 4096 = 1449.95. &nbsp;Dividing this 3 times by 1024 yields 1350.375G (or 1382784M). &nbsp;I&#39;ll use <strong>M</strong> instead with this number. &nbsp;But it wanted me to run <strong>e2fsck</strong> on it first.</li>
<li>Resized the LV using:<br />
		<strong><br />
		resize2fs -p /dev/VolGroup/LogVol02 1382784M</p>
<p>		</strong>This step is fairly quick but the next one isn&#39;t.<br />
		&nbsp;</li>
<li>Now resize the file system back down before we also resize the LV down to 500G. &nbsp;(I have about 115GB of storage there anyway. &nbsp;This should give us about 1TB to work with):
<p>		<strong>resize2fs -p /dev/VolGroup/LogVol02 500G</strong></p>
<p>		This may take a while.<br />
		&nbsp;</li>
<li>Next resize the LV to 500G:
<p>		<strong>lvm lvresize /dev/VolGroup/LogVol02 &#8211;size 500G</strong></p>
<p>		Now all your volumes should be resized and lined up. &nbsp;We should be able to resize the VG down to 538G now. &nbsp;You can mount the<strong> /dev/VolGroup/LogVol02</strong> on <strong>/mnt/mr</strong> or another folder of your choosing then issuing <strong>df -h</strong> to check the size.<br />
		&nbsp;</li>
<li>Now I run:
<p>		<strong>lvm pvresize /dev/sda2 &#8211;setphysicalvolumesize 500G</strong> (Really should be 538G)</p>
<p>		This tells me:</p>
<p>		<strong>/dev/sda2: cannot resize to 127999 extents as 137216 are allocated.<br />
		0 physical volmes(s) resized / 1 physical volume(s) not resized</strong></p>
<p>		This calculated for me the numbers that I will need. &nbsp;However, I still couldn&#39;t extend even with sizes of 700G which told me that my attempt to grow then shrink didn&#39;t work as planned. &nbsp;My LogVol02 was now sitting in between two free areas only only shrunk around it&#39;s center so to speak.<br />
		&nbsp;</li>
<li>We can see the above locations by issuing:
<p>		<strong>lvm pvdisplay &#8211;maps</strong></p>
<p>		which shows:</p>
<p>		&#8211; Physical Segments &#8211;<br />
		Physical extent 0 to 8191<br />
		Logical volume &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/dev/VolGroup/lv_root<br />
		Logical extents &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 to 8191</p>
<p>		Physical extent 8192 to 9215<br />
		Logical volume &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/dev/VolGroup/lv_swap<br />
		Logical extents &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 to 1023</p>
<p>		Physical extent 9216 to 126007<br />
		<strong><span style="color: rgb(255, 0, 0);">FREE</p>
<p>		</span></strong><span style="">Physical extent 126008 to 254007:<br />
		Logical volume &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/dev/VolGroup/LogVol02<br />
		Logical extents &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0 to 127999</p>
<p>		Physical extent 254008 to 357648:<br />
		<span style="color: rgb(255, 0, 0);"><strong>FREE</strong></span></p>
<p>		So my outermost extent is 254008.</p>
<p>		</span></li>
<li>So what I&#39;ll do is shrink the LogVol02 down to a smaller size (Mounting and checking with <strong>df -h</strong> showed only 119G usage on it) instead of 500G so it is easier to move, shrink the PV to what ever the last used extent was, create another PV group in the now free space on the disk, move the LogVol02 LV to the new PV, remove the old PV and recreate it, then move the old LV back and remove the new PV created earlier in this step. &nbsp;All this should line things up. &nbsp;So here we go:
<p>		<strong>resize2fs -p /dev/VolGroup/LogVol02 150G &nbsp;(fsck if it asks you too)<br />
		<span class="Apple-style-span" style="font-weight: normal;"><strong>lvm lvresize /dev/VolGroup/LogVol02 &#8211;size 150G<br />
		</strong></span></strong><span class="Apple-style-span" style="font-weight: normal;">Check usage and space (Was at 85% after above):</span><strong><span class="Apple-style-span" style="font-weight: normal;"><strong> mount /dev/VolGroup/LogVol02 /mnt/mr; cd mr; df -h; &nbsp;<br />
		<span class="Apple-style-span" style="font-weight: normal;"><strong>lvm pvdisplay &#8211;maps &nbsp;</strong></span></strong></span></strong><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-weight: normal;">(Last FREE starts at 164408 instead of 254008, which is good) &nbsp;LV LogVol2 is now 0 to 38399 extents.<br />
		<strong>lvm pvresize /dev/sda2 &#8211;setphysicalvolumesize 643G</strong> &nbsp; ( 150G / 38399 * 164407. &nbsp;Complained about 642G ) &nbsp;Don&#39;t care about precision here. &nbsp;Just need to shrink to make room for a new VG. &nbsp;Only 164408 to 164606 is left at the end. &nbsp;This is tiny in comparison.</p>
<p>		The next step here was to create a new VG on the same PV:</p>
<p>		<strong>lvm vgcreate BackupVG /dev/sda2</strong></p>
<p>		But that gave me:</p>
<p>		Physical volume &#39;/dev/sda2&#39; is already in volume group &#39;VolGroup&#39;<br />
		Unable to add physical volume &#39;/dev/sda2&#39; to volume group &#39;BackupVG&#39;</p>
<p>		This was odd but could not find anything conclusive until I read this:</p>
<p>		&quot;<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: sans-serif; font-size: 13px; line-height: 19px;">PVs and LVs cannot be shared between or span different VGs</span>&quot; -&nbsp;<a href="http://en.wikipedia.org/wiki/Logical_volume_management" rel="nofollow">http://en.wikipedia.org/wiki/Logical_volume_management<br />
		</a><br />
		This basically says I can&#39;t have two VG&#39;s on the same PV in this case, on the the same <strong>/dev/sda2</strong>. &nbsp;So I have to resize the partition, then create a new partition on the free space, then a VG on that then move the LV to the VG on the new PV. (This is certainly turning into an exercise)</p>
<p>		Now we determine the new end sector for our partition. &nbsp;Well need to verify numbers and calculate it:</p>
<p>		<strong>lvm pvs &#8211;units g</strong> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ( VolGroup PSize / PFree is 643.00g / 457.00g )<br />
		<strong>lvm pvs &#8211;units s</strong> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ( VolGroup PSize / PFree is <strong><span style="color: rgb(0, 100, 0);">1348460544S</span></strong></span> / 958390272S )<br />
		<strong>parted /dev/sda unit s print</strong> &nbsp; ( Start / End / Size for the lvm listead as <strong><span style="color: rgb(0, 0, 205);">409663</span></strong></span>s / 2930272064s / 2929862402s. &nbsp;It is of type <strong>Primary</strong> and the flags are <strong>lvm</strong>)</p>
<p>		Because the VG is a whole unit, not fragmented, it&#39;s start to end should be exactly the sectors highlighted in green. &nbsp;So the next end sector should be the green and blue number (1348870207+2042(safety margin) = 1348872249 ). &nbsp;There is the extra free space in the middle we are trying to get rid of but that is included in the total VG size, which is good. &nbsp;If we really need that 1MB later, we can extend it. &nbsp;</p>
<p>		<span style="color: rgb(255, 0, 0);"><strong>WARNING: </strong></span>These steps will remove /dev/sda2 partition on sda and recreate it. &nbsp;If you did not get the end sector correct, this can truncate your partition resulting in DATA LOSS. &nbsp;There is NO backing out from this. &nbsp;Make sure you made a backup of your partitions earlier.</p>
<p>		<strong>parted /dev/sda rm 2<br />
		parted /dev/sda mkpart primary 409663s 1348872249s<br />
		parted /dev/sda set 2 lvm on<br />
		parted /dev/sda print<br />
		fdisk -l /dev/sda</strong></p>
<p>		Done. &nbsp;Now check with <strong>parted /dev/sda unit s print</strong> and the end size should match exactly the number you specified above when recreating it.</p>
<p>		At this point check the FS using <strong>e2fsck -f /dev/VolGroup/LogVol02</strong> to ensure things are still fine.</p>
<p>		Now I&#39;m at the point where I have <strong>/dev/sda1</strong> and <strong>/dev/sda2</strong> and have about 500GB of free space to create another partition <strong>/dev/sda3</strong>.</p>
<p>		At this point I&#39;ll boot up into the system to ensure things still can be booted up as well. &nbsp;This is the ultimate test. &nbsp;I&#39;ll return to the <a href="http://www.microdevsys.com/WordPress/2011/09/26/linux-pxe-installing-and-network-booting-windows-7-linux-solaris-using-pxe/"><span style="color: rgb(0, 0, 255);"><strong>PXE</strong></span></a> boot on the second reboot. &nbsp;The system booted up fine.</p>
<p>		Now we need to make another partition and VG to where we will move LogVol02. &nbsp;To do this, create a new partition <strong>/dev/sda3</strong> then create the VG on that.</p>
<p>		<strong>parted /dev/sda &quot;mkpart primary ext4 1348462588s -1s&quot;</strong> &nbsp; (Need the &quot; because shell tries to interpret the - )<br />
		<strong>parted /dev/sda set 3 lvm on</strong><br />
		<strong>lvm vgcreate BVolGroup /dev/sda3</strong> (But this failed as I had to reboot after creating the above partitions before making VG&#39;s)<br />
		<strong>lvm pvcreate /dev/sda3</strong><br />
		<strong>lvm vgcreate BVolGroup /dev/sda3 &nbsp; </strong>&nbsp;(This would create the PV but since we&#39;re doing this manually&#8230;..)</p>
<p>		Now we should be able to move the LV from <strong>/dev/sda2</strong>. &nbsp;The way we do this is not with <strong>LVM</strong> but <strong>rsync</strong>&nbsp;(or <strong>dd</strong>). &nbsp;dd should be quicker but can leave empty unusable space that could cause more work. This is because we cannot move LV&#39;s between VG&#39;s according to LVM rules. &nbsp;We could move LV&#39;s to other PV&#39;s within the same VG (A VG can span multiple PV&#39;s) but that is not our setup here.</p>
<p>		Unfortunately, it occurred to me that since we can&#39;t move LV&#39;s between VG&#39;s, and I have more then 400G space in the middle of my VolGroup, I should be able to create a new LV, <strong>rsync </strong>between them, then rename the new one. &nbsp;This should do the trick:</p>
<p>		<strong>lvm lvcreate &#8211;name /dev/VolGroup/LogVol01 &#8211;size 150G<br />
		lvm pvdisplay &#8211;maps</strong> (verify the volumes LogVol01 and LogVol02 are identical in extents)<br />
		<strong>mke2fs -t ext4 /dev/VolGroup/LogVol01</strong><br />
		<strong>mkdir /mt/amr /mnt/bmr<br />
		mount /dev/VolGroup/LogVol02 /mnt/amr</strong><br />
		<strong>mount /dev/VolGroup/LogVol01 /mnt/bmr</strong><br />
		<strong>cd bmr</strong><br />
		<strong>rsync -avh /mnt/amr/* /mnt/bmr<br />
		</strong><br />
		Since the copy procedure target and source are using the same <u>physical</u> disk, the write/read speeds will be halved.</p>
<p>		<strong>umount /mnt/amr; umount /mnt/bmr<br />
		lvm lvremove /dev/VolGroup/LogVol02<br />
		lvm lvrename /dev/VolGroup/LogVol01 /dev/VolGroup/LogVol02</strong></p>
<p>		Let&#39;s see how everything looks like now before we resize the VG / PV:</p>
<p>		<span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-weight: normal;"><strong><span class="Apple-style-span" style="font-weight: normal;"><strong>lvm pvdisplay &#8211;maps</strong></span><br />
		lvm pvs &#8211;units g</strong>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ( VolGroup PSize / PFree is 643.00g / 457.00g )<br />
		<strong>lvm pvs &#8211;units s</strong>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ( VolGroup PSize / PFree is&nbsp;<strong><span style="color: rgb(0, 100, 0);">1348460544S</span></strong></span>&nbsp;/ 958390272S )<br />
		<strong>parted /dev/sda unit s print</strong>&nbsp;&nbsp; ( Start / End / Size for the lvm on /dev/sda2 listead as&nbsp;<strong><span style="color: rgb(0, 0, 205);">409663</span></strong></span>s / 1348872249s / 1348462587s. &nbsp;It is of type&nbsp;<strong>Primary</strong>&nbsp;and the flags are&nbsp;<strong>lvm</strong>)</p>
<p>		Finally, our LV&#39;s show to be lined up in the VG, with the free space showing up between extents 47616 and 164606. &nbsp;We now need to resize the VG / PV as we did earlier above, but to a now smaller size. &nbsp;So again, here are the calculations:</p>
<p>		<strong>lvm pvresize /dev/sda2 &#8211;setphysicalvolumesize 187G &nbsp; (</strong>150G / 38399 * 47616 = 186. &nbsp;It complained about 186 as there is a fractional remainder)</p>
<p>		Check again with:</p>
<p>		<span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-weight: normal;"><strong>lvm pvs &#8211;units s</strong>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ( VolGroup PSize / PFree is&nbsp;<strong><span style="color: rgb(0, 100, 0);">392159232S</span></strong></span>&nbsp;/ 2088906S )<br />
		<strong>parted /dev/sda unit s print</strong>&nbsp;&nbsp; ( Start / End / Size for the lvm on /dev/sda2 listead as&nbsp;<strong><span style="color: rgb(0, 0, 205);">409663</span></strong></span><span style="color: rgb(0, 0, 205);"><strong>s</strong></span> / 1348872249s / 1348462587s. &nbsp;It is of type&nbsp;<strong>Primary</strong>&nbsp;and the flags are&nbsp;<strong>lvm</strong>)</p>
<p>		Now we can shrink our <strong>/dev/sda2</strong> partition to it&#39;s minimal size (<span class="Apple-style-span" style="font-weight: normal;"><strong><span style="color: rgb(0, 0, 205);">409663</span></strong></span><strong><span style="color: rgb(0, 0, 205);">s</span></strong> +&nbsp;<strong><span style="color: rgb(0, 100, 0);">392159232S +&nbsp;</span></strong>2048(safety margin)):</p>
<p>		<strong>parted /dev/sda rm 2<br />
		parted /dev/sda mkpart primary 409663s <u>392570943</u>s<br />
		parted /dev/sda set 2 lvm on<br />
		parted /dev/sda print<br />
		fdisk -l /dev/sda<br />
		</strong><br />
		Remove the backup volume we created earlier:</p>
<p>		<strong>lvm vgremove /dev/BVolGroup<br />
		lvm pvremove /dev/sda3</strong></p>
<p>		And let&#39;s test with a restart. &nbsp;After the reboot, we&#39;ll move the entire PV / VG to partition &nbsp;<strong>/dev/sda3</strong> in preperation for installing Scientific Linux (Another RHEL 6.1 clone like CentOS but with OpenAFS and Kerberos pre included).</p>
<p>		<strong>lvm lvresize /dev/VolGroup/LogVol02 -l+255</strong> (to resize to the maximum VG size as only 255 extents were left available at the end.)<br />
		<strong>lvm pvsize &#8211;maps</strong> (Should now show no free extents.)</p>
<p>		There should now be ample 1.5TB - 187GB of free space on the physical device /dev/sda3.&nbsp; We&#39;ll now proceed to move everything to /dev/sda3 in the next step.</p>
<p>		This is how things look now visually:</p>
<p>
		&nbsp;</li>
<li>Now we&#39;ll create <strong>/dev/sda3</strong>&nbsp;at the end of the disk with the exact same size as <strong>/dev/sda2</strong>. &nbsp;Then we&#39;ll pvmove from 2 to 3:
<p>		<strong>parted /dev/sda unit s print free<br />
		parted /dev/sda mkpart primary 2538115887s 2930277167s</strong> (Based on results of above command and START +1 for an exact size of 392161281s as <strong>/dev/sda2</strong>)<br />
		<strong>parted /dev/sda set 3 lvm on<br />
		</strong><strong>parted /dev/sda unit s print free<br />
		lvm pvs<br />
		</strong></li>
<li>Now we create the PV:
<p>		<strong>lvm pvcreate /dev/sda3<br />
		</strong><br />
		You will notice that after we create the above PV, it&#39;s size may be greater then the actual size reported by parted:</p>
<p>		<u><strong>Before:</strong></u><br />
		<span style="font-family: courier new,courier,monospace;">PV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fmt&nbsp; Attr PSize&nbsp;&nbsp; PFree&nbsp; <br />
		/dev/sda2&nbsp; VolGroup lvm2 a-&nbsp;&nbsp; 187.00g&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 <br />
		</span></p>
<p>		<u><strong>After:</strong></u><br />
		<span style="font-family: courier new,courier,monospace;">PV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fmt&nbsp; Attr PSize&nbsp;&nbsp; PFree&nbsp; <br />
		/dev/sda2&nbsp; VolGroup lvm2 a-&nbsp;&nbsp; 187.00g&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 <br />
		/dev/sda3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lvm2 a-&nbsp;&nbsp; 754.07g 754.07g</span><br />
		&nbsp;</li>
<li>Notice the large <strong>PSize</strong> of 754.07g that doesn&#39;t match the 392161281s sector size of <strong>/dev/sda3</strong> (Which should be equal to /dev/sda2).&nbsp; This is why we need to resize the PV to it&#39;s actual size before we extend anything:
<p>		<strong> pvresize &#8211;test -v &#8211;setphysicalvolumesize 392161281s<strong> /dev/sda3</strong></strong><br />
		<strong>pvresize -v &#8211;setphysicalvolumesize 392161281s<strong> /dev/sda3</strong></strong>&nbsp; (If everything is ok from the above step.)<br />
		<span style="font-family: courier new,courier,monospace;"><br />
		<span>PV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fmt&nbsp; Attr PSize&nbsp;&nbsp; PFree&nbsp; <br />
		/dev/sda2&nbsp; VolGroup lvm2 a-&nbsp;&nbsp; 187.00g&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 <br />
		/dev/sda3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lvm2 a-&nbsp;&nbsp; 187.00g 187.07g</span><br />
		</span><br />
		(Double check with <strong>lvm pvs &#8211;units s</strong> and resize again if necessary to match <strong>/dev/sda2</strong>.)&nbsp; <br />
		&nbsp;</li>
<li>Now we should be ready to extend the VG:<br />
		<strong><br />
		lvm vgextend VolGroup /dev/sda3</p>
<p>		</strong></li>
<li>Finally, we do a pvmove from 2 to 3. &nbsp;Before you do, ensure that after the vgextend, both /dev/sda2 and /dev/sda3 print the same size by using <strong>lvm pvs &#8211;units s</strong>:
<p>		<strong>lvm pvmove /dev/sda2 /dev/sda3<br />
		lvm pvs -o +tags</strong> (To check the PV&#39;s in the VG VolGroup)</p>
<p>		The above will take some time since <strong>/dev/sda2</strong> is around 187GB in this case:<br />
		&nbsp;</li>
<li>Once the move is complete and without errors, reduce the VG by /dev/sda2:
<p>		<strong>lvm vgreduce VolGroup /dev/sda2</strong></p>
<p>		Mount and check manually. &nbsp;<strong>lvm vgdisplay</strong> should also show half the space again.<br />
		&nbsp;</li>
<li>Now remove /dev/sda2 PV:
<p>		<strong>lvm pvremove /dev/sda2</strong><br />
		&nbsp;</li>
<li>Mount to<strong> /mnt/mr</strong> check manually and reboot to ensure it can be read fine:
<p>		<span style="color: rgb(255, 0, 0);"><strong>ERROR:</strong></span> Mounting on /mnt/mr worked just fine but after the reboot, nothing mounted and subsequent lvm pvs, lvm vgs and lvm lvs all resulted in:</p>
<p>		&nbsp;</li>
<li>So my data was toast at which point I learned the very important commands the various online wiki&#39;s never informed me about: <strong>vgcfgbackup</strong> and <strong>vgcfgrestore</strong>. &nbsp;Unfortunately, I HAD NOT USED THE BACKUP.
<p>		<span style="color: rgb(255, 0, 0);"><strong>WARNING:</strong></span> My system was toast at this point and I had no way to recover the data because I did not have the LVM restore files.</p>
<p>		NOTE: Please read the post&nbsp;<a href="http://www.microdevsys.com/WordPress/2011/09/19/linux-lvm-recovering-a-lost-volume/"><strong><span style="color: rgb(0, 0, 205);">LVM: Recovering a lost volume</span></strong></a>. &nbsp;The below steps actually overwrote the VolGroup definitions as they were stored on the disk. &nbsp;I was not aware that the VG definitions were stored at the head of the partition before attepting step 32. &nbsp;DO NOT DO &nbsp;<br />
		&nbsp;</li>
<li><span style="color: rgb(255, 0, 0);"><strong>A BAD ATTEMPT TO RECOVER. &nbsp;THIS STEP WILL PERMANENTLY DESTROY THE DATA ON THE DISK. &nbsp;TRY ONLY IF YOU ARE PRACTICING.</strong></span>
<p>		Here, we will try to recover our lost data by rebuilding the config backup we should have done earlier. &nbsp;We will try to rebuild the backup config manually from screen printouts we took earlier. &nbsp;First, we will recreate the basic structure we had earlier. &nbsp;Then, we&#39;ll modify this backup config with the same UUID&#39;s as in the original configuration. &nbsp;</p>
<p>		<strong>lvm pvcreate /-u&nbsp;x0O0xW-TAXH-Vrz2-g299-pJm6-Mj5g-srkOBH &#8211;setphysicalvolumesize 47871e &#8211;norestorefile /dev/sda3</strong></p>
<p>		<strong>lvm vgcreate VolGroup /dev/sda3</strong></p>
<p>		<strong>lvm lvcreate &#8211;extents 8192 &#8211;name lv_root VolGroup</strong><br />
		<strong>lvm lvcreate &#8211;extents 1024 &#8211;name lv_swap VolGroup</strong><br />
		<strong>lvm lvcreate &#8211;extents 38655 &#8211;name LogVol02 VolGroup</strong></p>
<p>		We will now copy the VG backup from /etc/lvm/backup/VolGroup to our remote host so we can adjust the UUID&#39;s from the screen prints we took earlier. &nbsp;(Copy and paste is cumbersome on the recovery console or I simply do not know an easier way.)</p>
<p>		<strong>scp /etc/lvm/backukp/VolGroup root@192.168.1.1:/recovery/</strong></p>
<p>		Once we adjust the VolGroup backup file, we will use the <strong>vgcfgrestore</strong> option to recreate it with updated UUID numbers.</p>
<p>		Please see the link below for recovering at this point the proper way:</p>
<p>		<a href="http://www.microdevsys.com/WordPress/2011/09/19/linux-lvm-recovering-a-lost-volume/"><strong><span style="color: rgb(0, 0, 205);">LVM: Recovering a lost volume.</span></strong></a><br />
		&nbsp;</li>
<li>Now that we have recovered the LVM, I&#39;ll be sure to take backups of <strong>/etc/lvm/backup/&lt;VOLUME GROUP&gt;</strong> to any remote host.&nbsp; This way data can be recovered when needed instead of trying to recover the hard way.&nbsp;<br />
		&nbsp;</li>
<li>After the above recovery, the partition is now in an extended state over <strong>/dev/sda2</strong> and<strong> /dev/sda3</strong>, two partitions apart by about 1TB of data.&nbsp; Having tried the faulty <strong>pvmove</strong> method above, we won&#39;t retry it here.&nbsp; Instead we will shrink the partition back to <strong>/dev/sda2</strong> and create a backup partition on <strong>/dev/sda3</strong> of the same size as <strong>/dev/sda2</strong>.&nbsp; Then we will <strong>rsync</strong> / <strong>scp</strong> data between the two instead.&nbsp; Should be safer.<br />
		&nbsp;</li>
<li>Here is the list of steps:
<p>		<strong>#&nbsp; lvm pvcreate /dev/sda3</strong><br />
		<strong>#&nbsp; lvm vgcreate </strong><strong>VGEntertain /dev/sda3</strong><br />
		<strong>#&nbsp; lvm lvs &#8211;help</strong><br />
		<strong>#&nbsp; lvm lvs &#8211;units s</strong><br />
		LV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Attr&nbsp;&nbsp; LSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Origin Snap%&nbsp; Move Log Copy%&nbsp; Convert<br />
		LogVol02&nbsp; VolGroup&nbsp;&nbsp;&nbsp; -wI-a- 316661760S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		lv_root&nbsp;&nbsp; VolGroup&nbsp;&nbsp;&nbsp; -wI-a-&nbsp; 67108864S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		lv_swap&nbsp;&nbsp; VolGroup&nbsp;&nbsp;&nbsp; -wI-a-&nbsp;&nbsp; 8388608S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>		<strong>#&nbsp; lvm lvcreate -L316661760S -n oLogVol02 VGEntertain</strong><br />
		<strong>#&nbsp; lvm lvcreate -L67108864S -n olv_root VGEntertain</strong><br />
		<strong>#&nbsp; lvm lvcreate -L8388608S -n olv_swap VGEntertain</strong><br />
		<strong>#&nbsp; lvm lvs &#8211;units s</strong></p>
<p>		&nbsp; LV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Attr&nbsp;&nbsp; LSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Origin Snap%&nbsp; Move Log Copy%&nbsp; Convert<br />
		&nbsp; oLogVol02 VGEntertain -wi-a- 316661760S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		&nbsp; olv_root&nbsp; VGEntertain -wi-a-&nbsp; 67108864S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		&nbsp; olv_swap&nbsp; VGEntertain -wi-a-&nbsp;&nbsp; 8388608S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		&nbsp; LogVol02&nbsp; VolGroup&nbsp;&nbsp;&nbsp; -wI-a- 316661760S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		&nbsp; lv_root&nbsp;&nbsp; VolGroup&nbsp;&nbsp;&nbsp; -wI-a-&nbsp; 67108864S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		&nbsp; lv_swap&nbsp;&nbsp; VolGroup&nbsp;&nbsp;&nbsp; -wI-a-&nbsp;&nbsp; 8388608S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
		&nbsp; <br />
		<strong># lvm vgchange VGEntertain -a y<br />
		#&nbsp; mke2fs -ext4 /dev/VGEntertain/oLogVol02 <br />
		#&nbsp; mke2fs -t ext4 /dev/VGEntertain/oLogVol02 <br />
		#&nbsp; mount /dev/VolGroup/LogVol02 /mnt/mr<br />
		#&nbsp; mkdir /mnt/rr<br />
		#&nbsp; mount /dev/VolGroup/lv_root /mnt/rr<br />
		#&nbsp; mkdir /mnt/sr<br />
		#&nbsp; mount /dev/VolGroup/lv_swap /mnt/sr<br />
		#&nbsp; mkswap /dev/VGEntertain/olv_swap <br />
		#&nbsp; mke2fs -t ext4 /dev/VGEntertain/olv_root <br />
		#&nbsp; df -T</strong></p>
<p>		Filesystem&nbsp;&nbsp;&nbsp; Type&nbsp;&nbsp; 1K-blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Used Available Use% Mounted on<br />
		/dev&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmpfs&nbsp;&nbsp;&nbsp;&nbsp; 2026840&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 224&nbsp;&nbsp; 2026616&nbsp;&nbsp; 1% /dev<br />
		none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmpfs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 256000&nbsp;&nbsp;&nbsp; 129212&nbsp;&nbsp;&nbsp; 126788&nbsp; 51% /tmp<br />
		/dev/loop0<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; squashfs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 128896&nbsp;&nbsp;&nbsp; 128896&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 100% /mnt/runtime<br />
		/dev/mapper/VolGroup-LogVol02<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ext4&nbsp;&nbsp; 154818540 124239716&nbsp; 22714504&nbsp; 85% /mnt/mr<br />
		/dev/mapper/VolGroup-lv_root<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ext4&nbsp;&nbsp;&nbsp; 33027952&nbsp; 13555808&nbsp; 17794424&nbsp; 44% /mnt/rr<br />
		&nbsp;</li>
<li>At this point, knowing that my VG&#39;s and LV&#39;s were recovered, I rebooted to my old installation to take advantage of the GUI and Konsole to copy things between the two VG&#39;s I created a number of mount points and mounted each VG:
<p>		<strong># mkdir /mnt/omr /mnt/orr /mnt/osr</strong></p>
<p>		<strong># mount /dev/VGEntertain/oLogVol02 /mnt/omr</strong><br />
		<strong># mount /dev/VGEntertain/olv_root /mnt/orr</strong><br />
		<strong># mount /dev/VGEntergain/olv_swap /mnt/osr</strong></p>
<p>		<strong># mount /dev/VolGroup/LogVol02 /mnt/mr</strong><br />
		<strong># mount /dev/VolGroup/lv_root /mnt/rr</strong><br />
		<strong># mount /dev/VolGroup/lv_swap /mnt/sr</strong><br />
		&nbsp;</li>
<li>Next is to sync the two volumes together.&nbsp; For this I used <strong>rsync</strong> and went to sleep.&nbsp; The process completed overnight:
<p>		EX: <strong>rsync -avh &lt;SOURCE&gt; &lt;TARGET&gt;</strong></p>
<p>		<strong># rsync -avh /mnt/mr /mnt/omr</strong></p>
<p>		Repeat the same thing for the other mounted folders.<br />
		&nbsp;</li>
<li>Now we should also take a backup of the boot partition.&nbsp; For this again we can use <strong>dd</strong>.&nbsp; The below steps highlight the process.&nbsp; The most important thing below is that the two blue parts below have to match and the two green parts below have to match once you copy things over.&nbsp; Ideally, you want to save the new <strong>dd</strong> image file in the backup volume so it is not destroyed when we install the new OS:
<p>		<span style="font-family: courier new,courier,monospace;"><strong># parted /dev/sda unit s print free</strong><br />
		Model: ATA WDC WD15EADS-32R (scsi)<br />
		Disk /dev/sda: 2930277168s<br />
		Sector size (logical/physical): 512B/512B<br />
		Partition Table: msdos</p>
<p>		Number&nbsp; Start&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type&nbsp;&nbsp;&nbsp;&nbsp; File system&nbsp; Flags<br />
		&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 63s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 409662s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><span style="color: rgb(0, 0, 255);">409600</span>s</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; primary&nbsp; ext4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boot<br />
		&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 409663s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 392570943s&nbsp;&nbsp; 392161281s&nbsp;&nbsp; primary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lvm<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 392570944s&nbsp;&nbsp; 2538115886s&nbsp; 2145544943s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Free Space<br />
		&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2538115887s&nbsp; 2930277167s&nbsp; 392161281s&nbsp;&nbsp; primary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lvm</p>
<p>		#</span><br />
		<span style="font-family: courier new,courier,monospace;"><strong># dd if=/dev/sda1 bs=512 count=</strong></span><span style="color: rgb(0, 0, 255);"><span style="font-family: courier new,courier,monospace;"><strong>409600</strong></span></span><span style="font-family: courier new,courier,monospace;"><strong> of=./boot-partition.sda1</strong><br />
		409600+0 records in<br />
		409600+0 records out<br />
		209715200 bytes (210 MB) copied, 9.41159 s, 22.3 MB/s<br />
		<strong># ll</strong><br />
		total 204824<br />
		3407876 drwx&#8212;&#8212;&nbsp; 2 root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 Mar&nbsp; 9&nbsp; 2010 lost+found<br />
		3407874 drwx&#8212;&#8212;&nbsp; 4 root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 Jun 13&nbsp; 2010 .Trash-0<br />
		3407875 drwxr-xr-x 20 root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 Aug 31 21:57 Files<br />
		3407877 drwx&#8212;&#8212; 47 videouser videouser&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 Sep&nbsp; 2 14:01 videouser<br />
		&nbsp;262145 drwxr-xr-x 10 root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 Sep 24 01:39 ..<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 drwxr-xr-x&nbsp; 6 root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4096 Sep 25 21:27 .<br />
		&nbsp;&nbsp;&nbsp;&nbsp; 11 -rw-r&#8211;r&#8211;&nbsp; 1 root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 128, 0);"><strong>209715200</strong></span> Sep 25 21:27 <strong>boot-partition.sda1</strong><br />
		<strong># parted /dev/sda unit b print free</strong><br />
		Model: ATA WDC WD15EADS-32R (scsi)<br />
		Disk /dev/sda: 1500301910016B<br />
		Sector size (logical/physical): 512B/512B<br />
		Partition Table: msdos</p>
<p>		Number&nbsp; Start&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type&nbsp;&nbsp;&nbsp;&nbsp; File system&nbsp; Flags<br />
		&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32256B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 209747455B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 128, 0);"><strong>209715200</strong></span>B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; primary&nbsp; ext4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boot<br />
		&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 209747456B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200996323327B&nbsp;&nbsp; 200786575872B&nbsp;&nbsp; primary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lvm<br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200996323328B&nbsp;&nbsp; 1299515334143B&nbsp; 1098519010816B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Free Space<br />
		&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1299515334144B&nbsp; 1500301910015B&nbsp; 200786575872B&nbsp;&nbsp; primary&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lvm<br />
		</span></li>
<li>The last thing you want to check is if saving the boot partition above worked properly by mounting it using the loopback device on some free directory:
<p>		<strong># mount /mnt/omr/boot-partition.sda1 /mnt/orr/ -o loop</strong></p>
<p>		If all went according to plan, you should be able to browse the newly created <strong>dd</strong> out file from the mountpoint <strong>/mnt/orr</strong> in above example.&nbsp;&nbsp;&nbsp; <br />
		&nbsp;</li>
<li>At this point we are ready to install any new OS over the original VG&#39;s and PV&#39;s since a backup already exists of them.
<p>		<span style="background-color: rgb(0, 128, 0);"><strong><span style="color: rgb(255, 240, 245);">IMPORTANT</span>:</strong></span> Don&#39;t forget to take a backup of the VG groups as defined from /etc/lvm/backup/VolGroup and /etc/lvm/backup/VGEntertain per the above.</li>
</ol>
<p>
	Cheers!<br />
	TK</p>
<p>&nbsp;</p>
<ol></ol>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2011/09/25/linux-lvm-resizing-partitions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux LVM: Recovering a lost volume.</title>
		<link>http://www.microdevsys.com/WordPress/2011/09/19/linux-lvm-recovering-a-lost-volume/</link>
		<comments>http://www.microdevsys.com/WordPress/2011/09/19/linux-lvm-recovering-a-lost-volume/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 03:36:31 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
		
		<category><![CDATA[NIX Posts]]></category>

		<category><![CDATA[access]]></category>

		<category><![CDATA[data]]></category>

		<category><![CDATA[dd]]></category>

		<category><![CDATA[fs]]></category>

		<category><![CDATA[group]]></category>

		<category><![CDATA[HEX]]></category>

		<category><![CDATA[lvdisplay]]></category>

		<category><![CDATA[lvm]]></category>

		<category><![CDATA[lvs]]></category>

		<category><![CDATA[mount]]></category>

		<category><![CDATA[okteta]]></category>

		<category><![CDATA[partition]]></category>

		<category><![CDATA[pvdisplay]]></category>

		<category><![CDATA[pvmove]]></category>

		<category><![CDATA[pvremove]]></category>

		<category><![CDATA[pvs]]></category>

		<category><![CDATA[recover]]></category>

		<category><![CDATA[restore]]></category>

		<category><![CDATA[type]]></category>

		<category><![CDATA[unable]]></category>

		<category><![CDATA[unknown]]></category>

		<category><![CDATA[vgcfgrestore]]></category>

		<category><![CDATA[vgdisplay]]></category>

		<category><![CDATA[vgextend]]></category>

		<category><![CDATA[vgreduce]]></category>

		<category><![CDATA[vgs]]></category>

		<category><![CDATA[VolGroup]]></category>

		<category><![CDATA[Volume]]></category>

		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://www.microdevsys.com/WordPress/?p=1351</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2011/09/19/linux-lvm-recovering-a-lost-volume/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux LVM: Recovering a lost volume.';
digg_bodytext = '&nbsp;It may become necessary to recover or rebuild an LVM in case either a backup /etc/lvm/backup/&lt;VOLGROUP&gt; is not available or becomes lost or other conditions arise causing loss of system volume data.&nbsp; What might otherwise appear destroyed,...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
&#160;
It may become necessary to recover or rebuild an LVM in case either a backup /etc/lvm/backup/&#60;VOLGROUP&#62; is not available or becomes lost or other conditions arise causing loss of system volume data.&#160; What might otherwise appear destroyed, deleted or inaccessible, LVM comes with a few backup options in case of disaster.&#160; Here are the recovery [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
digg_url = 'http://www.microdevsys.com/WordPress/2011/09/19/linux-lvm-recovering-a-lost-volume/';
digg_bgcolor = '#F7F7F7';
digg_skin = '';
digg_window = '';
digg_title = 'Linux LVM: Recovering a lost volume.';
digg_bodytext = '&nbsp;It may become necessary to recover or rebuild an LVM in case either a backup /etc/lvm/backup/&lt;VOLGROUP&gt; is not available or becomes lost or other conditions arise causing loss of system volume data.&nbsp; What might otherwise appear destroyed,...';
digg_media = 'news';
digg_topic = '';
//-->
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</div>
<p>&nbsp;</p>
<p>It may become necessary to recover or rebuild an LVM in case either a backup <strong>/etc/lvm/backup/&lt;VOLGROUP&gt;</strong> is not available or becomes lost or other conditions arise causing loss of system volume data.&nbsp; What might otherwise appear destroyed, deleted or inaccessible, LVM comes with a few backup options in case of disaster.&nbsp; Here are the recovery steps I took to recover previously lost data without either a backup and using only a few open source tools:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span id="more-1351"></span></p>
<p><strong><span style="color: rgb(255, 0, 0);">NOTE:</span> Do not attempt these steps unless you have a firm understanding of UNIX / LINUX.&nbsp; The concepts here are relatively advanced.&nbsp; Also ensure you have a backup of the data that will be affected by your actions below.&nbsp; Also take note that your mileage may vary and that this may or may not necessarily work for you.&nbsp; <u>Use with caution.</u>&nbsp; <br />
	</strong></p>
<p>Before we proceed any further, the LVM version used here is:</p>
<p>&nbsp; LVM version:&nbsp;&nbsp;&nbsp;&nbsp; 2.02.83(2)-RHEL6 (2011-03-18)<br />
	&nbsp; Library version: 1.02.62-RHEL6 (2011-03-18)<br />
	&nbsp; Driver version:&nbsp; 4.20.6</p>
<p>
	If your version differs, the below steps may not work for you.</p>
<p>	The first step to take is to grab the start sectors of the partitions that used to hold your LVM.&nbsp; The Linux LVM holds the equivalent of <strong>/etc/lvm/backup/&lt;VOLGROUP&gt;</strong> just in case of loss to allow for recovery later, as we will be doing here. To do this, invoke <strong>dd</strong> and grab 255, 512 byte sectors from the start of, in this case, <strong>/dev/sda2</strong>:</p>
<p style="margin-left: 40px;"><span style="font-size: 12px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'Times New Roman';"><strong># dd if=/dev/sda2 bs=512 count=255 skip=1 of=./sda2.lvm</strong></span></span></p>
<p>This will create a binary file that I found only best to use a hex editor to view with.&nbsp; I used <strong>Okteta</strong> to get a look at the file in HEX notation, simply because it was installed on my secondary system at the time.&nbsp; I used it to identify start and end of blocks I need to get the correct block from the file.&nbsp; The start and end sectors of a block begin with the 0 ASCII character: 00.&nbsp; Here is how the file looked like in Okteta, showing start and end markers for the LVM PV&#39;s, VG&#39;s, and LV&#39;s definition block:</p>
<p>
	<strong>Okteta Linux LVM - START of LVM Definition.</strong><br />
	<img alt="Okteta start byte of LVM definition." height="138" src="http://www.microdevsys.com/wordpressimages/linux-lvm-recovery-okteta-1.jpg" width="795" /></p>
<p><strong><br />
	Okteta Linux LVM - END of LVM Definition.</strong><br />
	<img alt="Okteta end byte of LVM definition." height="341" src="http://www.microdevsys.com/wordpressimages/linux-lvm-recovery-okteta-2.jpg" width="790" /></p>
<p>	&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Okteta Linux LVM - END of LVM Definition (alternate example).</strong><br />
	<img alt="Okteta end byte of LVM definition (second example)" src="http://www.microdevsys.com/wordpressimages/linux-lvm-recovery-okteta-3.jpg" /></p>
<p>	Please note the end point actually marked by the green in the second image, NOT the red.&nbsp; They are marked on a <span style="color: rgb(255, 0, 0);">00</span> byte boundary.&nbsp; I did not find the START and END as easily descernable in VI.&nbsp; I expect Okteta, or any other HEX editor for that matter,&nbsp; to better indicate the starting and ending points.&nbsp; Your mileage may vary.&nbsp; The recovered file looked like this (<strong>sda2-lvm-final.lvm</strong>):</p>
<p style="margin-left: 40px;">VolGroup {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;l6D50I-m8tf-2iPJ-ef1R-O9kf-kH2v-7SslkB&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; seqno = 51<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = [&quot;RESIZEABLE&quot;, &quot;READ&quot;, &quot;WRITE&quot;]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags = []<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent_size = 8192<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_lv = 0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_pv = 0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metadata_copies = 0</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; physical_volumes {</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv0 {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;AR2cbu-Zlxw-8nR0-423o-20pa-3g3l-Te3gcI&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device = &quot;/dev/sda2&quot;</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stripe_count = 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # linear</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stripes = [&quot;pv1&quot;, 9216]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	}<br />
	# Generated by LVM2 version 2.02.83(2)-RHEL6 (2011-03-18): Sun Sep 11 05:51:56 2011</p>
<p>	contents = &quot;Text Format Volume Group&quot;<br />
	version = 1</p>
<p>	description = &quot;&quot;</p>
<p>	creation_host = &quot;localhost.localdomain&quot; # Linux localhost.localdomain 2.6.32-131.0.15.el6.x86_64 #1 SMP Sat May 21 10:27:57 CDT 2011 x86_64<br />
	creation_time = 1315720316&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Sun Sep 11 05:51:56 2011</p>
<p>
	After trying to apply the restored <strong>VolGroup</strong> <strong>sda2-lvm-final.lvm</strong> file, received the message:</p>
<p style="margin-left: 40px;"><strong># lvm vgcfgrestore -f sda2-lvm-final.lvm VolGroup</strong><br />
	Couldn&#39;t find device with uuid AR2cbu-Zlxw-8nR0-423o-3g3l-Te3gcI.<br />
	Couldn&#39;t find device with uuid 1tycCu-hDC0-USvN-fuS8-gdgd-QIHq-UHcb0Y.<br />
	Cannot restore Volume Group VolGroup with 2 PVs marked as missing.<br />
	Restore failed.<br />
	<strong> #</strong></p>
<p>This is because in order to restore, the <strong>vgcfgrestore</strong> commands needs to see the same PV&#39;s (including matching UUID&#39;s) on the system as existed before.&nbsp; At this point, I haven&#39;t created them yet.</p>
<p>We&#39;ll need to PV create on<strong> /dev/sda2</strong> and <strong>/dev/sda3</strong> as per the <strong>VolGroup</strong> recovered file above and assign the same <strong>UUID&#39;s</strong> as in our restore file. &nbsp;(The alternate might be to change the VolGroup recovery backup file and assign the new PV <strong>UUID&#39;s</strong> to the <strong>VolGroup</strong> restore file before applying. &nbsp;We will not try that here however so I cannot vouch for the success of this method.)</p>
<p>
	Before we can restore the VolGroup, we need to do so to PV&#39;s with the same UUID&#39;s.&nbsp; For this we create teh PV&#39;s first:</p>
<p style="margin-left: 40px;"><strong># lvm pvcreate -u $(cat sda2-lvm-final.lvm |grep 1tycCU|awk &#39;{ gsub(/&quot;/, &quot;&quot;, $0) } { print $3 }&#39;) /dev/sda3 &#8211;restorefile sda2-lvm-final.lvm <br />
	# lvm pvcreate -u $(cat sda2-lvm-final.lvm |grep AR2cbu|awk &#39;{ gsub(/&quot;/, &quot;&quot;, $0) } { print $3 }&#39;) /dev/sda2 &#8211;restorefile sda2-lvm-final.lvm </p>
<p>	</strong></p>
<p>Followed by:</p>
<p style="margin-left: 40px;"><strong># lvm vgcfgrestore -f sda2-lvm-final.lvm VolGroup</strong><br />
	Restored volume group VolGroup<br />
	<strong>#</strong></p>
<p>Unfortunately, in my case, this didn&#39;t work. &nbsp;I can&#39;t say I didn&#39;t expect that entirely because I had earlier done lvm pvmove from <strong>/dev/sda2</strong> to <strong>/dev/sda3</strong>. &nbsp;Next I tried the same thing but this time attempting to recover the volume from /dev/sda3. &nbsp;This one I had less hope of recovering because I had previously unsuccessfully tried to recreate the LVM structure on <strong>/dev/sda3</strong> that I thought I had lost. &nbsp;Unfortunately unknown to me at the time, I did NOT know about this type of recovery process. &nbsp;But I degress and now on to the show.</p>
<p>Below is the derived VolGroup definition I could derive from my former installation from the beginning of the partition using the means already explained above:</p>
<p style="margin-left: 40px;">VolGroup {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;l6D50I-m8tf-2iPJ-ef1R-O9kf-kH2v-7SslkB&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; seqno = 5<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = [&quot;RESIZEABLE&quot;, &quot;READ&quot;, &quot;WRITE&quot;]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags = []<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent_size = 8192<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_lv = 0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_pv = 0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metadata_copies = 0</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; physical_volumes {</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv0 {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type = &quot;striped&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stripe_count = 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # linear</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stripes = [&quot;pv0&quot;, 9216]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	}<br />
	# Generated by LVM2 version 2.02.83(2)-RHEL6 (2011-03-18): Mon Sep 12 05:04:15 2011</p>
<p>	contents = &quot;Text Format Volume Group&quot;<br />
	version = 1</p>
<p>	description = &quot;&quot;</p>
<p>	creation_host = &quot;localhost.localdomain&quot; # Linux localhost.localdomain 2.6.32-131.0.15.el6.x86_64 #1 SMP Sat May 21 10:27:57 CDT 2011 x86_64<br />
	creation_time = 1315803855&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Mon Sep 12 05:04:15 2011</p>
<p>Again we mimick the steps taken above to try and recover the lost LVM:</p>
<ol>
<li>lvm pvcreate -u $(cat sda3-lvm-final-3.lvm |awk &#39;{ if ( $0 ~ /x0O0xW/ ) { gsub(/&quot;/,&quot;&quot;,$3); print $3 } }&#39;) /dev/sda3 &#8211;restorefile sda3-lvm-final-3.lvm</li>
<li>lvm vgcfgrestore -f sda3-lvm-final-3.lvm VolGroup</li>
<li>lvm vgscan</li>
<li>lvm pvscan</li>
<li>lvm vgchange VolGroup -a y</li>
<li>lvm pvs</li>
<li>lvm vgs</li>
<li>lvm lvs</li>
</ol>
<p>The last three commands being the verification.&nbsp; All showed LV&#39;s, PV&#39;s and VG&#39;s listead.&nbsp; Now to mount the volumes to test. &nbsp;Unfortunately:</p>
<p style="margin-left: 40px;"><strong># mount /dev/VolGroup/lv_root /mnt/mr<br />
	</strong><span style="color: rgb(255, 0, 0);">mount: you must specify the filesystem type</span><strong><br />
	#</strong></p>
<p>Adding the -vvvvv to the above command reveals that the mounter couldn&#39;t see an OS type from the head of the volume it appears:</p>
<blockquote>
<p>mount: types: &quot;(null)&quot;<br />
		mount: opts: &nbsp;&quot;(null)&quot;</p>
</blockquote>
<p>At this point it looked like I was really in trouble. &nbsp;So I decided to see where my data was really located. &nbsp;For this I used dd:</p>
<p style="margin-left: 40px;"><strong># dd if=/dev/sda2 bs=512 count=100000 skip=1 of=./sda2.dd.lvm<br />
	# dd if=/dev/sda3 bs=512 count=100000 skip=1 of=./sda3.dd.lvm</strong></p>
<p>Then scp&#39;d the files to my server and analyzed them using:</p>
<p style="margin-left: 40px;"><strong># strings&nbsp;sda2.dd.lvm | more<br />
	# strings sda3.dd.lvm | more</strong></p>
<p>This quickly revealed where the problem looked to be. &nbsp;I could see my file names off the old partition on&nbsp;<strong>sda2</strong>&nbsp;but NOT on&nbsp;<strong>sda3</strong>. &nbsp;I had remembered what I did that lead to my predicament which was:</p>
<p style="margin-left: 40px;"><strong># pvcreate /dev/sda3<br />
	# vgextend VolGroup /dev/sda3<br />
	# pvmove /dev/sda2 /dev/sda3<br />
	# vgreduce VolGroup<br />
	# pvremove /dev/sda2</strong></p>
<p>There is also free space between&nbsp;<strong>/dev/sda2</strong>&nbsp;and&nbsp;<strong>/dev/sda3</strong>, about 1TB o f free space if not more. &nbsp;I had hoped the pvmove will move everything between partitions as advertised but unfortunately, it did not. &nbsp;But at least now I could confirm that my data was still on&nbsp;<strong>/dev/sda2</strong>&nbsp;and nothing was on&nbsp;<strong>/dev/sda3</strong>. &nbsp;So I had to work with any remaining LVM configs off of&nbsp;<strong>/dev/sda2</strong>&nbsp;if I have any hope of recovering my data. &nbsp;So I edited the smaller <strong>dd</strong> output earlier for <strong>sda2</strong> and recreated any and all available definitions I could find and started reimplementing from the earliest moving backwards:</p>
<p>And this time, mount worked on <strong>/dev/VolGroup/LogVol02</strong> and I could see my files:</p>
<p style="margin-left: 40px;"><strong># mount /dev/VolGroup/LogVol02 /mnt/mr<br />
	# du -sh /mnt/mr<br />
	119G &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /mnt/mr<br />
	#</strong></p>
<p>But I wanted <strong>/dev/VolGroup/lv_root</strong> to be visible. &nbsp;So off I go to the next available definition, inspired by my success above and try that.&nbsp; This time I used the third last one:</p>
<p style="margin-left: 40px;">VolGroup {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;l6D50I-m8tf-2iPJ-ef1R-O9kf-kH2v-7SslkB&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; seqno = 47<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = [&quot;RESIZEABLE&quot;, &quot;READ&quot;, &quot;WRITE&quot;]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags = []<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent_size = 8192<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_lv = 0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_pv = 0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metadata_copies = 0</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; physical_volumes {</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv0 {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;AR2cbu-Zlxw-8nR0-423o-20pa-3g3l-Te3gcI&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; device = &quot;/dev/sda2&quot;</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = [&quot;ALLOCATABLE&quot;]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags = []<br />
	&nbsp;&nbs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bsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	}<br />
	# Generated by LVM2 version 2.02.83(2)-RHEL6 (2011-03-18): Sun Sep 11 02:55:09 2011</p>
<p>	contents = &quot;Text Format Volume Group&quot;<br />
	version = 1</p>
<p>	description = &quot;&quot;</p>
<p>	creation_host = &quot;localhost.localdomain&quot; # Linux localhost.localdomain 2.6.32-131.0.15.el6.x86_64 #1 SMP Sat May 21 10:27:57 CDT 2011 x86_64<br />
	creation_time = 1315709709&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Sun Sep 11 02:55:09 2011</p>
<p>This time, I could see and mount all my partitions again:</p>
<p style="margin-left: 40px;"><strong># mount /dev/VolGroup/LogVol02 /mnt/mr<br />
	# mount /dev/VolGroup/lv_root /mnt/lv_root<br />
	# du -sh /mnt/mr<br />
	119G &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /mnt/mr<br />
	# du -sh /mnt/lv_root<br />
	13G&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /mnt/lv_root<br />
	#<br />
	</strong></p>
<p>And this is why I got my partitions back and working on <strong>/dev/sda2</strong>.&nbsp; I did notice one thing however.&nbsp; As soon as I restored the above definition the hard drive light on the disk of the target server stayed on as if it was copying something.&nbsp; Looking I noticed <strong>kblockd</strong> using some CPU while the hard drive light was on.&nbsp; So I checked what is doing disk I/O using this command:</p>
<p style="margin-left: 40px;"><strong># for ikh in $(ls /proc/*/io); do echo &quot;[$ikh]: &quot;$(cat $ikh 2&gt;/dev/null)|awk &#39;{ if ( $0 ~ /rchar/ &amp;&amp; $3 != 0 ) print $1&quot; &quot;$3; }&#39;; done</strong></p>
<p>Which, when ran twice, reveals which processes show a delta on Disk I/O:</p>
<p style="margin-left: 40px;">[/proc/1/io]: 388814<br />
	[/proc/1000/io]: 24292<br />
	<span style="color: rgb(0, 100, 0);">[/proc/1004/io]: 673413398</span><br />
	[/proc/12569/io]: 49573<br />
	[/proc/12583/io]: 30445<br />
	<span style="color: rgb(0, 100, 0);">[/proc/12592/io]: 170451</span><br />
	[/proc/67/io]: 107712397<br />
	[/proc/773/io]: 7780<br />
	[/proc/774/io]: 261734<br />
	[/proc/775/io]: 2412006<br />
	[/proc/776/io]: 26700<br />
	[/proc/778/io]: 1777975<br />
	[/proc/78/io]: 115248<br />
	[/proc/794/io]: 440762<br />
	[/proc/807/io]: 16012<br />
	[/proc/836/io]: 7767303<br />
	[/proc/84/io]: 58436892<br />
	[/proc/93/io]: 4478177<br />
	[/proc/self/io]: 1956<br />
	&nbsp;</p>
<p>Checking processes, this quickly revealed the processes:</p>
<p style="margin-left: 40px;">root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1004&nbsp; 0.0&nbsp; 0.0 108524&nbsp; 2120 tty1&nbsp;&nbsp;&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp; Sep17&nbsp;&nbsp; 0:08 bash<br />
	root&nbsp;&nbsp;&nbsp;&nbsp; 23238&nbsp; 0.0&nbsp; 0.0&nbsp; 20204&nbsp; 1252 ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp; 02:32&nbsp;&nbsp; 0:00 hald-addon-input: Listening on /dev/input/event3</p>
<p>With 1004 belonging to my current shell.&nbsp; So the only thing that I could deduce, that when I restored the LVM config, the pvmove defined in it, retriggered an <strong>lvm pvmove /dev/sda2 /dev/sda3</strong> again.&nbsp; I will let this one finish but I won&#39;t <strong>vgreduce</strong> anymore once it&#39;s done, but instead check with <strong>dd</strong> exactly where it moved things before I reduce and shrink my partition.&nbsp;</p>
<p>Having let the activity run for a while, I noted that even when it was done, I still could not reduce the VolGroup by /dev/sda3 at all:</p>
<p style="margin-left: 40px;"># <strong>lvm vgreduce VolGroup /dev/sda3</strong><br />
	<span style="color: rgb(255, 0, 0);">Physical volume /dev/sda3 is still in use.</span></p>
<p>So I decided to tweak the last <strong>VolGroup</strong> definition by removing the move blocks or amending them like this by editing everything in red out (Now this should work since we verified above that <strong>/dev/sda3</strong> has NO data):</p>
<p style="margin-left: 40px;">VolGroup {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;l6D50I-m8tf-2iPJ-ef1R-O9kf-kH2v-7SslkB&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; seqno = 47<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = [&quot;RESIZEABLE&quot;, &quot;READ&quot;, &quot;WRITE&quot;]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags = []<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent_size = 8192<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_lv = 0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max_pv = 0<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metadata_copies = 0</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; physical_volumes {</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pv0 {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;AR2cbu-Zlxw-8nR0-423o-20pa-3g3l-Te3gcI&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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bsp; stripe_count = 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # linear</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stripes = [&quot;pv<span style="color: rgb(255, 0, 0);">move</span>0&quot;, 0]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lv_swap {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;KBdB2L-j1ZS-8iA6-Uilh-43G1-NKxX-eE06FW&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = [&quot;READ&quot;, &quot;WRITE&quot;, &quot;VISIBLE&quot;, &quot;LOCKED&qu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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent_count = 38655</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type = &quot;striped&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stripe_count = 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # linear</p>
<p>	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stripes = [&quot;pv<span style="color: rgb(255, 0, 0);">move</span>0&quot;, 9216]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>	<span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pvmove0 {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = &quot;2D2d4C-tTFL-IJLu-CDX8-Ud6l-juav-7Xh9on&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = [&quot;READ&quot;, &quot;WRITE&quot;, &quot;PVMOVE&quot;, &quot;LOCKED&quot;]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; flags = []<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allocation_policy = &quot;contiguous&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; segment_count = 3</span></p>
<p style="margin-left: 40px;"><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extents_moved = 0</span></p>
<p style="margin-left: 40px;"><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mirrors = [&quot;pv0&quot;, 0,&quot;pv1&quot;, 0]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p style="margin-left: 40px;"><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; segment2 {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start_extent = 8192<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent_count = 1024</span></p>
<p style="margin-left: 40px;"><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type = &quot;mirror&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mirror_count = 2<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extents_moved = 0</span></p>
<p style="margin-left: 40px;"><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mirrors = [&quot;pv0&quot;, 8192,&quot;pv1&quot;, 8192]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p style="margin-left: 40px;"><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; segment3 {<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start_extent = 9216<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extent_count = 38655</span></p>
<p style="margin-left: 40px;"><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type = &quot;mirror&quot;<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mirror_count = 2<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extents_moved = 0</span></p>
<p style="margin-left: 40px;"><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mirrors = [&quot;pv0&quot;, 9216,&quot;pv1&quot;, 9216]<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
	}</p>
<p style="margin-left: 40px;"># Generated by LVM2 version 2.02.83(2)-RHEL6 (2011-03-18): Sun Sep 11 02:55:09 2011</p>
<p>	contents = &quot;Text Format Volume Group&quot;<br />
	version = 1</p>
<p>	description = &quot;&quot;</p>
<p>	creation_host = &quot;localhost.localdomain&quot; # Linux localhost.localdomain 2.6.32-131.0.15.el6.x86_64 #1 SMP Sat May 21 10:27:57 CDT 2011 x86_64<br />
	creation_time = 1315709709&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Sun Sep 11 02:55:09 2011</p>
<p>Sure enough, when the above edited file was reimplemented with vgcfgrestore, the volume was mountable and this time showed enough free space on <strong>/dev/sda3</strong> by which to reduce it:</p>
<p style="margin-left: 40px;">&nbsp; PV /dev/sda2&nbsp;&nbsp; VG VolGroup&nbsp;&nbsp; lvm2 [187.00 GiB / 0&nbsp;&nbsp;&nbsp; free]<br />
	&nbsp; PV /dev/sda3&nbsp;&nbsp; VG VolGroup&nbsp;&nbsp; lvm2 [187.00 GiB / <span style="color: rgb(0, 128, 0);"><strong>187.00 GiB free</strong></span>]<br />
	&nbsp; Total: 2 [373.99 GiB] / in use: 2 [373.99 GiB] / in no VG: 0 [0&nbsp;&nbsp; ]</p>
<p>And this time vgreduce worked successfully, and I was back on <strong>/dev/sda2</strong> about to attempt a mirror instead then a <strong>vgreduce</strong> and <strong>pvremove</strong>.</p>
<p>	<strong>MORAL OF THE STORY:</strong>&nbsp; <br />
	Consider using <strong>rsync</strong> or <strong>scp</strong> between volumes and define new ones manually before you copy over.&nbsp; You may get better mileage that way.&nbsp; Also, most importantly, take backup of the LVM config before you reboot.&nbsp; If that fails and you still get yourself into such a mess, then at least bookmark this site.&nbsp; </p>
<p>	Cheers!<br />
	TK</p>
]]></content:encoded>
			<wfw:commentRss>http://www.microdevsys.com/WordPress/2011/09/19/linux-lvm-recovering-a-lost-volume/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
<span style="color: #999999; font-size: 100%">Technorati Key: JDKEMU44HHYG</span>

<!-- Dynamic page generated in 1.409 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-19 09:23:07 -->

