<?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>storage Archives - DemonPenguins Brain</title>
	<atom:link href="https://brain.demonpenguin.co.uk/category/storage/feed/" rel="self" type="application/rss+xml" />
	<link>https://brain.demonpenguin.co.uk/category/storage/</link>
	<description>Random Mumblings</description>
	<lastBuildDate>Fri, 07 Dec 2018 13:40:52 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://i0.wp.com/brain.demonpenguin.co.uk/wp-content/uploads/2018/12/DP_favicon.png?fit=20%2C32&#038;ssl=1</url>
	<title>storage Archives - DemonPenguins Brain</title>
	<link>https://brain.demonpenguin.co.uk/category/storage/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">102551891</site>	<item>
		<title>Adding SphinxSE to MySQL on ubuntu server</title>
		<link>https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/</link>
					<comments>https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/#respond</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Thu, 30 Apr 2015 09:05:04 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[tech talk]]></category>
		<guid isPermaLink="false">https://brain.demonpenguin.co.uk/?p=409</guid>

					<description><![CDATA[<p>The post <a href="https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/">Adding SphinxSE to MySQL on ubuntu server</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="et_pb_section et_pb_section_0 et_section_regular" >
				
				
				
				
				
				
				<div class="et_pb_row et_pb_row_0">
				<div class="et_pb_column et_pb_column_4_4 et_pb_column_0  et_pb_css_mix_blend_mode_passthrough et-last-child">
				
				
				
				
				<div class="et_pb_module et_pb_text et_pb_text_0  et_pb_text_align_left et_pb_bg_layout_light">
				
				
				
				
				<div class="et_pb_text_inner">Unfortunately installing sphinx search on Ubuntu using apt-get does not install the SphinxSE engine in MySQL.&nbsp; To do that we need to build it from source.&nbsp; We can do that using the following steps:

Ensure that the build-essential packages are installed, as well as all the dependencies required for building mysql-server
<pre>apt-get install build-essential
apt-get build-dep mysql-server
</pre>
Next step get the mysql-server source code:
<pre>cd /tmp
dpkg --list | grep mysql-server
</pre>
In my case this gives:
<pre>ii  mysql-server                        5.5.43-0ubuntu0.14.04.1             all          MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.5                    5.5.43-0ubuntu0.14.04.1             amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-5.5               5.5.43-0ubuntu0.14.04.1             amd64        MySQL database server binaries
</pre>
So we can see we are using mysql-server version 5.5.43. Now we need to grab the source code:
<pre>wget 'http://mysql.mirrors.hoobly.com/Downloads/MySQL-5.5/mysql-5.5.43.tar.gz'
</pre>
Next we need the source code for sphinxsearch
<pre>wget 'http://sphinxsearch.com/files/sphinx-2.2.9-release.tar.gz'
</pre>
Now we need to extract the source code for both programs
<pre>tar xvfz mysql-5.5.43.tar.gz 
tar xvfz sphinx-2.2.9-release.tar.gz
</pre>
Next we need to copy the mysqlse engine code to the mysql source tree:
<pre>cp -R sphinx-2.2.9-release/mysqlse/ mysql-5.5.43/storage/sphinx
</pre>
Then we need to compile mysql:
<pre>cd mysql-5.5.43
./BUILD/autorun.sh
./configure
make
</pre>
Now go and get yourself a coffee &#8211; this may take some time 😉

OK so now you are caffined up and mysql has been build we need to copy a couple of files to the mysql you have on you system:
<pre>cp storage/sphinx/ha_sphinx.* /usr/lib/mysql/plugin/
</pre>
And now we need to login to mysql and enable the engine:
<pre>mysql -uroot -p mysql
mysql&gt; INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so';
mysql&gt; show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| PERFORMANCE_SCHEMA | YES     | Performance Schema                                             | NO           | NO   | NO         |
| MRG_MYISAM         | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| MyISAM             | YES     | MyISAM storage engine                                          | NO           | NO   | NO         |
| SPHINX             | YES     | Sphinx storage engine 2.2.9-release                            | NO           | NO   | NO         |
| CSV                | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
| FEDERATED          | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| InnoDB             | DEFAULT | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
10 rows in set (0.00 sec)
</pre>
As you can see the engine is now listed along with the standard ones.

To remove the engine you can do this.
<pre> mysql&gt; UNINSTALL PLUGIN sphinx; 
</pre></div>
			</div>
			</div>
				
				
				
				
			</div>
				
				
			</div>
<p>The post <a href="https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/">Adding SphinxSE to MySQL on ubuntu server</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2015/04/adding-sphinxse-to-mysql-on-ubuntu-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">409</post-id>	</item>
		<item>
		<title>There be Buffalo here&#8230;</title>
		<link>https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/</link>
					<comments>https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/#comments</comments>
		
		<dc:creator><![CDATA[dpadmin]]></dc:creator>
		<pubDate>Tue, 02 Mar 2010 11:12:22 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[tech talk]]></category>
		<category><![CDATA[Buffalo TeraStation]]></category>
		<category><![CDATA[BUFFALO TS-HTGL]]></category>
		<category><![CDATA[HS-DHTGL]]></category>
		<category><![CDATA[Live]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[Pro]]></category>
		<guid isPermaLink="false">https://brain.demonpenguin.co.uk/?p=90</guid>

					<description><![CDATA[<p>The battle to get nfs working on a Buffalo TeraStation Live by updating it's firmware to the Pro version</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/">There be Buffalo here&#8230;</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">I have had a Buffalo TeraStation Live for several years now, and have always been a bit irritated that I have had to use SMB for mounting the share to my linux boxes (pretty much all of my boxes!). I managed a while ago to install a version of nfs on the box which however was only version 2 so I hit the maximum file size limit of 2GB, a bit of a pain when I have a lot of files over that size.</p>
<p style="text-align: justify;">I was hunting around the web the other day &#8211; as I do on occasion 🙂 &#8211; when I came across <a href="http://forum.buffalo.nas-central.org/viewtopic.php?f=22&amp;t=20431">this thread</a>.</p>
<p style="text-align: justify;">&#8220;A-ha!&#8221; I thinks to me-self! So the TeraStation Pro is essentially the same hardware with different software on it! Not only that the Pro has nfs on it properly!</p>
<p style="text-align: justify;">I duly went and downloaded the latest pro version of the firmware, unzipped it and edited the ini file to:</p>
<pre>[Application]
Title = BUFFALO TS-HTGL Updater Ver.1.33
WaitReboot = 360
WaitFormat = 300
[Target]
ProductID = 0x00002006
Name = HS-DHTGL

[Flags]
VersionCheck = 0

[SpecialFlags]
Debug=1
</pre>
<p style="text-align: justify;">Now run the firmware update! (<em>Note to self, do not have any web sessions open, or be logged in via ssh or telnet whilst doing this or it will be slow and will fail!</em>) This worked a charm, had to turn the machine back on a couple of times as the firmware updated. I logged back into the web front end and went about setting up the nfs options, then mounted them on one of the linux boxes. Have a poke around &#8211; yup all my files are visible, but hang-on a sec, what&#8217;s this? The file owners were all over the place, not what I was expecting.</p>
<p>OK</p>
<pre>chown blah:blah *</pre>
<p style="text-align: justify;">Permission denied! Damn! Time to crack the box again!</p>
<pre>java -jar acp_commander.jar -t 192.168.0.100 -o</pre>
<p style="text-align: justify;">followed by a telnet into the box. Have a look at</p>
<pre>/etc/exports</pre>
<p style="text-align: justify;">and see that the options on the shares are:</p>
<pre>rw,sync,all_squash,anonuid=99,anongid=99,no_subtree_check</pre>
<p style="text-align: justify;">well, that&#8217;s not what I want! SO I edit the options to</p>
<pre>rw,sync,no_root_squash,no_subtree_check</pre>
<p>and</p>
<pre>exportfs -ra</pre>
<p style="text-align: justify;">remount the share, and all works as expected!</p>
<p style="text-align: justify;">Well sort of. As soon as any change is made on the web fronted the nfs server is restarted and the options magically change back to their defaults!</p>
<p>Damn!</p>
<p style="text-align: justify;">OK time to find where the file is being generated from! So looking at</p>
<pre>/etc/init.d/nfs.sh</pre>
<p style="text-align: justify;">we see the usual startup type stuff and lo and behold there is a line that reads</p>
<pre>nas_configgen -c nfs</pre>
<p style="text-align: justify;">Right well I&#8217;ll change that I thought, should only be a script file, but alas it is a binary, so one small change in the script after the offending line:</p>
<pre>perl -pi -w -e \
's/rw,sync,all_squash,anonuid=99,anongid=99,\
no_subtree_check/rw,sync,no_root_squash, \
no_subtree_check/g;' /etc/exports</pre>
<p style="text-align: justify;">&#8211; thanks to &#8220;The Book of Pete&#8221; means that the changes I want are applied to the</p>
<pre>/etc/exports</pre>
<p style="text-align: justify;">file after it is written to the system, and root can go mad with permissions and I can at last start running some backup scripts that will maintain ownership of files as I want it to! After all the box is only for my use on my LAN and not available to the public at large!</p>
<p>The post <a href="https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/">There be Buffalo here&#8230;</a> appeared first on <a href="https://brain.demonpenguin.co.uk">DemonPenguins Brain</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brain.demonpenguin.co.uk/2010/03/there-be-buffalo-here/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">90</post-id>	</item>
	</channel>
</rss>
