1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

4K drive problems

Discussion in 'TiVo Series3 HDTV DVRs' started by cuda74360, Jul 16, 2013.

  1. cuda74360

    cuda74360 New Member

    48
    0
    Jul 12, 2013
    Hi,

    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?

    Thanks!
     
  2. Soapm

    Soapm Active Member

    1,564
    0
    May 9, 2007
    So close,...
    Just for reference, I have 2Tb, 4K drives in both my HD and premier with no problems. I don't recall doing anything special beyond jfms.
     
  3. cuda74360

    cuda74360 New Member

    48
    0
    Jul 12, 2013
    Thanks for the response.

    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.
     
  4. jmbach

    jmbach der Neuerer

    1,552
    9
    Jan 1, 2009
    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.
     
  5. cuda74360

    cuda74360 New Member

    48
    0
    Jul 12, 2013
    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:

    Partition map (with 512 byte blocks) on '/dev/sdb'
    #: type name length base ( size )
    1: Apple_partition_map Apple 63 @ 1
    2: Image Bootstrap 1 1 @ 876054592
    3: Image Kernel 1 8192 @ 876054593 ( 4.0M)
    4: Ext2 Root 1 524288 @ 876062785 (256.0M)
    5: Image Bootstrap 2 1 @ 876587073
    6: Image Kernel 2 8192 @ 876587074 ( 4.0M)
    7: Ext2 Root 2 524288 @ 876595266 (256.0M)
    8: Swap Linux swap 262144 @ 877119554 (128.0M)
    9: Ext2 /var 524288 @ 877381698 (256.0M)
    10: MFS MFS application region 589824 @ 877905986 (288.0M)
    11: MFS MFS media region 876054528 @ 64 (417.7G)
    12: MFS Second MFS application region 589824 @ 878495810 (288.0M)
    13: MFS Second MFS media region 1074438144 @ 879085634 (512.3G)
    14: Apple_Free Extra 1390 @ 1953523778

    Device block size=512, Number of Blocks=1953525168 (931.5G)
    DeviceType=0x0, DeviceId=0x0

    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?
     
  6. jmbach

    jmbach der Neuerer

    1,552
    9
    Jan 1, 2009
    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.
     
  7. ggieseke

    ggieseke Active Member

    4,024
    12
    May 30, 2008
    Are you saying that you tried to put a Series 4 image on a Series 3?
     
  8. cuda74360

    cuda74360 New Member

    48
    0
    Jul 12, 2013
    No, I'm not saying that.

     
  9. nooneuknow

    nooneuknow TiVo User Since 2007

    3,554
    0
    Feb 5, 2011
    Cox Cable...
    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.
     
  10. cuda74360

    cuda74360 New Member

    48
    0
    Jul 12, 2013
    How would this be different than using pdisk and dd?

     
  11. jmbach

    jmbach der Neuerer

    1,552
    9
    Jan 1, 2009
    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.
     
  12. jmbach

    jmbach der Neuerer

    1,552
    9
    Jan 1, 2009
    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.
     
  13. Soapm

    Soapm Active Member

    1,564
    0
    May 9, 2007
    So close,...
    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.
     
  14. nooneuknow

    nooneuknow TiVo User Since 2007

    3,554
    0
    Feb 5, 2011
    Cox Cable...
    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?
     
  15. cuda74360

    cuda74360 New Member

    48
    0
    Jul 12, 2013
    Yes, that's exactly what I did. I issued the following commands:

    dd if=/dev/sdb2 of=sdb2.img bs=1024K
    dd if=/dev/sdb3 of=sdb3.img bs=1024K
    dd if=/dev/sdb4 of=sdb4.img bs=1024K
    dd if=/dev/sdb5 of=sdb5.img bs=1024K
    dd if=/dev/sdb6 of=sdb6.img bs=1024K
    dd if=/dev/sdb7 of=sdb7.img bs=1024K
    dd if=/dev/sdb8 of=sdb8.img bs=1024K
    dd if=/dev/sdb9 of=sdb9.img bs=1024K
    dd if=/dev/sdb10 of=sdb10.img bs=1024K
    dd if=/dev/sdb11 of=sdb11.img bs=1024K
    dd if=/dev/sdb12 of=sdb12.img bs=1024K
    dd if=/dev/sdb13 of=sdb13.img bs=1024K

    Then used pdisk to delete all the partitions, and recreate them. Then issued the following commands:

    dd if=sdb2.img of=/dev/sdb2 bs=1024K
    dd if=sdb3.img of=/dev/sdb3 bs=1024K
    dd if=sdb4.img of=/dev/sdb4 bs=1024K
    dd if=sdb5.img of=/dev/sdb5 bs=1024K
    dd if=sdb6.img of=/dev/sdb6 bs=1024K
    dd if=sdb7.img of=/dev/sdb7 bs=1024K
    dd if=sdb8.img of=/dev/sdb8 bs=1024K
    dd if=sdb9.img of=/dev/sdb9 bs=1024K
    dd if=sdb10.img of=/dev/sdb10 bs=1024K
    dd if=sdb11.img of=/dev/sdb11 bs=1024K
    dd if=sdb12.img of=/dev/sdb12 bs=1024K
    dd if=sdb13.img of=/dev/sdb13 bs=1024K

    I skipped over partition 1, since that is the partition map.

    No joy. The TiVo did boot, but had the issues I described in the original post.
     
  16. cuda74360

    cuda74360 New Member

    48
    0
    Jul 12, 2013
    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...
     
  17. cuda74360

    cuda74360 New Member

    48
    0
    Jul 12, 2013
    As long as the partitions are aligned, wouldn't the drives 512 byte emulation take care of the rest? At least, that is their "fix" or Windows XP (which has no native support for AF.)

    http://www.wdc.com/wdproducts/library/WhitePapers/ENG/2579-771430.pdf
     
  18. ggieseke

    ggieseke Active Member

    4,024
    12
    May 30, 2008
    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.

    Just food for thought...
     
  19. jmbach

    jmbach der Neuerer

    1,552
    9
    Jan 1, 2009
    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.
     
  20. nooneuknow

    nooneuknow TiVo User Since 2007

    3,554
    0
    Feb 5, 2011
    Cox Cable...
    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.
     

Share This Page