I think its unrealistic to expect a consumer level computer system to assuredly last more than 5 years (isn't that the standard depreciation schedule anyway?), especially if you plan to add additional software to it over time (newer software tends to be ever more demanding?). My strategy is to buy cheap (well, if it's not Apple ;-), but reliable (i.e. read reviews) hardware and replace parts, if necessary, in the interim. Buying reliable does not have to mean buying expensive.
As far as drives go, I have a 1TB WD10EACS being beaten to death daily in a TiVo HD (since May 2008) and it's pretty reliable so far, as are all but one of my 200GB ATA drives (works once it starts, but has a flaky spin up -- I suppose I should stop using it?). Many of my older SCSI drives (4GB, 8GB, circa 1995) seem to work as well as they ever did -- I've sold some to agencies looking for replacements in nuclear power plants and similar applications (don't you feel safe now?). However, an 8GB USB flash key I was using became completely inert one day -- and it didn't seem to be a static shock issue. I had an identical 1GB one that worked fine for years, and I went back to that until I got another 8GB one (different brand this time). Didn't lose anything, as it was only being used as a backup device.
For unchanging applications that never need updated software, I suppose you could just keep an old system going forever, maybe backing it up just enough (clone drive?) so you could buy a replacement old system on ebay and swap it in if necessary. Works, but it's generally better to "get modern" when possible --- though it never really stays that way for long!