Wiki Register Search FAQ Memberlist Usergroups Log in    
Reply to topic Series 1 SVR2000 with 1.5TB (space displayed incorrectly)
Series 1 SVR2000 with 1.5TB (space displayed incorrectly)
iabhua


Joined: 06 Jan 2009
Posts: 19
Country: Guest
Reply with quote
I gizmo fundies.

I have recently upgraded my series 1 sony svr2000 with a 500GB IDE and 1TB Sata drive.

It works great! I have upped the encoding Q to 7200kbits for 720x576.
Now I have about 600 hours at this recording Q!!! Smile
At the old basic Q, I have 1800+ hours. Smile hehe
I'll give the adapter name ($32) and spec of drives if anyone is interested.

I have only one glitch. The availiable space is now incorrectly shown in sysinfo and now playing.

It gives a -%. Does anyone know how and where to fix something like this.

I orignally tried to increase my space to 2TB but with my specific adapters I had to add the first drive as a IDE, not because 2 Satas did not work but the system was a bit unstable. I overcame this by using an IDE 500gb as os drive.

With this much space it really helps as I;m away from home a lot.
View user's profileFind all posts by iabhuaSend private message
Re: Series 1 SVR2000 with 1.5TB (space displayed incorrectly
TivoZA
Site Admin

Joined: 04 Oct 2005
Posts: 1742
Country: Guest
Reply with quote
Take a look at the "Info" page on TivoWebPlus, is the "Total Space" value listed at the bottom correct?

If it is correct I can use the 'get_totalsizes' method from the "info.tcl" file to fix the problem in the "autospace.tcl" file which will correct the values displayed in the "Now Playing" menu. If it's incorrect then another fix may be to manually edit the "autospace.tcl" file and specify your hard drives actual size replacing the bits in [] in the below line:
Code:
set Spc_Total     [expr $Spc_Total/2]
View user's profileFind all posts by TivoZASend private message
iabhua


Joined: 06 Jan 2009
Posts: 19
Country: Guest
Reply with quote
Thanks for the reply.

Unfortunately the Space Summary gives:
Total Space - -667904 MB 100.0% -210:44:07
Total Used 102 338436 MB -50.7% 139:15:22
Total Free - Best - -1006340 MB 150.7% -316:41:53

I'll try to manually edit the autospace.tcl file entry. I see it says "convert space figures to KiB".
So your saying I should replace "expr $Spc_Total/2" in [] with the drive size in KiBs? Or assign a variable to that num and put it there?

I'm not sure of the actual size. Here is my disk info
/dev/hda:
multcount = 16 (on)
I/O support = 1 (32-bit)
using_dma = 1 (on)
readahead = 8 (on)
geometry = 16383/16/63, sectors = 976773168, start = 0
drive state is: active/idle

Device: WDC WD5000AAJB-00YRA0 Supports ATA Version 8
Drive supports S.M.A.R.T. and is disabled
Use option -e to enable

/dev/hdb:
multcount = 16 (on)
I/O support = 1 (32-bit)
using_dma = 1 (on)
readahead = 8 (on)
geometry = 16383/16/63, sectors = 1953525168, start = 0
drive state is: active/idle

Device: WDC WD10EAVS-00D7B1 Supports ATA Version 8
Drive supports S.M.A.R.T. and is disabled
Use option -e to enable

Would it be safe to say from the Space Summary "Total Used 338436 MB + Total Free Best -1006340 MB", (ignoring the -) that the total space in MB is 1344776MB? It looks about right for 1.5TB.
This would give 1377050624 KiB or KB in old convention?

Do you think this is correct? Please bear with me. Could you give me an example with these figure of what the entry in the autospace.tcl should look like?

How does the tivo calculate the space anyway? I'm not a programmer by nature, but would like to fix this problem properly. Smile
Thanks again

*For info for those that want to try this:
First Drive: I used the WDC WD5000AAJB-00YRA0 500GB as OS drive.
Second Drive: I used the "Addonics ADSAIDE SATA Drive To IDE-Atapi" adapter. in conjunction with a 1TB WDC WD10EAVS-00D7B1 Sata drive (same type sold my www.weaknees.com) but I bought it at a ebay shop for R704 with shipping.
View user's profileFind all posts by iabhuaSend private message
TivoZA
Site Admin

Joined: 04 Oct 2005
Posts: 1742
Country: Guest
Reply with quote
From the telnet prompt, type the following:
Code:
find / -name get_space | grep bin_ppc
The above should list some files locations, run one of the files as follows:
Code:
/hack/TivoWebPlus/bin_ppc/get_space
This should output information similar to the following:
Code:
785168 742336 974127104 20680704
The size of your hard drive in KB is the 3rd number divided by 2 (e.g. 974127104 / 2 = 487063552 KB = 475648 MB = 464.5 GB).

Could you post your result from running 'get_space', using this information I may be able to generate the fixes you require.
View user's profileFind all posts by TivoZASend private message
Incorrect space for 1.5TB
iabhua


Joined: 06 Jan 2009
Posts: 19
Country: Guest
Reply with quote
The get_space app give the following:
785168 750840 -1367867392 1307672576

As you can see the actual space is displayed as -1367867392.
This definitely can't be right as I have twice that in the tivo and obviously it shouldn't be negative.
View user's profileFind all posts by iabhuaSend private message
Re: Incorrect space for 1.5TB
TivoZA
Site Admin

Joined: 04 Oct 2005
Posts: 1742
Country: Guest
Reply with quote
What result do you get when you type the following:
Code:
pdisk -l
View user's profileFind all posts by TivoZASend private message
Incorrect 1.5TB displayed
iabhua


Joined: 06 Jan 2009
Posts: 19
Country: Guest
Reply with quote
I get:

Partition map (with 512 byte blocks) on '/dev/hda'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Image Bootstrap 1 262144 @ 2097216 (128.0M)
3: Image Kernel 1 4096 @ 2359360 ( 2.0M)
4: Ext2 Root 1 262144 @ 2363456 (128.0M)
5: Image Bootstrap 2 4096 @ 2625600 ( 2.0M)
6: Image Kernel 2 4096 @ 2629696 ( 2.0M)
7: Ext2 Root 2 262144 @ 2633792 (128.0M)
8: Swap Linux swap 1046528 @ 2895936 (511.0M)
9: Ext2 /var 262144 @ 3942464 (128.0M)
10: MFS MFS application region 1048576 @ 4204608 (512.0M)
11: MFS MFS media region 2097152 @ 64 ( 1.0G)
12: MFS New MFS Application 1024 @ 5253184
13: MFS New MFS Media 971505664 @ 5254208 (463.2G)
14: Apple_Free Extra 13296 @ 976759872 ( 6.5M)


Partition map (with 512 byte blocks) on '/dev/hdb'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: MFS New MFS Application 1024 @ 64
3: MFS New MFS Media 1953497088 @ 1088 (931.5G)
4: Apple_Free Extra 26992 @ 1953498176 ( 13.2M)

Showing my 2 drives correctly.
View user's profileFind all posts by iabhuaSend private message
Re: Incorrect space for 1.5TB
TivoZA
Site Admin

Joined: 04 Oct 2005
Posts: 1742
Country: Guest
Reply with quote
iabhua wrote:
The get_space app give the following:
785168 750840 -1367867392 1307672576

As you can see the actual space is displayed as -1367867392.
This definitely can't be right as I have twice that in the tivo and obviously it shouldn't be negative.
Ok, try the following:
Code:
cd /tmp
wget http://tivoza.nanfo.com/downloads/getspace.tgz
tar -xzvf getspace.tgz
./get_space

Assuming the 3rd number in the result above divided by 2 gives you the size of your hard drive in KB, you can now replace your existing 'get_space' file as follows:
Code:
mv /hack/TivoWebPlus/bin_ppc/get_space /hack/TivoWebPlus/bin_ppc/get_space.bak
mv get_space /hack/TivoWebPlus/bin_ppc/get_space

Once you've done the above, open up TiVoWebPlus and from the top menu, select "Restart -> Full". Give it a minute to reload and then select the "Info" menu and check the "Space Summary" details at the bottom.
View user's profileFind all posts by TivoZASend private message
Cool
iabhua


Joined: 06 Jan 2009
Posts: 19
Country: Guest
Reply with quote
Great man!

getspace now gives: 785168 750832 2927099904 1295613952
This seams to be correct.

1.)the info menu shows:
Total Space - 1048575 MB 100.0% 328:32:05
Total Used 105 346484 MB 33.0% 141:49:24
Total Free - Best - 702091 MB 67.0% 219:58:33
It seams some space is still missing from here though.

