INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Setup Guide: Installing Media Center on FreeNAS server  (Read 16704 times)

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Setup Guide: Installing Media Center on FreeNAS server
« on: February 14, 2017, 06:46:11 am »

For the last year or so I have been looking at storage solutions for our home needs.   It needed to hold our media collection, backups from various PCs & ideally run JRiver’s MediaCenter serving multiple clients simultaneously.  I ended up choosing FreeNAS.
 
This covers the steps I took to get MediaCenter running (on a debian VM) once I had an operational FreeNAS server.  It is not about getting FreeNAS working nor about configuring shares

Caveats
  • I believe you need some experience with *NIX operating systems.   Going in I had experience with vi, basic tasks like moving and copying files and modifying access and groups, reviewing the sys log etc, but I am far from being a UNIX admin.  My skills were not good enough to get everything working, but thanks to the internet and some helpful people here I managed to get through.  There are probably better / more efficient methods available than what I used
  • You need to do some research on FreeNAS & get a least a basic understanding of the recommended hardware and the storage pool(s) setup (pools, vdevs etc)
  • Virtual machines on FreeNAS 9.10 do not have direct access to the host’s storage.  You will need to create shares (NFS or CIFS / SMB etc)
  • FreeNAS is poised to release version 10.  I believe that it will bring improved virtualisation and docker capabilities (as well as an improved GUI).  I do not know what the upgrade process will be.
  • RAID is not a backup solution.  You still need to back up the data you cannot do without (or be bothered re-ripping)
  • Use complex passwords (perhaps use LastPass or similar to generate / store passwords)
  • I haven’t tested these instructions end to end yet (will do so & edit accordingly)

My FreeNAS server setup
VersionFreeNAS-9.10.2-U1 (86c7ef5)
CPUIntel(R) Xeon(R) CPU E5620 @ 2.40GHz
MotherboardIntel S5500HCV
RAM24482MB (6 x 4GB ECC Registered)
HBAHP/LSI 8 Port 6Gb/s External SAS HBA Controller SAS9200-8e-HP
Boot Drive1 x Samsung SSD
Storage Pool 1 (Media / backups)4 x 6TB WD Red NAS drives in 2 vdevs.  Each vdev consists of 2 drives mirrored
Storage Pool 2 (Surveillance)1 x 1TB HDD

Aside from the Hard Drives all components were sourced on the secondhand market.  The hardware has been running without issue for several months
You can install the OS onto USB sticks.  I originally had this, but the USB sticks failed so have moved to an SSD
Backup your FreeNAS configuration regularly

I run multiple VMs, one of which is for mediacenter.  I ensure the UID & GIDs for common users are the same across the VMs

The jriver benchmark score for the Virtual machine is JRMark (version 22.0.71): 2049

Resources
I could not have got this working without help from other forum members, the FreeNAS forum and articles on the internet.  Some references

FreeNAS
 Forum - https://forums.freenas.org/index.php#freenas-forum.1
 Hardware - will it FreeNAS - https://forums.freenas.org/index.php?forums/will-it-freenas-freenas-build-discussion.70/

iohyve
 configuration and virtual machine installation - https://www.youtube.com/watch?v=rCDh9K16Q5Q

MediaCenter
 Config for Debian (Awesome Donkey) - https://yabb.jriver.com/interact/index.php/topic,105985.0.html
 x11vnc and jriver Services (mwilliams) - https://yabb.jriver.com/interact/index.php/topic,108981.0.html
 headless config (bob) - https://yabb.jriver.com/interact/index.php/topic,109419.0.html

Installation Summary

1. Configure iohyve on FreeNAS, build the virtual machine
  • iohyve - install
  • iohyve - fetch the OS image
  • iohyve - Define the Virtual Machine (disk space)
  • iohyve - set the VM’s CPU, RAM, OS type and loader
  • iohyve - Build / configure the VM
  • iohyve – set the VM to start automatically

