[mythtv-commits] Ticket #6503: GetFilesystemInfos, TotalKB: -1 should be ignored

MythTV mythtv at cvs.mythtv.org
Sun Apr 26 18:13:15 UTC 2009


#6503: GetFilesystemInfos, TotalKB: -1 should be ignored
-------------------------------+--------------------------------------------
 Reporter:  nick at kreucher.net  |        Owner:  cpinkham  
     Type:  defect             |       Status:  assigned  
 Priority:  minor              |    Milestone:  0.21.1    
Component:  MythTV - General   |      Version:  0.21-fixes
 Severity:  medium             |   Resolution:            
  Mlocked:  0                  |  
-------------------------------+--------------------------------------------

Comment(by cpinkham):

 I added code to the AutoExpirer in both trunk and -fixes to ignore
 filesystems with a TotalKB or UsedKB == -1.  If you are compiling your own
 binaries and update to svn head then you should be able to see some error
 messages printed to the log when this situation is encountered.

 If you are using automount and the filesystem is not already mounted or
 automounted when the expirer runs, then there isn't much we can do about
 it in the code.  I wonder if this situation would occur if you used a
 subdirectory like we recommend.  We generally tell people not to put their
 recordings in the root directory of a mount whether it is nfs or a local
 drive.  The reason for this is because if the filesystem is not mounted
 for some reason, the backend will happily put the files in the parent
 filesystem and then those files will be hidden when/if the real recording
 filesystem is mounted.  We recommend putting recordings in a subdir of the
 mount.  If you used a subdir, then autofs would probably cause the
 filesystem to be mounted when we call statfs() and we'd get the true usage
 numbers for use in the expirer.

 With only one filesystem/directory, you may not be seeing issues in the
 scheduler, but if you had 2 of them, these invalid usage numbers would
 severely impact the Storage Groups disk scheduling code.

 Can you compile and run the attached statfs.c program?  Basically this:
    gcc -o statfs statfs.c ; ./statfs /var/lib/mythtv/recordings

 Try that with the filesystem mounted and unmounted, then try it again with
 the filesystem unmounted, but instead of giving it the recordings
 directory, create a temporary subdirectory underneath recordings and pass
 statfs the name of the subdirectory (ie, ./statfs
 /var/lib/mythtv/recordings/tmpsubdir)  and see if that gives different
 results or if it causes the filesystem to be mounted (which it should).
 If this is the case, then using a subdir would fix the issue for you.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/6503#comment:8>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list