# Drive won't Expand



## rorwizard (Jun 6, 2013)

Hello Everyone, 

I need some help. I've spent hours looking through previous solutions on this forum and just haven't found an answer for my situation. I have a 1.5 TB that copies fine, no errors. Then when I go to expand I get the "Expand Did not finish successfully" error. 

Equipment: TiVo Premiere 4

Background: My house was struck by lightning a few weeks ago, and fried all the HDMI ports in my house. I used the replacement program from TiVo to get a new box, and keep my discounted monthly rate. I then transfered all the shows from the old box to the new box via my network. Then took both drives out of the TiVo's, and copied the new drive to my previously expanded 1.5 TB drive out of the old unit. Copy worked fine, expand gives me the error. Both Hard drives work fine in the TiVo. Previous expansion with the same drive for the now bad TiVo was completed on the same computer/motherboard and hard drive, and I had no problems. 

Troubleshooting: I've taken the following steps: Run a Full HD scan with WD's utility of my 1.5 tb drive and a full scan of the new TiVo's drive with SeaTools. Both come back with no errors. I tried re-starting the whole process with no luck. I've also done KS57 and KS58 on both drives, then tried to re expand and even re copy and re expand, still got the same symptoms. I also tried the hdparm method described in another thread but that says "HPA setting seems invalid"

fdisk gives me:

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

hdparm -N /dev/sdb gives me:

dev/sdb:
max sectors = 18446744072344861488/2930277168(18446744072344861488?), HPA setting seems invalid


----------



## jmbach (Jan 1, 2009)

What program are you using to expand. Should be using JMFS. 
What size is the native drive. 

Can you drop to command line and run . /mfslayout.sh on the drive you are trying to expand and post the results.


----------



## ThAbtO (Apr 6, 2000)

You should be using JMFS or DVRBars to copy/upgrade a Premiere drive. Most other programs will not even recognize it. Windows Disk manager will ruin the boot sector, so do not even call it up.


----------



## rorwizard (Jun 6, 2013)

Thanks for the responses. I'm using JMFS. I will get that info on the drive for you. However, I just bought a brand new drive, did another copy. And another expand. Same error. New drive is WD EZRX 2TB.


----------



## rorwizard (Jun 6, 2013)

when I run that command I get java.Lang.Exception: no root MFS found


----------



## rorwizard (Jun 6, 2013)

I take it back... When I run if I get:


java.io.IOException: Logical block is located beyond the current storage: block=1121, [email protected]
And then 5 at lines 

I also just tried to run mfsadd.sh from the command line and got an almost identical error.


----------



## rorwizard (Jun 6, 2013)

Sorry for the multiple messages, also trying to up my post count so I can pm...

I just saw that another user had almost an identical error. Is it possible that TiVo is blocking this with their newest software?


----------



## unitron (Apr 28, 2006)

2930277168 is the LBA number for a 1.5TB drive.

Nowadays, at least up through 2TB drives, the LBA number should end in 168 on all size drives, although of course the part before the 168 will vary with the drive size.

What brand and model motherboard are you using to do this drive wrangling and are you connecting straight to SATA ports on the motherboard or via USB adapters?


----------



## rorwizard (Jun 6, 2013)

Straight to SATA on an Intel DG33TL mother board. same board I used when I did the original expansion.


----------



## jmbach (Jan 1, 2009)

What source drive are you using for the copy.


----------



## rorwizard (Jun 6, 2013)

The 500 gb drive that shipped in the new box TiVo sent me


----------



## jmbach (Jan 1, 2009)

Well I have seen that error if the source drive is larger that 1TB. Was the replacement TiVo from Tivo itself or from another 3rd party.


----------



## jmbach (Jan 1, 2009)

Try using the scripts found  here  to copy your original drive to whatever drive you want as your final drive. Or for a test you can use DvrBARS to back up your original drive and restore it on your drive of choice. I would boot the target drive in the TiVo before expanding it.


----------



## jmbach (Jan 1, 2009)

If you are still having issues, then we will need to look deeper at image on the drive.


----------



## rorwizard (Jun 6, 2013)

Thanks for the reply jmbach. Unfortunately using those scripts is a bit out of my league. I could probably figure it out, but I have to go on a business trip tonight, so I don't have time. I'm just going to use the non expanded drive for now, and when I get home I'm planning on transferring all my recordings to a computer, then getting a clean image, installing and expanding that, and then transferring the recordings back. It will be a bit cumbersome, but hopefully that will work for me.


