View unanswered posts | View active topics It is currently Thu May 23, 2013 6:58 am



Reply to topic  [ 70 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7
 HOWTO: Let the Media Library Index a mounted NAS share 
Author Message

Joined: Wed Nov 23, 2011 11:35 pm
Posts: 14
Post Re: HOWTO: Let the Media Library Index a mounted NAS share
Hope that someone can help me:

In the following file i entered at the bottom the following tekst
vi /usr/local/etc/rcS

sleep 35
mount -t cifs //192.168.1.122/Films /mnt/usbmounts/sda1/films -o username:XXXX,password=XXXX
mount -o bind /usr/local/etc/Films /tmp/usbmounts/sda1/films

Now De ac-ryan boots oke, and i can klik on jukebox-usb-C-indexfile
Then everything works

But what i want is: when AC-ryan boots, that i can click on Films in homescreen.
Is that possible?

(how do i create a file in Putty, i read somewhere that i have to create a file "mountnas"

Thnx


Wed Nov 23, 2011 11:48 pm
Profile

Joined: Mon Dec 26, 2011 7:44 pm
Posts: 1
Post Re: HOWTO: Let the Media Library Index a mounted NAS share
Here is my configuration files.
- Make connection to your AC Ryan Mini HD2

Code:
# vi /usr/local/etc/mountnas
#!/bin/sh

sleep 25

MDSHARE1=//192.168.2.13/Multimedia
MDSHARE2=//192.168.2.13/Family
MD1=/usr/local/etc/Multimedia
MD2=/usr/local/etc/Family
USBSHARE=/tmp/usbmounts/sda1
OPTIONS=nolock,proto=tcp,username=youruser,password=secret

rmdir $MD1 $MD2
mkdir $MD1
mkdir $MD2

i=1
while [ $i != 0 ]
  do
  if [$(mount | grep /tmp/usbmounts/ | grep sd | wc -l) -eq 0 ]; then
    sleep 10
  else
    i=0
  fi
done

mount -t cifs $MDSHARE1 $MD1 -o $OPTIONS
sleep 2
mount -t cifs $MDSHARE2 $MD2 -o $OPTIONS
sleep 2

mount -o bind $MD1/video $USBSHARE/Videos
mount -o bind $MD1/mp3/mp3_collectie $USBSHARE/Music
mount -o bind $MD2/fotos $USBSHARE/Pictures


Then remove a hidden direcotry to force indexing.

Code:
# rm -rf  /tmp/usbmounts/sda1/.Theater


Then reboot the server:

Code:
# reboot


Question: Why does indexing not work. I can see all the files in File-Explorer on the extern USB disk.

Note: I am using a QNap 419 as central NAS.


Mon Dec 26, 2011 8:12 pm
Profile

Joined: Fri Dec 30, 2011 12:01 pm
Posts: 1
Post Re: HOWTO: Let the Media Library Index a mounted NAS share
I got my AC Ryan last night, if I knew it'd be this ... troublesome to get your data from the network to show on the AC Ryan without clicking 10 million times ... I would've stayed with my popcorn (which could)

Anyway, after playing around a bit with this, I managed to get my data shown in the normal libraries, via manually mounting them. Having them automatically mounted seems to not work though, as I oftenly add new movies, series or songs to my NAS ... I wouldn't really want to go through the ordeal everytime to have them manually synced.

I added these lines to the rcS file - these lines work manually but don't seem to happen automatically:
sleep 25
mount -t cifs //192.168.1.150/Media /mnt/usbmounts/sda1/Media -o username=XXX,password=YYY

this however did the trick:
/usr/local/etc # mount -t cifs //192.168.1.150/Media /mnt/usbmounts/sda1/Media -o username=XXX,password=YYY

when I then rescanned the usb storage it starts to well I suppose scanning / adding them (it also takes quite a while)


Fri Dec 30, 2011 12:07 pm
Profile

Joined: Mon Jan 02, 2012 11:39 am
Posts: 19
Post Re: HOWTO: Let the Media Library Index a mounted NAS share
So i have it sript working on the newest firmware (r6629) but almost..

It script is working (after a reboot i see in /mnt/usbmounts/Movies my samba share full of movies)

So i go to mediaplayer, and go to Movies, no movies!

So i go to files, usb -> C: (?) -> Movies there it is..

How fix i that i see movies in the main Movies? For now, working fine..

(sorry for my bad english)

So, autoscan enabled that works.. I post my script in a couple of hours..


Mon Jan 02, 2012 11:43 am
Profile

Joined: Mon Jan 02, 2012 11:39 am
Posts: 19
Post Re: HOWTO: Let the Media Library Index a mounted NAS share
So, i worked it.. But it works!

Its a verry c00l en smart script, i like it. Thanks to a friend of my.

Code:
#!/bin/sh

sleep 25

mount -r -t cifs -o nolock,proto=tcp,username=USER,password=PASS //PATH/TO/SHARE /usr/local/etc/SHARE

sleep 2

mount -r /usr/local/etc/SHARE/Movies /tmp/usbmounts/sda1/Movies/Movies
mount -r /usr/local/etc/SHARE/Tv /tmp/usbmounts/sda1/Movies/Tv

mount -r /usr/local/etc/SHARE/Pictures /tmp/usbmounts/sda1/Pictures

mount -r /usr/local/etc/SHARE/Music /tmp/usbmounts/sda1/Music/Music
mount -r /usr/local/etc/SHARE/MusicDVD /tmp/usbmounts/sda1/Music/MusicDVD

sleep 2



It works great, turn autoscan on, and do there a usb stick in and great some directorys (mkdir /usr/local/etc/SHARE) (/tmp/usbmounts/sda1/Music/Music)

etc etc so you have everything, this script can you get more directorys to one mountpoint

(Now i go to Files -> Usb -> C: -> Movies -> Tv -> Allo Allo) a lot faster than go to network, he's indexing it now, so a lot faster.

Thx to you guys!


Mon Jan 02, 2012 9:58 pm
Profile

Joined: Tue Jan 10, 2012 4:39 pm
Posts: 1
Post Re: HOWTO: Let the Media Library Index a mounted NAS share
Is there some newbie tutorial for this !??! I see all kinds of scripts but what file do I need to edit. Do I need to get access to my PlayonHD2 Mini from my PC !?!??


Tue Jan 10, 2012 4:48 pm
Profile

Joined: Mon Jan 09, 2012 11:30 pm
Posts: 4
Post Re: HOWTO: Let the Media Library Index a mounted NAS share
Dj-Visto wrote:
So, i worked it.. But it works!

Its a verry c00l en smart script, i like it. Thanks to a friend of my.

Code:
#!/bin/sh

sleep 25

mount -r -t cifs -o nolock,proto=tcp,username=USER,password=PASS //PATH/TO/SHARE /usr/local/etc/SHARE

sleep 2

mount -r /usr/local/etc/SHARE/Movies /tmp/usbmounts/sda1/Movies/Movies
mount -r /usr/local/etc/SHARE/Tv /tmp/usbmounts/sda1/Movies/Tv

mount -r /usr/local/etc/SHARE/Pictures /tmp/usbmounts/sda1/Pictures

mount -r /usr/local/etc/SHARE/Music /tmp/usbmounts/sda1/Music/Music
mount -r /usr/local/etc/SHARE/MusicDVD /tmp/usbmounts/sda1/Music/MusicDVD

sleep 2



It works great, turn autoscan on, and do there a usb stick in and great some directorys (mkdir /usr/local/etc/SHARE) (/tmp/usbmounts/sda1/Music/Music)

etc etc so you have everything, this script can you get more directorys to one mountpoint

(Now i go to Files -> Usb -> C: -> Movies -> Tv -> Allo Allo) a lot faster than go to network, he's indexing it now, so a lot faster.

Thx to you guys!


Trying to do ANY mount to a windows 7 shared folder (which IS accessible through the " network" function / browser in the ac ryan) results in a " Failed: error code 2" . Any ideas what this code means?


Tue Jan 10, 2012 11:19 pm
Profile

Joined: Mon Jan 09, 2012 11:30 pm
Posts: 4
Post Re: HOWTO: Let the Media Library Index a mounted NAS share
schudel wrote:
Dj-Visto wrote:
So, i worked it.. But it works!

Its a verry c00l en smart script, i like it. Thanks to a friend of my.

Code:
#!/bin/sh

sleep 25

mount -r -t cifs -o nolock,proto=tcp,username=USER,password=PASS //PATH/TO/SHARE /usr/local/etc/SHARE

sleep 2

mount -r /usr/local/etc/SHARE/Movies /tmp/usbmounts/sda1/Movies/Movies
mount -r /usr/local/etc/SHARE/Tv /tmp/usbmounts/sda1/Movies/Tv

mount -r /usr/local/etc/SHARE/Pictures /tmp/usbmounts/sda1/Pictures

mount -r /usr/local/etc/SHARE/Music /tmp/usbmounts/sda1/Music/Music
mount -r /usr/local/etc/SHARE/MusicDVD /tmp/usbmounts/sda1/Music/MusicDVD

sleep 2



It works great, turn autoscan on, and do there a usb stick in and great some directorys (mkdir /usr/local/etc/SHARE) (/tmp/usbmounts/sda1/Music/Music)

etc etc so you have everything, this script can you get more directorys to one mountpoint

(Now i go to Files -> Usb -> C: -> Movies -> Tv -> Allo Allo) a lot faster than go to network, he's indexing it now, so a lot faster.

Thx to you guys!


Trying to do ANY mount to a windows 7 shared folder (which IS accessible through the " network" function / browser in the ac ryan) results in a " Failed: error code 2" . Any ideas what this code means?


Never mind, I solved it. I needed to create the mount directories on the usb stick in advance. Now it seems to work fine :-)


Wed Jan 11, 2012 11:17 am
Profile

Joined: Tue Jan 24, 2012 1:28 pm
Posts: 1
Post I need help , cannot mount to USB
Hello Guys ,

I am relatively new to Linux
I cannot seem to mount my buffallo link station on a usb folder
(Otherwise my NAS works ok when i access it in the player via filebrowser)

I have plugged a usb device into the mediaplayer (formatted FAT)
i go to busybox and checked if i can access the drive and have write access
cd /mnt/usbmounts/sda/
mkkdir movies
cd movies
So far so good i cann access the usb and also read and write on the usbdrive
now i tried to mount the NAS as described :

mount -t cifs //192.168.2.4/share /mnt/usbmounts/sda/movies -o username=guest

i get the error failed: No such device or address

if i type

mount -t cifs //192.168.2.4/share -o username=guest

I get the error : can't find //192.168.2.4/share in /etc/fstab



i googled a bit too find a solution (with no success)

Then i had a idea , i went to the player and accessed the network in the filebrowser , until i was on the "share" folder of the NAS.

I went back to the PC accessed the player via telnet and just typed mount (to see all mounted drives)
Now i see my Nas is temporarily mounted (only for current session / gone after reeboot=

//192.168.2.4/share on /tmp/netb/mnt/WORKGROUP/MOVIES/share type cifs (rw,nodiratime,unc=\\192.168.2.4\share,username=)


when i try then cd /tmp/netb/mnt/WORKGROUP/MOVIES/share

I get the error ,that i do not have sufficient rights to access

Can someone help me with this information , how my command should look like in order for me to mount the NAS folder "share" to USB ?


Wed Jan 25, 2012 7:32 pm
Profile

Joined: Sun Jan 15, 2012 6:55 pm
Posts: 13
Post Re: How to Make the Media Library Index a mounted NAS share?
Is it possible to have the script code (named mountnas) on USB stick root, and then just add
/usr/local/sda1/mountnas &
in
/usr/local/rcS

If it's possible, can the script be maintained from somewhere else than the Playon - for instance a PC?

If scriptcode not present on USB stick, will boot fail ot will it continue?

magnolia61 wrote:
Hello people,
I think I have succeeded in achieving just what I wanted:
To have the mini2 index my shares from my NAS that I mounted on a usb-drive.

Here is my specific how-to.

In /usr/local/etc I created a file named: mountnas with the following contents:
Code:
#!/bin/sh
sleep 20
ip=10.0.0.3
expt1=media/Music/M61-LIBRARY
mntp=/usr/local/etc
mkdir $mntp/Music
options=nolock,proto=tcp
mount -t nfs -o $options $ip:/$expt1 $mntp/Music
mount -o bind $mntp/Music /tmp/usbmounts/sda4/Music

and in /usr/local/rcS i added the line:
Code:
/usr/local/etc/mountnas &

my trick seems to be to first mount the shares in /usr/local/etc
and to bind them to /tmp/usbmounts afterwards.
Also i reduced the sleep to 20 in my hardwired lan-situation.
In my config my usb-stick is sda4. This can be a different # in your situation.

RESULT: my mini2 now indexes my NAS!


Thu Jan 26, 2012 1:42 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 70 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by: phpBB | Innitial forum Design by: STSoftware | Modified by: AC Ryan.