Pvr over Nfs

Here for general support for E series TVs, request and problem solve area.

Pvr over Nfs

Postby ocean » Sun May 12, 2013 8:48 pm

Hey Guys
I know that the question was asked many times before, but I (and maybe other users too) still got a problem by config my init-files for pvr over nfs. I don't know exactly what to change in these files and I also don't know if the the xfs-Image is still needed or even where I have to store it on the nfs-share. Also I think it's good to know if we can use the same adjusts for C-,D- and E-Series.
My adjusted nfs-shares are on a fritzbox 7320 with freetz running. The exports-file on the "server" is:
Code: Select all
the ip of server is: 192.168.2.2
exports:
/var/media/ftp/Nfs-Filme/Videos *(rw,anonuid=0,anongid=0,insecure,async,fsid=0,no_subtree_check)
/var/media/ftp/Nfs-Platte *(rw,anonuid=0,anongid=0,insecure,async,fsid=0,no_subtree_check)

The shares were found in standard config of all samygo init-files. The first share only offers the videos to watch on the tvs, the second one is an own hdd only for pvr (if possible for both tvs the same pvr storage).
So I think the shares are correct.
But where do I need to change the init files.

Kind regards ocean

P.S.: If everything is running fine I offer to write a wiki entry...
Samsung UE32D6510 (downgraded to T-GASDEUC-1016.0) with "SamyGO Hospitality mode hack" running
Samsung UE46ES6710 ( T-MST10PDEUC-1040.2) with SamyGo running, installed via "InstallSamyGO-tool"
User avatar
ocean
SamyGO Project Donor
 
Posts: 169
Joined: Sat Jan 07, 2012 7:22 pm
Location: Germany

Re: Pvr over Nfs

Postby ocean » Mon May 27, 2013 2:11 pm

