[mythtv-users] Hard drive selection when Mythtv is in a VM

Mark Wedel mwedel at sonic.net
Thu Jan 4 04:19:20 UTC 2018


On 01/03/2018 07:44 PM, Phill Edwards wrote:
>     I know some of you have Mythtv backends running in a VM. What is the best
>     way to configure the hard drive you use for recorded TV?  I did a test build
>     using VirtualBox 5.2.4 under Windows 10 and installed Xubuntu 16.04; just
>     used a partition on the VDI created for the VM for recordings.  That works
>     in limited testing.  I think I could install a dedicated drive and configure
>     it just for the VM to use for recordings, but not sure that’s any better,
>     but it would be dedicated and not a dynamically created virtual drive. 
>     Looking for what has been thoroughly tested.
> 
>     I’ve also toyed with using the VirtualBox under NAS4Free.  I can just use a
>     directory on the NAS directly.  That VM has been very unstable  so far
>     unrelated to the mythtv.  I’m chasing down potential problem with the
>     NAS4Free system to make sure it’s not hardware.
> 
> 
> I have a MythTV Backend running as a VM on Proxmox (Linux KVM-based), and have 
> some CIFS shares on a QNAP physical NAS to store recordings. I like it that way 
> because it makes backing up the VM easy as the VM isn't too massive (I'm not 
> interested in backing up recordings). This has worked well for a few months now.

  I can't say that I've tried using a VM with mythtv, but there are some general 
notes:

- If you just use a default image, this is usually represented as a file from 
the host OS where virtualbox is running (in your case windows) within the 
windows filesystem.  The Xubuntu then puts another filesystem on top of that. 
This means that there are 2 filesystem layers (Xubuntu + windows) that each 
read/write has to go through.  Generally, this is probably fairly minimal 
performance difference.  However, any optimization that Xubuntu tries to do may 
be lost.  For example, in a normal case of writing to a hard disk, writing to a 
contiguous sequence of blocks is probably going to be faster, because there will 
be no seeking involved.  So Xubuntu may still do this, but there is no guarantee 
that windows will write those blocks contiguously - it might scatter those 
blocks physically over the disk, depending on what blocks are available.

  Note that if you are running on an SSD, seeks are no longer an issue.  This 
presumes an actual hard disk.

- If you use a network filesystem (nfs, share from a nas, etc), many of these 
issues go away, since the protocol says 'write this file', and the NAS can 
figure out best way to write it to disk.  However, now you are adding network 
latency, unless that share is from the same physical host (eg, a share out from 
the windows to xubuntu means that the traffic never leaves the box)

  I used to run with NFS as the backend storage, and it seemed to work 
reasonably well.

  One advantage of using a share is that it unifies your storage layout.  For 
example, if you have a 1 TB disk for windows and you want xubuntu to store to 
use the virtual disk, you have to allocate some amount of space, lets say 500 
GB.  If down the road, you find out you really only have 100 GB in recordings, 
but need another 200 GB for windows storage, changing that layout is a bit of a 
task.  In comparison, if you use network storage, perhaps you just give xubuntu 
50 GB (after all, you only need space for the OS).  Then, that remaining 950 GB 
can be used by xubuntu or windows.


> 
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
> 



More information about the mythtv-users mailing list