PVR on NFS share not working for D8000

General Forum for talking area for D series TVs.
Post Reply

delpiero
Posts: 3
Joined: Thu Nov 15, 2012 6:12 pm

PVR on NFS share not working for D8000

Post by delpiero »

Dear all,
first of all, thanks a lot to all contributing on this project.
I'm facing an issue currently with my 64D8000 plasma after installing SamyGo (using the development user).
My current firmware is 1014, so compatible with SamyGo.

On the other side, I have a Synology NAS in the same network with the TV.
I would like to use one newly created NFS folder on the NAS to record using PVR.

So first of all I have the new folder created on the NAS and mounted in the new virtual usb. I can acces from the smarthub this new usb device where I can see 3 folders:
CONTENTS
nfs
upnp

If I access nfs, I find my NAS address(192.168.1.5) from where I can browse to this new folder. I already saved a movie in this folder and it can be played w/o any problem by the TV.

When I'm using the record button, I receive the message "not enough space on the device".

I'try to put some pictures to be more clear.

In the SamyGo init folder, I have active the following files only:
01_01_catch_crap.init
01_04_server_replacement.init
01_05_hiddev.init
02_04_vusb.init
03_01_fuse.init
03_03_djmount.init
03_03_nfsmount.init
04_04_samba.init
06_05_apache.init
06_05_samba-server.init

Can somebody explain for each file what is really doing?

And here is my 03_03_nfsmount.init:

Code: Select all

#!/bin/sh
#
# ? Copyright 1996-2010, ZsoltTech.Com
#       by Ser Lev Arris <arris@ZsoltTech.Com>
#
#       donated for the SamyGo Project
#       http://samygo.sourceforge.net/
#
#       Version: SamyGO svn $Id: 03_03_nfsmount.init 1069 2011-01-03 16:47:24Z arris69 $

. /dtv/SGO.env
# sleep 9
##### YOU CAN CHANGE ME HERE ######
SERVER="192.168.1.5"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="/volume3/recordings"
# SHARES="Video Music Photo" # if you won't all your shares, but then set SERVER too!!
##### CHANGE ME END ######

FR_NAME="NFS Server"
# M_OPTS="soft,udp,async,nolock,rsize=32768,wsize=8192"
# M_OPTS="rw,soft,udp,nolock,rsize=32768,wsize=32768"
# M_OPTS="soft,tcp,nolock,rsize=32768,wsize=32768"
# M_OPTS="soft,tcp,nolock,rsize=8192,wsize=8192"
M_OPTS="soft,tcp,nolock"

SERVERS="Don't set me!!"

DEST_DIR=$MOUNT_PATH/nfs

do_mount()
{
#		$(echo -e "[sdg]\nVendor : NfsMount\nProduct : $FR_NAME\n\
#Serial : Q80VQLFG\nDevpath : 7\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)
	
	for i in $S_MOUNTS ; do
		M_POINT="$DEST_DIR/$1/$(echo -n $i | sed -e "s/\//_/g")"
		mkdir -p "$M_POINT" 
		if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then
			/bin/busybox mount -o "$M_OPTS" "$1:$i" "$M_POINT"
		else
			echo "$M_POINT is mounted!"
		fi
	done
}

get_shares()
{
	if [ -z "$SHARES" ] ; then
		echo -n "Search Shares on: "
		for i in $SERVERS ; do
			echo $i
			# S_MOUNTS=$(showmount --no-headers -e $i | cut -d " " -f1)	
			S_MOUNTS=$(showmount --no-headers -e $i | sed 's/^\(.*\) .*/\1/')	
			[ -n "$S_MOUNTS" ] && do_mount $i
		done
	else
		echo -n "Fixed Server: "
		for i in $SERVERS ; do
			echo $i
			S_MOUNTS=$SHARES
			[ -n "$S_MOUNTS" ] && do_mount $i
		done
	fi
}

