linuxfedoralvm

/dev/mapper/fedora-root full to 96%, but more than 50% of the weight seems to be hidden


The facts:

# ls -lh /
total 80K
drwxrwxrwx.   5 root root 4.0K May 26  2015 backUp
lrwxrwxrwx.   1 root root    7 Aug 16  2014 bin -> usr/bin
dr-xr-xr-x.   4 root root 3.0K Jan  5 14:13 boot
drwxrwxrwx.   6 root root 4.0K Jul 16 12:01 data_1
drwxrwxrwx.   5 root root 4.0K Jun 10  2015 data_2
drwxr-xr-x.  20 root root 3.6K Jan  6 09:29 dev
drwxr-xr-x. 160 root root  12K Jan  6 10:28 etc
drwxr-xr-x.   4 root root 4.0K Aug 16  2014 home
drwxr-xr-x.   2 root root    0 Jan  6 09:56 hosts
lrwxrwxrwx.   1 root root    7 Aug 16  2014 lib -> usr/lib
lrwxrwxrwx.   1 root root    9 Aug 16  2014 lib64 -> usr/lib64
drwx------.   2 root root  16K Nov  4  2014 lost+found
drwxr-xr-x.   2 root root 4.0K Aug 16  2014 media
drwxr-xr-x.   2 root root 4.0K Aug 16  2014 mnt
drwxr-xr-x.   4 root root 4.0K Jul 17 17:43 opt
dr-xr-xr-x. 295 root root    0 Jan  6 10:29 proc
dr-xr-x---.  25 root root 4.0K Jan  6 10:51 root
drwxr-xr-x.  46 root root 1.4K Jan  6 10:46 run
lrwxrwxrwx.   1 root root    8 Aug 16  2014 sbin -> usr/sbin
drwxr-xr-x.   2 root root 4.0K Aug 16  2014 srv
dr-xr-xr-x.  13 root root    0 Jan  6 09:29 sys
drwxr-xr-x.   2 root root 4.0K Jul 15 16:25 sysroot
drwxrwxrwt.  14 root root  300 Jan  6 10:56 tmp
drwxr-xr-x.  14 root root 4.0K Sep 14 16:57 usr
drwxr-xr-x.  20 root root 4.0K Jan  6 10:29 var
# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                  32G     0   32G   0% /dev
tmpfs                     32G  308K   32G   1% /dev/shm
tmpfs                     32G  1.5M   32G   1% /run
tmpfs                     32G     0   32G   0% /sys/fs/cgroup
/dev/mapper/fedora-root   50G   45G  2.3G  96% /
tmpfs                     32G  328K   32G   1% /tmp
/dev/sda3                477M  147M  301M  33% /boot
/dev/sdb2                917G  288G  583G  34% /data_2
/dev/sdb1                917G   20G  852G   3% /data_1
/dev/mapper/fedora-home  160G   13G  140G   9% /home
/dev/sdc1                2.7T  383G  2.2T  15% /backUp
tmpfs                    6.3G  8.0K  6.3G   1% /run/user/42
tmpfs                    6.3G   36K  6.3G   1% /run/user/1385
# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               fedora
  PV Size               235.95 GiB / not usable 0   
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              60402
  Free PE               0
  Allocated PE          60402
  PV UUID               8oXP7e-NSTf-weml-tWWg-E64b-mjmq-nzcf19
# lvdisplay
  --- Logical volume ---
  LV Path                /dev/fedora/swap
  LV Name                swap
  VG Name                fedora
  LV UUID                Ego2By-VwgS-bIic-Wwna-D5u8-4JDi-9gVAez
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2014-11-04 12:35:40 +0100
  LV Status              available
  # open                 2
  LV Size                23.85 GiB
  Current LE             6105
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Path                /dev/fedora/home
  LV Name                home
  VG Name                fedora
  LV UUID                uPHuWm-rdMX-AOt9-MJWP-5Qgs-a83u-Asqktc
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2014-11-04 12:35:40 +0100
  LV Status              available
  # open                 1
  LV Size                162.10 GiB
  Current LE             41497
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
   
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
  LV UUID                PQG3IH-2lt3-PCyq-c6by-fSxL-2a2L-Hlr87V
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2014-11-04 12:35:46 +0100
  LV Status              available
  # open                 1
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
# du -sh /*
382G    /backUp
0   /bin
145M    /boot
20G /data_1
288G    /data_2
308K    /dev
42M /etc
12G /home
0   /hosts
0   /lib
0   /lib64
16K /lost+found
4.0K    /media
4.0K    /mnt
137M    /opt
du: cannot access ‘/proc/13761/task/13761/fd/3’: No such file or directory
du: cannot access ‘/proc/13761/task/13761/fdinfo/3’: No such file or directory
du: cannot access ‘/proc/13761/fd/3’: No such file or directory
du: cannot access ‘/proc/13761/fdinfo/3’: No such file or directory
0   /proc
35M /root
du: cannot access ‘/run/user/1385/gvfs’: Permission denied
du: cannot access ‘/run/user/42/gvfs’: Permission denied
1.5M    /run
0   /sbin
4.0K    /srv
0   /sys
4.0K    /sysroot
4.0K    /tmp
9.3G    /usr
2.9G    /var

So, according to these results, /backUp, /data_1 and /data_2 are mounted on two disks (/dev/sdc and /dev/sdb respectively) and the system in an other disk (/dev/sda) with LVM.

/dev/mapper/fedora-root 50G 45G 2.3G 96% /

9.3G /usr

2.9G /var

Thus, it appears that the / from the du command is weighting nearly 13G and from df command nearly 45G ... So I have 32G in a black hole ... I do not see the error, please do not hesitate to give advice to fix this very strange things !I am sure that I miss something ...


Solution

  • I lost a lot of time for finally a very easy thing. As proposed in comment by mattdm, in this case the more easy and quick thing to try is to unmount all the volumes (except the system, of course) and check if data exist again in the mount point. The problem can comes in the case of an automatic backup each day (as I do). If for an unknown reason the corresponding disk is unpluged (or other) the backup will be done on the root file (the mounting point). If the disk is then mounted (again for an unknow reason - the date for this problem corresponds to christmas vacation :-)) , the corresponding data on the root file will be obscured !!!! For the long version see here. Hope this will help.