2. Fix the UID / GIDs on the VM (optional?)
3. Install some packages on the VM
4. Configure lightdm, xorg and x11vnc for headless operation (thanks mwilliams, bob)
5. Create service to start x11vnc on boot, restart if fails (thanks mwilliams)
6. Mount required NAS shares
7. Install JRiver MediaCenter (thanks Awesome Donkey)
8. Configure MediaCenter as per your preferences (import files, views, DLNA servers etc)
9. Configure services for autostart & restart of mediacenter (thanks mwilliams, bob)
10. Secure x11vnc (using ssh) - optional
11. Accessing mediacenter from the WAN (Internet) - optional


Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Iohyve setup and virtual machine configuration / build
« Reply #1 on: February 14, 2017, 06:46:51 am »

    If you haven't used iohyve before I recommend you look at the youtube video and take some notes
https://www.youtube.com/watch?v=rCDh9K16Q5Q

Prerequisites
  • Decide which storage pool iohyve and the VMs will reside in
  • Enable terminal access on FreeNAS root account (you can disable it later if desired)
  • Need the network interface identifier in FreeNAS
  • Might need an app to access the terminal service.  I use pUTTY

Need to add some images of the freenas UI (for pool name and network interface details)

Access the FreeNAS server via a terminal session using the root account

Inital Setup of iohyve on Freenas
This can be skipped if iohyve is already configured
The command to configure the hypervisor is iohyve setup pool = {storage pool name} kmod = 1 net = {Network Interface}
In my case the pool is name “MacJones_pool1” and the network interface is “lagg0” the command is
[/list]
Code: [Select]
iohyve setup pool = MacJones_pool1 kmod = 1 net = lagg0

Set some FreeNAS tunables
This will ensure the iohyve setup is enabled on a restart of the FreeNAS server.  It can be skipped if iohyve has already been configured / tunables are already present
The entry related to net=lagg0 should be changed to refer to the network interface specified in the iohyve installation
VariableValueType
iohyve_enableYESrc.conf
iohyve_flagskmod =1 net=lagg0rc.conf

Need to add some images of the freenas UI (Tunables section)

Fetch the operating system that will be used on the virtual machine
iohyve must have the OS image available before it can be used to build a VM.  In this case I used the debian 8 OS as that is the default / recommended distro for mediacenter

You can fetch it from a local respository or from the internet.  In my case I already had it available on the FreeNAS server
The command is iohyve fetch {location}
Code: [Select]
iohyve fetch /mnt/MacJones_pool1/ISOImages/debian-8.6.0-amd64-netinst.iso

Pulling it directly from the debian site should be as simple as getting the url for the most recent debian 8 version & then executing the iohyve fetch command.  As an example
Code: [Select]
iohyve fetch http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso

**Note the current version is more recent than the one I had locally

Define the Virtual Machine
This sets the VM name and the disk allocation
The command is iohyve create {name} {disk allocation}
In my case I named the VM "deb64vm003" and wanted 32GB of disk.  The command was
Code: [Select]
iohyve create deb64vm003 32G

Set the VM's attributes
This set the VMs attributes (CPU, RAM, OS type, Loader).  It done via the iohyve set command and can be issued individually or as a group.  In my case I allocated 2 CPU, 4GB RAM, set the OS to be debian, set the boot loader to grub_bhyve & set the description to JRiver MediaCenter

The command syntax is iohyve set {vm name} {one or more attribute / value pairs}

In my case
Code: [Select]
iohyve set deb64vm003 ram=4096 cpu=2 os=debian loader=grub-bhyve description= jRiver_Media_Center

Build / Configure the VM
Next we have to get iohyve to install the OS onto the VM.  This is done using the iohyve install command.  The syntax is iohyve install {VM name} {image name}

In my case the vm = deb64vm003 and the image = debian-8.6.0-amd64-netinst.iso

Code: [Select]
iohyve install deb64vm003 debian-8.6.0-amd64-netinst.iso

To complete the OS installation you need to start another terminal session (as root) with the FreeNAS server and open the iohyve console for the VM.  The command for the console is iohyve console {VM name}

Code: [Select]
iohyve console deb64vm003

Complete the debian 8 installation (it will take some time - especially if slow internet connection).  Of note
  • I make the hostname the same as the VM name
  • Choose a good mirror.  In Australia I use the iiNet mirror
  • As part of the install choose xfce and ssh
  • I get the install to create an account named ‘jriver’