get_servers()
{
	if [ -z "$SERVER" ] ; then
		# SERVERS=$(cat /proc/net/arp | grep -v "IP address" | cut -d " " -f1)
		SERVERS=$(cat /proc/net/arp | grep -v "IP address" | sed 's/^\(\w*.\w*.\w*.\w*\) *.*/\1/')
	else
		SERVERS=$SERVER
	fi
}

case $1 in 
	start)
	# for systems with modular nfs kernel support
	insmod $MOD_DIR/kernel/net/sunrpc/sunrpc.ko
	insmod $MOD_DIR/kernel/fs/lockd/lockd.ko
	insmod $MOD_DIR/kernel/fs/nfs_common/nfs_acl.ko
	insmod $MOD_DIR/kernel/fs/nfs/nfs.ko
	get_servers
	get_shares
	;;
	stop)
	# may can fail if device access the mount from content library
	# for i in $(cat /proc/mounts | grep nfs | cut -d " " -f2) ; do
	for i in $(cat /proc/mounts | grep "$DEST_DIR" | sed 's/^\(.*\) \(.*\) nfs .*/\2/') ; do
		/bin/busybox umount $i
	done
	;;
	status)
	/bin/mount | grep "$DEST_DIR"
	;;
	*)
	echo "Usage: $0 {start|stop|status}" 1>&2
	exit 0
	;;
esac
And here are some "screenshouts":

Message I get when I'try to record:
Image

Accessing the folder via the Virtual Usb device:

Image

Image

Image

Image

Image

thank you in advance for your help,

User avatar
juusso
SamyGO Moderator
Posts: 10124
Joined: Sun Mar 07, 2010 6:20 pm

Re: PVR on NFS share not working for D8000

Post by juusso »

LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

hondavtec
SamyGO Project Donor
Posts: 56
Joined: Wed Sep 28, 2011 12:30 am

Re: PVR on NFS share not working for D8000

Post by hondavtec »

Hi delpiero,

I also got a Synology NAS with flawlessly working nfs recording.
Since I'm no linux expert it took me quite a while to figure everything out.
I've setup 2 virtual USB drives, one for nfs recording, the other one for samba sharing.
My vusb.init:

Code: Select all

. /dtv/SGO.env

case $1 in 
   start)

      mkfs.vfat -C /dtv/vusb 500
                mkfs.vfat -C /dtv/vusb1 500

      insmod $MOD_DIR/kernel/drivers/usb/gadget/dummy_hcd.ko || \
      insmod $MOD_DIR/kernel/drivers/mstar/usb/gadget/dummy_hcd.ko
      sleep 2
      insmod $MOD_DIR/kernel/drivers/usb/gadget/g_file_storage.ko file=/dtv/vusb,/dtv/vusb1 || \
      insmod $MOD_DIR/kernel/drivers/mstar/usb/gadget/g_file_storage.ko file=/dtv/vusb,/dtv/vusb1
      sleep 3
      
      dev="sda1" # set fallback if someting wrong with modules
                count=-1
      for i in /sys/block/sd?/device/model ; do
         if [ `cat $i | grep -c "SamyGO Virt"` -gt "0" ] ; then
                                let count=count+1
            echo "found gadget at: $i"
            dev=`echo $i | sed 's/^\/.*\(sd.\)\/.*/\1/g'`
            echo "scsidev: $dev"
                                if [ "$count" -eq "0" ] ; then
                                      sed -i -e "s,MountPlaceholder,/dtv/usb/$dev," /dtv/SGO.env
                                      first_dev=$dev
                                else
                                      sed -i -e "s,/dtv/usb/$first_dev\",/dtv/usb/$first_dev\"\nMOUNT_PRV$count=\"/dtv/usb/$dev\"," /dtv/SGO.env
                                fi
         else
            echo "real storage device at: $i"
         fi
      done
     ;;
   stop)
      dev="sda1" # set fallback if someting wrong with modules
                count=-1
      for i in /sys/block/sd?/device/model ; do
         if [ `cat $i | grep -c "SamyGO Virt"` -gt "0" ] ; then
                                let count=count+1
            echo "found gadget at: $i"
            dev=`echo $i | sed 's/^\/.*\(sd.\)\/.*/\1/g'`
            echo "scsidev: $dev"
                                if [ "$count" -eq "0" ] ; then
                                     sed -i -e "s,/dtv/usb/$dev,MountPlaceholder," /dtv/SGO.env
                                else
                                    sed -i -e "s,MOUNT_PRV$count=\"/dtv/usb/$dev\",," /dtv/SGO.env
                                fi
         else
            echo "real storage device at: $i"
         fi
      done
           sed -i -e "/^$/d" /dtv/SGO.env
     rmmod g_file_storage
     ;;
   status)
     cat /sys/block/sd?/device/model
     ;;
     *)
     echo "Usage: $0 {start|stop|status}" 1>&2
     exit 0
     ;;
