Add folders on other volumes to media server

Questions regarding media streaming across varied protocols, including UPnP/DLNA/CIFS can be placed here.

Add folders on other volumes to media server

Postby Taxman » Sat Oct 30, 2010 5:56 pm

Update: This method is now out of date, the means to add other folders is built into the DLNA media server as of DSM 3.2, look under control panel\media server\indexed folder.

I thought I'd just put this here for easy reference as it gets asked a couple of times. Basically the Synology server is limited to the 3 default folders it creates music:photo:video on volume1, this can be a bit of a problem under certain conditions if you happen to not be using a RAID/JBOD array and do not have a Samba capable media player that can access the folders on volume 2,3 or 4.

But what you can do is use the mount command to create a link to a folder on volume 1 and this allows the UPnP/DLNA server to index the contents of the folder making it appear on your UPnP/DLNA client.

Tips for naming of folders for use with mount command;
* Always user lower case letters, as the command is case specific it keeps things a lot easier.
* Don't use spaces in the mount target folder name, use an underscore for example use /video_volume2/ instead of /video volume2/


Step1: Log into the DSM, go to control panel\shared folder and create a folder on volume 2, 3 or 4 and call it anything media or whatever. For the purpose of this explanation I just called it media.

Step 2: Now create a sub folder inside /volume1/video/ for example media_volume2.

Step 3: Go to control panel\terminal and enable the SSH service.

Step 4: If your NAS admin user account does not have a password set one now.

Step 4: Make a note of the IP address of the NAS, the system info or Synology Assistant will tell you.

Step 5: Download Putty (for Windows) or use Terminal (OSX) and enter in the IP of the NAS to connect to it. You will be asked about a key just say yes to that then at the command prompt it will ask for a login type root and press enter. It will then ask for a password enter in your admin password.

Step 6: type in this command and press enter (right click pastes in Putty)
mount -o bind /volume2/media/ /volume1/video/media_volume2/

If everything went well and there are no errors close Putty. Now the /volume2/media/ and /volume1/video/media_volume2/ are linked, I recommend using the /volume1/video/media_volume2/ as the destination folder when copying files to the NAS or using FileStation as this will trigger the automatic index update so the files will appear on your UPnP/DLNA client. If for some reason they do not run a re-index and that should make them show.

The mount will remain in place until the NAS is rebooted.
Last edited by Taxman on Thu Jan 19, 2012 3:12 pm, edited 2 times in total.
Taxman
Guru
Guru
 
Posts: 1423
Joined: Sun Mar 23, 2008 1:45 pm

Re: Add folders on other volumes to media server

Postby PeterN » Tue Dec 07, 2010 11:35 pm

Dear Taxman,
Thank you for the useful instructions.
I have implemented them and can see the linked "volume2/movies" folder and files inside the "/volume1/video/media_volume1" folder with the Windows7 Explorer on my PC.
I also have Conceptronic CFULLHDMAi network player. It was working OK with another NAS/DLNA but now it can not find the media files in the "video" folder after the DLNA server on the Synology 411j finished indexing.
Could you please suggest me solution for this problem?
Thanks.
PeterN
I'm New!
I'm New!
 
Posts: 2
Joined: Tue Dec 07, 2010 9:13 pm

Re: Add folders on other volumes to media server

Postby Taxman » Thu Dec 09, 2010 5:37 pm

Even after a manual re-indexing the files dont show ?

If so not sure to be honest they should be showing, the indexing process is only triggered if you copy your media into the "/volume1/video/media_volume1" folder otherwise the media server will not automatically update it's listings.
Taxman
Guru
Guru
 
Posts: 1423
Joined: Sun Mar 23, 2008 1:45 pm

Re: Add folders on other volumes to media server

Postby ljcarr » Sat Jan 08, 2011 2:34 pm

Thanks for the explanation Taxman, I am just about to try and do something like this, maybe you could tell if you have any experience with media servers (i.e Popcorn hour c-200). I ask because my setup situation is as follows: I have a popcorn hour(pch) media player downstairs and a synology CS-407 nas up stairs, which has 2 X 1TB hdd in RAID0 (room for 2 more later), on the 1st hdd I have a folder with my movies inside. Now I have the pch linked to the movie folder on the nas, however this disk is nearly full and I am not sure when this disk is full and I want to start filling the second disk, how I get the movies to appear as if they are in the folder on the first disk? otherwise the pch will not see them, I would have to setup another link to the second disk, and obviously this will repeat every time I add a disk. Could you please give me some advise or point me towards resources. cheers
ljcarr
Trainee
Trainee
 