Even if nobody answered on my question I got the "PVR over NFS" working now. I even didn't use the vusb-script neither the record-to-nwshare-script. I built everything inside the nfsmount-script as you can see here in the code comment, which is copied and modified by the code parts I found here in forum:
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/
    #       depending on some other coders of the samygo-forum and also on
    #       Version: SamyGO svn $Id: 03_03_nfsmount.init 1069 2011-01-03 16:47:24Z arris69 $

    #############-Some Variables-####################
    V_USB="sdj"           # Aka name usb-device with 1 partition
    R_USB="sdk"           # Aka name record-device
    USB_NAME="Movies"          # symbolic name of usb-device
    REC_NAME="Recorder"       # symbolic name of record-device
    ###############################################



    sed -i -e "s,MountPlaceholder,/dtv/usb/${V_USB}," /dtv/SGO.env
    sed -i -e "s,MountPlaceholder,/dtv/usb/${R_USB}," /dtv/SGO.env

    . /dtv/SGO.env

   # Share_X = '<ServerIP>:<SHAREPATH>:<NAME_OF_MOUNT>'
   # RECORDSHARE='<ServerIP>:<SHAREPATH>'
   
    RECORDSHARE='192.168.2.2:/var/media/ftp/Nfs-Filme/Recorder/Wohnzimmer'
   
    SHARE_1='192.168.2.2:/var/media/ftp/Nfs-Filme/Videos:Movies'

    FR_NAME="NFS Server"
   
    M_OPTS="soft,tcp,nolock"

    SERVERS="Don't set me!!"

    DEST_DIR=$MOUNT_PATH
    RECDIR=/dtv/usb/${R_USB}

    do_mount()
    {

    if [ -n "$3" ]; then
      # M_POINT="$DEST_DIR/$3"   # with name of directory
      M_POINT="$DEST_DIR"         # mount direct so that there only will be the hierarchy tree you have in your share
   else
      M_POINT="$DEST_DIR/$1/$(echo -n "$2" | sed -e "s/\//_/g")"
   fi
   
   mkdir -p "$M_POINT"
       if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then
          /bin/busybox mount -o "$M_OPTS" "$1:$2" "$M_POINT"
          if [ $? = 0 ]; then
             echo "Share $1:$2 successfully mounted on $M_POINT"
          else
             echo "Error during mount of $1:$2 on $M_POINT"
          fi
       else
          echo "Share $1:$2 is already mounted!"
       fi
    }
   
   mount_record()
    {
   if [ -n "$RECORDSHARE" ]; then

         M_POINTREC="$RECDIR"
      
      mkdir -p "$M_POINTREC"
         if [ `cat /proc/mounts | grep -c "$M_POINTREC"` -lt "1" ] ; then
           /bin/busybox mount -o "$M_OPTS" "$1:$2" "$M_POINTREC"
           if [ $? = 0 ]; then
             echo "NFS_PATH=$M_POINTREC" >> /dtv/SGO.env
             mount -t xfs -o loop "$RECDIR"/PVR/pvrimage" "$RECDIR"/PVR/Wohnzimmer"
             echo "Share $1:$2 successfully mounted on $M_POINTREC"
           else
             echo "Error during mount of $1:$2 on $M_POINTREC"
           fi
         else
           echo "Share $1:$2 is already mounted!"
         fi
   fi   
    }

    get_shares()
    {
       ENDARRAY=false
       N=1
       while [ $ENDARRAY = false ]
       do
          eval SHARE=\${SHARE_${N}}
          if [ -z "$SHARE" ]; then
             ENDARRAY=true
          else
             SERVER=`echo "$SHARE"|cut -d ':' -f1`
             SHPATH=`echo "$SHARE"|cut -d ':' -f2`
        SHNAME=`echo "$SHARE"|cut -d ':' -f3`
         
             echo -n "Check if server $SERVER is reachable..."
             showmount --no-header -e $SERVER 1>/dev/null 2>&1
             if [ $? = 0 ]; then
                echo 'ok'
                do_mount "$SERVER" "$SHPATH" "$SHNAME"
             else
                echo 'NOT reachable skip!'
             fi
             let N=N+1
          fi
       done
      
      if [ -n "$RECORDSHARE" ]; then
      
        RECSERVER=`echo "$RECORDSHARE"|cut -d ':' -f1`
             RECSHPATH=`echo "$RECORDSHARE"|cut -d ':' -f2`
         
        echo -n "Check if server $RECSERVER is reachable..."
             showmount --no-header -e $RECSERVER 1>/dev/null 2>&1
         
             if [ $? = 0 ]; then
      RECAVAIL=true
                echo 'ok'
                mount_record "$RECSERVER" "$RECSHPATH"
      sleep 5     # it is even working without the sleep in my case
             else
                echo "$RECSERVER NOT reachable skip!"
      RECAVAIL=false
             fi
        else
         echo "No Record-Share available!"
      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
    }

    anounce_usb()
    {
       if [ -e /dtv/usb/usblog ] ; then
          echo ""
       else
          touch /dtv/usb/usblog
       fi
       if [ `cat /dtv/usb/usblog | grep -c "$V_USB"` -lt "1" ] ; then

          cp -f /dtv/usb/usblog /dtv/usb/usblog.bak
       
      ####  VIRTUALUSB "NFS-SERVER"  ####
      
          if [ `cat /proc/mounts | grep -c "$M_POINT"` > "0" ] ; then
             echo -e "[$V_USB]\nVendor : Home\nProduct : $USB_NAME\nSerial : 30122011\nDevpath : 7\n\
    Lun : 0\nScsiDevicePath : /dev/${V_USB}1\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/usblog
       
        else
             echo "No Nfs-Share mounted!"
          fi
   
      ####  VIRTUALUSB "RECORDER"  ####
      
      if [ -n "$RECORDSHARE" ]; then
      
        if [ `cat /proc/mounts | grep -c "$M_POINTREC"` > "0" ] && [ $RECAVAIL = true ] ; then
             echo -e "[$R_USB]\nVendor : Home\nProduct : $REC_NAME\nSerial : 21052013\nDevpath : 8\n\
    Lun : 1\nScsiDevicePath : /dev/${R_USB}1\nMountDir : $RECDIR\nFileSystem : xfs\n" >> /dtv/usb/usblog

          else
             echo "No Record-Share mounted!"
          fi
        fi
      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/nfs.ko
       get_servers
       get_shares
       anounce_usb
       ;;
       stop)
       # may can fail if device access the mount from content library
       # for i in $(cat /proc/mounts | grep nfs | cut -d " " -f2) ; do
       cp -f /dtv/usb/usblog.bak /dtv/usb/usblog
       for i in $(cat /proc/mounts | grep "$DEST_DIR" | sed 's/^\(.*\) \(.*\) nfs .*/\2/') ; do
          /bin/busybox umount $i
       done
      
      for i in $(cat /proc/mounts | grep "$RECDIR" | sed 's/^\(.*\) \(.*\) nfs .*/\2/') ; do
          /bin/busybox umount $i
       done
       ;;
       status)
       /bin/mount | grep "$DEST_DIR"
      
       /bin/mount | grep "$RECDIR"
       ;;
       *)
       echo "Usage: $0 {start|stop|status}" 1>&2
       exit 0
       ;;
    esac

