LVM and MythTV

Caution: extreme geekery ahead.  Do not continue reading unless you know what hda and hdb are, and the joys of logical volume managers.  Cheers.

Way back last weekend, the DVR I built in 2006 decided to be cranky. I had originally built it with a 250 GB IDE drive, then added a 160 GB IDE drive which I’d salvaged from an older WinBox I replaced.  Sometime after that, I put in a 400 GB SATA drive.  That brought me over 800 GB total capacity, which has been enough for the past couple years. I noticed the temperature was increasing on the hard drives a while ago.

HD TempI didn’t worry about it, as the machine worked just fine regardless.  Then. last week, I noticed a little hiccup in the video feed while watching the news. As ever, when the tuners have ever had a problem, I rebooted the DVR to reset the tuners. Turns out, the tuners weren’t the problem. As the machine rebooted, it came up with an error which I’ve never seen before, and then halted the boot. Linux boxes don’t tend to halt their boot processes for much beyond catastrophic failure. I spent that night and part of the next day doing the research I needed to, and ran all the appropriate fixes (LVM activation and E2fsck with alternate master record blah blah). Finally, nearly one day after the machine went down, it was back again.

As you can see from the thin white line near the end of this graph, this is the only significant downtime my DVR has suffered in at least the last year.

CPU-YearlyI looked through the messages log and saw a lot of errors for hdb that imply some hardware failure. Since I bought that hard drive about 6 years ago and it’s been in constant use for over three years (the DVR never sleeps), it’s not surprising I suppose. Now, of course, I have to take care of this. Since I’ve got the machine set up as an LVM drive, I can add a new hard drive and move the data on to it, then remove the old drive. This is complicated by the fact that I have about 100 GB free, and the dying drive is 160 GB. So, I need to add a new drive before I can remove the old drive. That case is kind of crowded. The joys of vgreduce, pvremove and all manner of other exciting commands are in my future.  I’ll probably get a 500 or 750 GB drive, so the DVR will finally crest the 1 terabyte mark. I’ve already got more than a terabyte on my desktop, so it seems only fair that the DVR get to the same level.

The LVM setup is very confused right now anyway.  I’ve got hda1 (4.5 GB) as a standard ext3 boot and root drive. Simple.  MythTV originally required a “live TV” partition, so I had hda3 (15 GB) as the cache and hda4 (212 GB) as additional storage space (the recordings and such). When I added the 160, that became one big hdb1, still simple. The next upgrade of MythTV removed the necessity to separate live TV from recorded shows, and so the hda3 partition became useless. I added it to the LVM pool, which is a bit silly – hda3 and hda4 are both in there, and not just one merged partition. When I bought the 400 GB drive, that got tacked on as sda1. So, my LVM pool is hda3 hda4 hdb1 sda1. When I get done with the next planned upgrade, it will be hda3 hda4 sda1 sdb1.  Maybe I’ll go ahead and merge hda3 and hda4 while I’ve got the thing down anyway. Pretty much any drive I buy today will be large enough for the 217 GB of hda data and the 160 GB of hdb data, and then I’ll have to delete and recreate the hda3 partition so I can add it back to the LVM pool.  In case you want to sympathize with my plight, here’s the full sequence: physically add sdb, partition sdb1 as LVM, pvcreate sdb1, vgextend VG to include sdb1, pvmove all extents from hda3 hda4 and hdb1 to sdb1, vgreduce hda3 etc. to make them no longer active participants in the LVM, repartition hda3 from the old hda3 and hda4, vgextend to include new hda3, turn off machine and physically remove dying hdb.  Then, it’s back and room for more packrat behavior!

More DVR fun… This morning, one of the five fans in the DVR started making the grinding sound that indicates something has brushed against the fan blades. After two years of never opening the case, I finally cracked that bad boy… yuck. After giving every fan and air duct a good vacuuming (sorry Leo), the machine is now five degrees cooler inside.  Guess that worked.

HDtemp-DailySadly, I now have 20 minutes of downtime this morning. Linux geeks are all about the uptime.

Fall TV Schedule

In good news, Heroes is definitely coming back next year (cliffhanger season finale tomorrow!). In stranger news, there will be a show based on the one-liner Geico caveman commercials. If you thought it was hard to stretch a Saturday Night Live character to a movie, imagine stretching a slightly-funny ad to an entire season of television.

CBS is going to add a reality show that has a bunch of kids creating an entire town with no adult supervision, but they are cancelling Jericho and The Class. Go figure. And, I’m annoyed that Fox is killing off The War at Home – there are far too few good comedies on television as it is. Guess they have to make room for more episodes of American Idol.

