Skip to content

Caliban – Opinion and Righteous Anger

Ian, Sarah, Eloïse and Lucas kick against the pricks.

Archive

Category: System Administration

It turns out that my first dedicated network drive, a LaCie Big Ethernet Disk, wasn’t dead as I suspected after all, merely in a state of suspended animation for the last eighteen months.

I’ve regularly returned to this LaCie drive over the last year and a half, because it housed some unessential data for which I had no back-up of. I’ve always hoped I could one day find a way to get at it again.

So, I returned to the unit again a few days ago, expecting another bout of brief head-scratching, followed by consignment of the device to the cupboard until the next time my curiosity auto-piqued.

This time, I decided to completely dismantled the thing. Why worry about rendering void an expired guarantee?

I thought I’d been hearing the drives spin up during my irregular tests over the last eighteen months, but what I’d actually been hearing turns out to have been the sizzling of the power adapter block. Seriously, up close, it sounded like bacon being fried, but from a distance, the sound was inseparable from that of spinning drives. Anyway, the drives themselves, as it turned out, were silent when I put my ear next to them. A good sign, to be sure.

I hadn’t previously suspected the power supply, because the blue light on the front of the drive housing was illuminated, as were the LAN lights at the back. This obviously meant that the drive was receiving electricity, at which point I ruled out the power supply as the possible cause of the problem. That left only the hard drives themselves and if those were buggered, well, game over, right?

A quick Google search now revealed many more similarly broken drive units than when I had first looked for others afflicted with this ailment back in June of 2008. Lo and behold, many people reported the same sizzling power supply problem, and the fact that the unit hadn’t completely shuffled off its mortal coil, but merely declined to the point that it could now power only the lights on the casing, not spin up the discs inside. Another very good sign!

I wish I had realised earlier that it was only the power supply at fault. I hadn’t even contacted LaCie at the time, believing the unit to be no longer under guarantee, its being just over a year in my possession. I also didn’t realise that a power supply unit could partially die and then stabilise at some drastically suboptimal level, the way many LaCie units apparently have.

It turns out that LaCie actually offered a two year guarantee on units back then (in Europe, at least), so I should have contacted them. If nothing else, they would have replaced the drive.

More likely, they would have known what was wrong and just supplied me with a new power supply free of charge. More fool me for not looking into it.

Incidentally, in case you run into a similar problem, you should be aware that LaCie currently offers a three year guarantee on new drive units.

I opened a ticket with LaCie, but they were adamant that they wouldn’t help me, because the drive is all of 2½ years old now. My retort that it had died when it was only one year old cut no ice with them.

I would have liked them to demonstrate a little more understanding, particularly in view of the fact that so many other users’ drives have had exactly the same problem, but they’re obviously not that kind of company. Some manufacturers will bend over backwards to help any customer with a problem, whether the unit is still under guarantee or not — just in the name of good customer service — but that’s only some companies; not LaCie.

Now almost certain that only a faulty power supply was standing between me and my old data, I bit the bullet and ordered a replacement from the LaCie Web site. At least they actually sell the accessory on-line. I had half expected it to not even be separately available, which would have been a problem, because it has a strange, proprietary four pin connector that meant no-one else’s adapter could be substituted in its place. Why do companies do this? I’m unpleasantly reminded of the 1001 different charger connectors that Nokia mobile phones have sported over the last fifteen years.

Anyway, for around €40 plus postage, I ordered a new 57W adapter. To LaCie’s credit, they did at least send it promptly.

Once it arrived, I plugged in the unit and, sure enough, the drives span up again.

A switch port mirroring and tcpdump session was required to figure out which IP address the thing was attempting to latch onto, and then I was able to log in and configure the drive again.

With that done, I took it down to the equipment cupboard and connected it to the UPS and core switch.

The next twelve hours saw the ReadyNAS pulling 56 Gb of data off the LaCie, where it’s now better protected against the vagaries of cheap consumer electrical goods.

I feel pretty daft for having remained in the dark for so long about such a trivial problem and its equally trivial fix, particularly as it ended up costing me not only time without my data, but also money for a new power supply.

I was even wrong about this being a single drive unit. Opening it up revealed two 320 Gb drives, not the single 640 Gb drive I was expecting to find.