It's maybe a little bit dirty coding, but for me it is working with this version on my UE32D6510 and also on the UE46ES6710.
I just leave it here if anybody else needs something to start one thinking.
Regards ocean

P.S.: Would be great if anybody could give me an answer about how to disable DRM on the ES I asked already there -> http://forum.samygo.tv/viewtopic.php?f=53&t=5224
Samsung UE32D6510 (downgraded to T-GASDEUC-1016.0) with "SamyGO Hospitality mode hack" running
Samsung UE46ES6710 ( T-MST10PDEUC-1040.2) with SamyGo running, installed via "InstallSamyGO-tool"
User avatar
ocean
SamyGO Project Donor
 
Posts: 169
Joined: Sat Jan 07, 2012 7:22 pm
Location: Germany

Re: Pvr over Nfs

Postby juzis » Mon May 27, 2013 2:22 pm

thanks for sharing!
LE40B653T5W,UE40D6750
Have questions? Read SamyGO Wiki, Search on forum first!
HowTo: [B] Repair TV from u-boot, [B] FFB (v0.8), [B] FFB for CI+ . Get root on: C series, D series, E series, F series
User avatar
juzis
SamyGO Moderator
 
Posts: 7958
Joined: Sun Mar 07, 2010 6:20 pm

Re: Pvr over Nfs

Postby ocean » Mon May 27, 2013 2:25 pm

no problem juzis, your welcome
Samsung UE32D6510 (downgraded to T-GASDEUC-1016.0) with "SamyGO Hospitality mode hack" running
Samsung UE46ES6710 ( T-MST10PDEUC-1040.2) with SamyGo running, installed via "InstallSamyGO-tool"
User avatar
ocean
SamyGO Project Donor
 
Posts: 169
Joined: Sat Jan 07, 2012 7:22 pm
Location: Germany

Re: Pvr over Nfs

Postby miazza » Tue May 28, 2013 12:56 pm

Really interesting job.
Do you this there is any chance to have it working also over samba ?

miazza
miazza
SamyGO Project Donor
 
Posts: 272
Joined: Wed Apr 03, 2013 6:10 pm

Re: Pvr over Nfs

Postby ocean » Tue May 28, 2013 1:01 pm

I don't know. I was happy when all was running on nfs. ;-)
Samsung UE32D6510 (downgraded to T-GASDEUC-1016.0) with "SamyGO Hospitality mode hack" running
Samsung UE46ES6710 ( T-MST10PDEUC-1040.2) with SamyGo running, installed via "InstallSamyGO-tool"
User avatar
ocean
SamyGO Project Donor
 
Posts: 169
Joined: Sat Jan 07, 2012 7:22 pm
Location: Germany

Re: Pvr over Nfs

Postby mmhorda » Fri Jul 05, 2013 10:46 am

ocean wrote:I don't know. I was happy when all was running on nfs. ;-)