esac
And this is my nfsmount.init:

Code: Select all

#!/bin/sh
#
# ? Copyright 1996-2010, ZsoltTech.Com
#       by Ser Lev Arris <arris@ZsoltTech.Com>
#
#       donated for the SamyGo Project
#       http://samygo.sourceforge.net/
#
#       Version: SamyGO svn $Id: 03_03_nfsmount.init 1069 2011-01-03 16:47:24Z arris69 $

. /dtv/SGO.env
# sleep 9
##### YOU CAN CHANGE ME HERE ######
SERVER="192.168.1.10"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="/volume2/Movie/-Aufnahmen"
# SHARES="Video Music Photo" # if you won't all your shares, but then set SERVER too!!
##### CHANGE ME END ######

FR_NAME="NFS Server"

# M_OPTS="soft,udp,async,nolock,rsize=32768,wsize=8192"
# M_OPTS="rw,soft,udp,nolock,rsize=32768,wsize=32768"
# M_OPTS="soft,tcp,nolock,rsize=32768,wsize=32768"
# M_OPTS="soft,tcp,nolock,rsize=8192,wsize=8192"
M_OPTS="soft,tcp,nolock"
# M_OPTS="rw,soft,udp,async,nolock,rsize= 8192,wsize=8192"

SERVERS="Don't set me!!"

DEST_DIR="/dtv/usb/sda"

do_mount()
{
#		$(echo -e "[sdg]\nVendor : NfsMount\nProduct : $FR_NAME\n\
#Serial : Q80VQLFG\nDevpath : 7\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)
	
	for i in $S_MOUNTS ; do
		M_POINT="$DEST_DIR(echo -n $i | sed -e "s/\//_/g")"
		# mkdir -p "$M_POINT" 
		if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then
			/bin/busybox mount -o "$M_OPTS" "$1:$i" "$DEST_DIR" -t nfs
		else
			echo "$M_POINT is mounted!"
		fi
	done
}

get_shares()
{
	if [ -z "$SHARES" ] ; then
		echo -n "Search Shares on: "
		for i in $SERVERS ; do
			echo $i
			# S_MOUNTS=$(showmount --no-headers -e $i | cut -d " " -f1)	
			S_MOUNTS=$(showmount --no-headers -e $i | sed 's/^\(.*\) .*/\1/')	
			[ -n "$S_MOUNTS" ] && do_mount $i
		done
	else
		echo -n "Fixed Server: "
		for i in $SERVERS ; do
			echo $i
			S_MOUNTS=$SHARES
			[ -n "$S_MOUNTS" ] && do_mount $i
		done
	fi
}

get_servers()
{
	if [ -z "$SERVER" ] ; then
		# SERVERS=$(cat /proc/net/arp | grep -v "IP address" | cut -d " " -f1)
		SERVERS=$(cat /proc/net/arp | grep -v "IP address" | sed 's/^\(\w*.\w*.\w*.\w*\) *.*/\1/')
	else
		SERVERS=$SERVER
	fi
}

