# What size swap file for 2x400GB TiVo?



## Darren P (Jan 8, 2002)

Hi all,

I am just about to upgrade my TiVo to a 2x400GB monster, copying my existing recordings from my current 250GB drive. 

What I would like to know is what size swap file should I use when I do the "mfsrestore -s 300 -r4 -xzpi" command?? I used 300 for my 250GB drive, but I know I need to make it much bigger to cope with 800GB!!

Thanks a lot.

DP


----------



## blindlemon (May 12, 2002)

Theoretically you should need 400mb for an 800gb TiVo. 

There are some people in the US who claim that the standard swap (64mb) is enough for any size drive but that doesn't seem to be proved and I would prefer to err on the side of safety myself. You're only talking about 30 minutes or so of recording time anyway, which out of the 990 hours you will get with an 800gb TiVo should be of little matter 

BTW, I assume you are using Samsung drives, as the latest series of big Seagates won't work in pairs in a UK TiVo.


----------



## Darren P (Jan 8, 2002)

Yep, using a pair of HD400LD Samsung drives.. Had a GSOD the other day, but the TiVo recovered itself, so would definitely prefer to err on the side of caution!!

Is there any merit in going even higher than 400MB, say 500 or 600MB?? As you say, in the scheme of things, very little recording time would be lost...

Thanks for the help.

DP


----------



## blindlemon (May 12, 2002)

If you may decide to replace one of the drives (eg. the B drive) with a bigger drive in future then it may be worth upping the swap to accommodate that - eg. to 575 to allow for a 750gb "B" drive....


----------



## Pete77 (Aug 1, 2006)

blindlemon said:


> You're only talking about 30 minutes or so of recording time anyway, which out of the 990 hours you will get with an 800gb TiVo should be of little matter
> 
> BTW, I assume you are using Samsung drives, as the latest series of big Seagates won't work in pairs in a UK TiVo.


But 800Gb is only about 280 hours at Best which is probably optimal for maximum possible capacity without the big slow down in Now Playing menu activity that occurs once you hit 400 recordings or so.

As to the drives I suppose he might also be using Hitachis? 

Also on the Swap file size business I thought the general rumour in circulation was that f you don't have a big enough swap file size for the drives you are using then that is what sometimes causes all the contents of the /var directory and subdirectories to be periodically erased?


----------



## blindlemon (May 12, 2002)

I've not heard that theory. The /var partition gets wiped if the TiVo OS decides there is corruption after running e2fsck.


----------



## Pete77 (Aug 1, 2006)

blindlemon said:


> I've not heard that theory. The /var partition gets wiped if the TiVo OS decides there is corruption after running e2fsck.


On the basis of the upgrades you have done for your clients (presumably now numbering into the hundreds) how rare an event do you think the loss of the /var directory is? Have you ever experienced it yourself on any of your own permanent Tivo machines?


----------



## blindlemon (May 12, 2002)

The /var partition does get wiped from time to time - I've had it happen to one of my own machines, and a number of my customers have also experienced it. 

It's very hard to say in numerical terms how rare it is, but I would estimate probably 5-10% of upgraded machines per year suffer from it. (We don't know about un-upgraded machines, or those that don't have hacks or run TiVoWeb as it goes unnoticed in those cases.)

Luckily, some pre-configured drives come with a facility to restore the /var parition to its original configuration by running a single command from the bash prompt...


----------



## Pete77 (Aug 1, 2006)

blindlemon said:


> Luckily, some pre-configured drives come with a facility to restore the /var parition to its original configuration by running a single command from the bash prompt...


Well 17 months and counting here since my monster HD upgrade and installation of TivoWeb and the gradual subsequent addition of numerous hacks so fingers double crossed. This machine is one of the very first 601Es but it has always seemed to be stubbornly reliable.

I have the entire contents of my hack directory periodically backed up using FileZilla on my PC's hard drive and then in turn backed up from there on to an external 2.5" hard drive and a couple of DVD sets I also use. Then I also use the TivoWeb Backup module to save the SPs etc too.

If my hack directory was ever wiped out your special utility for your customers wouldn't be that much use to me to get back to where I was as I now have so many other hacks installed too. If I ever had to restore my /var/hack backup I think the main issue might be the file permissions and also which re.sysinit file is then used at bootup time to load the additional hacks like Endpad, Autospace etc.

Lastly having reverted to running only TivoWeb memory resident but with the ability to start up TivoWebPlus 1.3.1 locally or remotely via Hackman I can report that stability wise its still no contest between TivoWeb being the clear choice stability and reliability wise for UK Thomson Tivo S1 users over TivoWebPlus 1.3.1. When running TivoWebPlus I had a total freeze in the Tivo interface with the machine stuck half way between the tv picture and a Tivo menu and another one while amending a Season Pass setting. These problems have not recurred since reverting to running only TivoWeb. Also TivoWebPlus doesn't support Ljay's httpd log add on which monitors unauthorised (and/or some authorised) external accesses of the Tivo over the internet.


