[mythtv] Detection of shared disks in storage groups

Gregorio Gervasio, Jr. gtgj at pacbell.net
Sat Dec 2 19:43:28 UTC 2006


(This is with SVN r12168.)

In mythbackend/backendutil.cpp, BackendQueryDiskSpace has a 16KB fudge
factor for the total space when detecting shared disks:

            // Sometimes the space reported for an NFS mounted dir is slightly
            // different than when it is locally mounted because of block sizes
            if ((abs(it1->totalSpaceKB - it2->totalSpaceKB) <= 16 ) &&
                (abs(it1->usedSpaceKB - it2->usedSpaceKB) < maxWriteFiveSec))

In my system, this does not seem to be enough.  From the master
backend's "-v file" logs:

Dir: slave1.home:/home/mythtv/store.v
     Location: Local
     Drive ID: 1
     TotalKB : 397553664
     UsedKB  : 176041984
     FreeKB  : 221511680

Dir: slave2.home:/home/mythtv/store.v
     Location: Remote
     Drive ID: 2
     TotalKB : 397541376
     UsedKB  : 176029696
     FreeKB  : 221511680

ie, the size discrepancy is 12288KB.  Don't know if it matters but the
directory is on an XFS-over-LVM filesystem on the first slave and
NFS-mounted with options (nfsvers=3,rsize=16384,wsize=16384,soft)
on the second slave.

        I'm not sure what problems this will cause but just in case,
I've bumped up the fudge factor in my local tree.
-- 
Gregorio Gervasio, Jr.


More information about the mythtv-dev mailing list