LinHES Forums
http://forum.linhes.org/

Inconsistant disk space availability
http://forum.linhes.org/viewtopic.php?f=6&t=4635
Page 1 of 1

Author:  marc.aronson [ Fri May 20, 2005 6:45 am ]
Post subject:  Inconsistant disk space availability

I have a separate disk drive set up to hold recordings. It is mounted at /myth/tv. When I look at "recorded programs" through the web interface I see the following:

145 programs, using 138 GB (113 hrs 59 mins) out of 161 GB

When I do a "df /dev/hde1" I see the following:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hde1 178100004 135885288 33167716 81% /myth/tv

The "138GB use" shown by mythweb is consistant with the DF output if you assume that mythweb is counting in units of 1024, so I'm not worried about that. What does have me concerned is that mythweb is telling me that my total capacity is 161GB, but "df" is telling me my total capacity is 178GB. This is inconsistant. In addition I have seen scenarios where the total disk usage of recorded shows, as reported by mythweb, exceeds the capacity reported by mythweb.

What I've also noticed is that whenever /myth/tv fills up, my root partition maxes out to 100% because many of the log files become massive in size.

I've done some forum searching without luck -- are these "known issues"? Thanks in advance for your help.


Marc

Author:  brendan [ Fri May 20, 2005 8:40 am ]
Post subject:  Re: Inconsistant disk space availability

There is a setting in mythtv to automatically delete files when less than xxxxMB are remaining. Have you enabled that? It's not on by default...

-brendan

Author:  marc.aronson [ Fri May 20, 2005 6:56 pm ]
Post subject: 

After doing the posting I discovered that by having one of the parameters set to 0 the autoexpire functon was disabled. I've enabled it -- hopefully this prevents the disk overflows on the root partition. Still wondering about the discrepency between what "recorded programs" on the web interface shows as available disk space vs. DF. Part of me is starting to wonder if the web interface automatically assumes the some amount of the space is unavailable and being used for other purposes...

Author:  tjc [ Fri May 20, 2005 8:59 pm ]
Post subject: 

Mine is pretty much dead on... On the other hand since it's a dedicated partition there's nothing else there but the recordings. From the command line...
Code:
root@black:~# df -m /dev/hdb1
Filesystem           1M-blocks      Used Available Use% Mounted on
/dev/hdb1               187786    137313     50473  74% /myth/tv
root@black:~# df -BG /dev/hdb1
Filesystem           1G-blocks      Used Available Use% Mounted on
/dev/hdb1                 184G      135G       50G  74% /myth/tv

From the http://black/mythweb/status.php page...
Code:
Machine information
Disk Usage:

    * Total Space: 187,785 MB
    * Space Used: 137,313 MB
    * Space Free: 50,472 MB

From the bottom of the http://black/mythweb/recorded_programs.php page...
Code:
79 programs, using 134 GB (72 hrs 30 mins) out of 183 GB.

I've actually got close to 160Gb of stuff in the list, but it's on another partition and only symlinked to from the /myth/tv directory so it's the numbers for that which are right and since that's where new recordings go it's all that really matters. What version are you using and what screens are you looking at?

Author:  marc.aronson [ Fri May 20, 2005 10:57 pm ]
Post subject: 

tjc:

I am looking at the bottom of the mythweb recorded_programs screen: http://mythtv/recorded_programs.php?myt ... 7a21226d7c

I am using knoppmyth version R4V5.

I have a dedicated disk with a single partition on it for recordings. This partition is mounted at /myth/tv. One more interesting piece of info: Mythweb http://mythtv/status.php?mythweb_id=92d ... 7a21226d7c tells me that the disk space available is "Total Space: 165,090 MB", which is consistant with the 161GB reported on the bottom of the "recorded programs" screen. At the same time, "df /dev/hd1e" reports 178100004.

A bit confusion...

Author:  tjc [ Fri May 20, 2005 11:45 pm ]
Post subject: 

Well it looks like you're off by 9Gb which is about 4 hours worth... What does this show for you?
Code:
root@black:/var/log# du -k /myth/tv/
16      /myth/tv/lost+found
141719160       /myth/tv/
I'm wondering if an fsck may not be in order... or if one happened and left some undead files in lost+found, or ... Also how many total hours does that page report?

Oh, and what file sysetm are you using there? ext3? reiser? xfs? Asking "mount" should tell you something like this...
Code:
root@black:~# mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
none on /proc type proc (rw,nodiratime)
/dev/hda3 on /cache type ext2 (rw)
/dev/hda4 on /myth type ext3 (rw)
sysfs on /sys type sysfs (rw)
/dev/hdb1 on /myth/tv type ext3 (rw)
usbfs on /proc/bus/usb type usbfs (rw)

Author:  marc.aronson [ Sat May 21, 2005 5:05 am ]
Post subject: 

tjc:

I am using an ext3 file system. The info you asked for is:
Code:

root@mythtv:~ # du -k /myth/tv
16      /myth/tv/lost+found
142408192       /myth/tv

root@mythtv:~ # df /myth/tv
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hde1            178100004 142441000  26612004  85% /myth/tv

root@mythtv:~ # mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
/dev/root.old on /initrd type ext2 (rw)
none on /proc type proc (rw)
/dev/hda3 on /cache type ext2 (rw)
/dev/hda4 on /myth type ext3 (rw)
/dev/hde1 on /myth/tv type ext3 (rw)



