{"action":"created","issue":{"url":"https://api.github.com/repos/ZoneMinder/ZoneMinder/issues/1281","repository_url":"https://api.github.com/repos/ZoneMinder/ZoneMinder","labels_url":"https://api.github.com/repos/ZoneMinder/ZoneMinder/issues/1281/labels{/name}","comments_url":"https://api.github.com/repos/ZoneMinder/ZoneMinder/issues/1281/comments","events_url":"https://api.github.com/repos/ZoneMinder/ZoneMinder/issues/1281/events","html_url":"https://github.com/ZoneMinder/ZoneMinder/issues/1281","id":132773366,"number":1281,"title":"Web Console Free space issue","user":{"login":"knnniggett","id":5150042,"avatar_url":"https://avatars.githubusercontent.com/u/5150042?v=3","gravatar_id":"","url":"https://api.github.com/users/knnniggett","html_url":"https://github.com/knnniggett","followers_url":"https://api.github.com/users/knnniggett/followers","following_url":"https://api.github.com/users/knnniggett/following{/other_user}","gists_url":"https://api.github.com/users/knnniggett/gists{/gist_id}","starred_url":"https://api.github.com/users/knnniggett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knnniggett/subscriptions","organizations_url":"https://api.github.com/users/knnniggett/orgs","repos_url":"https://api.github.com/users/knnniggett/repos","events_url":"https://api.github.com/users/knnniggett/events{/privacy}","received_events_url":"https://api.github.com/users/knnniggett/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-10T17:59:45Z","updated_at":"2016-04-10T21:46:10Z","closed_at":null,"body":"In 1.29.0 we changed the way we determine free space from using the df system command to use disk_free_space. It made sense at the time. Typically we do want to use native calls.\r\n\r\nHowever, initial reports indicate disk_free_space does not report free disk space the same way df does. It appears to only work correctly on some, but not all, local disks. The bad thing is that disk_free_space does not fail. It simply reports an inaccurate value.\r\n\r\nHere is an example comparison between disk_free_space and df on an NFS volume:\r\nhttps://gist.github.com/pliablepixels/5e025ab3973854d26435\r\n\r\nHere is a similar example on a local volume using dev_mapper (probably a fake raid volume):\r\nhttps://forums.zoneminder.com/viewtopic.php?p=92474&sid=3c5d5089f4f0820e0bdec13804e7371d\r\n\r\nIn some cases, it appears that dividing the block size from the value reported by disk_free_space gets us a value nearly the same as what df reports. However, we would have to add extra logic to somehow determine when and when not to divide the value by the block size.\r\n\r\n@pliablepixels and I have been discussing this, and I can't think of any other solution at the moment than to revert back to using df.\r\n\r\nIf I don't hear any feedback over the next couple days, you can expect a pull request which will revert commit 8350ddac7cda0b4f314fab2301fd0cb5094d4dc2 \r\n\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30730613-web-console-free-space-issue?utm_campaign=plugin&utm_content=tracker%2F188329&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F188329&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/ZoneMinder/ZoneMinder/issues/comments/208080509","html_url":"https://github.com/ZoneMinder/ZoneMinder/issues/1281#issuecomment-208080509","issue_url":"https://api.github.com/repos/ZoneMinder/ZoneMinder/issues/1281","id":208080509,"user":{"login":"knnniggett","id":5150042,"avatar_url":"https://avatars.githubusercontent.com/u/5150042?v=3","gravatar_id":"","url":"https://api.github.com/users/knnniggett","html_url":"https://github.com/knnniggett","followers_url":"https://api.github.com/users/knnniggett/followers","following_url":"https://api.github.com/users/knnniggett/following{/other_user}","gists_url":"https://api.github.com/users/knnniggett/gists{/gist_id}","starred_url":"https://api.github.com/users/knnniggett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knnniggett/subscriptions","organizations_url":"https://api.github.com/users/knnniggett/orgs","repos_url":"https://api.github.com/users/knnniggett/repos","events_url":"https://api.github.com/users/knnniggett/events{/privacy}","received_events_url":"https://api.github.com/users/knnniggett/received_events","type":"User","site_admin":false},"created_at":"2016-04-10T21:46:10Z","updated_at":"2016-04-10T21:46:10Z","body":"#1407 is related to this."}}