<?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>My IT-blog &#187; nas</title>
	<atom:link href="http://dev.eek.be/tag/nas/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.eek.be</link>
	<description>IT knowledge exchange</description>
	<lastBuildDate>Fri, 04 Jun 2010 05:34:15 +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>Change folders for Synology media server</title>
		<link>http://dev.eek.be/2010/01/change-folders-for-synology-media-server/</link>
		<comments>http://dev.eek.be/2010/01/change-folders-for-synology-media-server/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 22:07:17 +0000</pubDate>
		<dc:creator>Wim</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Synology]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://dev.eek.be/?p=264</guid>
		<description><![CDATA[When you enable the Synology Media Server on your NAS, there are 3 directories added to your file-system (video, music and photo) which will be used for the DLNA/UPnP media server to play the corresponding files. I wasn&#8217;t very happy with these 3 directories because I wanted to categorize my media in other directories. In [...]]]></description>
			<content:encoded><![CDATA[<p>When you enable the Synology Media Server on your NAS, there are 3 directories added to your file-system (video, music and photo) which will be used for the DLNA/UPnP media server to play the corresponding files.</p>
<p>I wasn&#8217;t very happy with these 3 directories because I wanted to categorize my media in other directories. In this post, I will post how I&#8217;ve resolved this problem.</p>
<p>First, enable SSH access to the NAS and log in.<br />
<a href="http://dev.eek.be/wp-content/uploads/2010/01/syn1.png"><img src="http://dev.eek.be/wp-content/uploads/2010/01/syn1.png" alt="" title="syn1" width="640" height="400" class="alignleft size-full wp-image-265" /></a></p>
<p>My first idea to tackle this issue was to use of symbolic links</p>
<pre class="prettyprint" lang-java>
ln -s /volume1/MyMusicDirectory /volume1/music
</pre>
<p>I&#8217;ve re-indexed my files on the NAS and everything worked instantly. All the files in MyMusicDirectory where indexed so I was very happy&#8230;but not for long.<br />
I noticed quickly that the new files I&#8217;ve placed in MyMusicDirectory weren&#8217;t auto-indexed by the NAS. I always had to re-index through the webinterface which can take hours when there is a lot of data to index so that was a big issue.<br />
I figured out what the problem was: symbolic links will be considered as files and not as directories so the autoindexer wouldn&#8217;t follow the symbolic link.</p>
<p>Up to idea 2: mount &#8211;bind<br />
I used mount &#8211;bind to create an unbreakable link which normally would be used as a directory by the NAS so the contents could be auto-indexed.</p>
<pre class="prettyprint" lang-java>
mount --bind /volume1/MyMusicDirectory /volume1/music
</pre>
<p>It worked!! YES!!<br />
Till I&#8217;ve rebooted the NAS. The mount was gone and I had to manually add it again. Not something I want to do at every reboot.</p>
<p>Up to idea 3: changing fstab<br />
The file /etc/fstab will be loaded at startup to mount the filesystem so I&#8217;ve added the following rule in the file:</p>
<pre class="prettyprint" lang-java>
/volume1/MyMusicDirectory /volume1/music bind defaults,bind 0 0
</pre>
<p>I saved the file and rebooted and it didn&#8217;t worked. The fstab file will be overridden at startup with Synology&#8217;s default fstab-file so the rule I&#8217;ve entered before was deleted.</p>
<p>And then idea 3: <b>The solution</b><br />
Create a file rc.local</p>
<pre class="prettyprint" lang-java>
touch /etc/rc.local
</pre>
<p>open the file and add the following line:</p>
<pre class="prettyprint" lang-java>
mount --bind /volume1/MyMusicDirectory /volume1/music
</pre>
<p>Now restart the NAS and you&#8217;re done.<br />
The files in MyMusicDirectory will be auto-indexed by the media server.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.eek.be/2010/01/change-folders-for-synology-media-server/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