Posts: 18
Joined: Sat May 03, 2008 8:23 pm

Re: Add folders on other volumes to media server

Postby jbsf » Wed Jan 12, 2011 8:23 am

I'm just beginning the process of setting up my DS211j to use as a FLAC DLNA server for my network DAC, I've read the review on Amazon for the product which is the first time I was aware that DLNA supports only one 'music folder' ... so to try to keep this brief, is this solution posted

a) One that will enable me to to have effectively two shared music folders, ie on each drive, visible ?
b) Is there anything that can be done to make this 'permanent', ie I don't plan to leave my NAS on a lot of the time when I'm not using to listen to music..

As a newbie to all of this, I sense of lot of frustration from other users about this issue, and equally from Synology forum moderators :roll: ... so my question is, is this a universal DLNA problem, or something unique to Synology's DLNA 'implementation' ??


Taxman wrote:I thought I'd just put this here for easy reference as it gets asked a couple of times. Basically the Synology server is limited to the 3 default folders it creates music:photo:video on volume1, this can be a bit of a problem under certain conditions if you happen to not be using a RAID/JBOD array and do not have a Samba capable media player that can access the folders on volume 2,3 or 4.

But what you can do is use the mount command to create a link to a folder on volume 1 and this allows the UPnP/DLNA server to index the contents of the folder making it appear on your UPnP/DLNA client.

....
The mount will remain in place until the NAS is rebooted.
jbsf
I'm New!
I'm New!
 
Posts: 2
Joined: Sat Jan 01, 2011 2:54 am

Re: Add folders on other volumes to media server

Postby psedog » Thu Jan 20, 2011 12:12 pm

I'm not sure about using bind, but I do know that using Symbolic links work even after rebooting. Windows won't be able to access the links. If you need them to work in windows, then a little bit of tweaking will be required on your NAS. LInk to the Windows fix http://forum.synology.com/enu/viewtopic.php?f=27&t=32611

Here is some sample code for creating a symbolic link

Code: Select all
DiskStation> cd /volume1
DiskStation> ln -s /volume1/2TB_Beast/Video video
DiskStation> ln -s /volume2/2TB_Beast/Music music


I'm only using a single hard disk NAS, so I'm guessing that your second hard disk will be @ /volume2

Hope this helps.
psedog
Beginner
Beginner
 
Posts: 26
Joined: Thu Jan 13, 2011 12:36 am

Re: Add folders on other volumes to media server

Postby chuongng » Thu Feb 10, 2011 9:47 pm

psedog wrote:I'm not sure about using bind, but I do know that using Symbolic links work even after rebooting.

Here is some sample code for creating a symbolic link

Code: Select all
DiskStation> cd /volume1
DiskStation> ln -s /volume1/2TB_Beast/Video video
DiskStation> ln -s /volume2/2TB_Beast/Music music


I'm only using a single hard disk NAS, so I'm guessing that your second hard disk will be @ /volume2


Has anyone tried this and confirmed that the Symbolic Links still work after reboot? Pls confirm ... I want to get a NAS and it seems that NAS from Synology is better design, esp its application than QNAP.

To psedog: have you actually tried it and confirm that's the case? Thanks.
chuongng
I'm New!
I'm New!
 
Posts: 4
Joined: Thu Feb 10, 2011 9:41 pm

Re: Add folders on other volumes to media server

Postby robotmak » Fri Mar 04, 2011 5:38 pm

Correct me if I am wrong, but i found out that if you delete that folder that you "mount -o bind" it will also delete the original folder with the files on there. Be cautious. Before you delete those folder, "umount" them first.

Because I am not familiar with linux, is there way around this?
robotmak
Trainee
Trainee
 
Posts: 11
Joined: Tue Feb 01, 2011 3:53 pm

Re: Add folders on other volumes to media server

Postby wallacio » Sun Mar 06, 2011 3:47 pm

Creating symbolic links works and the links are preserved after a reboot.

I did this with photos, but there's no reason why it wouldn't work with videos too.

