From:             puciek at gmail dot com
Operating system: Centos, Gentoo, Ubuntu
PHP version:      5.4.17
Package:          Filesystem function related
Bug Type:         Bug
Bug description:disk_total_space doesn't work with LVM

Description:
------------
Running disk_total_space on a system that is using LVM it will return
completely 
incorrect data.
For example on a machine with result of "df -h" as follows:
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vg-vg_root    99G   47G   47G  50% /
tmpfs                     32G     0   32G   0% /dev/shm
/dev/sda1                194M   65M  120M  36% /boot
/dev/mapper/vg-vg_backup 400G   33M  400G   1% /var/tmp
/dev/mapper/vg-vg_mysql  950G   81G  870G   9% /data

on this setup it will always return 32G.

We get similar result on second machine with "df -h":
Filesystem              Size  Used Avail Use% Mounted on
/dev/mapper/batty-root  258G  217G   29G  89% /
none                    4.0G  208K  4.0G   1% /dev
none                    4.0G     0  4.0G   0% /dev/shm
none                    4.0G   88K  4.0G   1% /var/run
none                    4.0G     0  4.0G   0% /var/lock
none                    4.0G     0  4.0G   0% /lib/init/rw
none                    258G  217G   29G  89% /var/lib/ureadahead/debugfs 

where it will always return 4G.

At first that it was because of outdated version of PHP, original tests
were 
with PHP version 5.3.27 and 5.3.6, but then I was able to reproduce it on
my 
testing box with Gentoo and PHP 5.4.17.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65446&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65446&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65446&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65446&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65446&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65446&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65446&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65446&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65446&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65446&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65446&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65446&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65446&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65446&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65446&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65446&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65446&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65446&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65446&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65446&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65446&r=mysqlcfg

Reply via email to