Once the installation has completed OK......


Set the VM so that it automatically starts 
The command is iohyve set {VM name} boot=1
Code: [Select]
iohyve set deb64vm003 boot=1

Start the VM
The iohyve command is iohyve start {VM Name}

Code: [Select]
iohyve start deb64vm003


At this stage the VM should be OK.  There is no graphical console (yet).  Access is via a terminal session
  • Test that you can access the Vm via a terminal session
  • Restart FreeNAS to ensure iohyve and the VM start on reboot

Useful iohyve commands
iohyve list: lists all defined VMs & current status
Code: [Select]
[root@freenas] ~# iohyve list
Guest       VMM?  Running  rcboot?  Description
deb64vm003  YES   YES      YES      jRiver_Media_Center
deb64vm004  YES   YES      NO       Wed Jan 25 08:37:29 AEDT 2017
[root@freenas] ~#

iohyve getall {vm name} - lists all the attributes set for that vm
Code: [Select]
[root@freenas] ~# iohyve getall deb64vm003
Getting deb64vm003 iohyve properties...
20160122       20160122
bargs          -A_-H_-P
boot           1
con            nmdm0
cpu            2
description    jRiver_Media_Center
install        no
loader         grub-bhyve
name           deb64vm003
os             debian
persist        1
ram            4096
size           32G
tap            tap0
template       NO
vnc            NO
vnc_h          600
vnc_ip         127.0.0.1
vnc_tablet     NO
vnc_w          800
vnc_wait       NO
[root@freenas] ~#

iohyve start {vm name} - starts the specified VM if not already running
iohyve stop {vm name} - stops the specified VM
iohyve console {vm name} - starts a terminal session with the VM's console

Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
UID GID update - optional
« Reply #2 on: February 14, 2017, 06:47:37 am »

I like to keep the UIDs and GID the same across my VMs.  It may not be required, but suspect it will make access the host’s storage easier (once FreeNAS has this functionality)

The following instructions were taken from https://muffinresearch.co.uk/linux-changing-uids-and-gids-for-user/

You will need the user name, current UID and GID and the values you want them to be

Logon to the VM via a terminal session.  You need to be root
usermod -u <NEWUID> <LOGIN>
groupmod -g <NEWGID> <GROUP>
find / -user <OLDUID> -exec chown -h <NEWUID> {} \;
find / -group <OLDGID> -exec chgrp -h <NEWGID> {} \;
usermod -g <NEWGID> <LOGIN>
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Install packages on the VM, add groups to the user account
« Reply #3 on: February 14, 2017, 06:48:17 am »

We need to install additional packages to get a graphical console working.  sudo is installed to make life easier

Install the following on the VM: sudo, x11vnc, xserver-xorg-video-dummy. 

Logon to the VM via a terminal session.  I prefer to use the jriver account created during the OS installation and elevate my privileges via su

As an example
Code: [Select]
root@deb64vm003:/home/jriver# apt-get install sudo xserver-xorg-video-dummy x11vnc

Once completed add the user account specified in the VM build (in my case jriver) to the groups sudo and adm (note adm appears to be required to get x11vnc to start on boot). 

As an example
Code: [Select]
usermod -a -G adm,sudo jriver
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
(reserved) Configure lightdm, xorg and x11vnc for headless operation
« Reply #4 on: February 14, 2017, 06:48:56 am »

The following steps are used to create a graphical console.  MediaCenter requires one (even in mediaserver mode)

I had major issues getting the graphical console to work.  Most stem from my lack of knowledge on how the x-server works.   Thanks to mwilliams for taking the time to help me out.  Great assistance with troubleshooting and configuration settings

iohyve doesn’t present a graphical console for its VMs.  This is why I installed xserver-xorg-video-dummy.

