PDA

View Full Version : LARGE drive upgrade and swap space


Hichhiker
08-06-2006, 01:47 PM
Well, the my out-of-date knowledge strikes again. I am about to embark on yet another upgrade, upgrading S2 Dtivo (6.x zippered) to a 320GB hard drive. I have done many upgrades for myself, family and friends, and I am generally pretty comfortable with Linux and Tivo upgrade processes, however to date I have never dealt with the really large drives (over 160GB) and from many readings here I recall there was an issue with swap partition size over 127mb. And that drives over a certain size (somewhere around 300GB) need larger swap space. Unfortunately while I recall seeing a lot of info, I was not paying attention to it and searching the forums now results in a lot of uncertain and irrelevant info :-/

So I figured I'd ask what I wanted to find out :


* What is the proper way to calculate the swap requirements (not that blindly assigning 500+MB to swap is a big loss of space on 320GB drive, but I hate doing things blindly)

* How to create a swap partition over 127mb

* How to allow Tivo Kernel to USE full swap space if it is over 127mb

* Do I need to change the Kernel for above if I am alreay running a zippered dtivo.

* Anything else I should know before I do this? I am keeping recordings and would prefer to do this only once :-)

From searching the forum, I gathered:


* 6.x Software already includes LBA48 Kernel

* You must use an upgrade CD which supports large hard drives (LBA48).

* S2 units can be expanded only once. So if you already upgraded the size of hard drive once, you cannot simply expand it again without loosing the recordings. If I remember correctly, S1 units could be expanded a few times, but have a similar limitation in the end.

* mfstools will create a swap partition over 127mb without a problem with -s # command

* TPIP command (http://www.courtesan.com/tivo/tpip.html) will fix the kernel to use the larger swap space. Syntax seems to depend on version of tpip.

* It has been suggested in this thread to use 1mb of swap per 1GB of space rule of thumb i.e. 320MB for a 320GB hard drive. Alternatively people suggest 1mb per 2gb. Latter seems to jive better with other posts I've seen suggesting that problems with swap of 127 start with hard drives in about 300GB range (2x127=254 and since most drives are either 250gb or 300gb it would make sense that 300gb is the cut off range) Of course these are rough rounded estimates so real world numbers would be a bit off. Its always better or over estimate than underestimate here.


Is this correct and am I missing any details?


So in the end:

using PTVUpdate's CD (with tpip version 1.2)
with original drive connected to Pri master (/dev/hda)
and new drive connected to Pri slave (/dev/hdb)
Creating swap space of 320mb

# mfsbackup -Tao - /dev/hda | mfsrestore -r 4 -s 320 -xzpi - /dev/hdb
# tpip -s /dev/hdb

And thats all. Don't forget "-r 4", otherwise bad things happen (as in BSOG loop)

Thanks

-HH

wscannell
08-06-2006, 02:07 PM
You information you gathered is correct. If you create a swap partition above 127, you initialize it with tpip to make it useable.

The amount of swap space has been debated a bit and there does not seem to be any definitive answer. I have two 300 GB units with swap set to 127 with no issues, although I have not had a GSOD to deal with.

Have you ever upgraded the size of the hard drive before? If so, it is not easy to upgrade and save recordings as all of the partitions on the hard drive are used.

Hichhiker
08-06-2006, 02:20 PM
You information you gathered is correct. If you create a swap partition above 127, you initialize it with tpip to make it useable.


Thanks for a quick reply. Its good to have a sanity check and I figure having all info in one spot may help the next searcher :-)


The amount of swap space has been debated a bit and there does not seem to be any definitive answer. I have two 300 GB units with swap set to 127 with no issues, although I have not had a GSOD to deal with.


My understanding of the matter is that the size of swap space beyond the basic is only relevant during GSOD or other whole disk operations. I would probably guess it also depends on amount of physical memory the device has (did the amount of ram change from S1 to S2???)


Have you ever upgraded the size of the hard drive before? If so, it is not easy to upgrade and save recordings as all of the partitions on the hard drive are used.

Yes I've upgraded a large number of tivos (all the family and friends) both for size and other hacks, just most of them were S1 and before today I never done upgrade where the size of swap mattered - i always just set it to 127. I don't think having more than 100 hours of tivo is that usefull , but the cost of drives is so damn cheap these days so I bought 320's instead of 120's I usually get for $5 more :-)

-HH

wscannell
08-06-2006, 02:28 PM
Yes I've upgraded a large number of tivos (all the family and friends) both for size and other hacks, just most of them were S1 and before today I never done upgrade where the size of swap mattered - i always just set it to 127. I don't think having more than 100 hours of tivo is that usefull , but the cost of drives is so damn cheap these days so I bought 320's instead of 120's I usually get for $5 more :-)

-HH

The point here was if you have already upgraded the drive size of the S2 DTiVo you are planning to upgrade, you will not be able to upgrade again and save recordings. At least not easily. However, since you have zippered the unit, you can take the important programs off the TiVo before the upgrade, if necessary.

Hichhiker
08-06-2006, 02:36 PM
The point here was if you have already upgraded the drive size of the S2 DTiVo you are planning to upgrade, you will not be able to upgrade again and save recordings. At least not easily. However, since you have zippered the unit, you can take the important programs off the TiVo before the upgrade, if necessary.

Sorry, I misunderstood you. Yes, I am aware of that. The units I am upgrading still have their original hard drives in them, so it is not an issue :-) But you are right, it is something that should be included in the original post for completeness sake.

-HH

mr.unnatural
08-06-2006, 02:38 PM
A good rule of thumb is to set up about 1MB of swap space for each GB of drive capacity. This may end up being more than you'll actually need but it's better to have too much swap space than not enough. I didn't see anyone mention this but you'l need an LBA48 aware boot CD in order to expand the drives beyond 137GB. The PTVUpgrade enhanced LBA48 CD is what most people use.

rpdre1
08-06-2006, 02:42 PM
The rule of thumb I've seen posted was 1MB for every 2GB.

mr.unnatural
08-06-2006, 05:03 PM
That just proves there is no hard and fast rule for the correct size swap file. 1MB swap for each 2GB drive capacity would probably be sufficient in most cases.