Looking like the DVR will have plenty of free space this fall.

TiVoNoGo

Everyone who said that they didn’t need to worry about TiVo’s closed architecture, because it did everything they needed, including that nifty TiVoToGo that let you make DVDs on your computer from your TiVo box? Yeah, you got punked.

The new and improved TiVo Series3 boxes, the ones that finally allow you to record HD (something you could do with MythTV for years), have deleted the already-very-limited ability to do what you want with the recording you make on your machine that you pay for. Cheers.

There is no legal reason to do this, by the way. The fair use doctrine and case law (Betamax decision) are on the side of people who want to make personal copies of free over-the-air broadcasts. Aren’t you glad that TiVo is more interested in not offending Hollywood than they are in providing features their customers want?

No Fast Forward, ever!

The FX channel in the UK has decided to start displaying still images for 30 seconds during some of their ad slots. Apparently Sky+ PVRs don’t jump 30 seconds, they play at 12 times the normal speed when you want to skip commercials. ABC recently said they want to disable fast-forward on DVRs, as if that’s remotely possible from the non-hardware side of things.

In case you are unaware, there are PVRs that will let you jump forward, not just go faster. There are PVRs that will automatically mark commercials for skipping them without any interaction from the viewer at all. You just can’t buy these PVRs any longer. The one that was on the market was ReplayTV, which is gone. The good news is that you can still get the functionality, but you need to build it yourself. Look into MythTV – one of your geek friends can build it for ya for about 400 bucks; ABC and FX and everyone else will then have no control over what you can do with your own recorder, and you’ll at least have the same ability with your new machine that we had with VCRs in the 80s.

The Corruptibles

The Electronic Frontier Foundation has launched a new approach to consumer activism: The Corruptibles. The cartoon is pretty cool, and gives a reasonably simple overview of what the entertainment industry would like to have Congress give them. So far, the congresscritters have given them pretty much everything the industry has paid for wanted, so there’s a great deal of confidence that they’ll get everything else they’ve bought asked for as well.

I’m sure some people don’t care that their iPod only works with music they buy from Apple, and that Sony enjoys building virus-like rootkit hacking tools into music CDs, and the industry wanting to halt all technology at the level of analog cassette tapes, but maybe some of you realize that giving one business model special protection is a bad thing.

Only we can stop…The Corruptibles!

I’m not addicted…

I can quit any time I want. It’s a good thing most of the programs on my MythTV box are set for “autoexpire when the drive gets full.” Here’s the latest status line.

297 programs, using 242 GB (246 hrs 31 mins) out of 345 GB.

Now, to be fair, I have a truly stupendous number of cartoons for the Boy, as well as a significant number of DVDs ripped to the hard drive (no need to mess with the disks, which is good if you’re six years old).

Why 350 Gigs?

Several people have recently asked why in the world I would need 350 gigs of storage space, when that equates to hundreds of hours of video footage – way more than I could watch in a reasonable amount of time.

So, here’s the explanation for those who haven’t drunk the DVR koolaid yet.

I don’t record things to watch them at a specific time (except for a few shows that I look forward to talking about at work), but to have them for whenever I feel like watching them. Say I feel like watching a cooking show.  Six months ago, I could flip over to the Food Network and hope one of the shows I liked was on, or deal with watching the Al Roker barbecue special again.  Now, I just see which Good Eats or 30 Minute Meals episode I feel like watching. And Alex has three episodes of every one of his shows on tap, for whenever he wants to spend his 30 minutes of screen time per day.

Although I’m still opposed to the idea of tuners being not part of an industry standard and therefore being held hostage to a cable or satellite company for digital signals, I can see the utility of a dual-tuner HD box sometime in the future. The bigger problem is that whole DRM nonsense. As the consumers get more educated and begin to revolt against all the copy protection crap the MPAA and RIAA want us to encumber our media with, they continue to plan even more.  France has legislated the first step toward making DRM illegal, and yet the US government opposes the measure.  It’s astounding.

As Cory Doctorow says, nobody wants to do less with their media today than they did yesterday.  Yet, that’s what the MPAA want to force on us.  Why?

More fun with hard drives

Remember the new hard drive? Well, I decided to stop the separation of the various media files between hda4 and hdb1, because it causes issues that require me to manually move recorded movies to the video share in order to free up the space on hda4 (which was the original purpose of the extra drive). So, I spent a few hours today moving 140 gigs of files around from drive to drive, so as to get the system up and running using the Logical Volume Manager system. Now that it’s up, it’s sweet and future maintenance will be crazy easy.

Previously, the df command showed

