LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mounted disk still reports 0 bytes on Rhel 5 even when files are delete (https://www.linuxquestions.org/questions/linux-newbie-8/mounted-disk-still-reports-0-bytes-on-rhel-5-even-when-files-are-delete-878524/)

boberey 05-03-2011 05:43 AM

Mounted disk still reports 0 bytes on Rhel 5 even when files are delete
 
Mounted second hard disk still report 0 bytes even when files are already deleted in rhel5 . I already checked the lost+found and trash . It only happen that disk space on deleted files cannot be recovered after the disk reach full capacity , but if it does not reach yet its full capacity , deleting files will recover the disk space . The format of the disk I have mounted is ext3 also have tried ntfs using fuse but the same problem , once allowed to reach 0 bytes I can no longer recover space with deleting files and had to reformat and restore the backup. Any suggestion please .

ramram29 05-03-2011 06:30 AM

If you delete the file while it's opened with another program then you will not be able to see the recovered space until the file handle is closed. The lsof command will tell you if the file handle is opened and under what process. Once you kill that process then the free space will be visible.

boberey 05-03-2011 09:25 PM

sir is restarting the system and dismounting the drive not sufficient to close the file handle or kill any open process ? i have the server shutdown /restarted and the disk un-mount/mounted many times but still i cannot recover the disk space.

ramram29 05-05-2011 12:16 AM

Then there must be a file or files that are taking up the space. Run the following commands and post the output:

cd /

mount

df -hP

du -hs

boberey 05-09-2011 11:37 PM

Sir I can no longer show you the actual status of our server since i already reformat it , and just
monitor and delete some files before it reach 0 disk space.We used SAS 300 MB for hda and 300MB for hdb . In hda which contains the system is ok , the hdb which is the mounted disk has the problem of recovering disk space.

I configure a test system using IDE and SATA in order to figure out the problem , below is the result.

the folder properties on mounted drive states
Type : folder
Contents 425 items , totalling 726.2 MB
location : /mnt
Volume 784.4 MB Volume
Free space : 0 bytes

I can no longer recover the 30MB + space

output of the mount/df/du are

[root@localhost /]# mount
/dev/mapper/VolGroup01-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sda1 on /mnt/d2 type ext3 (rw)

[root@localhost /]# df -hP
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol00 37G 3.5G 32G 10% /
/dev/hda1 99M 12M 83M 13% /boot
tmpfs 125M 0 125M 0% /dev/shm
/dev/sda1 773M 733M 0 100% /mnt/d2

[root@localhost /]# du -hs
4.5G .


All times are GMT -5. The time now is 10:48 AM.