Amazing.
its working! Thanks a lot for sharing :)

Edit:
I was just thinking i will write what i have tested it on.
UE40D6100 - T-GAS6DEUC 1014.0
UE50ES6300 - T-MST10PDEUC 1030.0
Last edited by mmhorda on Fri Jul 05, 2013 11:09 am, edited 1 time in total.
TV: LE40C750 - T-VALDEUC 3011.0
TV: UE40D6100 - T-GAS6DEUC 1011.5
TV: UE50ES6300 - T-MST10PDEUC 1030.0
NAS: MyBookLive 3Tb - Core F/W 02.43.03-022
User avatar
mmhorda
 
Posts: 123
Joined: Tue Jan 25, 2011 11:23 am

Re: Pvr over Nfs

Postby ocean » Fri Jul 05, 2013 10:55 am

You're welcome mmhorda.
Samsung UE32D6510 (downgraded to T-GASDEUC-1016.0) with "SamyGO Hospitality mode hack" running
Samsung UE46ES6710 ( T-MST10PDEUC-1040.2) with SamyGo running, installed via "InstallSamyGO-tool"
User avatar
ocean
SamyGO Project Donor
 
Posts: 169
Joined: Sat Jan 07, 2012 7:22 pm
Location: Germany

Re: Pvr over Nfs

Postby ocean » Wed Jul 31, 2013 11:17 am