----------



## jmbach (Jan 1, 2009)

Might try DvrBARS to see if it can do a truncated backup and quick restore. If that goes cleanly, then see if that image can be expanded. If it can then do a modified back up and quick restore. This will transfer your recordings. Then do an expansion.


----------



## jmbach (Jan 1, 2009)

The other thing to try is a modified JMFS found here. This one resolves that error for large drives. I am beginning to suspect something with partition 10 is not correct. But you have already tried a KS 57 and 58. What version OS is the TiVo software is on the drive.


----------



## rorwizard (Jun 6, 2013)

Ok thanks. Will try it when I get back next week


----------



## telemark (Nov 12, 2013)

This part is a major issue you'll have to fix up before any of the Tivo-aware software will work correctly.


> hdparm -N /dev/sdb gives me:
> 
> dev/sdb:
> max sectors = 18446744072344861488/2930277168(18446744072344861488?), HPA setting seems invalid


It should say something like (for a 1.5TB drive):
2930277168/2930277168

You might want to check through your BIOS settings to make sure it's not causing this being set. This first post has some names for it:
http://lime-technology.com/forum/index.php?topic=10866.0

If you find a culprit setting, you'll still have to undo the "damage" by hand, but at least any new drives you connect will be safe from the automatic modifications.

So the order to follow is, check your BIOS settings to make sure it's DISABLED.
Connect each of your NEW drives in turn, and reset the HPA to disabled, permanently.
Connect your OLD (source) drive and check it has never been set.
(If the source drive is set too, post back but don't modify it. We have to figure out if it's corrupted.)

If that all looks correct, then you can start over:
Clone the source to your target drive.
Run one of the Expander commands on the target drive.

For the super technical minded, there is some other bug, that hopefully can just be avoided...
18446744072344861488 is not a sane value. It looks like some kind of overflow of a register.
To track it down, for starters take a look at the CPU type, OS version, MB chipset, BIOS version, etc.
aka, no fun or very interesting to some.


----------



## jmbach (Jan 1, 2009)

hdparm issue might be related to what version of hdparm is being used and version OS it is running on and/or the hardware connection being used (SATA or usb). If I have the problem it is invariably using my dock via USB connection using the tools on the JMFS iso. If I change to eSata or use the latest Linux distro the issue does not happen. So far I never had the issue happen when connected via SATA or eSata for any version hdparm or OS version.


----------



## telemark (Nov 12, 2013)

Ya, I agree and had a similar experience, USB convertor was the culprit. But OP said he used direct connect SATA so it's not suppose to be a problem there. That leaves an old Linux OS or misbehaving motherboard chipset.

In any case, until the OS/tools report size correctly, it'll cause jmfs and other tools to barf.

The output of:
# dmesg | grep sdb
might be a more informative indicator of if there's an actual problem there.


----------



## nooneuknow (Feb 5, 2011)

telemark said:


> Ya, I agree and had a similar experience, USB convertor was the culprit. But OP said he used direct connect SATA so it's not suppose to be a problem there. That leaves an old Linux OS or misbehaving motherboard chipset.
> 
> In any case, until the OS/tools report size correctly, it'll cause jmfs and other tools to barf.
> 
> ...


Wouldn't that make the next logical step to intentionally use a USB 2.0 or USB 3.0 bridge/dock, then, to avoid SATA that may not be behaving as well as it should?


----------



## telemark (Nov 12, 2013)

Sure, that could do something better/interesting, if the OP has access to one.

I try to not recommend buying more hardware unless it's pretty certain that it'll be the ultimate fix to the problem, and with the number of variables and lack of details, it could be anything at this point.

