<?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>h3x.no &#187; Ubuntu</title>
	<atom:link href="http://h3x.no/category/linux/ubuntu/feed" rel="self" type="application/rss+xml" />
	<link>http://h3x.no</link>
	<description>Tor Henning Ueland`s thoughts about technology and other stuff</description>
	<lastBuildDate>Fri, 30 Jul 2010 21:20:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>sh: phpize: not found</title>
		<link>http://h3x.no/2010/07/09/sh-phpize-not-found</link>
		<comments>http://h3x.no/2010/07/09/sh-phpize-not-found#comments</comments>
		<pubDate>Fri, 09 Jul 2010 19:56:07 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[phpize]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=499</guid>
		<description><![CDATA[When using pecl, or something else that require phpize, you may get a warning saying that phpize is not found, even when you have PHP installed on your server.  In order to use phpize you need to install the PHP development packages, normally named php-devel. For Debian/Ubuntu, you can fix this by running: sudo apt-get [...]]]></description>
			<content:encoded><![CDATA[<p>When using pecl, or something else that require phpize, you may get a warning saying that phpize is not found, even when you have PHP installed on your server.  In order to use phpize you need to install the PHP development packages, normally named php-devel.</p>
<p>For Debian/Ubuntu, you can fix this by running:</p>
<blockquote><p>sudo apt-get install php5-dev</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2010/07/09/sh-phpize-not-found/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto: Increase disk space in a mdadm raid</title>
		<link>http://h3x.no/2010/03/02/howto-increase-disk-space-in-a-mdadm-raid</link>
		<comments>http://h3x.no/2010/03/02/howto-increase-disk-space-in-a-mdadm-raid#comments</comments>
		<pubDate>Tue, 02 Mar 2010 18:35:28 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid]]></category>

		<guid isPermaLink="false">http://h3x.no/?p=288</guid>
		<description><![CDATA[I currently have a Ubuntu Linux server running two mdadm RAID`s. One of the RAID sets is set up using 6 x 500 GB SATA drives. Now i have purchased 6 x 1500 GB SATA drives that will replace the old disks, but the challenge is to increase the RAID and filesystem without loosing any [...]]]></description>
			<content:encoded><![CDATA[<p>I currently have a Ubuntu Linux server running two mdadm RAID`s. One of the RAID sets is set up using 6 x 500 GB SATA drives. Now i have purchased 6 x 1500 GB SATA drives that will replace the old disks, but the challenge is to increase the RAID and filesystem without loosing any data or having downtime. (Note: not having downtime is possible since i use a system that supports hot swapping of drives)</p>
<p>In summary, this can be achieved by doing the following:<br />
1) Replace all disks in the RAID (one by one)<br />
2) Grow the RAID<br />
3) Expand the filesystem</p>
<p>In this guide i will be working on <strong>/dev/md1</strong></p>
<p>Now, let`s get to work!</p>
<h2><span style="color: #000000;"><strong>Part one: Replace the disks</strong></span></h2>
<p>PS: If your system does not support hot swap, you have to turn of/restart your machine for each disk you are replacing.</p>
<p>Remove a disk in the RAID, then insert a new (bigger) drive.<br />
Check dmesg (or similiar) to get the name of the last drive.</p>
<blockquote><p>[14522870.380610] scsi 15:0:0:0: Direct-Access     ATA      WDC WD15EARS-00Z 80.0 PQ: 0 ANSI: 5<br />
[14522870.381589] sd 15:0:0:0: [<strong>sdm</strong>] 2930277168 512-byte hardware sectors: (1.50 TB/1.36 TiB)<br />
[14522870.381622] sd 15:0:0:0: [<strong>sdm</strong>] Write Protect is off<br />
[14522870.381626] sd 15:0:0:0: [<strong>sdm</strong>] Mode Sense: 00 3a 00 00<br />
[14522870.381673] sd 15:0:0:0: [<strong>sdm</strong>] Write cache: enabled, read cache: enabled, doesn&#8217;t support DPO or FUA<br />
[14522870.381845] sd 15:0:0:0: [<strong>sdm</strong>] 2930277168 512-byte hardware sectors: (1.50 TB/1.36 TiB)<br />
[14522870.381870] sd 15:0:0:0: [<strong>sdm</strong>] Write Protect is off<br />
[14522870.381875] sd 15:0:0:0: [<strong>sdm</strong>] Mode Sense: 00 3a 00 00<br />
[14522870.381918] sd 15:0:0:0: [<strong>sdm</strong>] Write cache: enabled, read cache: enabled, doesn&#8217;t support DPO or FUA<br />
[14522870.381926] <strong> sdm</strong>: unknown partition table<br />
[14522870.397752] sd 15:0:0:0: [<strong>sdm</strong>] Attached SCSI disk<br />
[14522870.397878] sd 15:0:0:0: Attached scsi generic sg9 type 0</p></blockquote>
<p>Now, tell mdadm to add your new drive to the RAID you removed a drive from by doing:</p>
<blockquote><p>mdadm &#8211;manage /dev/<strong>md1</strong> &#8211;add /dev/<strong>sdm</strong></p></blockquote>
<p>Mdadm will then start syncing data to your new drive, to get a ETA of when it`s done (and when you can replace the next drive) check the mdadm status.</p>
<blockquote><p><span style="color: #000000;">root@bais:/home/samba/raid1/test# cat /proc/mdstat<br />
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]<br />
md0 : active raid5 sdl[2] sdi[4] sdf[3] sde[1] sdd[0]<br />
5860553728 blocks level 5, 128k chunk, algorithm 2 [5/5] [UUUUU]</span></p>
<p><span style="color: #000000;">md1 : active raid5 sdm[6] sdg[1] sdk[5] sdj[7](F) sdh[2] sdc[3] sda[0]<br />
2441932480 blocks level 5, 64k chunk, algorithm 2 [6/5] [UUUU_U]<br />
<strong> [==&gt;..................]  recovery = 14.2% (69439012/488386496)<strong> finish=155.8min</strong> speed=44805K/sec</strong></span></p>
<p><span style="color: #000000;">unused devices:</span></p></blockquote>
<p>So after around 155 minutes  the drive is active. (And the next one can be replaced)</p>
<p>Repeat this process for each disk in the RAID.</p>
<p>When you have changed all disks, run the command &#8220;mdadm &#8211;manage /dev/md<strong>X</strong> &#8211;remove failed&#8221; to remove any devices listes as failed for the given RAID.</p>
<h2><strong><strong>Part two: Increase the space available for the RAID</strong></strong></h2>
<p>This is done by simply issuing the command:</p>
<blockquote><p>mdadm &#8211;grow /dev/md1 &#8211;size=max</p></blockquote>
<p>And the RAID size is increased, note that this has caused the RAID to start a resync (again):</p>
<blockquote><p>root@bais:~# cat /proc/mdstat<br />
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]<br />
md0 : active raid5 sdl[2] sdi[4] sdf[3] sde[1] sdd[0]<br />
5860553728 blocks level 5, 128k chunk, algorithm 2 [5/5] [UUUUU]</p>
<p>md1 : active raid5 sdc[0] sdj[3] sdh[5] sdg[2] sdn[1] sdm[4]<br />
7325692480 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]<br />
<strong>[======&gt;..............]  resync = 34.6% (508002752/1465138496) finish=247.0min speed=64561K/sec</strong></p></blockquote>
<p>PS: note that the resync speed has increased by around 20MB/s after all the drives was replaced <img src='http://h3x.no/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You will now also notice that the RAID reports it`s new size:</p>
<blockquote><p>root@bais:~# mdadm &#8211;detail /dev/md1<br />
/dev/md1:<br />
Version : 00.90<br />
Creation Time : Sat Jun 13 01:55:27 2009<br />
Raid Level : raid5<br />
<strong>Array Size : 7325692480 (6986.32 GiB 7501.51 GB)</strong><br />
Used Dev Size : 1465138496 (1397.26 GiB 1500.30 GB)<br />
Raid Devices : 6<br />
Total Devices : 6<br />
Preferred Minor : 1<br />
Persistence : Superblock is persistent</p>
<p><strong>Update Time : Fri Mar  5 08:03:47 2010</strong><br />
State : active, resyncing<br />
Active Devices : 6<br />
Working Devices : 6<br />
Failed Devices : 0<br />
Spare Devices : 0</p>
<p>Layout : left-symmetric<br />
Chunk Size : 64K</p>
<p><strong>Rebuild Status : 35% complete</strong></p>
<p>UUID : ed415534:2925f54a:352a6ad4:582f9bd3 (local to host bais)<br />
Events : 0.247</p>
<p>Number   Major   Minor   RaidDevice State<br />
0       8       32        0      active sync   /dev/sdc<br />
1       8      208        1      active sync   /dev/sdn<br />
2       8       96        2      active sync   /dev/sdg<br />
3       8      144        3      active sync   /dev/sdj<br />
4       8      192        4      active sync   /dev/sdm<br />
5       8      112        5      active sync   /dev/sdh</p></blockquote>
<h2><strong><strong>Part three: resize file system<br />
</strong></strong></h2>
<p>Start off by unounting the file system in question and perform a file system check to make shure everything is a-ok</p>
<blockquote><p>root@bais:/home/torhenning# <strong>umount /home/samba/raid1</strong><br />
root@bais:/home/torhenning#<strong> fsck /dev/md1</strong><br />
fsck 1.41.4 (27-Jan-2009)<br />
e2fsck 1.41.4 (27-Jan-2009)<br />
/dev/md1 has gone 188 days without being checked, check forced.<br />
Pass 1: Checking inodes, blocks, and sizes</p></blockquote>
<p>Be warned: The fsck CAN take quite a time to finish.</p>
<p>When it`s complete, you are ready for the last step, which is to resize the filesystem:</p>
<blockquote><p>root@bais:/home/torhenning# <strong>resize2fs /dev/md1 6986G</strong><br />
resize2fs 1.41.4 (27-Jan-2009)<br />
Resizing the filesystem on /dev/md1 to 1831337984 (4k) blocks.</p></blockquote>
<p>And voila! Mount up the filesystem again and you are finished! <img src='http://h3x.no/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2010/03/02/howto-increase-disk-space-in-a-mdadm-raid/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Locate duplicate files under Ubuntu (And some ranting)</title>
		<link>http://h3x.no/2009/11/21/locate-dublicate-files-under-ubuntu-and-some-ranting</link>
		<comments>http://h3x.no/2009/11/21/locate-dublicate-files-under-ubuntu-and-some-ranting#comments</comments>
		<pubDate>Sat, 21 Nov 2009 14:35:55 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.h3x.no/?p=119</guid>
		<description><![CDATA[Edit: Post updated due to obvious user error Looking for a program to find dublicate files? Then fdupe saves the day! root@bais:/home/samba/raid0# apt-cache search fdupe fdupes &#8211; identifies duplicate files within given directories By the way, how come the apt search gives to random results? torhenning@bais:~$ sudo apt-cache search duplicate &#8230;. mirror &#8211; keeps FTP [...]]]></description>
			<content:encoded><![CDATA[<p>Edit: Post updated due to obvious user error <img src='http://h3x.no/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Looking for a program to find dublicate files? Then fdupe saves the day!</p>
<blockquote><p>root@bais:/home/samba/raid0# <strong>apt-cache search fdupe</strong><br />
fdupes &#8211; identifies duplicate files within given directories</p></blockquote>
<p>By the way, how come the apt search gives to random results?</p>
<blockquote><p>torhenning@bais:~$ sudo apt-cache search duplicate<br />
&#8230;.<br />
mirror &#8211; keeps FTP archives up-to-date<br />
vlc &#8211; multimedia player and streamer<br />
(and a lot of other irrelevant crap)</p></blockquote>
<p>Can`t exactly say that having to grep in a search results is a good &#8220;feature&#8221;..</p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2009/11/21/locate-dublicate-files-under-ubuntu-and-some-ranting/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting Groupwise to work on Ubuntu 64bit (9.04)</title>
		<link>http://h3x.no/2009/05/15/getting-groupwise-to-work-on-ubuntu-64bit-904</link>
		<comments>http://h3x.no/2009/05/15/getting-groupwise-to-work-on-ubuntu-64bit-904#comments</comments>
		<pubDate>Fri, 15 May 2009 09:28:54 +0000</pubDate>
		<dc:creator>Tor Henning Ueland</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[alien]]></category>
		<category><![CDATA[Groupwise]]></category>

		<guid isPermaLink="false">http://www.h3x.no/?p=52</guid>
		<description><![CDATA[Just a quick post on what i did to get Groupwise up and running on Ubuntu 64bit: 1) Installed a 32bit virtual Ubuntu machine, and converted the Groupwise installer to a .deb package with &#8220;alien -c filename&#8221;. 2) Moved the .deb package back to the host machine. 3) Installed 32bit java libraries &#8220;sudo apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post on what i did to get Groupwise up and running on Ubuntu 64bit:</p>
<p>1) Installed a 32bit virtual Ubuntu machine, and converted the Groupwise installer to a .deb package with &#8220;alien -c filename&#8221;.</p>
<p>2) Moved the .deb package back to the host machine.</p>
<p>3) Installed 32bit java libraries &#8220;sudo apt-get install ia32-sun-java6-bin&#8221;</p>
<p>4) Forced installation of the Groupwise client &#8220;sudo dpkg -i &#8211;force-architecture novell-groupwise-gwclient_8.0.0-84911_i386.deb&#8221;</p>
<p>5) And it works <img src='http://h3x.no/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://h3x.no/2009/05/15/getting-groupwise-to-work-on-ubuntu-64bit-904/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