Got a little update for everybody who is also willing to play records from a D-Series Tv with drm disabled, on a E-Series Tv with nfs shares:
Code: Select all
        #!/bin/sh
       
        ######################### Some Variables ##########################
        V_USB="sdi"      # Aka name first usb-device with 1 partition
        V2_USB="sdj"      # Aka name second usb-device with 1 partition
        R_USB="sdk"      # Aka name record-device
        ###################################################################

       
       # RECORDSHARE='<ServerIP> :                 <SHAREPATH>                 :<NAME_OF_MOUNT>'
          RECORDSHARE='192.168.2.2:/var/media/ftp/Nfs-Platte/Recorder/Wohnzimmer:Recorder'
       
       # Share_X=' <ServerIP>:          <SHAREPATH>          :<NAME_OF_MOUNT>'
         SHARE_1='192.168.2.2:/var/media/ftp/Nfs-Filme/Videos:Movies'
         SHARE_2='192.168.2.2:/var/media/ftp/Nfs-Platte/Recorder/Schlafzimmer/CONTENTS:Aufnahmen'
       
        M_OPTS="soft,tcp,nolock"

        SERVERS="Don't set me!!"

        DEST_DIR_1=/dtv/usb/${V_USB}
        DEST_DIR_2=/dtv/usb/${V2_USB}
       
        RECDIR=/dtv/usb/${R_USB}

        do_mount()
        {   
            if [ -n "$3" ]; then
          eval M_POINT${4}="\$DEST_DIR_${4}"    # directly to virtual-usb device
       else
          eval M_POINT${4}="\$DEST_DIR_${4}/$1/$(echo -n "$2" | sed -e "s/\//_/g")"
       fi
       
       eval mkdir -p "\$M_POINT${4}"
           if [ `cat /proc/mounts | grep -c eval "\$M_POINT${4}"` -lt "1" ] ; then
             eval /bin/busybox mount -o "$M_OPTS" "$1:$2" "\$M_POINT${4}"
              if [ $? = 0 ]; then
                eval echo "Share $1:$2 successfully mounted on \$M_POINT${4}"
              else
                eval echo "Error during mount of $1:$2 on \$M_POINT${4}"
              fi
           else
              echo "Share $1:$2 is already mounted!"
           fi
        }
       
       mount_record()
        {
       if [ -n "$RECORDSHARE" ]; then

          M_POINTREC="$RECDIR"
         
          mkdir -p "$M_POINTREC"
             if [ `cat /proc/mounts | grep -c "$M_POINTREC"` -lt "1" ] ; then
               /bin/busybox mount -o "$M_OPTS" "$1:$2" "$M_POINTREC"
               if [ $? = 0 ]; then
                 mount -t xfs -o loop "$RECDIR"/PVR/pvrimage" "$RECDIR"/PVR/Wohnzimmer"
                 echo "Share $1:$2 successfully mounted on $M_POINTREC"
               else
                 echo "Error during mount of $1:$2 on $M_POINTREC"
               fi
             else
               echo "Share $1:$2 is already mounted!"
             fi
       fi   
        }

        get_shares()
        {
           ENDARRAY=false
           N=1
           while [ $ENDARRAY = false ]
           do
              eval SHARE=\${SHARE_${N}}
              if [ -z "$SHARE" ]; then
                 ENDARRAY=true
              else
           
                 SERVER=`echo "$SHARE"|cut -d ':' -f1`
                 SHPATH=`echo "$SHARE"|cut -d ':' -f2`
                 SHNAME=`echo "$SHARE"|cut -d ':' -f3`   
             
                 echo -n "Check if server $SERVER is reachable..."
                 showmount --no-header -e $SERVER 1>/dev/null 2>&1
                 if [ $? = 0 ]; then
                    echo 'ok'
                    eval USB_NAME${N}="$SHNAME"                          # to get the names out of the share-path
                    do_mount "$SERVER" "$SHPATH" "$SHNAME" "$N"
                 else
                    echo 'NOT reachable skip!'
                 fi
                 let N=N+1
              fi
           done
         
          if [ -n "$RECORDSHARE" ]; then
         
          RECSERVER=`echo "$RECORDSHARE"|cut -d ':' -f1`
          RECSHPATH=`echo "$RECORDSHARE"|cut -d ':' -f2`
          REC_NAME=`echo "$RECORDSHARE"|cut -d ':' -f3`
             
          echo -n "Check if server $RECSERVER is reachable..."
                    showmount --no-header -e $RECSERVER 1>/dev/null 2>&1
             
                 if [ $? = 0 ]; then
          RECAVAIL=true
                    echo 'ok'
                    mount_record "$RECSERVER" "$RECSHPATH"
          sleep 5
                 else
                    echo "$RECSERVER NOT reachable skip!"
          RECAVAIL=false
                 fi
            else
             echo "No Record-Share available!"
          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
        }

        anounce_usb()
        {
           if [ -e /dtv/usb/usblog ] ; then
              echo ""
           else
              touch /dtv/usb/usblog
           fi
           if [ `cat /dtv/usb/usblog | grep -c "$V_USB"` -lt "1" ] ; then

              cp -f /dtv/usb/usblog /dtv/usb/usblog.bak
           
          ####  VIRTUALUSB1 "Movies"  ####
         
              if [ `cat /proc/mounts | grep -c "$M_POINT1"` > "0" ] ; then
                 echo -e "[$V_USB]\nVendor : Home\nProduct : $USB_NAME1\nSerial : 30122011\nDevpath : 7\n\
        Lun : 0\nScsiDevicePath : /dev/${V_USB}1\nMountDir : $DEST_DIR_1\nFileSystem : vfat\n" >> /dtv/usb/usblog
           
            else
                 echo "Share1 not mounted!"
              fi
           
            ####  VIRTUALUSB2 "Aufnahme"  ####
           
            if [ `cat /proc/mounts | grep -c "$M_POINT2"` > "0" ] ; then
                 echo -e "[$V2_USB]\nVendor : Home\nProduct : $USB_NAME2\nSerial : 30122011\nDevpath : 7\n\
        Lun : 0\nScsiDevicePath : /dev/${V2_USB}1\nMountDir : $DEST_DIR_2\nFileSystem : vfat\n" >> /dtv/usb/usblog
       
            else
                 echo "Share2 not mounted!"
              fi
       
          ####  VIRTUALUSB "RECORDER"  ####
         
          if [ -n "$RECORDSHARE" ]; then
         
            if [ `cat /proc/mounts | grep -c "$M_POINTREC"` > "0" ] && [ $RECAVAIL = true ] ; then
                 echo -e "[$R_USB]\nVendor : Home\nProduct : $REC_NAME\nSerial : 21052013\nDevpath : 8\n\
        Lun : 0\nScsiDevicePath : /dev/${R_USB}1\nMountDir : $RECDIR\nFileSystem : xfs\n" >> /dtv/usb/usblog

              else
                 echo "Record-Share not mounted!"
              fi
            fi
         fi
        }


        case $1 in
           start)
           insmod $MOD_DIR/kernel/net/sunrpc/sunrpc.ko
           insmod $MOD_DIR/kernel/fs/lockd/lockd.ko
           insmod $MOD_DIR/kernel/fs/nfs/nfs.ko
           get_servers
           get_shares
           anounce_usb
          rm "$DEST_DIR_2"/*.mkv
          for i in "$DEST_DIR_2"/*.srf; do ln -s "$i" "${i/.srf}".mkv; done
           ;;
           stop)
           # may can fail if device access the mount from content library
           # for i in $(cat /proc/mounts | grep nfs | cut -d " " -f2) ; do
           cp -f /dtv/usb/usblog.bak /dtv/usb/usblog
           for i in $(cat /proc/mounts | grep "$DEST_DIR_1" | sed 's/^\(.*\) \(.*\) nfs .*/\2/') ; do
              /bin/busybox umount $i
           done
          for i in $(cat /proc/mounts | grep "$DEST_DIR_2" | sed 's/^\(.*\) \(.*\) nfs .*/\2/') ; do
              /bin/busybox umount $i
           done
         
          for i in $(cat /proc/mounts | grep "$RECDIR" | sed 's/^\(.*\) \(.*\) nfs .*/\2/') ; do
              /bin/busybox umount $i
           done
           ;;
           status)
           /bin/mount | grep "$DEST_DIR_1"
          /bin/mount | grep "$DEST_DIR_2"
         
          /bin/mount | grep "$RECDIR"
           ;;
           *)
           echo "Usage: $0 {start|stop|status}" 1>&2
           exit 0
           ;;
        esac