Bob has since created a thread for the xorg.conf file (https://yabb.jriver.com/interact/index.php/topic,109419.0.html).  I’d recommend you use his method

the xorg.conf file I currently use is listed below.  I'll be changing mine to match Bob's

Code: [Select]
jriver@deb64vm003:~$ cat /etc/X11/xorg.conf
# This xorg configuration file is meant to be used
# to start a dummy X11 server.
# For details, please see:
# https://www.xpra.org/xorg.conf
# obtained from http://cosmolinux.no-ip.org/raconetlinux2/dummy_radeon_nvidia.html

# Here we setup a Virtual Display of 1600x900 pixels

Section "Device"
    Identifier "Configured Video Device"
    Driver "dummy"
    #VideoRam 4096000
    VideoRam 256000
    #VideoRam 16384
EndSection

Section "Monitor"
    Identifier "Configured Monitor"
    HorizSync 5.0 - 1000.0
    VertRefresh 5.0 - 200.0
    #Modeline "1600x900" 33.92 1600 1632 1760 1792 900 921 924 946
    #1368x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 85.86 MHz
    Modeline "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
    #1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
    #Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync


EndSection

Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
        Viewport 0 0
        Depth 24
        Virtual 1600 900
    EndSubSection
EndSection

jriver@deb64vm003:~$

x11vnc setup
As the jriver user execute x11vnc -storepasswd.  This will prompt you to set and confirm a password for VNC and notify the path the password will be saved in.  The path is important as it it referenced in the x11vnc.service file later on.  The default path and file is /home/jriver/.vnc/passwd

Initial setup is not securing the VNC session over SSH.  I chose to do it this way & once everything is working OK to change the x11vnc config to secure it

lightdm config
mwilliams advised to uncomment the following settings and set the user id for the autologin-user (in my case the user id that was specified in the OS installation)
pam-autologin-service=lightdm-autologin
autologin-user=jriver
autologin-user-timeout=0

My lightdm config is
Code: [Select]
jriver@deb64vm003:~$ cat /etc/lightdm/lightdm.conf
#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
# logind-load-seats = True to automatically set up multi-seat configuration from logind
# logind-check-graphical = True to on start seats that are marked as graphical by logind
# log-directory = Directory to log information to
# run-directory = Directory to put running state in
# cache-directory = Directory to cache to
# sessions-directory = Directory to find sessions
# remote-sessions-directory = Directory to find remote sessions
# greeters-directory = Directory to find greeters
#
[LightDM]
#start-default-seat=true
#greeter-user=lightdm
#minimum-display-number=0
#minimum-vt=7
#lock-memory=true
#user-authority-in-system-dir=false
#guest-account-script=guest-account
#logind-load-seats=false
#logind-check-graphical=false
#log-directory=/var/log/lightdm
#run-directory=/var/run/lightdm
#cache-directory=/var/cache/lightdm
#sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions
#remote-sessions-directory=/usr/share/lightdm/remote-sessions
#greeters-directory=/usr/share/lightdm/greeters:/usr/share/xgreeters

#
# Seat defaults
#
# type = Seat type (xlocal, xremote)
# xdg-seat = Seat name to set pam_systemd XDG_SEAT variable and name to pass to X server
# pam-service = PAM service to use for login
# pam-autologin-service = PAM service to use for autologin
# pam-greeter-service = PAM service to use for greeters
# xserver-command = X server command to run (can also contain arguments e.g. X -special-option)
# xserver-layout = Layout to pass to X server
# xserver-config = Config file to pass to X server
# xserver-allow-tcp = True if TCP/IP connections are allowed to this X server
# xserver-share = True if the X server is shared for both greeter and session
# xserver-hostname = Hostname of X server (only for type=xremote)
# xserver-display-number = Display number of X server (only for type=xremote)
# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true)
# xdmcp-port = XDMCP UDP/IP port to communicate on
# xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
# unity-compositor-command = Unity compositor command to run (can also contain arguments e.g. unity-system-compositor -special-option)
# unity-compositor-timeout = Number of seconds to wait for compositor to start
# greeter-session = Session to load for greeter
# greeter-hide-users = True to hide the user list
# greeter-allow-guest = True if the greeter should show a guest login option
# greeter-show-manual-login = True if the greeter should offer a manual login option
# greeter-show-remote-login = True if the greeter should offer a remote login option
# user-session = Session to load for users
# allow-user-switching = True if allowed to switch users
# allow-guest = True if guest login is allowed
# guest-session = Session to load for guests (overrides user-session)
# session-wrapper = Wrapper script to run session with
# greeter-wrapper = Wrapper script to run greeter with
# guest-wrapper = Wrapper script to run guest sessions with
# display-setup-script = Script to run when starting a greeter session (runs as root)
# display-stopped-script = Script to run after stopping the display server (runs as root)
# greeter-setup-script = Script to run when starting a greeter (runs as root)
# session-setup-script = Script to run when starting a user session (runs as root)
# session-cleanup-script = Script to run when quitting a user session (runs as root)
# autologin-guest = True to log in as guest by default
# autologin-user = User to log in with by default (overrides autologin-guest)
# autologin-user-timeout = Number of seconds to wait before loading default user
# autologin-session = Session to load for automatic login (overrides user-session)
# autologin-in-background = True if autologin session should not be immediately activated
# exit-on-failure = True if the daemon should exit if this seat fails
#
[SeatDefaults]
#type=xlocal
#xdg-seat=seat0
#pam-service=lightdm
pam-autologin-service=lightdm-autologin
#pam-greeter-service=lightdm-greeter
#xserver-command=X
#xserver-layout=
#xserver-config=
#xserver-allow-tcp=false
#xserver-share=true
#xserver-hostname=
#xserver-display-number=
#xdmcp-manager=
#xdmcp-port=177
#xdmcp-key=
#unity-compositor-command=unity-system-compositor
#unity-compositor-timeout=60
#greeter-session=example-gtk-gnome
#greeter-hide-users=false
#greeter-allow-guest=true
#greeter-show-manual-login=false
#greeter-show-remote-login=true
#user-session=default
#allow-user-switching=true
#allow-guest=true
#guest-session=
#session-wrapper=lightdm-session
#greeter-wrapper=
#guest-wrapper=
#display-setup-script=
#display-stopped-script=
#greeter-setup-script=
#session-setup-script=
#session-cleanup-script=
#autologin-guest=false
autologin-user=jriver
autologin-user-timeout=0
#autologin-in-background=false
#autologin-session=UNIMPLEMENTED
#exit-on-failure=false

#
# Seat configuration
#
# Each seat must start with "Seat:".
# Uses settings from [SeatDefaults], any of these can be overriden by setting them in this section.
#
#[Seat:0]

#
# XDMCP Server configuration
#
# enabled = True if XDMCP connections should be allowed
# port = UDP/IP port to listen for connections on
# key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored in keys.conf)
#
# The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn.  Alternatively
# it can be a word and the first 7 characters are used as the key.
#
[XDMCPServer]
#enabled=false
#port=177
#key=

#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# command = Command to run Xvnc server with
# port = TCP/IP port to listen for connections on
# width = Width of display to use
# height = Height of display to use
# depth = Color depth of display to use
#
[VNCServer]
#enabled=false
#command=Xvnc
#port=5900
#width=1024
#height=768
#depth=8
jriver@deb64vm003:~$
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Create service to start x11vnc on boot, restart if fails
« Reply #5 on: February 14, 2017, 06:49:46 am »

Thanks to mwilliams for this.  His instructions can be found at https://yabb.jriver.com/interact/index.php/topic,108981.0.html

I have split his instructions into two parts.  This one covers getting x11vnc to start at boot / restart upon failure.  Once this is working the VM's graphical console should be available via a VNC client after any restart

Note the ExecStart command references the x11vnc password path set when you stored the password

My x11vnc.service is
Code: [Select]
jriver@deb64vm003:/etc/systemd/system$ cat x11vnc.service
[Unit]
     Description=x11vnc
     After=display-manager.service

[Service]
     Type=forking
     Environment=DISPLAY=:0
     User=jriver
     ExecStart=/usr/bin/x11vnc -rfbauth /home/jriver/.vnc/passwd -display :0 -geometry 1920x1080 -auth guess -forever -bg
     Restart=always
     RestartSec=10

[Install]
     WantedBy=graphical.target

jriver@deb64vm003:/etc/systemd/system$

Next enable the service
Code: [Select]
sudo systemctl enable x11vnc.service

At this stage x11vnc is configured but not running.  Start x11vnc.service
Code: [Select]
sudo systemctl start x11vnc.service

Note you will need to modify this service if you desire to secure the VNC session over SSH.  This will be covered in a later section

Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Mount required NAS shares
« Reply #6 on: February 14, 2017, 06:50:25 am »

As mentioned in an earlier post, VMs in iohyve cannot access the host storage directly. As such you will need to access data on the NAS via CIFS (SMB), NFS or another sharing protocol

I am currently using a CIFS share.  Once I had mounted the share correctly - I updated the/etc/fstab file to ensure the share was mounted when the guest was restarted

  • Create a mount point.  In my case this was /mnt/shares/FreeNas_Media
  • Mount the share
  • Edit /etc/fstab.  In my case I added //192.168.1.99/FreeNas_Media  /mnt/shares/FreeNas_Media  cifs  username=xxxxxxxx,password=xxxxxxx,iocharset=utf8  0  0

Notes
  • I used the IP address of the FreeNas Server.  I should probably use a name & allow the name to be resolved to an address
  • The username and password have been removed.  I should probably change the setup & move the username & password into a separate file
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Install JRiver MediaCenter
« Reply #7 on: February 14, 2017, 06:51:02 am »

Awesome Donkey has documented all the required steps.  I was able to follow them without a hiccup.  Recommend you use the stable repository unless you specifically want the latest

https://yabb.jriver.com/interact/index.php/topic,105985.0.html
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
(reserved) Configure MediaCenter as per your preferences
« Reply #8 on: February 14, 2017, 06:51:47 am »

(reserved) Configure MediaCenter as per your preferences
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Configure services for autostart & restart of mediacenter
« Reply #9 on: February 14, 2017, 06:52:37 am »

once again - thanks to mwilliams for documenting / sharing how to do this.  His instructions are at https://yabb.jriver.com/interact/index.php/topic,108981.0.html

I intentionally didn't create / enable the jriver.service at them same time as the x11vnc.service.  I wanted to ensure mediacenter was installed OK and stable.

Create the jriver.service file.  My current version is
Code: [Select]
root@deb64vm003:/etc/systemd/system# cat jriver.service
  [Unit]
     Description=JRiver
     After=x11vnc.service

  [Service]
     Type=simple
     Environment=DISPLAY=:0
     User=jriver
     ExecStart=/usr/bin/mediacenter22 /MediaServer
     Restart=always
     RestartSec=10
     KillSignal=SIGHUP
     TimeoutStopSec=45
  [Install]
     WantedBy=graphical.target

root@deb64vm003:/etc/systemd/system#

Enable the jriver.service
Code: [Select]
Systemctl enable jriver.service

Need to add instructions to test the service without rebooting.  Also add what logs to check if issues
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
(reserved) Secure x11vnc (using ssh)
« Reply #10 on: February 14, 2017, 06:53:24 am »

(reserved) Secure x11vnc (using ssh)
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
(reserved) Accessing mediacenter from the WAN (Internet)
« Reply #11 on: February 14, 2017, 06:54:13 am »

(reserved) Accessing mediacenter from the WAN (Internet)
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72543
  • Where did I put my teeth?
Re: Setup Guide: Installing Media Center on FreeNAS server
« Reply #12 on: February 14, 2017, 06:56:01 am »

Thanks for doing this.
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Re: Setup Guide: Installing Media Center on FreeNAS server
« Reply #13 on: February 14, 2017, 09:02:23 am »

Thanks for doing this.

you are more than welcome.  It will take me some time to finish it and test it end to end

have received a fair amount of help on interact over the years.  Hopefully someone finds this helpful

regards,

Steve
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4889
Re: Setup Guide: Installing Media Center on FreeNAS server
« Reply #14 on: February 14, 2017, 10:11:55 am »

Thanks very much for all of this work. Unfortunately, it will not be of much use to me because I am on another platform (unraid), but this will be a gold mine for those who are still looking for a NAS solution.
Logged

madbrain

  • Galactic Citizen
  • ****
  • Posts: 308
Re: Setup Guide: Installing Media Center on FreeNAS server
« Reply #15 on: March 13, 2017, 03:23:48 am »

Thank you very much for putting together this guide. I may very well end up following in your steps - with different hardware, though.

I do have a couple questions :
1) what is the idle power consumption of your server ? Have you checked with a kill-a-watt ?
2) how are you backing up all this data, if you are backing it up at all ?
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Re: Setup Guide: Installing Media Center on FreeNAS server
« Reply #16 on: March 18, 2017, 11:35:49 pm »