----------



## Darren P (Jan 8, 2002)

Well...

Tried to do an mfsbackup | mfsrestore command to backup my 250GB drive (including all recordings) on to my 400GB drive, but it wouldn't start, saying that the target drive was not big enough for the restore!! I now have it running using the same command but without the 'x', but this is my second try, as the first time, it froze at 55.56% with no error message..

Any suggestions for if it falls over again this time?? I don't understand why I could not use the 'x' in the command, as the target drive is much bigger than the original drive...

Thanks.

DP


----------



## Darren P (Jan 8, 2002)

Tried again and it's fallen over again. Even tried a different new drive and no joy - falls over at the same point.

Help!! Anyone??

DP


----------



## blindlemon (May 12, 2002)

What command did you use? How many MFS partitions do you have on your existing 250gb drive? 

If you have 3 MFS partitions already then you won't be able to copy recordings AND expand to fill the new drive.


----------



## Darren P (Jan 8, 2002)

I first switched on DMA. Then, I first tried the following command:

mfsbackup -Tao - /dev/hda | mfsrestore -s 400 -r 4 -xzpi - /dev/hdb

This then failed straight away at the 'Analyzing source' stage, saying that the target disk was not big enough. I then re-did the command without the 'x' - this ran until 55.56% and then froze - it did this twice, on both new 400gb disks that I tried...

I can't remember exactly how many partitions are on my original 250gb drive (can't look at the mo as I am trying a dd copy instead) but I'm pretty sure it was more than 3, and probably 5 (it has come from my original 40gb being moved to a 120gb drive and then to the 250gb drive...). Maybe that's my problem?? If so, if the dd copy works, can I then expand the drive and add my 2nd 400gb drive??

Thanks.

DP


----------



## Pete77 (Aug 1, 2006)

Does the below data from the Info function of TivoWebPlus 1.3.1 tell me how many partitions I have on my two 250Gb Samsung HA250JCs?

Makes it look like I only have one partition on each hard drive but surely that can't be right can it? I created this setup by a piped backup and restore including recordings from my 30Gb and 15Gb original Quantum drives on to one of the two HA250JCs and then added the second HA250JCs with mfsadd.



> File System/Disk Information
> 
> Filesystem Type Size Used Avail Capacity Mounted on
> /dev/hda4 ext2 124M 27M 91M 23% /
> ...


----------



## blindlemon (May 12, 2002)

Darren P said:


> I then re-did the command without the 'x' - this ran until 55.56% and then froze - it did this twice, on both new 400gb disks that I tried...


I would suspect drive corruption on your 250gb drive in that case. Try to get a minimal backup ASAP.



Darren P said:


> it has come from my original 40gb being moved to a 120gb drive and then to the 250gb drive...). Maybe that's my problem??


Yes. You already have 3 partitions on your 250gb drive so you can't expand AND keep your recordings. You need to make a minimal backup and restore that instead.



Darren P said:


> if the dd copy works, can I then expand the drive and add my 2nd 400gb drive??


No. You can add the 2nd 400gb drive as a B drive, but without a spare partition you don't have any scope to expand your A drive.


----------



## Trevor73 (Feb 21, 2005)

Hi !
Just out of curiousity - how long should it take to run dd copy on a 400Gb? 

I read on the boards that DD copy isn't the most communicative piece of software around, but by now I've been staring at the same prompt since Friday night 23:05... which is 61hrs ago.. The machine is only an AthlonXP 1,25Gh, but this is kinda slow don't you think?? 

Trevor


----------



## blindlemon (May 12, 2002)

It does seem slow. Did you check that DMA was enabled before you started the copy? 

However, if your source drive has errors then a great deal of time can be wasted on retries, and DMA will be disabled in the process. I once copied a 200gb drive using dd_rescue and it took two weeks


----------



## Trevor73 (Feb 21, 2005)

DMA was indeed enabled, and AFAIK there were no errors on the source drive. I'll give it a few more days then. 

Thanks. 
Trevor.


----------



## Pete77 (Aug 1, 2006)

Trevor73 said:


> DMA was indeed enabled, and AFAIK there were no errors on the source drive. I'll give it a few more days then.
> 
> Thanks.
> Trevor.


It took two hours to copy my original 15Gb + 30Gb to the new 250Gb with a piped backup and restore but then I only had about 15 hours of Basic recordings I was copying over.

If you had two full 2 x 250Gbs then I suppose you could be looking at 30 or 40 hours just for all the recordings to copy over?


----------