with that script I now got 3 virtual-usb devices called "Movies", "Aufnahmen" and "Recorder".
"Movies" are all the of my movies on the first nfs-share.
"Aufnahmen" is the mounted CONTENTS folder of the D-Series TV with unencrypted records.
"Recorder" the virtual-usb for the E-Series to record on.

with
Code: Select all
rm "$DEST_DIR_2"/*.mkv
for i in "$DEST_DIR_2"/*.srf; do ln -s "$i" "${i/.srf}".mkv; done

I could link to the records of the D-Series tv to get them played on the ES. Everytime the ES is booting up all links will be deleted and only any records on the D CONTENTS exists a new link will be performed. That also will keep up the right name if you activate moviemanager-script on D-Series tv, as it also deletes the links to records that no longer exists on the share.

Regards ocean
Samsung UE32D6510 (downgraded to T-GASDEUC-1016.0) with "SamyGO Hospitality mode hack" running
Samsung UE46ES6710 ( T-MST10PDEUC-1040.2) with SamyGo running, installed via "InstallSamyGO-tool"
User avatar
ocean
SamyGO Project Donor
 
Posts: 169
Joined: Sat Jan 07, 2012 7:22 pm
Location: Germany

Re: Pvr over Nfs

Postby ocean » Mon Aug 19, 2013 5:00 pm

Has anybody a solution for deactivating the popup for the first device that is connected here in that script?
Samsung UE32D6510 (downgraded to T-GASDEUC-1016.0) with "SamyGO Hospitality mode hack" running
Samsung UE46ES6710 ( T-MST10PDEUC-1040.2) with SamyGo running, installed via "InstallSamyGO-tool"
User avatar
ocean
SamyGO Project Donor
 
Posts: 169
Joined: Sat Jan 07, 2012 7:22 pm
Location: Germany

Next

Return to [E] Support

Who is online

Users browsing this forum: No registered users and 2 guests