MythTV Tips: Clear Job Queue via MySQL and Removing Stuck Recordings

Had an issue where we had stuck items in the Job Queue. Found that these can easily be removed via the MythTV Frontend, but to do them in mass, MySQL is the way to go. Log into mysql into the mythconverg DB and:

TRUNCATE Table jobqueue;

To remove older recordings that may be stuck in MythTV issue the following MYSQL command:

 DELETE FROM recorded WHERE starttime < ‘YEAR-MONTH-DAY 00:00:00’;

Finally, we had to rework the naming schema using STARTTIMEUTC. So now the user job reads:

/usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl –link /LOCATION/TO/STORE –chanid “%CHANID%” –starttime “%STARTTIMEUTC%” –format ‘%cN-%T-%S-%m%d%y-%G-%i-%s’

read more

HVR2250 Causing Error: getting frontend signal strength failed – Mythbuntu 12.04/14.04

For the past month I have been having issues with my Mythbuntu DVRs. In all systems I was experiencing an odd issue where sometimes the tuners (HVR 2250) would not lock to channels (on both Mythbuntu 12.04 and 14.04). I would confirm the signal strength with a tester, but to no avail. What was more annoying, was that the errors were seemingly random – different channel, different tuners on different days. I would come in and see this:

LockingError

Failed recordings would show up as 0 bytes and with no thumbnail.  When looking at the logs, I did finally find:

E SignalMonitor dvbchannel.cpp:1022 (GetSignalStrength) DVBChan(3:/dev/dvb/adapter1/frontend0): Getting Frontend signal strength failed.#012#011#011#011eno: Invalid argument (22)

And this brought me to Google, only to find that others have had this issue with these Hauppauge tuners:

After looking into the EIT Scan options, I could not find teh direct cause. So, I started experimenting with different tuners.

Changing to HD Homerun tuners has COMPLETELY SOLVED this issue. This leaves me to believe that there is an issue with the drivers/firmware used for the HVR22550 – especially when used with alongside multiple tuners.

read more

Fix Mythlink.pl user jobs in Mythbuntu 14.04

After my upgrade from 12.04 to 14.04 I found that my rename user job via Mythlink.pl was completing successfully but not actually creating the symlink. After some digging I found this is due to using %STARTTIME% in the userjob. Post 0.26+ %STARTTIMEUTC% is required. After fixing that, your user jobs will work again!

 

read more

Fixing: incrementally starting raid arrays

I ran into an issue on a specific Mythbuntu 14.04 machine where the RAID was halting the system on boot-up giving the following error:

incrementally starting raid arrays
mdadm: Create user root not found 
mdadm: create group disk not found 
incrementally started raid arrays

If CTRL-ALT-DEL was pressed, the machine would reboot like normal and the RAID would appear to be OK. After much searching I came across the cause and the fix of this MDADM issue.

FROM: http://serverfault.com/questions/593734/mdadm-boot-error-incrementally-starting-raid-array-ubuntu-server-14-04

The problem was that mpt2sas.ko was not loaded, and thus mdadm couldn’t see any disk. This in turn was caused by a packaging error: when apt was removing unneeded wlan packages like crda, it also auto-removed the linux-image-extra-$VERSION package, which actually owns mpt2sas.ko.

To ensure, that the module gets loaded before the raid modules, I also did a

echo mpt2sas >>/etc/initramfs-tools/modules

After that, reboot and all is fixed!

read more

Ubuntu 14.04 Samba Configuration Writable Share

Full writable samba share for 14.04. Edit /etc/samba/smb.conf :

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = SERVERNAME
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ==============================
[SHARENAME]
path = /path/to/share
browsable =yes
writable = yes
guest ok = yes
read only = no

[SHARENAME2]
path = /path/to/share
browsable =yes
writable = yes
guest ok = yes
read only = no

 

read more

Software RAIDs over 2TB in Ubuntu 14.04 – The Easy Way!

Setting up and dealing with software RAIDs in Linux can be a pain – especially if you have drives over the old 2TB limit. After many setups over the years, here is the best way on Ubuntu systems (or any system that uses MDADM).

If you drives are over 2TB in size start at step 1, otherwise skip to step X. In this example,. I have the OS installed to /dev/sda1 , the RAID1 I want to set up include 4TB drives on /dev/sdb and /dev/sdc:

1. Verify the drives are labeled what you thought: fdisk -l /dev/sdb  AND fdisk -l /dev/sdc

2. To create a partition start GNU parted: 

  • parted /dev/sdb
  • (parted) mklabel gpt
  • Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?Yes/No? yes
    (parted)
  • (parted) unit TB
  • (parted) mkpart primary 0.00TB 4.00TB
  • (parted) print
  • (parted) quit

3. Repeat steps for each drive that will be in the array. In this case just SDB and SDC.

4. Once the large partitions are in place, format the drives with: mkfs.ext3 /dev/sdb1 AND mkfs.ext3 /dev/sdc1

5. Now that all the partitions are set up, and those partitions have been formatted, it is time to set up the array using MDADM.

6. Install MDADM: apt-get install mdadm

7. Install MDADM web admin (makes everything easy):

  • On Ubuntu, create the following file: /etc/apt/sources.list.d/webmin.list and add the following lines to it:
  • # Repository for Webmin
  • deb http://download.webmin.com/download/repository sarge contrib
  • apt-key adv –keyserver keyserver.ubuntu.com –recv-keys D97A3AE911F63C51
  • apt-get update
  • apt-get install webmin

8. Use your browser to access your webmin panel at the following url: https://localhost:10000

9.To administer the Software RAID using webmin login as a sudo-er, go to the page Hardware > Linux RAID, select create RAID and the type you wish with the specific drives you want to use. 

10. To watch the progress of your RAID syncing: watch -n3 cat /proc/mdstat

11. Mount the volume – edit FSTAB – ENJOY!

 

 

read more