In other words, here's to hoping it's just a Bios setting or new Linux CD away from working which might save the OP money. 
(or he could have a USB dock already, in which case, I'd say go for it)


----------



## nooneuknow (Feb 5, 2011)

telemark said:


> Sure, that could do something better/interesting, if the OP has access to one.
> 
> I try to not recommend buying more hardware unless it's pretty certain that it'll be the ultimate fix to the problem, and with the number of variables and lack of details, it could be anything at this point.
> 
> ...


As long as those who decide to buy docks or adapters go with USB 3.0, preferably with USAP support (not required, but a bonus), it's an investment, plus, then already on-hand, for the future, and can be used as a backup drive holder, when not playing around with TiVo drives.

I have more than I need, along with a lot a things. Anybody looking for some docks/adapters, either USB 2/3 (or 2TB drives, PCIe USB 3.0 add-in cards, AV QoS Gigabit Ethernet switches, regular green GigE switches, etc.), gets a TCF member discount, off of what I'd ask otherwise. Those in need, can PM me about it, so I don't come across as an opportunistic seller, flagrantly breaking forum rules...

Everything I'm willing to part with has been verified to work for TiVo usages.


----------



## rorwizard (Jun 6, 2013)

telemark said:


> This part is a major issue you'll have to fix up before any of the Tivo-aware software will work correctly.
> 
> It should say something like (for a 1.5TB drive):
> 2930277168/2930277168
> ...


Hey guys, sorry it has taken me over a month to get back to this... I have been overwhelmed with a lack of time between work and other projects at home that were more urgent. I read through the post you linked. It does appear that the drive I am using as a source has HPA enabled.

I think this is especially strange, as before the lightning strike with the original TiVo premiere I had I did all this with no problems on the same computer, same motherboard. I'm wondering if the drive that came from TiVo with the replacement unit they sent me was all screwed up?

Anyway, so here is my current state: I'm attempting using DVRbars to make a backup and restore and see if I can expand that... but I'm getting an "insufficient memory" error during the backup.

I do have a USB adapter. Its USB 2.0, an older device I"ve had for a while.

Also because of the Delay I've had to send the disc I was copying from back to TiVo along with the old unit. So right now I've got the copied image, unexpanded on the 1.5 TB drive, that won't expand. That drive works fine in the TiVo. I've also got another 2.0 TB drive that I could copy/expand to, and use in my TiVo.

Where do I go from here? Thanks for everyone's help.


----------



## unitron (Apr 28, 2006)

Ask about that insufficient memory error message in this thread:

http://www.tivocommunity.com/tivo-vb/showthread.php?t=503261


----------



## telemark (Nov 12, 2013)

Start with a modern Linux+Tivo iso. From the DIY 4TB Premiere thread:

https://www.dropbox.com/s/vkyd1hwd0gqltur/jmfs-rev105-krbaker-tivotools.iso

There's something very odd about the 1.5TB from the old Tivo. Was this struck by lightning?

Don't run jmfs for expansion until the sector count appears correct. Running it for Layout is Ok.

Your options are:
* Get / use another (good) drive
* Try to rewrite the HPA setting using hdparm (some risk of making it worse)
* Patch jmfs to ignore the wrong sector count (not certain this will work but if the Tivo doesn't care yet it's wrong, it doesn't appear to care)


----------



## ggieseke (May 30, 2008)

unitron said:


> Ask about that insufficient memory error message in this thread:
> 
> http://www.tivocommunity.com/tivo-vb/showthread.php?t=503261


I'll be honest - I've never seen that before. I use that as a stock error message every time I try to allocate memory with malloc or realloc and it fails, but that has never happened. At its worst doing a Modified Full backup on a really large drive with lots of recordings I've seen DvrBARS eat up about a gig of memory, and that's peanuts compared to what even a 32-bit copy of XP with 512MB of memory can provide when you take the swap file into account.

At worst, it should have caused the swap file to increase. That's annoying and slow but it still works. To fail that drastically there had to be something else involved, and telemark's comments regarding insane values comes to mind. I'm not trying to duck out of responsibility, but something's really wrong here.


----------



## telemark (Nov 12, 2013)

For some humor or perspective-

18 446 744 072 344 861 488 * 512 bytes =
9.44473297 zettabytes


----------



## rorwizard (Jun 6, 2013)

I. Don't think there is anything wrong with the physical drive. I also tried to copy from the drive I got from TiVo to a brand new 2tb hard drive from the store. Can someone tell me how to find the correct value to give hdparm? Willing to try it.


----------



## rorwizard (Jun 6, 2013)

Also I just tried the jfms that was designed to go to 4gb, same result.


----------



## jmbach (Jan 1, 2009)

How is the drive connected to your computer. And what type of computer is it.


----------



## rorwizard (Jun 6, 2013)

You guys are going to love this... 

Just ran hdparm-N on both drives again, the numbers are now showing normal. This is with the sparx Linux distribution that came with the newest jfms for big drives.

2tb:
39070291678/39070291678, HPA is disabled

1.5tb:
2930277168/2930277168, HPA is disabled

Sigh...


----------



## rorwizard (Jun 6, 2013)

jmbach said:


> How is the drive connected to your computer. And what type of computer is it.


Both direct SATA it's a home built pc, motherboard is Intel dg33tl that I got off the Intel retail thing many years ago


----------



## jmbach (Jan 1, 2009)

Do what do we want to accomplish.


----------



## jmbach (Jan 1, 2009)

What is our starting point and what is our goal.


----------



## rorwizard (Jun 6, 2013)

Mfslayout.sh on both drives returns an error "LOGICAL block is located beyond the current storage: block=1122


----------



## jmbach (Jan 1, 2009)

Can't see your picture. But which drives.


----------



## rorwizard (Jun 6, 2013)

I have a 1.5 gigabyte drive that is currently working in my TiVo that has an image copied from a new drive straight from TiVo. It will not expand to allow me to use the rest of the drives space. The goal is to either expand this drive, or copy it to my 2tb spare drive and expand it there. I have not had success with either.


----------



## jmbach (Jan 1, 2009)

What version OS is the image we are working with.


----------



## rorwizard (Jun 6, 2013)

jmbach said:


> What version OS is the image we are working with.


Standby, I'll boot it, and find out.


----------



## jmbach (Jan 1, 2009)

Are there any recordings to save?


----------



## rorwizard (Jun 6, 2013)

Yes


----------



## jmbach (Jan 1, 2009)

Since we are trying to save recordings, use the copy and rearrange script on the newer JMFS iso to copy the source drive to the 2TB drive.


----------



## jmbach (Jan 1, 2009)

If this is an original TiVo image and there are no external dives married to it, then use the order 1,13,11,2,3,4,5,6,7,8,9,14,10,12


----------



## rorwizard (Jun 6, 2013)

Ok. Can you give me the command line for that?

Os Version is: 20.4.4a-01-2-750


----------



## telemark (Nov 12, 2013)

Could you paste the complete MfsLayout output

also I need the output from:
dmesg | grep sd
or
dmesg | grep hd


----------



## jmbach (Jan 1, 2009)

./tivo_copy_rearranged.sh /dev/sda /dev/sdb 1 11 13 2 3 4 5 6 7 8 9 14 10 12. Where sda is the source drive and sdb is the target drive.


----------



## rorwizard (Jun 6, 2013)

Here is a link to my drop box picture of the output

https://www.dropbox.com/s/4dye52w2w5nrgcs/2014-11-03 22.54.00.jpg?dl=0


----------



## rorwizard (Jun 6, 2013)

jmbach said:


> ./tivo_copy_rearranged.sh /dev/sda /dev/sdb 1 11 13 2 3 4 5 6 7 8 9 14 10 12. Where sda is the source drive and sdb is the target drive.


11 and 13 are reversed from your previous post... Which should I use?


----------



## jmbach (Jan 1, 2009)

Either one. The main thing is that they are located at the beginning of drive. Doesn't matter which one is first.


----------



## rorwizard (Jun 6, 2013)

Great. I'll let that run over night. Do I need to coalesce when it finishes copying per this post: http://www.tivocommunity.com/tivo-vb/showthread.php?p=10122061#post10122061
? If so is 12 and 13 correct?

I also want to take a moment to thank you, and everyone else that has spent any amount of time walking me thorough this. I'm grateful for your help.


----------



## jmbach (Jan 1, 2009)

We don't need to coalesce because we are expanding to 2TB.


----------



## rorwizard (Jun 6, 2013)

Great. So I'll just attempt expand tomorrow and report back. Thanks again.


----------



## jmbach (Jan 1, 2009)

Interesting mfslayout error. Did this image have an expand attempt on it already.


----------



## rorwizard (Jun 6, 2013)

That worked!! TiVo now reports 316 hd hours available. Thank you guys so much for your help.

For anyone looking at this in the future the updated jfms with directions is located here: http://www.tivocommunity.com/tivo-vb/showthread.php?p=10122061#post10122061

Can't thank everyone on here enough.


----------



## jmbach (Jan 1, 2009)

Congratulations. Not sure what was causing your initial problems. Probably a combination of older distro / software and newer hardware.


----------



## rorwizard (Jun 6, 2013)

I think the drive in the refurb was screwed up before I got it, and the direct copy didn't help. Anyway thanks again for the help.


----------

