0

I m having a problem with df command, my / fs look like this:

                                        Size  Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_root              945M  811M   69M  93% /

but if i run du command :

moesoe@x64lmwbionm:/$ sudo du -hx --apparent-size --max-depth=1
4.1K    ./lib64
30M     ./root
8.1K    ./media
3.5M    ./etc
338M    ./lib
4.0K    ./mnt
200K    ./nsr
4.0K    ./srv
16K     ./lost+found
8.9M    ./sbin
11M     ./bin
391M    .

I know the difference between the two command and i know why sometime we have difference between them.

But in reality size of du result is > of df result because we need tu use --apparent-size with du command to see approximatively same result of two command (problem with sparsefile)

But here as you can see df result is > du result.

I see if i don't have deleted file with lsof command, but no deleted file on this partition,

sudo lsof +L1 / | grep -i delete
httpd      1460       root   24w   REG  252,6        0     0   95 /applis/apache/apache_2416_unix.001/logs/proxy.1460 (deleted)
httpd      1460       root   25w   REG  252,6        0     0   97 /applis/apache/apache_2416_unix.001/logs/rewrite-map.1460 (deleted)
httpd      1476      httpd   24w   REG  252,6        0     0   95 /applis/apache/apache_2416_unix.001/logs/proxy.1460 (deleted)

and /applis/apache have its own partition:

/dev/mapper/datavg-lv_applisapache                   287M   26M  255M  10% /applis/apache

I have try to reboot the system to see if df result will be updated, but not working.

additional info:

Linux x64lmwbionm 3.16.0-77-generic #99~14.04.1-Ubuntu SMP Tue Jun 28 19:17:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Did you have some trick or others things to get back my free space? :)

EDIT1 : add /etc/fstab content

UUID=57565ea2-83f0-4727-9f5b-7eba6000f06a /boot           ext4    defaults        0       2
/dev/mapper/rootvg-lv_home /home           ext4    defaults        0       2
/dev/mapper/rootvg-lv_opt /opt            ext4    defaults        0       2
/dev/mapper/rootvg-lv_tmp /tmp            ext4    defaults        0       2
/dev/mapper/rootvg-lv_usr /usr            ext4    defaults        0       2
/dev/mapper/rootvg-lv_var /var            ext4    defaults        0       2
/dev/mapper/rootvg-lv_swap none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
/dev/datavg/lv_applis /applis ext4 defaults 0 2
/dev/datavg/lv_moteurs /moteurs ext4 defaults 0 2
/dev/datavg/lv_outils /outils ext4 defaults 0 2
/dev/datavg/lv_applisservicemix /applis/servicemix ext4 defaults 0 2
/dev/datavg/lv_moteursservicemix /moteurs/servicemix ext4 defaults 0 2
/dev/datavg/lv_outilsservicemix /outils/servicemix ext4 defaults 0 2
/dev/datavg/lv_applisapache /applis/apache ext4 defaults 0 2
/dev/datavg/lv_applisogm /applis/ogm ext4 defaults 0 2
/dev/datavg/lv_moteursapache /moteurs/apache ext4 defaults 0 2
/dev/datavg/lv_moteursjava /moteurs/java ext4 defaults 0 2
/dev/datavg/lv_bkp01 /bkp01 ext4 defaults 0 2
/dev/datavg/lv_data01 /data01 ext4 defaults 0 2
/dev/datavg/lv_moteurspostgres /moteurs/postgres ext4 defaults 0 2
/dev/datavg/lv_moteurswmq /moteurs/wmq ext4 defaults 0 2
/dev/datavg/lv_logs /logs ext4 defaults 0 2
CDNLMW3612-3930.nas.dsit.sncf.fr:/Canaltrain_Data_3 /NAS nfs nfsvers=3,auto,rw,exec 0 2
/dev/datavg/lv_agentOdin /moteurs/agentOdin ext4 defaults 0 2

thanks a lot!

0

You probably have some files hidden underneath a mount point. I would try stopping httpd and doing a umount /applis/apache, then looking in the /applis/apache directory to see if something is still there.

  • why in /applis? /applis is in separate mount point, my problem is on /. lsof result is here just to show that i don't have deleted file in / directory. for me this is an other probleme because i already stop and start apache but file come again... – Mançaux Pierre-Alexandre Mar 19 '18 at 11:05
  • 2
    Yes, but the act of mounting a filesystem will cover up any files that might already exist in the directory where it is being mounted. Do you have any other FSes on the system? What does /etc/fstab look like? – mulad Mar 19 '18 at 11:15
  • i have add in edit1 the content of /etc/fstab – Mançaux Pierre-Alexandre Mar 19 '18 at 13:36
  • 2
    Okay, that's a lot of filesystems. Try this instead, which will help expose anything that could have been hidden: mount -o bind / /mnt That will make a bind-mount of the root filesystem (a "copy" of it) on /mnt, but which won't have any of the other mounts on it. Run sudo du -hx --apparent-size --max-depth=1 /mnt ...and you'll probably see one of the subdirectories is a lot bigger than when running against / – mulad Mar 19 '18 at 15:12
  • ok thanks i have my 783Mo on it and now i can see where my space is...i will contact the right person now to explain this and get back my space! thanks a lot – Mançaux Pierre-Alexandre Mar 19 '18 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.