2.)If I go to my Nowplaying menu on the tivo itself I still get -51% and the system info still gives 0Hours 30 Min.

At least getspace now give the correct space.

How did you fix getspace?
Do you think it can be fixed further?
View user's profileFind all posts by iabhuaSend private message
Re: Cool
TivoZA
Site Admin

Joined: 04 Oct 2005
Posts: 1742
Country: Guest
Reply with quote
iabhua wrote:
getspace now gives: 785168 750832 2927099904 1295613952
This seams to be correct.
...
How did you fix getspace?
Do you think it can be fixed further?
The problem is basically arithmetic overflow. Your drive size is 2927099904 whilst the highest Signed Integer value is 2147483647. In the get_space instance this was easy enough to fix by changing the value from an integer to a long, and then recompiling the app. Fixing TivoWebPlus can be done in a couple of ways, the simplest of which is explained below.


iabhua wrote:
1.)the info menu shows:
Total Space - 1048575 MB 100.0% 328:32:05
Total Used 105 346484 MB 33.0% 141:49:24
Total Free - Best - 702091 MB 67.0% 219:58:33
It seams some space is still missing from here though.
To fix the TivoWebPlus "Info" menu, you need to edit the 'info.itcl' file. Assuming your TivoWebPlus is installed in the "/hack/TivoWebPlus/modules/" directory, you can edit 'info.itcl' as follows:
Code:
joe /hack/TivoWebPlus/modules/info.itcl
Scroll down till you find the following code:
Code:
proc get_totalsizes {} {
  global usersize

  set retval [catch {set getspace [exec "$::bin_dir/get_space"]} error]
  if {$retval != 1} {
    scan $getspace "%*d %*d %d %*d" totalmedia
  } else {
    error $error
  }
  set usersize [expr round($totalmedia/2/1024)]
}
And replace it with this:
Code:
proc get_totalsizes {} {
  global usersize

  set retval [catch {set getspace [exec "$::bin_dir/get_space"]} error]
  if {$retval != 1} {
    scan $getspace "%*d %*d %s %*d" totalmedia
  } else {
    error $error
  }
  set usersize "0"
  while {[expr $totalmedia - 2147483647] > 0} {
     set totalmedia [expr $totalmedia - 2147483647]
     set usersize [expr $usersize + 1048576]
  }
  set usersize [expr $usersize + round($totalmedia/2/1024)]
}
To save your changes:
Code:
Press: Ctrl K      (This enables the command menu mode)
Press: X            (This will save the file)