case $1 in 
	start)
	# for systems with modular nfs kernel support
	insmod $MOD_DIR/kernel/net/sunrpc/sunrpc.ko
	insmod $MOD_DIR/kernel/fs/lockd/lockd.ko
	insmod $MOD_DIR/kernel/fs/nfs_common/nfs_acl.ko
	insmod $MOD_DIR/kernel/fs/nfs/nfs.ko
	get_servers
	get_shares
	;;
	stop)
	# may can fail if device access the mount from content library
	# for i in $(cat /proc/mounts | grep nfs | cut -d " " -f2) ; do
	for i in $(cat /proc/mounts | grep "$DEST_DIR" | sed 's/^\(.*\) \(.*\) nfs .*/\2/') ; do
		/bin/busybox umount $i
	done
	;;
	status)
	/bin/mount | grep "$DEST_DIR"
	;;
	*)
	echo "Usage: $0 {start|stop|status}" 1>&2
	exit 0
	;;
esac
You could try to mount your nfs share directly to your Virtual USB, compare this section to your nfsmount.init:

Code: Select all

DEST_DIR="/dtv/usb/sda"

do_mount()
{
#		$(echo -e "[sdg]\nVendor : NfsMount\nProduct : $FR_NAME\n\
#Serial : Q80VQLFG\nDevpath : 7\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)
	
	for i in $S_MOUNTS ; do
		M_POINT="$DEST_DIR(echo -n $i | sed -e "s/\//_/g")"
		# mkdir -p "$M_POINT" 
		if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then
			/bin/busybox mount -o "$M_OPTS" "$1:$i" "$DEST_DIR" -t nfs
		else
			echo "$M_POINT is mounted!"
		fi
	done
You just need to figure out how your USB mounts are named: sda, sdb...

Hope this helps, if it still doesn't work you may have made a mistake configuring your NAS.
Let me know...


Best
Frank
UE22H5670
UE40ES6710
PS51E8090
Synology DS1511+
DVBLink

delpiero
Posts: 3
Joined: Thu Nov 15, 2012 6:12 pm

Re: PVR on NFS share not working for D8000

Post by delpiero »

Hi Frank,
I'm not familiarized with linux at all, that's the reason I asked for help.
Fortunately, I just had to use your coding for mounting and it worked perfectly. I just mounted directly to sda device. The issue I have now is that, when I insert a new usb drive in a second usb port, the virtual device is created in a different device (sdb, sda1, etc), so I have to change the nfsmount file again. But I can live with this...
Is there any chance to "fix" the virtual usb when it's created to use always sda for example?

Thanks a lot for your help,

Regards,

hondavtec
SamyGO Project Donor
Posts: 56
Joined: Wed Sep 28, 2011 12:30 am

Re: PVR on NFS share not working for D8000

Post by hondavtec »

delpiero wrote:your coding for mounting and it worked perfectly.
Glad I could help, but it's not my coding... I found it somewhere here.
However, I just realized it's already a bit outdated, have a look over here:
viewtopic.php?f=22&t=4722
UE22H5670
UE40ES6710
PS51E8090
Synology DS1511+
DVBLink

manuxi
Posts: 3
Joined: Tue Nov 13, 2012 11:32 pm

Re: PVR on NFS share not working for D8000

Post by manuxi »

Hi delpiero,

did you figure out what the problem was? I tried the whole day to get the nfs-thing to work - without success :(

As far I understood this I have to create a vusb-device and mount my nfs-recording folder to it.
But than - how do I check that this works and how do I tell my UE55D7000 to record there?
1. vusb.init
I tried the vusb.init from hondavtec
- there are two files created: vusb and vusb1

How do I tell nfsmount.init to use these? Its not clear to me how this is working. Did not find any explanations...

Could someone tell me what exactly I have to do to access ma record-folder on my nas (synology ds1512+)...?

Thank you very much in advance...
Manu

Post Reply

Return to “[D] General”