The exact info on the mythweb page is as follows:

Code:
151 programs, using 144 GB (119 hrs 29 mins) out of 161 GB


Interesting thing is that I have seen the "using xxxGB" reported by mythweb exceed 161 GB at times.

In terms of fsck -- I will try to run one and let you know the results.


Marc

Author:  marc.aronson [ Sat May 21, 2005 5:10 am ]
Post subject: 

OK, I stopped the myth backend and mysql, unmounted /dev/hde1 and did an fsck. Here are the results

Code:
root@mythtv:~ # fsck /dev/hde1
fsck 1.34-WIP (21-May-2003)
e2fsck 1.34-WIP (21-May-2003)
/dev/hde1: clean, 324/22626304 files, 36320280/45235015 blocks


Marc

Author:  marc.aronson [ Sat May 21, 2005 9:10 am ]
Post subject: 

I formatted another drive of similiar size I had hanging around, copied over all the files on the original drive that had the recordings, and then set up to mount the new drive at /myth/tv. Now all the readings are consistant ("df" vs. "mythweb/recorded-programs"). Also, when I use mythweb to bring up the list of recorded programs, it comes up massively faster. I am guessing that there was something wrong with the file system structure on the original drive...

Marc

Author:  tjc [ Sat May 21, 2005 12:25 pm ]
Post subject: 

Well as the old Russian proverb goes "the morning is wiser than the evening".

Is the drive a SATA device? Like most modern "smart" devices It might be hiding bad block problems from you. This could account for the discrepancy, were the size reported by the software is the "official" size of the drive and the free blocks reflected a 9GB chunk of tracks which have been mapped out as "bad". There are a couple ways to check on that either using the SMART tools, (man smartd or man smartctl) or by reformatting the drive and checking the amount of free space.

BTW - When you set this up did you format/mkfs it for large files? This page has lots of good info on this kind of stuff: http://www.mythtv.org/docs/mythtv-HOWTO-23.html#ss23.4

Author:  marc.aronson [ Sat May 21, 2005 6:27 pm ]
Post subject: 

It's a Hitachi EIDA drive -- 185GB supporting UDMA5. I am using the EXT3 file system, which I believe is a good bet based on what I've read and the link you pointed me at. Please let me know if you feel I'm mistaken here.

Interesting thought about bad sector mapping -- I'll play with the drive later this week to see if this explains it, although I suspect this is not it. I am working from memory here, which is always a dangerous thing for me to do :-), but I seem to recall times when "mythweb/recorded programs" shows that I had used more space than mythweb thought existed, which suggests that the space is accessible.

In any event, my new drive is in place and I am using EXT3 with LVM. It works for the first drive, but when I try to add the left over space from my main drive using

Code:
vgextend vg /dev/hda6
I get the following error:

Quote:
vgextend -- ERROR: no physical volumes usable to extend volume group "vg"


Sigh... Ever seen this one? Could it be because I had to make /dev/hda4 an extended partition? (/dev/hda5 & /dev/hda6 are both "inside" the extended partition "hda4"). fdisk shows the following partition table:

Quote:
Device Boot Start End Blocks Id System
/dev/hda1 * 1 345 2771181 83 Linux
/dev/hda2 346 439 755055 82 Linux swap
/dev/hda3 440 1224 6305512+ 83 Linux
/dev/hda4 1225 9726 68292315 5 Extended
/dev/hda5 1225 4143 23446836 83 Linux
/dev/hda6 4144 9726 44845416 8e Linux LVM


Thank you for the time you have already taken to help me out and any thoughts you may have on this one...

marc

Author:  marc.aronson [ Sat May 21, 2005 7:23 pm ]
Post subject: 

Problem solved! The LVM "how to" is missing one key step when you go to expand your volume: You need to do a "pvcreate" on the volume your are about to add. (It tells you to do this for the original volume, but doesn't mention it for the one's your are adding to expand the space.) Once I did this it worked and I know have 212GB available (172GB on the Hitachi drive + 40GB from the drive that I boot from which is an 80GB WD drive).

I am happy :-).

Author:  tjc [ Sun May 22, 2005 9:32 am ]
Post subject: 

Good for you! It's always a pleasure to help someone who seems to grasp the diagnostic and troubleshooting process and can work through stuff for themself. 8-)

BTW - Don't forget to add a note to the wiki about the missing step!

Author:  marc.aronson [ Sun May 22, 2005 12:00 pm ]
Post subject: 

Thank you for the positive words. Actually, I did a lot of programming from 1972 - 1995 on many different systems including the old Univac 1100's, VAX/VMS & Sun Solaris. Even wrote a spelling test program using voice synthesizing software on an Atari 800 for my kids to help them learn their spelling back when the Atari 800 was actually an interesting machine, so I kind of have a background in this stuff. Having said that, it's been 10 years since I've done any serious programming, so it's all a bit rusty at the "bits and bytes" level. Taking the time to install and configure Knoppmyth has been a lot of fun -- tweaking scripts, fooling around with LVM and the various storage options, getting DMA mode to work with my add-in "Promise" IDE controller and othe steps has been a lot of fun!


After I got it working I went to add a note to the Wiki about the missing step and discovered that this missing step was already added sometime between when I printed out the LVMHowTo instructions in January & today. Probably should have look there first thing, but the extra reading on LVM was probably a good idea anyway...


Marc

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/