事实:
# 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
因此,根据这些结果,/backUp、/data_1 和 /data_2 安装在两个磁盘(分别为 /dev/sdc 和 /dev/sdb)上,系统安装在另一个磁盘(/dev/sda)上,并使用 LVM。
- df -h命令返回 / 已满 96%:
/dev/mapper/fedora-root 50G 45G 2.3G 96% /
- 但是如果我们把 / 的du -sh返回,我们观察到更重的目录是 /usr 和 /var,总重量大约 13G(/backUp、/data_1 和 /data_2 在其他磁盘上)和 /home 对应 /dev/mapper/fedora-home):
9.3G /usr
2.9G /var
因此,似乎du命令的 / 权重接近 13G,而df命令的权重接近 45G ...所以我在黑洞中有 32G ...我没有看到错误,请不要犹豫,给建议解决这个非常奇怪的事情!我确定我错过了一些东西......