The irony is that I currently actually need a USB drive for the purpose of back-up, but this one can only be connected over Ethernet. I wouldn’t really mind, but I have to mount this drive over CIFS, which is less than ideal on an almost exclusively UNIX-like network (and especially when you consider that the LaCie unit actually uses XFS internally). The drive has a USB port, but annoyingly, it can function only as a USB host, which means that you can connect other devices and have the LaCie present them for use, but you can’t make the LaCie subordinate to another device that is serving as a USB host.

Since I’ve already got two ReadyNAS units in the house, one of which has an external Seagate drive connected over USB, I’d like to connect the LaCie to the other one. If both devices can only host other USB devices, however, doing so isn’t going to get me anywhere.

As you may know, I use a Netgear ReadyNAS RND4410 for my internal network’s mass storage. I’m very happy with the device, but it is a bit inflexible when it comes to back-ups.

The problem is that most forms of back-up that it provides for don’t support the deletion of files that are no longer on the source. For example, if file A and B were backed up last night, but file A was deleted on the source by somebody this morning, tonight’s backup should back up only file B (and even then, only if it has since changed) and delete file A from the back-up destination.

This level of control calls for the common free software program, rsync, to be used for back-ups. The ReadyNAS does support rsync, but Netgear’s interface to it via the Web-based FrontView software is less than ideal. That’s because it doesn’t allow one to specify the use of rsync’s many optional flags and parameters. In particular, it doesn’t allow the essential --exclude flag to be used to omit certain directories from the back-up. I’m not being picky; I actually have a back-up job that will fail without the use of this flag.

Happily, though, the ReadyNAS is Linux-based and Netgear nowadays provide an EnableRootSSH patch, which will, oddly enough, allow you to ssh into your ReadyNAS as root.

I’d been resisting the temptation to do this for some time, because I had no good reason to do so. The ReadyNAS is sold as an appliance and one isn’t really supposed to go prodding at its internals. The potential for rendering one’s device non-functional is definitely there. Of course, I know what I’m doing (famous last words, I know), but I still have a healthy respect for devices supposed to operate as black-box appliances.

Nevertheless, I needed more flexible rsync functionality for my back-ups. An alternative to poking around on the Netgear would be to schedule the back-up jobs on the clients themselves, pushing the data to be backed up to the ReadyNAS instead of having the ReadyNAS run the back-up job and pull the data from the clients.

I wanted my back-ups centralised, however, so I installed the EnableRootSSH patch and went gently wandering across the file-system.

I found what I needed and was able to add the functionality I needed with 15 lines of Perl. Now, it’s possible to define a set of extra options to be passed to an rsync back-up job when it’s invoked.

I’ve posted details of how to do this to Netgear’s ReadyNAS forum, so I won’t repeat them here. I mention the hack here only to gain a bit of publicity for it, as I’m sure I’m not the only person who needs this extra functionality.

Of course, a much better solution would be for Netgear to integrate this into their FrontView Web-based interface. I’d much rather be able to use the supplied tools than have to resort to hacks like this.

Still, at one level, it is nice that Netgear have allowed this kind of thing to be done. It encourages experimentation, development and user community growth.

Another thing that kept me busy over the last few days was enhancing, tv_grab_nl_upc, my program for fetching television guide data for UPC’s digital cable network in The Netherlands and outputting the results in XMLTV format.

Of all the stuff I’ve written, this is possibly the most obscure and least useful to anyone else (of course, I’ve said that before and been wrong). Nevertheless, necessity is the mother of invention, and I need this program, so I’ve been working on improving it over the Christmas period.

Specifically, this new version uses some heuristics to try to derive a subtitle for the programme in question. Ideally, this should be the episode name for a series, the destination city/country for a travel programme, etc. Sometimes, UPC includes this kind of information as part of the programme’s description, but programmatically determining whether the first sentence of the description is suitable for use as a subtitle is a tricky business; hence the many man hours that have gone into the 0.5.0 release, as I had to perform a fair amount of textual analysis and parser refinement before reaching the point that plucking text from the description to use as the subtitle was logical enough to be more use than hindrance.

Anyway, 0.5.0 of tv_grab_nl_upc is now out, even if I’m the only one who cares.

For a number of reasons, I’ve been dissatisfied with using our Hauppauge PVR-350’s on-board MPEG-2 decoder and TV Out port for MythTV. For one thing, the MythTV mailing-list makes it clear that support for the decoder of this device is on the way out. None of the developers use one, so the code is unmaintainable.

With this in mind, I purchased an XFX GeForce FX5200 AGP video card for €39 from Alternate, which has a well-supported nVidia chipset. The card arrived in the post yesterday, so I installed it in the system and got to work configuring it at the end of the evening.