iabhua wrote:
2.)If I go to my Nowplaying menu on the tivo itself I still get -51% and the system info still gives 0Hours 30 Min.
The "Now Playing" menu can be fixed by editing the 'autospace.tcl' file. Having fiddled with the above it appears that the 'autospace.tcl' file can be made to load much faster so once I've made the changes I'll post an update here.

As for the "System Information" screen, unfortunately it's not editable so that screen will have to stay as is.
View user's profileFind all posts by TivoZASend private message
info.itcl script edit for larger than 1TB
iabhua


Joined: 06 Jan 2009
Posts: 19
Country: Guest
Reply with quote
Wow

The info.itcl script edit worked great.

I really take my hat off for you.

Now I know why you ARE TivoZA. You rule!

I'll keep my eyes open for your post.

Thanks
View user's profileFind all posts by iabhuaSend private message
Re: Cool
TivoZA
Site Admin

Joined: 04 Oct 2005
Posts: 1742
Country: Guest
Reply with quote
Ok, I've created an updated version of autospace for you to try.

You can download the new version to your TiVo as follows:
Code:
cd /hack
wget http://tivoza.nanfo.com/downloads/autospace-1.5.tgz
tar -xzvf autospace-1.5.tgz
rm autospace-1.5.tgz

If you're using the OzTiVo 1.6 image or later you can set autospace to load at startup by adding the below line to '/etc/sysinit.conf':
Code:
autospace_enable="YES"
If your using the TivoZA image or an earlier version of the OzTiVo image you need to add the following line to '/etc/rc.d/rc.sysinit.author':
Code:
/hack/autospace/autospace.tcl >/dev/null 2>&1 &
If you want to run autospace without having it load at startup you can run the above command.
View user's profileFind all posts by TivoZASend private message
Autospace fix
iabhua