/dev/hda1 /
/dev/hda3 /cache
/dev/hda4 /myth

/dev/hdb1 /myth/video

Now, the df command shows:

/dev/hda1 /
/dev/hda3 /cache
/dev/mythvg/mythlv /myth

Physically, that /dev/mythvg/mythlv device is a logical device, spread across two physical devices, with a combined total available space of 365 gigabytes. Now, instead of having 120 gigs free on the video drive and 80 gigs free (and falling fast) free on the main myth drive, I’ve got 206 gigs free on the logical myth drive. And, if I decide to be a bigger packrat, I can grab a SATA drive or two and extend the logical volume group across the new drives as well. I’m gonna get a terabyte, babay!

Fun with hard drives

Officemax had a deal on a 300 Gigabyte Baracuda drive this week, so I grabbed one to replace my secondary drive on the Windows machine (which was a 160 GB Maxtor).  Then, the 160 went into the MythTV box, to serve as a storage place for ripped DVDs or movies I record from TV but don’t want to erase for a while (if at all).

The default structure used by Knoppmyth is to make four partitions on the primary drive (hda), with the fourth being the /myth directory and using the vast majority of the space on the disk.  With a 250 GB drive, I ended up with 160 GB used within six weeks of starting this project.  So, I added the 160 GB drive as /myth/video and away we go.

New partition structure:

hda1 – / (user files and operating system)
hda2 – swap
hda3 – /cache (for live tv)
hda4 – /myth

hdb1 – /myth/video

And now I’ve got over forty gigs used of the hdb1 partition, and down to less than half used on the hda4 partition.

When I bought some blank CDs this week, I ended up with a free 128 MB USB thumbdrive.  Anyone want it?  What the heck will I do with this thing?  I’ve already got three SD cards of varying capacity, an old CompactFlash microdrive (340 MB), and a spare 128 MB memory stick.  Like I need more solid-state storage?

What’s New?

Someone (phbt!) recently pointed out that it has been more than two weeks since I posted, which is some sort of rare event. Gee, sorry I haven’t had any particularly stellar blinding insights lately that I had to share.

I’m still happy with the MythTV box, which now has about 180 programs stored on it. I’m planning to get another drive to use just for storing movies, which I have been acquiring from late-night TV regularly now. I also had to stop feeling so packrat-like. I was recording shows that I remember from my childhood, as if I suddenly acquired the ability and desire to watch 45 hours of television each day while still going to work and caring for the Boy.

I’ve added limits to most of my recordings, to make them stop recording more than X number of shows (X can vary from 3 to 10). Exceptions are, of course, the SciFi channel shows, which don’t auto-expire and don’t have storage limits. Yes, I am predictable.

I’m still slowly converting my VHS tapes to DVD. Unless I buy a different piece of furniture for my television, I won’t have room for a separate DVD player or VHS player again, anyway.

Work remains fun and exciting. The two women I work next to need slapping on a daily basis, but it beats being in the Army.

It was 85 on Thursday, and 35 on Friday. Just in time for the big Rodeo Parade.

Three weeks until Game Night.

I’ve got chocolate.

How goes that MythTV Box?

Well, I’m so glad you asked.  Since I have two MPEG-encoding tuners, it’s amazing what my poor little Sempron chip is capable of.

Right now, 60% of the CPU is being used by mythtranscode, which is going through the movie Road to Wellville and removing all the commercials while compressing it to MPEG4 instead of the default MPEG2 (about half the size with equivalent video quality). Another 22% of the CPU is being used to transcode the movie LA Story from DVD to MPEG4, so I don’t have to find the disk to watch the movie whenever I want to (and just to prove I can). Meanwhile, both tuners are recording shows (Surface and Stargate, I believe) and I’m watching the Simpsons from last night.

I’ve really been abusing the recording features, and I’ve got 66 programs saved, using 68 gigs of my 212 available. After removing commercials and transcoding to MPEG4, a 30 minute show fits in 360 megs.

State of the PVR – Night the Fourth

I didn’t do any work on the MythTV box Wednesday, but I got a borrowed monitor to help me set things up Thursday.  Looks like I’m in business, although I need to get a cable to split the speaker output from the sound card into RCA jacks to get to the TV.  Then, I’ll push a tunnel through the firewall so I can program my PVR from work.  Oh yeah.  That’s the stuff.

I promise to post a full review and more pretty pictures soon.

State of the PVR – Night the Second

And the hardware is installed.  Tonight, I have completed my mother’s federal tax return preparation and then finished installing the hardware in my MythTV box.

