Device Passthrough, Virtualisation or ??

Status
Not open for further replies.

Shadow dream

Cadet
Joined
Nov 28, 2015
Messages
7
Hello guys!

I'm new to this Forum and also new to FreeNAS. Now recently (actualy a few months) ago I have first heared of FreeNAS and it's rock solid filesystem ZFS. With my interest in data-security being awaken, I have looked deeper into things and found lots of nice things.
To make things short: I am about to build my own box at home to store and share my data (either localy or VPN). I have read lots of posts and comments to make my decisions on the hardware and think I made a solid choice. But as things are, I would not open this thread if I didn't have a question or two.

Now one of the things I'd like my FreeNAS to do is being able to record TV series from sheddule.
(I know some will shout out loud at this point, but hey, FreeNAS offers the options - If I simply wanted storage my old NAS could get the job done.)
While I am still waiting for some hardware to arrive, I am toying arround with FreeNAS in a VM for now. I have been able to set up MythTV with XServer in a Jail so far, but without testing my Tuner. It's a PCIe Tuner Card that I have sitting here already.
I have been looking for guides on how to pass-through a PCIe Card to a Jail, but I have not been able to find something close enough to my setup yet. Most answers covered USB-Sticks/Dongles, but as far as I am aware, PCIe is a whole different story. Now, I don't want to set up a second PC to run 24/7 just for that one feature.

The only working solution I have found is running ESXi natively with a virtualized FreeNAS and a virtualized Linux. Now I'm not too happy with this solution, since I want FreeNAS to handle my precious data. Even with Backup, I have read about the risks. I'm not too keen on a fragile system. That's why I'm building that box in the first place!

What kind of solution would you recommend? Is it even possible to pass-through? I think I could slap MythTV onto native FreeNAS somehow, but how unorthodox is that?!
I don't claim to know every possible way yet, so please help me out!

Thanks!
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
The lack of responses suggests a lack of experience among forum members with what you're trying to do.
I could slap MythTV onto native FreeNAS somehow
This would for sure be the wrong approach. Jails and virtual machines are the place for installing anything.
 

Shadow dream

Cadet
Joined
Nov 28, 2015
Messages
7
Well, that's the point I'm making. Sorry if I sound rude, but what you are saying is exactly what I said in the very sentence you are quoting (well, you cut that final part...): It's not the way to go!

I have read "https://forums.freenas.org/index.ph...nas-in-production-as-a-virtual-machine.12484/" and I have read "https://forums.freenas.org/index.ph...ide-to-not-completely-losing-your-data.12714/" to get a feeling for do's and don't's. Now I have even less experience with ESXi, so I'm not too keen to jump on that train just now, apart from it being a not-so-good idea. I'm sure I could fill in some line of text to get it going, but copy paste is not exactly the definition of reliable. (Please don't quote half of my sentence again ;-) )

I might have to face, that FreeNAS simply doesn't support that kind of tinkering. Either I'll burn my fingers on the ESXi-path, or burn cash to get some LAN-Tuner to do that job for me.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
It wasn't clear to me what you meant by "how unorthodox is that?!"

Oops, I quoted another fragment.

:rolleyes:
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You don't pass through a PCIe card to a jail. In the UNIX model, the kernel interfaces with physical devices. A jail does not have a separate kernel; it is merely an artificial set of restrictions making compartments within the traditional UNIX framework. Either the kernel supports the device, or the userland has to be clever enough to interface with the device through some generic interface.
 

Shadow dream

Cadet
Joined
Nov 28, 2015
Messages
7
Now that's strange, I set up e-mail notification, but seem to have mîssed that last one... sorry for my late reply

@jgreco: Uhm, so do I understand you right? Are you saying a Jail has access to all devices that FreeNAS has access to?
As long as I can forward the data from my PCIe-Tuner to my Myth-Jail, I'm happy.

On a side note:
I've been looking for solutions, and what I have found is a blog explaining how to setup ZFS on Ubuntu. I'm mostly interested in the features of ZFS, especialy the data integrity. But since ZFS is not native on Linux I wonder what the differences would be. As far as I understand, FreeNAS is built for ZFS and thus is pretty solid and performant. What are the differences between both setups? Why would I prefer one over the other? (I'm not a hopeless dummy, but I'm not too deep into that stuff either, so...)
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
FreeNAS is built for ZFS
Right, FreeBSD is built with ZFS, and FreeNAS is a custom version of FreeBSD.