Joined: 06 Jan 2009
Posts: 19
Country: Guest
Reply with quote
I loaded the autospace fix.

I had to stop it by changing YES to NO in the systinit.conf file.
For some reason it crashes my tivo when I "kill" the process.
And then restarts with the tivo because it was set to start automatically.
Only then could I overwrite the autospace app.

Unfortunately it still gives -% for some reason.

It is a LOT faster though. Smile
View user's profileFind all posts by iabhuaSend private message
Re: Autospace fix
TivoZA
Site Admin

Joined: 04 Oct 2005
Posts: 1742
Country: Guest
Reply with quote
I've changed the size variables in autospace so it now stores the values in megabytes instead of kilobytes, by doing this you should never reach the upper numeric limit. To update, download autospace again as in the above post. If you still have problems run the following and post the results:
Code:
/hack/autospace/autospace.tcl info


iabhua wrote:
I had to stop it by changing YES to NO in the systinit.conf file.
For some reason it crashes my tivo when I "kill" the process.
And then restarts with the tivo because it was set to start automatically.
Only then could I overwrite the autospace app.
Autospace hooks into the TiVo event manager and as such it can't just be terminated, it needs to exited cleanly. You can close autospace by typing the following:
Code:
/hack/autospace/autospace.tcl exit
View user's profileFind all posts by TivoZASend private message
mrtickle


Joined: 03 Mar 2010
Posts: 1
Country: Guest
Reply with quote
Hi,

It may not be relevant here but this mod breaks compatability with UK Tivos which was hard to get working originally. I was hoping to take advantage of the faster load times!

proc space_summary reads /Recording/NowShowingByExpiration which doesn't exist in version 2.5.5 of the tivo software. Changing it back to /Recording/NowShowing and changing v like this:
Code:

    ForeachMfsFile fsid name type /Recording/NowShowing "" 55 {
      if [string match "*:24855:*" $name] { set v 4 } else { set v [string index $name 3] }
      set arr($fsid) $v
    }

...gets it working as far as the bar being the right length, but it thinks every recording is a suggestion and reports a 1% usage figure.

autospace info gives

Spc_Total: 237268
Spc_Available: 35882
Spc_Deleted: 0
Spc_Suggest: 199313
Spc_Perm: 0
Spc_Recording: 0
Cnt_Deleted: 0
Cnt_Suggest: 147
Cnt_Perm: 0
Cnt_Recording: 0

my actual stats are 43 keep, 104 normal recordings.

Any pointers would be appreciated - if it's a quick fix to put back in support for Tivos running pre-v3 software that would be great!
View user's profileFind all posts by mrtickleSend private message
Series 1 SVR2000 with 1.5TB (space displayed incorrectly)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
All times are GMT + 2 Hours  
Page 1 of 1  

  
  
 Reply to topic  
Powered by phpBB © phpBB Group
Design by phpBBStyles.com | Styles Database.
Content © TivoZA