With the loss of the PVR-350’s on-board MPEG-2 decoder, playback now has to be handled by the CPU, but we have a 3 Ghz Pentium 4 in the box, so it can take it in its stride. This is pretty much the only disadvantage to switching to this video card.

Here are some of the advantages:

  • The FX5200 has a DVI Out socket, so we’re now connecting to the TV using DVI. The result is that X and MythTV now look superb on our 94 cm Philips LCD TV. The image is crisp and clear and we can drive the TV at its native resolution, which appears to be 1280×720. Related to this, menus and widgets no longer run off the screen and fonts are properly scaled. Bliss!

  • Thanks to DDC, the monitor can now tell the video card which video modes it can handle, so the Xorg configuration is now very simple and doesn’t even need HorizSync or VertRefresh parameters for the TV. Here’s the relevant section from Xorg.0.log;

(--) NVIDIA(0): Connected display device(s) on GeForce FX 5200 at PCI:1:0:0:

(--) NVIDIA(0): Philips FTV (DFP-0)

(--) NVIDIA(0): Philips FTV (DFP-0): 135.0 MHz maximum pixel clock

(--) NVIDIA(0): Philips FTV (DFP-0): Internal Single Link TMDS

(WW) NVIDIA(0): Mode "1280x800" is too large for Philips FTV (DFP-0);

(WW) NVIDIA(0): discarding.

(WW) NVIDIA(0): Mode "1280x768" is too large for Philips FTV (DFP-0);

(WW) NVIDIA(0): discarding.

(II) NVIDIA(0): Assigned Display Device: DFP-0

(II) NVIDIA(0): Validated modes:

(II) NVIDIA(0): "1280x720"

(II) NVIDIA(0): Virtual screen size determined to be 1280 x 720

(--) NVIDIA(0): DPI set to (76, 76); computed from "UseEdidDpi" X config option

I’m not sure why those first two modes are tried, since they wouldn’t offer the correct 16:9 aspect ratio. If anyone knows, please tell me. Nor do I understand why 1920×1080i isn’t tried or selected, since our TV is capable of that resolution. I’m not too bothered, though, since we don’t have any input sources that can provide that resolution.

  • MythTV is slowly moving towards OpenGL for its themes and menus, so having an nVidia card with its hardware acceleration allows us to enjoy all of the OpenGL goodies. TV playback can also use certain OpenGL functions to reduce jitter and make other improvements to the image. And, very pleasingly, we can now enjoy all of the OpenGL visualisations offered by the MythMusic module. The TV has become a big flat disco ball for listening to my music collection!

  • Although MPEG-2 decoding is now handled by the CPU, we can still offload some of the work to the video card’s GPU by using MythTV’s XvMC support. A lot of people seem to have trouble with XvMC, but I found it very easy to get working. The only issue was that the OSD (on-screen display) became greyscale rather than colour, but that’s a known issue and there’s an easy fix for it.

  • During playback, fast-forwarding at greater than 3x speed now properly displays the current location in the recording. With The PVR-350, fast-forwarding beyond 3x speed would freeze the playback image, leaving you with only the playback timer to hazard a guess at where in the stream to resume playback. This was very annoying and confined us to 3x fast-forwarding much of the time.

  • During playback, rewinding at any speed now properly displays the current location in the recording. Similar to the previous point, but even more annoying, was that the PVR-350 would freeze the playback image when rewinding at any speed. If you wanted to replay the last couple of scenes in a programme, you would thus have to guess how long they were and resume playback after rewinding that many minutes.

  • Not using the PVR-350 MPEG-2 decoder for playback means that the audio and video are now separable. This, in turn, means that we can now send audio to our sound system, rather than being restricted to using the TV’s built-in speakers.

  • As a result of the previous change, the internal MythTV volume controls now also work. Previously, we had to adjust the volume via the TV, because the PVR-350’s hardware decoder volume was beyond the control of MythTV.

  • The ivtv driver decoder errors that have plagued us since I first set up this system almost a month ago are now happily also a thing of the past. We would regularly get errors like these in the log:

Sep 18 14:36:52 tourbillon kernel: ivtv0 warning: DEC: Sched Buffer end reached 0x0ad51267

Sep 18 14:36:52 tourbillon kernel: ivtv0 warning: DEC: Mailbox 10: 0x00000000 0x0ad41267 0x0ad41267 0x00000000

