PVR Recording over NFS for C-Series


From SamyGO
Revision as of 00:44, 21 January 2011 by Remi71 (talk | contribs)
Jump to: navigation, search

Introduction

This has been tested on C-Model UE46C6500UP.

Original forum post: SamyGo Extension Pack modified for NFS recording

Some init script (/etc/init.d) of the SamyGO Extensions Pack has been modified to support PVR recording over NFS share and to support multiple fixed NFS share from different servers.

Features

  • Support for multiple fixed NFS server with multiple share
  • Support for PVR recording over dedicated NFS share
  • Logging on file (for the moment only for the recording part, for debugging purpose)

Bugs and limitations

  • Extension Pack must be run from a USB stick of at least 2GB size (because it must contain a XFS File System image file). Probably it's possible to run from the internal flash of the TV, however the stick is needed for the FS image file (1.5GB minimum for recording). This require other script modification.
  • This mod. has been tested only over NFS share on Linux machines. Probably works also over NFS on Windows. Feel free to try.

Requirements

Modifications from the original version

  • Based on SamyGO Extension Pack v0.03.6-r12-for-T-VALDEUC
  • Script 02_04_vusb.init : support for a second virtual usb device for recording (if XFS image exist on the USB stick and image size is >= 1.5GB)
  • Script 03_03_nfsmount.init: support for multiple fixed NFS server
  • Script 80_80_record_to_nwshare.init: completely rewritten
  • Created folder /var/log (for logfile samygo.log)
  • Script rcsGO: modified to include log file path in /dtv/SGO.env

Installation

  1. Make sure you have configured correctly your NFS servers and shares and no network problem exist between servers and TV. For recording, write permission on the dedicated share is needed by the TV. I suggest the following entry in exports file:
<MEDIA SHARED FOLDER>       <TV HOSTNAME or IP>(rw,async,no_subtree_check,root_squash,anonuid=<USER ID>,anongid=<GROUP ID>)
<RECORD SHARED FOLDER>      <TV HOSTNAME or IP>(rw,async,no_subtree_check,root_squash,anonuid=<USER ID>,anongid=<GROUP ID>)
  • USER ID and GROUP ID must match a user/group with write permission on the SHARED FOLDER
  • For recording <RECORD SHARED FOLDER> entry may be on a different exports file of a different NFS server.
  1. Move to your Linux machine ;)
  2. Format the USB stick (single partition, FAT32 FS)
  3. Explode the SamyGO Extension Pack v0.03.6-r12-for-T-VALDEUC.zip file on the USB stick and configure it as usual (see:SamyGO_Extensions_Pack#General_usage
  4. Explode the provided file File:SamyGO-All-Extensions-v0.03.6-r12-for-T-VALDEUC-20110103184650 rconti-mod.zip on the USB key into the SamyGO folder (replace all requested files).

6. Move to SamyGO folder and create the XFS file image with the following command (make sure you have support tools for XFS FS --> package xfsprogs under Ubuntu):


mkfs.xfs -f -d file,name=pvrimage,size=1536m


Ignore error message like:

Code: Select all

   existing superblock read failed: Inappropriate ioctl for device


7. Mount the image:

Code: Select all

   mount -t xfs -o loop pvrimage <MOUNT POINT>


8. Create the empty file .PlaceHolderDO-NOT-REMOVE:

Code: Select all

   touch <MOUNT POINT>/.PlaceHolderDO-NOT-REMOVE


This file must be never removed!

9. Edit etc/init.d/03_03_nfsmount.init and modify the following parameters:

Code: Select all

      SHARE_1='<SERVER NAME or IP>:<SHARE>'
      SHARE_2='<SERVER NAME or IP>:<SHARE>'
      ..
      ..
      SHARE_n='<SERVER NAME or IP>:<SHARE>'
      


Example:

Code: Select all

      SHARE_1='mediaserver01.shareskills.org:/home/remi/localdata/media'
      SHARE_2='fileserver01.shareskills.org:/var/landata/photo'
      


10. Edit etc/init.d/80_80_record_to_nwshare.init and add modify the following parameters:

Code: Select all

       # Remote NFS fileserver for recording
       PVRSERVER='<SERVER NAME or IP>'
       # Remote NFS share for recording
       PVRPATH='<SHARE>'
       # Number of second to wait for pvrimage mount point to be ready.
       # If you experience problem like "No virtual device found ready for PVR or already mounted" message in samygo.log then try to increase this.
       WAIT=25
       


11. Turn off your TV, insert the USB stick and power on. Wait for 35-40sec then connect via SSH

12. Verify NFS mount via df -h command. Verify also the log file /dtv/usb/sda1/SamyGO/var/log/samygo.log

If all is ok, from your TV go under Media: you must see two additional device named SamyGo Virt. USB. One is for media NFS share and one for recording. Select one whose size is 1.5GB (corresponding to the XFS image size) and try record: the recording must begin with no error message. If a message appear that say "Format USB device" do not proceed because something went wrong.

NOTE: Although the media screen report that the SamyGo Virt. USB device for recording is 1.5GB, don't worry because the NFS share is remounted into the original mount point of the XFS image so the real size is the free space on your server. --Remi71 00:22, 21 January 2011 (UTC)