4K drive problems

I have a HD XL (TCD658000) with a failing hard drive. It started rebooting whenever we watched a certain recording. I ran a kickstart and it failed the SMART test with a Fail 7.

So, I used the MFS Live CD to create a truncated image, and restored it to a WD10EURX. This worked, but videos skip frames every 2-5 minutes. This never happened with the original drive.

I believe that this has to do with the 4K format of the new drive, as the MFS partitions are not aligned (base is not evenly divisible by 8.)

I tried using dd to backup each partition (except for the 1st, since it's the partition table) to an image, corrected the partition alignment with pdisk by deleting and recreating the partitions, and restoring the data back from the images to each new partition. This allowed the TiVo to boot and videos played without issue. There were several problems, though... I didn't get the THX intro, TiVo Central wouldn't display, no background graphics on the Now Playing List, not all remote commands responded, videos continued to play when you hit the TiVo button, etc.

I also have a regular HD (TCD652160.) As a test, I used dd to clone the original drive out of it to the WD10EURX, and used mfsinfo -x to expand the capacity. As was noted in another thread on this forum, this resulted in all MFS partitions being aligned. I didn't have the video playback problems on the HD.

I'm convinced that the 4K sectors of this drive are causing the problems I'm having. Is there a source for the old 512B sector drives? Or am I going at this the wrong way?

I suspect that the Premiere uses a newer Linux kernel that natively supports the 4K drives,and that it's partitions are already aligned to 4k drives. This would make sense, as it came out around the same time the 4K drives were being phased in. Unfortunately, I don't have access to one to confirm this.

On the HD (not XL), if you DD copy the original 160GB drive (basically what JMFS does) to a 1 TB or 2 TB drive and then expand it with MFS tools, you will end up with all MFS partitions aligned. I tried this with my HD to confirm, and had no video playback problems.

On my HD XL, though, I can't figure out how to get the partitions aligned and am getting skipped frames during playback.

Oddly enough, I ran the WD Diagnostics Extended Test on the factory drive last night and it found no errors. So I erased it and restored the truncated image I took from it last week when it first starting acting up. The drive now passes the Kickstart 54 SMART tests and seems fine.

You can consider using your HD image on your HD XL and use a KS 52. If you are adept you can use a hex editing program and change the brev code in block0 of the HD image to that of the HD XL.
Although you may 4k align the partitions, there is no evidence that the TiVo keeps the alignment internally. Consequently there would be no performance improvement. At the same time I like the idea of 4k align partitions as it will not degrade performance. The only thing that might happen is to lose a few seconds of recording time.
I have a WD20EURS drive in my S3 and have not those issues yet. I did have those issues with bad capacitors. (with the original drive) After I replaced them had no more problems.

I tried to use the HD image on my XL. After performing a Kickstart 52, it downloaded the software, rebooted, and hung at the "Just a few more minutes" screen. Is the hex edit required to make this work? I've never used a hex editor before, but would be willing to give it go it you can tell me what to do.

This is the partition map that is being generated by the MFS Live CD when I restore my truncated backup:

As you can see, the Bootstrap partitions are being created with a length of 1, which throws off the alignment of the other partitions. The factory image has the same issue. Is there a way to restore the backup and tell it to use a length of 8 for these partitions?

Yes but you will have to do a manual copy of each partition to the new drive and adjust the partition map accordingly. iBored can be used to do it. Would suggest getting used to that program if you want to attempt it.

The brev code is a backup if for some reason the software cannot poll the hardware to figure out what machine it is. You can use iBored to change the brev code in block0.

Try another KS 52. Sometimes letting it boot and then do a c&de instead of a KS 52 will work.

As I always do, I'm now going to point out that there is more to misalignment than performance issues, even if they aren't enough to notice on the equipment in question, that the drive is used in (such as a TiVo device).

Misalignment also causes extra read/write/seek operations. This can hypothetically shorten the drive's life, as opposed to the life-span it may have hypothetically had if operated aligned.

Yes but you will have to do a manual copy of each partition to the new drive and adjust the partition map accordingly. iBored can be used to do it. Would suggest getting used to that program if you want to attempt it.

As I always do, I'm now going to point out that there is more to misalignment than performance issues, even if they aren't enough to notice on the equipment in question, that the drive is used in (such as a TiVo device).

Misalignment also causes extra read/write/seek operations. This can hypothetically shorten the drive's life, as opposed to the life-span it may have hypothetically had if operated aligned.

Click to expand...

That is true. It is those extra operations that can decrease lifespan of the drive and degrade performance. Having the partitions aligned is only the first step. The OS has to cooperate as well or the first step is meaningless.

You can use pdisk to adjust the partition map. Other than copying a drive to another drive, I have not used dd for anything else. Consequently I do not know the full extent of dd's abilities. If it can copy a certain range of sectors from one drive to a specified area in another drive, then it can be used as well.

You can use pdisk to adjust the partition map. Other than copying a drive to another drive, I have not used dd for anything else. Consequently I do not know the full extent of dd's abilities. If it can copy a certain range of sectors from one drive to a specified area in another drive, then it can be used as well.

Click to expand...

With dd you would more than likely copy partitions one at a time. So once the new partition map is created you can use dd to fill them with the old data.

That is true. It is those extra operations that can decrease lifespan of the drive and degrade performance. Having the partitions aligned is only the first step. The OS has to cooperate as well or the first step is meaningless.

Click to expand...

I don't know enough about all the different OS tech factors to chime in there. I do agree with how you accurately interlinked the performance and lifespan factors as being due to essentially the same reason. On a better day, I'd have included that...

What I think would get people's attention the fastest, is the lowered life-expectancy, which I'd better stick to calling theory, so as to not get jumped.

If you talk to most about a miniscule (in a TiVo) performance drop, which may not be enough to notice, their eyes will just glaze over once you start explaining specifics.

I theorize that the longer an AF/4K/512e drive runs, that the performance should take a bigger and bigger hit. By the time the drive is in use long enough, and/or the data fragments enough, for the same people to notice, the last thing they may think of, is the drive. Everybody is SO FAST to post SUCCESS, post-drive upgrade, when all many have done at that point is to get the drive to boot up, download its updates, and start recording.

Yet, tell them the drive will (in theory) fail sooner, then you may have their full attention...

Unfortunately, it will be quite some time before most people start experiencing any noticeable performance degradation, due to the drive not being aligned, and even longer before complaints of short life spans come rolling in...

I'd like to try and speed these things up, and prove these theories. Any ideas or suggestion, that aren't obvious?

If you talk to most about a miniscule (in a TiVo) performance drop, which may not be enough to notice, their eyes will just glaze over once you start explaining specifics.

Click to expand...

I'm experiencing far more than a miniscule performance drop. In addition to the skipped frames, everything else takes longer. It takes at least 2x-3x longer to add/remove a season pass, delete a show, initiate a transfer from another TiVo...

One thing I'd like to point out is that the linux and MFS application partitions all start with header structures of varying sizes. Getting the actual files aligned to 4K is probably more important in the long run than the start address of the partition itself.

The MFS media partitions use 128K blocks and the individual FSIDs allocated for recordings are usually 1GB, so there's probably less overlap in read/write cycles than you might suspect even if they're not 4K aligned.

Yes and no. The OS still has to cooperate some. The OS groups blocks into clusters. For Windows XP those cluster sizes for the drives we are talking about is 4k or a multiple of 4k. If those clusters were smaller than aligning the partitions are of no help. So in 512 emulation, the drive firmware does the interpolation and converts the 8 - 512 block call (1 cluster) to the drive as one 4k block.

I'm experiencing far more than a miniscule performance drop. In addition to the skipped frames, everything else takes longer. It takes at least 2x-3x longer to add/remove a season pass, delete a show, initiate a transfer from another TiVo...

Click to expand...

EDIT/ADD: I experienced the same behavior you describe, after the last update rolled out. I don't blame the drive, alignment, or anything else, except TiVo degrading the core TiVo performance with the last update. All four of my Premiere TCD746320 2-Tuner units are doing the same, regardless of if they have a true 512byte sector, or an AF drive in them. The update was comparable to the prior update, if not slightly faster, when first installed. Now, over time, it is an unbearable dog, knowing how fast it was before.

I did post, that people could start blaming the wrong things on the wrong things, with all the AF/4K/512e uncertainty going around. I think this might be an example. That's just an early opinion/theory at this time.
END of EDIT/ADD

I only said it that way, due to being jumped-on by people claiming that there is no performance degradation, or if it is, you'd never see it in TiVo usage scenarios. I got sick of it, so I adjusted.

I'm getting jumped on, no matter what I say. Often, it's when I'm trying to help. Now I see, with even greater clarity, why people like richsadams bailed ship (TCF).

Not that your post is one I consider to be jumping on me. I'm just in the middle of replying to all the actual jumping-upon that I am enduring, right now. Sorry.