Sep 18 14:48:32 tourbillon kernel: ivtv0 warning: DEC: Decoder Invalid type 0xd8031707?

Sep 18 14:48:32 tourbillon kernel: ivtv0 warning: DEC: Decoder Invalid type 0x0e86df64?

In practical terms, these manifested as occasional picture freezes during playback. Sometimes we’d get several within a few minutes. At other times, we’d watch a whole programme without one. They were very unpredictable.

A quick hit of the Rewind button was necessary to unjam the system. It was irritating, but we were able to live with it. Now we’re no longer using the hardware MPEG-2 decoder of the PVR-350 card, however, we’re avoiding whatever it was in the driver or the firmware that was causing these.

  • Time-stretching now works properly. Time-stretching is the ability to play back video at faster than normal speed, but with the appropriate audio compensation, so that the pitch remains constant.

The idea is that, if you’re short on time, you can get through a 30 minute programme in, say, 20 minutes if you pay good attention and can stand listening to people who talk very quicklyt. At 1.5x speed, for example, everyone sounds like the people who read the disclaimer at the end of American radio adverts. You know the ones, where it sounds as if all the gaps between the words in their sentences have been sucked out.

  • Because we’re using a plain old video card now, the entire Linux boot process can be followed on the TV screen. If there’s ever a problem that causes the system to fail to boot, I’ll now be able to debug it without a blindfold.

And that’s about it. I reprogrammed our Harmony 885 universal remote-control to use the external sound system instead of the TV’s audio for MythTV playback and to select the DVI input on the TV instead of the relevant SCART connector, and now we’re all set. I just need to go and buy a new DVI cable, as I borrowed the one from my computer upstairs for testing purposes.

What do you do when you’re missing your wife and darling daughter? In my case, you keep busy.

I had intended to go into the crawlspace under our house at the weekend to lay down some CAT5e cable. The intention was to run Ethernet to the spot directly under where our TV is located, then up through a tiny hole in the floor that the previous owners must have (had) drilled. That would give us the much needed wired network access that we’re missing in the living-room.

Well, when I went to do the work, I noticed that I had purchased the wrong kind of cable; I had bought solid cable instead of braided. So, I went back to Media Markt yesterday and switched my solid cable for a 50m reel of braided.

Today, I had no good reason to put off the work any longer, so with the family out of the way, I got down to some undisturbed work in the cellar.

The crawlspace under our house is really quite vile. It’s not just a flat, dusty space down there. Oh no, it’s full of rubble, old plastic bags, bits of old wire and God knows what else; probably a load of rat turds and asbestos, I shouldn’t wonder.

I’d bought a nice, powerful Maglite torch yesterday, an essential piece of kit when crawling around on your belly and elbows in the pitch black. It has a rotary head, so that you can turn from a wide angle beam into a sharp, bright point of light. I’d been bitching for ages that we didn’t own a decent torch, but thanks to a local ironmonger’s, that’s now been put to rights.

Anyway, I was under the house for only about fifteen minutes and there were no unexpected hitches. It was easy to draw the cable across the breadth of the house and feed it up into the living-room.

Upon exiting the crawlspace, I immediately headed upstairs for a shower. My clothes, skin and hair were covered in… I don’t even want to know what.

Back downstairs, I carefully stripped the cable in the living-room and crimped an RJ-45 connector onto the end, using an excellent guide, turned up by Google. If you think that I know the colour-coding order of an Ethernet cable off by heart, you’d be wrong.

With one end done, I went back downstairs into the cellar and crimped a connector onto the other end. I then hooked up that end to the router.

Back in the living-room, I plugged the other end of the cable into the on-board Ethernet jack of the MythTV box, tried to bring up the link and… bingo!

Sep 20 16:43:32 tourbillon kernel: e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex

I’ve already decommissioned the 802.11b WLAN card inside the MythTV box, as it’s no longer needed. It wasn’t working well any more anyway, because it was suffering interference from the wireless speakers of our recently purchased Logitech Z-5450 5.1 speaker set.

With a 100 Mbit link from the MythTV box, I’ll now be able to stream TV programmes to my workstation on the top floor, which could be handy if Sarah is commandeering the real TV downstairs.

In the future, I suspect we’ll eventually move to gigabit Ethernet and a distributed MythTV set-up, so that we can stream programmes and DVDs to televisions anywhere in the house. We could even make the front-ends discless, so that there would be almost no noise emanating from the cases.

Anyway, that stuff is all some way off yet. I’m just happy to finally have Ethernet where the TV is.