ZFS on Linux is an add-on, due to the way each is licensed. I ran ZFS with Ubuntu for a while and didn't have any issues. What you won't get is a built-in GUI for managing pools and datasets, but it's not hard to do at the command-line if you're not CLI-phobic.
 

Shadow dream

Cadet
Joined
Nov 28, 2015
Messages
7
Once I got a hand on those lines I need, it should be manageable. So, basicly there is no "penalty" for not using FreeBSD?
I'm wondering how scrubs or SMART-tests will work. Do I need to create scripts and a Cron-job?

Maybe I should just set up a VM and try it out myself. If I can get along, everything should be fine, right?
Well, I still have another question on that regard. On another forum someone sets up OpenMediaVault with ZFS (http://forums.openmediavault.org/index.php/Thread/7633-HOWTO-Instal-ZFS-Plugin-use-ZFS-on-OMV/). That one I have tried to replicate on a VM with little success (= none at all, got stuck on the install for some reason).
While I was looking for which OS I should set up on my Server, OMV was recomended to me because it bases on Debian and is essentialy the same as FreeNAS (without ZFS). Now I don't expect any difference in using either Ubuntu or Debian, that's why my question: Is the GUI the only thing I will lose? Since I'll start from scratch I won't have to worry about compatibility of tank-versions or whatever, but how the software works together.
I'm pretty sure I can get Debian (or Ubuntu) to run the way I need, but I hesitate on that step because I'm concerned about my Data (even with a Backup, I don't want my system to be unstable from day 1).
I'll try to do some more testing on my own, but some experience from here would be very much appreciated!
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
OMV was recomended to me because it bases on Debian and is essentialy the same as FreeNAS (without ZFS). Now I don't expect any difference in using either Ubuntu or Debian
Someone has been leading you astray.

Debian is a flavor of Linux, and Ubuntu is built on Debian.

FreeBSD is a flavor of Unix, and FreeNAS is build on FreeBSD.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
@jgreco: Uhm, so do I understand you right? Are you saying a Jail has access to all devices that FreeNAS has access to?
As long as I can forward the data from my PCIe-Tuner to my Myth-Jail, I'm happy.

You can at least potentially do so, sure. A jail doesn't necessarily have access to all the devices that the host system has, this is determined by what's allowed by devfs.
 

Shadow dream

Cadet
Joined
Nov 28, 2015
Messages
7
Ok thanks so far, I'll try to get that runnung once I can (still waiting for my Mainboard ....)
I'll call when I need help again ;-)
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Beware Santa Claus, that nice server you asked for for Christmas, well, I like to steal playthings. (See avatar.)
 

Shadow dream

Cadet
Joined
Nov 28, 2015
Messages
7
Sorry for the Necro, but I find it appropriate to just continue this thread instead of opening a new one on the same matter. *cough*

So I finaly have my "puzzle" (=Server) together, built and running. I did a lot of experimenting using different OSes and ending up with FreeNAS again. I'm happy with that decision since Data is my first intent for that machine.
Now I need to get all the software running for the services I want to add. Specificly I'm talking about that pass-through of a PCIe-Card mentioned in the OP.
My current setup is Freenas 9.10 stable as base. Then I installed a phpVirtualBox Jail on which I have installed Mythbuntu to take care of my TV-Recordings. Now I need to get that PCIe-Card from the Mainboard-slot to Mythbuntu.
VirtualBox allowes to pass through devices via the Serial Ports. Using the command "lspci -vv" (found in the Internet) in FreeNAS Shell I could obtain following informations:

02:00.0 Multimedia controller: Digital Devices GmbH Cine V7
Subsystem: Digital Devices GmbH Device 0032
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at df400000 (64-bit, non-prefetchable)
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [70] MSI: Enable- Count=1/2 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [90] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Exit Latency L0s unlimited, L1 <1us
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Range A, TimeoutDis+, LTR-, OBFF Not Supported
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-

I know I need that IRQ number "16" somewhere and I'm missin the I/O Port, but elsewhise I'm standing pretty blank here. Google isn't helping that much either. My results mostly cover RAID-Cards for FreeNAS, but nothing with Jails or even VMs in Jails.

Does anyone here know what I need to do here?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I think what you need to do is "not do what you are trying to do". :P I think that's been said by our resident virtualization geek already...

As far as I know what you are wanting to do is basically "impossible" unless you plan to code up the necessary changes and then compile them into FreeNAS. For starters, you'll have to add the appropriate drivers to FreeNAS for the device in question...
 
Status
Not open for further replies.
Top