PVR Recording over NFS for C-Series
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.
- 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.
- Some Linux command line knowledge
- A Linux machine for USB stick preparation
- Tested on SamyGO Extension Pack v0.03.6-r12-for-T-VALDEUC
- Tested on TV firmware T-VALDEUC 2010/11/04_003003 (probably work on other firmware)
- TV hacked to support run.sh script execution from USB (see Hacking C series TV. Models with Internet@TV only
- At least one NFS server with a NFS share for media + NFS share for recording
- A USB stick (2GB minimum size)
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
- Script rcsGO: modified to include log file path in /dtv/SGO.env
- 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.
- Move to your Linux machine ;)
- Format the USB stick (single partition, FAT32 FS)
- 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)
- From the 1083 revision page download the files:
- Copy downloaded rcSGO file on the USB key into the SamyGO folder (replace the original one)
- Copy downloaded 02_04_vusb.init.remi71 file on the USB key into the SamyGO/etc/init.d folder (rename as 02_04_vusb.init and replace the original one)
- Copy downloaded 03_03_nfsmount.init.remi71 file on the USB key into the SamyGO/etc/init.d folder (rename as 03_03_nfsmount.init and replace the original one)
- Copy downloaded 80_80_record_to_nwshare.init.remi71 file on the USB key into the SamyGO/etc/init.d folder (rename as 80_80_record_to_nwshare.init and replace the original one)
- Under the SamyGO folder 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:
existing superblock read failed: Inappropriate ioctl for device
- Mount the image:
mount -t xfs -o loop pvrimage <MOUNT POINT>
- Create the empty file .PlaceHolderDO-NOT-REMOVE:
touch <MOUNT POINT>/.PlaceHolderDO-NOT-REMOVE
- This file must be never removed!
- Edit the file etc/init.d/03_03_nfsmount.init and modify the following parameters:
SHARE_1='<SERVER NAME or IP>:<SHARE>'
SHARE_2='<SERVER NAME or IP>:<SHARE>'
SHARE_n='<SERVER NAME or IP>:<SHARE>'
- Edit the file etc/init.d/80_80_record_to_nwshare.init and modify the following parameters:
# Remote NFS fileserver for recording
PVRSERVER='<SERVER NAME or IP>'
# Remote NFS share for recording
# 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.
- Turn off your TV, insert the USB stick and power on. Wait for 35-40sec then connect via SSH
- Verify NFS mount via df -h command. Verify also the log file /dtv/usb/sda1/SamyGO/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.
Performance of the USB stick it's not so important, because the NFS share is re-mounted into the mount point of the XFS image, so the real device to record to is the NFS share over network. If you have slow performance problem during recording check:
- Network link (speed, full/half duplex). 100MBit FD through a good switch like 3COM or HP is recommended.
- Use of a real Linux server with the NFS Kernel server (more fast and reliable than user-space NFS servers) is recommended. I have not tested Pre-build NAS: I prefer build it by myself so i can fine tune each parameter.
- Very important is the server parameters for share exports. My /etc/exports settings are:
- The most important is the "async" option: allows the NFS server to violate the NFS protocol and reply to requests before any changes made by that request have been committed to stable storage (e.g. disc drive). Using this option usually improves performance, but at the cost that an unclean server restart (i.e. a crash) can cause data to be lost or corrupted.
- A fast disk array is also very important: my little media server is an old PIV with 1.2GB of RAM but with a fast RAID0 SATA disk array --> 700Mbit/sec
--Remi71 23:55, 26 January 2011 (UTC)