hi,

I haven't checked the power consumption - will do so & report back.  Its operation is covered by PV panels during daylight hours - so only costing me at night

I am still in the freenas infancy & it is only holding data that can be recovered (re-rip of media or the files are already on other machines).   

Before I move more important data to it will be testing recovery options (offsite hard drive and or rync data to offsite NAS or cloud service).  Only smaller / critical files would be in the rsync / cloud storage.  Will also need to investigate encryption.

Steve

Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Re: Setup Guide: Installing Media Center on FreeNAS server
« Reply #17 on: May 12, 2017, 06:23:56 am »

Finally got round to checking the server's power consumption.  At 240VAC 50Hz it is idling along between 130 and 140 watts.  That's with the following
  • 5 x mechanical HDD
  • 1 x SSD
  • 2 x HBAs (via PCI-e slots)
  • 2 x VMs running (but not doing much)

One of the HBAs will be removed the next time I have the case open - so it might decrease a little
Serving a MKV file via DLNA to a Samsung TV did not change the consumption
I'll report back again after loading up the CPU and disk activity

Looking at FreeNAS builds on new hardware - users are reporting 72 - 80 watts at idle.

regards,

Steve
Logged

stevemac

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 305
Date / Time correction on virtual machines
« Reply #18 on: May 12, 2017, 06:36:17 am »