Code: Select all
WALLANAS> ls -l /volume1/photo
drwxrwxrwx    2 root     root          4096 Mar  5 13:36 @eaDir
lrwxrwxrwx    1 root     root            29 Feb 26 17:25 andy -> /volume1/homes/andy/Pictures/
lrwxrwxrwx    1 root     root            30 Feb 26 17:25 julie -> /volume1/homes/julie/Pictures/


So in my DNLA clients, I see two top level folders; "julie" and "andy" which is content pulled from folders in respective home shares.
wallacio
I'm New!
I'm New!
 
Posts: 7
Joined: Sun Feb 13, 2011 3:17 pm

Re: Add folders on other volumes to media server

Postby HouseUK » Sun Apr 03, 2011 11:07 am

When trying to Mount folders I have found that my Volume1 is called Volume 1 and as such the commands arent working.
Anybody know a way of fix this that dosnt involve rebuilding the volume from scratch?

Also can you mount folders from USB drives? usbshare1 for example.
HouseUK
I'm New!
I'm New!
 
Posts: 6
Joined: Sun Apr 03, 2011 10:50 am

Re: Add folders on other volumes to media server

Postby symplify » Sun Apr 10, 2011 5:29 pm

I hope this is useful

I only have one hdd in the diskstation at the moment and it is volume1.

in the volume1 music folder I created a folder called usbsharemusic
in the volume1 video folder I created a folder called usbsharemovies

I have 2 external usb hard drives ntfs format, one with music (I called the folder music2)
the other with videos (I called the folder movies2)

check in control panel of diskstation (external devices) which volumeUSB number is for which external drive
stay logged in diskstation

I used putty to access the diskstation and typed
cd /
dir
ln -s /volumeUSB1/usbshare/movies2 /volume1/video/usbsharemovies
enter
ln -s /volumeUSB2/usbshare/music2 /volume1/music/usbsharemusic
enter
reboot

the diskstation will restart and close putty.
log back in to diskstation, re-index media dlna

you cannot see anything in the folders in disksation only in a media player like
PS3, windows player, VLC

symlink folders are always there after restarts.
if adding to usb external drives in any way I have to re-index to see it in a player.
Streaming is good with no problems, all is well.

Good luck.
symplify
I'm New!
I'm New!
 
Posts: 3
Joined: Sun Apr 10, 2011 4:57 pm

Re: Add folders on other volumes to media server

Postby HouseUK » Sun Apr 10, 2011 11:54 pm

Thank you very much for that, I will give a try tomorrow night its abit late right now.
HouseUK
I'm New!
I'm New!
 
Posts: 6
Joined: Sun Apr 03, 2011 10:50 am

Re: Add folders on other volumes to media server

Postby HouseUK » Sun Apr 17, 2011 9:54 pm

Ok so i had it working a treat, but after powering off while i sorted out the wires from my switch I have a strange access issue.

In the mediaserver everything works great.

BUT in windows or file browser the USB drives are unaccessable which means I cant add movies to the nice new share i have created. In windows it says i have no access, in DSM they just dont show up in file browser.

Any Ideas whats gone wrong and how to fix it?
HouseUK
I'm New!
I'm New!
 
Posts: 6
Joined: Sun Apr 03, 2011 10:50 am

Re: Add folders on other volumes to media server

Postby symplify » Mon Apr 18, 2011 3:04 pm

which wires from what switch, not sure what you mean
is the media server playing files from the external drives or the video folder

are your usb devices showing in control panel(diskstation)
are your usb devices in the correct ports on diskstation
if not they will not show in file browser or will not be allocated to the right share
if usb drives are not correctly ejected in control panel(external devices) before unplugging, it can cause probs reading from drives.
symplify
I'm New!
I'm New!
 
Posts: 3
Joined: Sun Apr 10, 2011 4:57 pm

Re: Add folders on other volumes to media server

Postby HouseUK » Mon Apr 18, 2011 8:28 pm

ok i'll try to explain.

After rebooting the server because i had to turn the power off while moving some cales around, the media server sees and streams files from the USB drive but in windows explorer it just keeps asking for a password, even though I have logged on.

In file browser the USB drives dont show up and as such I can not copy any more files onto the USD drives. but the drives show up perfectly normally under external devices on control panel.

If i try and go through the links i get an error saying i need permission to access this area.
HouseUK
I'm New!
I'm New!
 
Posts: 6
Joined: Sun Apr 03, 2011 10:50 am

Next

Return to Media Server

Who is online

Users browsing this forum: No registered users and 1 guest