The only tricky part has been finding somewhere to tuck all the power cords. The PSU I chose has a lot of cables attached to it, very generous compared to most power supplies. Unfortunately, I only need two of them to power the drives and front case fan – the rest are just in the way.  Fortunately, I have a spare 5 1/4 drive bay that I am not using, and it’s placed perfectly to hold the cables.

Strangely, neither the motherboard (which has onboard sound) nor the DVD drive included an audio cable, so the optical drive won’t be pumping any CD audio for the time being.  Good thing that’s not a big issue for me, eh?

The case now contains all the components I intend to install. The only other parts that are not connected are the mouse, keyboard, and remote control.  Whew.

For photos of the progress so far, check out the gallery.  Good night.

State of the PVR – Night the First

I just spent an hour putting the first pieces into the case. The LC13 case is quite roomy and built like a tank. The Sempron processor is easy to install, as has been the case with every ZIF-style chip in the past decade. The heatsink was equally easy to install, although they sure have grown since the last time I installed a processor (that was a K6-200, if I remember correctly). The pre-installed thermal paste is a nice touch and worth the extra few bucks for the retail package, in my mind at least.

I’ve got the hard drive temporarily placed, as I have to pull its cage out again in order to install the DVD burner (which arrives via UPS tomorrow). And, that’s enough fun for tonight. My pile of hardware has dwindled considerably, with the tuners and video card being the only parts left to install (after that burner, of course) tomorrow night.

Downloadable Television – Why?

Apple came out with the latest iPod (with video, but not part of the name so nobody who isn’t in the know can possibly tell if it’s a “video” iPod or not on the shelf – WTF?) a few weeks ago. They accompanied the launch with a new offering in the iTunes Music Store – downloadable television shows. That’s right, instead of setting your VCR or TiVo, you can pay two bucks to get a 320×240 video of Lost or Desperate Housewives on your two-inch screen. Why?

This week, NBC announced a deal with DirecTV to offer commercial-free television shows for a buck an episode, delivered to the DirecTV Digital Video Recorder. You know, the box you can use to record the shows when they are played on television for free? Yeah. Why?

And, finally, CBS announced a deal to deliver television shows via the pay-per-view channel on Comcast cable systems, for a buck an episode. They won’t delete the commercials when they send you your copy, though. Um…Why?

I understand that television studios need to find new ways to generate revenue in the age of TiVo and the internet. Their standard commercial-supported model is going to have a hard time staying viable when people can easily skip the commercials. But, can’t they find some way to add value to their offerings, rather than removing the value that was already there?

I can rent a movie for a buck (three for a new release); paying two bucks for the episode of Lost that aired ten minutes ago seems kind of retarded to me. If you notice, none of these three networks is using the same system as any other. If you want to watch ABC shows, you have to use an iPod and iTMS. If you want to watch NBC shows, you have to subscribe to DirecTV satellite service. If you prefer CBS shows, move to a city that offers Comcast cable. Fox? Nope, not playing yet. And, the networks aren’t offering all of their shows on-demand – just a select few.

I don’t see anything here that I can’t do better with existing tools (TiVo, MythTV, ReplayTV, VHS tape) and without paying per episode. Damn, I already pay an insane amount for cable television – I’m not about to pony up another hundred bucks a month to watch the shows on a 2-inch screen.

Am I missing something vital here? Apple has sold one million downloaded videos, so someone must be watching them. More money than brains, as the saying goes.

Celestia

We’ve been playing with Celestia the past couple days, and boy is my graphics card tired.

Alex keeps wanting to look at the lava flows on Venus, and I’ve got models of the Deepspace 9 station and Babylon 5 and stuff all over the universe. This is going to be such a timesink this summer, I’m betting. Wonder if I can get it working on the TV-out for the Linux MythTV box I’ll be putting together. That would be cool – flying around space on the television, making Alex go, “ooh! Let me see the lava, Daddy!” over and over again. hehe

Geekin’

So, with the one gigabyte Memory Stick in my Clie, I’ve finally gotten around to ripping some DVD video to it. So far, just a Looney Tunes short, “One Froggy Evening,” but next is one of Alex’s movies. Something about Dino Thunder Thunder White Thunder Ranger Thunder Power Thunder I think.

Meanwhile, I’ve decided that a PVR(Personal Video Recorder) would be a cool thing to have, but hearing the stories about the studios reaching into machines and turning off features, I’m a bit wary of the commercial Tivo and MCE products. Then, Tivo starts adding commercials when you’re trying to skip them…

So, I’m putting together plans for a MythTV based recorder once I graduate this spring. Figure nobody gives a 34 year-old graduation presents, so I’ll get ’em for myself. 🙂