Export to GitHub

puppy-development - issue #67

busybox command DF -k calculates too much free space for a small 117MB Partition


Posted on Jan 29, 2010 by Quick Rabbit

What steps will reproduce the problem? 1. df -k or df -h commands with the 3rd partition /dev/sdb3 being a small size of 117Megabyte partition, but 7.8 Gigabytes of Free Space available.

df -h

Filesystem Size Used Avail Use% Mounted on rootfs 18G 3.0G 14G 19% / /dev/root 18G 3.0G 14G 19% / shmfs 43M 0 43M 0% /dev/shm /dev/loop0 125M 125M 0 100% /mnt/+root+dpup-devx-484.sfs /dev/sdb3 8.4G 148M 7.9G 2% /mnt/sdb3 /dev/sda3 464M 2.3M 438M 1% /mnt/sda3 /dev/sdb4 8.3G 7.2G 767M 91% /mnt/sdb4 #

  1. Pmount uses this command on lines 209, 210 to calculate the Free space available on a partition. FREEK=df -k | tr -s ' ' | grep "$DEVPATTERN" | cut -f 4 -d ' ' if [ $FREEK -gt 1048576 ];then #1024*1024

3.

What is the expected output? What do you see instead? I expect to see about 115 MegaBytes, what I see is 7.8 Gigabytes which is larger than partition total size/space available.

What version of the product are you using? On what operating system? Happens on Puppy Linux 3.0 and Puppy Linux 4.20 and dPup 484 beta 3 Linux.

Please provide any additional information below. df -k for the /dev/sda drive looks just fine with its 480 Megabyte Partition. /dev/sda3 correctly displays the available free space. See the graphic file pmount_sdb_error.png for the red circled error. Understand the file df-k_error_output.txt which has the output from the "df -k" and "df -h" commands. This command is ueed at line 209 in the /usr/sbin/pmount command. It calculates the available free space for this partition into a variable "FREEK". "FREEK" is later printed out from the "pmount" command, where the error is shown in the pmount_sdb_error.png file.

Attachments

Status: New

Labels:
Type-Defect Priority-Medium