Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#6846 closed defect (invalid)

FreeSpace calculations don't work correctly

Reported by: eric.bosch@… Owned by: Isaac Richards
Priority: minor Milestone: 0.22
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Freespace calculations are multiplying reality with what it thinks to be separate filesystems. It needs to determine if for local directories, if all the directories are logically within the filesystem, or if they exist in separate filesystems. I am organizing videos, LiveTV and recordings in separate directories, but on the same filesystem, so the reported freespace is triple what reality is. I will look at the code and determine if I can generate a patch to resolve this.

Change History (7)

comment:1 Changed 10 years ago by sphery <mtdean@…>

Is this fixed by #6582 ?

comment:2 Changed 10 years ago by eric.bosch@…

No, 6582 did not fix the issue, in fact it broke things, causing the master backend to crash when switching tuners between master and slave. The problem appears to be completely due to differences in reported sizes of nfs versus local filesystems. Below is a snapshot of the stats of the drives. Mythtv reflects an accurate space/usage in each of the mounted/local filesystem groups, but it is failing to identify that an NFS filesystem is the same as the local filesystem on the other backend.

gandalf scripts # df -k /video Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 974529356 535549500 438979856 55% / gandalf scripts # df -k /videonfs/ Filesystem 1K-blocks Used Available Use% Mounted on saruman:/video 930209280 60635136 869574144 7% /videonfs

saruman ~ # df -k /video Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda4 930209140 60691568 869517572 7% /video saruman ~ # df -k /videonfs/ Filesystem 1K-blocks Used Available Use% Mounted on gandalf:/video 974529536 535549952 438979584 55% /videonfs

comment:3 Changed 10 years ago by eric.bosch@…

You may close this as well. After reviewing information on optimizing mythtv with NFS, and making some adjustments to options in exports and fstab, this is now being reported correctly.

comment:4 Changed 10 years ago by robertm

Resolution: invalid
Status: newclosed

Closed at the request of opener. Thanks for reporting back.

comment:5 Changed 10 years ago by cpinkham

(In [21297]) Add the filesystem block size to the FileSystemInfo? structure and modify the backend's duplicate filesystem detection logic to use the maximum of the block sizes of the two filesystems it is comparing or 32K as the 'fuzzy' comparison value when comparing the sizes of two filesystems to determine if they are in fact the same fileystem, and yes, I can make a longer run-on sentence, I just wasn't trying that hard this time.

With newer kernels supporting NFS block sizes up to 1 MegaByte?, our 32K fuzzy comparison wasn't working in some cases. Now we'll use a larger number, but only if necessary because a filesystem was mounted with a larger block size than 32K.

References #6846.

comment:6 Changed 10 years ago by cpinkham

(In [21298]) Fix one user of BackendQueryDiskSpace? that I missed in [21297] and bump the protocol version since the wire protocol did change with the addition of the block size to FileSystemInfo?.

Refs #6846.

comment:7 Changed 10 years ago by sphery

(In [21368]) Allow for larger NFS blocksizes when comparing total filesystem size to identify filesystems.

This is a much simpler implementation of the fix that went into trunk in [21297] and [21298] , here always allowing up to 1MiB total filesystem size differences, where 1MiB is the current maximum blocksize used for NFS within the Linux kernel. The more robust fix in trunk could not be backported to -fixes because of the protocol version change.

Refs #6846

Note: See TracTickets for help on using tickets.