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

<channel>
	<title>Utility Computing dot China &#187; raid level migration</title>
	<atom:link href="http://www.utilitycomputing.com.cn/tag/raid-level-migration/feed" rel="self" type="application/rss+xml" />
	<link>http://www.utilitycomputing.com.cn</link>
	<description>数 据 嘉 年 华</description>
	<lastBuildDate>Tue, 13 Sep 2011 12:51:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>PostgreSQL Upgrade Part 3</title>
		<link>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade-part-3</link>
		<comments>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade-part-3#comments</comments>
		<pubDate>Sat, 01 Sep 2007 12:40:16 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[FOSS/GNU/Linux]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[array reconstruction]]></category>
		<category><![CDATA[big iron]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[raid level migration]]></category>
		<category><![CDATA[scsi]]></category>

		<guid isPermaLink="false">http://www.utilitycomputing.com.cn/?p=49</guid>
		<description><![CDATA[I knew the config files were different between 7.4 and 8.1 and that some items merely changed names and some were deprecated. I used this excellent resource before. Even the very rudimentary tweaks I did, and with a RAID array that is in a 90% rebuild rate, background initialisation, this 8.1 version is FAST! I [...]]]></description>
			<content:encoded><![CDATA[<p>I knew the config files were different between 7.4 and 8.1 and that some items merely changed names and some were deprecated.</p>
<p>I used <a href="http://www.powerpostgresql.com/Downloads/annotated_conf_80.html">this excellent resource</a> before.</p>
<p>Even the very rudimentary tweaks I did, and with a RAID array that is in a 90% rebuild rate, background initialisation, this 8.1 version is FAST!  I have no idea why people use MySQL, it really is such a piece of crud.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade-part-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL Upgrade Part 2</title>
		<link>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade-part-2</link>
		<comments>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade-part-2#comments</comments>
		<pubDate>Sat, 01 Sep 2007 12:03:14 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[FOSS/GNU/Linux]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[array reconstruction]]></category>
		<category><![CDATA[big iron]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[raid level migration]]></category>
		<category><![CDATA[scsi]]></category>

		<guid isPermaLink="false">http://www.utilitycomputing.com.cn/?p=48</guid>
		<description><![CDATA[Well, the PostgreSQL upgrade was a snap, sorta. I needed to do a full dump and restore as this was a major version change &#8211; no surprises there. What pissed me off though, is that when using the binary data type for dump files when using pg_dump (&#8220;-T c&#8221;) the resulting backup file is of [...]]]></description>
			<content:encoded><![CDATA[<p>Well, the PostgreSQL upgrade was a snap, sorta.  I needed to do a full dump and restore as this was a major version change &#8211; no surprises there.  What pissed me off though, is that when using the binary data type for dump files when using pg_dump (&#8220;-T c&#8221;) the resulting backup file is of no use for remote workers who aren&#8217;t at the actual console.</p>
<p>Let me expand on this;</p>
<p>This type of backup file is advertised as &#8220;more convenient&#8221; and offers more options for restore time selective data restores, data re-ording, index tricks and the like.  However no matter WHAT I did, it reported and sent a copy of the current pg_restore process and all the data being restored to standard output too!!  This means that basically, I was going to have the same full text of 20GB worth of database data shoved down my SSH session!</p>
<p>Yes &#8211; this makes the whole affair much slower!</p>
<p><span id="more-48"></span></p>
<p>Luckily, being the lateral thinking kind of dude that I am, I never put all my eggs in one basket.  That is just a recipe for data omelette.</p>
<p>I also had some plain text file dumps made from pg_dump.  So I went into the the PostgreSQL template1 sessions and then used the &#8220;\i&#8221; command to import my big .SQL file.  Perfect!  Only important updates sent to std output and not the whole damn enchilada.</p>
<p>Disk restore is still going on.  At a max through put of 20MByte a second with a 1000BaseT network, that is at best 1.2G a minute, 72GB an hour, so for 250GB approximately 3.5 hours.   However I was still doing a raid array background initialisation, so even after setting the rebuild rate to 10%, the system still needs a lot of time to move the files back &#8211; I didn&#8217;t bother to do the maths, because 3.5 hours or 10 hours it would all breach my maintenance window.</p>
<p>Because my advertised downtime window to clients was rapidly approaching, I had no choice but to continue to allow the copy to proceed, but redirect the main cluster to access the data store via NFS over the network and bring services back online.  I will then be able to do a RSYNC later in less than 1 hour to bring the haphazardly copied set on the main cluster in line with the now used and modified data store on my hot standby server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade-part-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL Upgrade</title>
		<link>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade</link>
		<comments>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade#comments</comments>
		<pubDate>Fri, 31 Aug 2007 21:35:53 +0000</pubDate>
		<dc:creator>richard</dc:creator>
				<category><![CDATA[FOSS/GNU/Linux]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[array reconstruction]]></category>
		<category><![CDATA[big iron]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[raid level migration]]></category>
		<category><![CDATA[scsi]]></category>

		<guid isPermaLink="false">http://www.utilitycomputing.com.cn/?p=47</guid>
		<description><![CDATA[Well this week was fun. For some reason one of our main clusters that runs client ASP software for general office, file, email, collaboration, etc&#8230; went crazy. First I noticed that the usual night time &#8220;Vacuum&#8217;s&#8221; that are needed to keep the PostgreSQL planar at it&#8217;s most efficient and indexes clean, was running right into [...]]]></description>
			<content:encoded><![CDATA[<p>Well this week was fun.  For some reason one of our main clusters that runs client ASP software for general office, file, email, collaboration, etc&#8230; went crazy.</p>
<p>First I noticed that the usual night time &#8220;Vacuum&#8217;s&#8221; that are needed to keep the PostgreSQL planar at it&#8217;s most efficient and indexes clean, was running right into the day time!  It usually needed less than an hour for the 20GB database we currently have.</p>
<p>So after many failed attempts to get an online vacuum done.  I stayed up really late, took the cluster down and did FULL vacuum.  Full vacuum&#8217;s are slow, and you can&#8217;t run anything while they happen because they do full table locks, where as online vacuum&#8217;s do quick tuple/row level locks.</p>
<p>Anyway, database seemed speedier, but system was still sluggish.  I have all data separated.  Database files are on large RAID10 arrays with U320 SCSI drives spinning at 15K &#8211; split over TWO SCSI buses!  Yeah tis fast.  Big disks are used because it means relative to the size of the disk, more data is on the outer edge of the platters, that spin faster than the centre of the platters.  I also keep PostgreSQL&#8217;s transaction log on a separate RAID1 array with 73GB 15K U320 drives as well with a 256MB battery backed cache.</p>
<p><span id="more-47"></span></p>
<p>Now database based operations were zippy again&#8230;.the system while set by me to not rate a disk search at too high a cost due to the super speed disk IO that I have, still should get SOME data out of the cache and not run to the comparatively sloooow disks straight away.  After doing this all was cool again database wise.</p>
<p>However operations that needed the data store to be accessed were still piss slow.  So email ingestion, file usage, etc crawled.  The data store which compliments the database data weighs in at about 250GB now.  And this is on a single RAID1 array with 300GB U320 10K drives.  I also remembered that over a 1000BaseT network to backup to a robotic tape library, the data store array (RAID1) maxes out at about 750MB a min.  While the RAID10 with the database does it at 2700+MB a min.</p>
<p>So I thought, &#8220;lets add some more disks to the data store array&#8221;.  I get more space, so relatively speaking more of the data is on the outside edges of all the platters (another topic for what one can do with LVM), the array has double the heads and spindles too &#8211; and some RAID0 goodness inside that RAID10 nested set.</p>
<p>Now Dell&#8217;s storage white paper from 2005 does state that a RAID1 to a RAID10 migration/raid level reconstruction is supported.  RAID10 being two RAID1 arrays striped together in RAID0 (with the mirror part straddling 2 SCSI buses for speed and channel redundancy).  However when I went into Open Manage after putting the drives in the chassis, expecting to be able to &#8220;reconstruct/migrate levels&#8221; to a RAID10, then pop into LVM, create some new data devices, add them to my Volume group and then expand my partition and then finally my file system &#8211; all while still being online&#8230;&#8230;..I was greeted with only the option to reconstruct/migrate to RAID5 (Get ^*^*&amp;^) or RAID0 (Uh, yeah, OK..).</p>
<p>So feeling quite annoyed now.  I then went and made the two new drives into a new RAID1 set, thinking that I would then be able to add this to a final &#8220;nested&#8221; array with the current RAID1 set and make a RAID10 out of them.  Well I thought it was working, but it wasn&#8217;t.  All I managed to do was end up with my existing array being made into a RAID0 (heart attack!!) and the new array sitting there untouched.  Also the Open Manage array management setup gave me no choice of stripe size.  It defaulted to 64K.  I prefer 128K to ensure the best chance of the records/tuples fitting into one whole stripe to maximise concurrency of head operations on different data records &#8211; and also because the PERC4 family of RAID cards does not suffer any penalty if a stripe size is too big for the data used &#8211; so why not eh?</p>
<p>So what am I doing now at 5:32 AM?</p>
<p>Rsyncing all data again to the hot standby server, will then power off the cluster, log in with the DRAC card, go into the BIOS of the RAID card and redo my friggin array from scratch, as RAID10 and 128K stripe and then boot up and copy my damn data back.</p>
<p>Not happy pappy.  Not happy.  I think it is SAN time&#8230;unless SAN&#8217;s can be this anal as well?</p>
<p>So what does this have to do with PostgreSQL upgrade?  Well since the cluster is down anyway, I might as well go from 7.4 to 8.1.  Get some of that auto vacuum goodness and lap up some of the apparent massive speed boosts in the 5 years of development between the two versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.utilitycomputing.com.cn/fossgnulinux/postgresql-upgrade/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