I noticed an issue with the date/time on the virtual machines. 
Whilst the UTC and local time settings were correct on the FreeNAS server & the timezone settings were correct on the guests, the date/time was incorrect on the guests.

performed the following on the debian VMs (guests) to fix it
  • Set system date correct for my timezone
  • updated /etc/adjtime so that the 3rd line was LOCAL not UTC
  • Copied system date to hardware clock
  • rebooted the guest

regards,

Steve
Logged

madbrain

  • Galactic Citizen
  • ****
  • Posts: 308
Re: Setup Guide: Installing Media Center on FreeNAS server
« Reply #19 on: September 29, 2017, 07:15:13 am »

Finally got round to checking the server's power consumption.  At 240VAC 50Hz it is idling along between 130 and 140 watts.  That's with the following
  • 5 x mechanical HDD
  • 1 x SSD
  • 2 x HBAs (via PCI-e slots)
  • 2 x VMs running (but not doing much)

One of the HBAs will be removed the next time I have the case open - so it might decrease a little
Serving a MKV file via DLNA to a Samsung TV did not change the consumption
I'll report back again after loading up the CPU and disk activity

Looking at FreeNAS builds on new hardware - users are reporting 72 - 80 watts at idle.

regards,

Steve

Thanks. That is useful. I have solar PV as well, but also two electric cars and lots of other things going on. I have a net positive electric bill, and the marginal cost of anything that runs 24/7 can be high.

72-80 watts idle is better than what I have with my Skylake PC with lots of drives, which is about 90 watts idle best case.
It's a lot more than my ODROID XU4 with external dual-drive USB 3.0 dock . Using ext4 I have managed 75 MB/s file transfer over LAN gigabit ethernet interface with a single client. Not maxing the interface, but this is pretty good.
I should measure the power consumption with a few drives. Right now, I'm running with a 6TB Toshiba N300 in one of the docks, and an 8TB Seagate Backup Plus which is too slow for NAS and will be removed shortly when I have more/faster drives.
Altogether I would be surprised if I'm exceeding 30W idle and 40W with active drives. All the drives power down when idle. XU4 power consumption cannot be more than 20W as it uses a 5V/4A power supply.
Logged
Pages: [1]   Go Up