df -h 出来的容量与du -sh
Tagged Tags:

标题如题,df -h 出来的体积与du -sh
查看的体积消息不雷同,是这里出了难点了呢?

下边分别是du -sh *与df -h出来的结果

[root@mail /]# du -sh *
6.2M    bin
22M    boot
172K    dev
29M    etc
165G    home
130M    lib
26M    lib64
16K    lost+found
4.0K    media
4.0K    mnt
4.0K    opt
du: 无法访问"proc/9139/task/9139/fd/4": 没有那个文件或目录
du: 无法访问"proc/9139/task/9139/fdinfo/4": 没有那个文件或目录
du: 无法访问"proc/9139/fd/4": 没有那个文件或目录
du: 无法访问"proc/9139/fdinfo/4": 没有那个文件或目录
0    proc
0    result.txt
201M    root
15M    sbin
4.0K    selinux
4.0K    srv
0    sys
40K    tmp
6.3G    usr
349M    var
[root@mail /]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root   50G   44G  3.4G  93% /
tmpfs                         2.4G     0  2.4G   0% /dev/shm
/dev/sda1                     485M   32M  428M   7% /boot
/dev/mapper/VolGroup-lv_home  586G  165G  392G  30% /home
[root@mail /]# cat /etc/redhat-release 
CentOS release 6.5 (Final)
[root@mail /]# 

如上是有关询问命令的出口,上边是硬盘fdisk -l的出口消息

[root@mail /]# fdisk -l

Disk /dev/sda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00014e84

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       65271   523774976   8e  Linux LVM

Disk /dev/sdb: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_swap: 5217 MB, 5217714176 bytes
255 heads, 63 sectors/track, 634 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_home: 638.5 GB, 638494703616 bytes
255 heads, 63 sectors/track, 77625 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@mail /]# 

前面也利用 badblocks 进行围观了下,坏的块为0。

事实上是找不出去相关的从头到尾的经过了,遂发出来希望经过的大神辅导一下。

在此步骤在此以前也曾狐疑是不是是因为有删除文件而从不释放出来而产生的,然后删除了有个别文本,容积间也会直接压缩,也是有实行重启过服务器,四哥新手。在发贴时期仍也会不停的自已张开查找答案。

 

谢谢!

 

—————————————————-管理步骤——————————————————————————–

以下跟上排查的步骤:

先使用

#lsof |grep deleted

以此命令看下有未有哪些进度正在写。

[root@mail /]# lsof |grep deleted

dovecot 1256 root 110u REG 253,0 0 3148313
/usr/local/u-mail/data/dovecot/run/dovecot/login-master-notify05d38466580f94c5
(deleted)

dovecot 1256 root 127u REG 253,0 0 3148357
/usr/local/u-mail/data/dovecot/run/dovecot/login-master-notifyd14e8b6fc98a9e9f
(deleted)

df -h 出来的容量与du -sh。dovecot 1256 root 130u REG 253,0 0 3148662
/usr/local/u-mail/data/dovecot/run/dovecot/login-master-notify7400f77e8b2eb8b1
(deleted)

mysqld 1652 umail_mysql
3w REG 253,0 38989980588 1310730 /tmp/umail_mysql.log (deleted)

imap-logi 5024 nobody 4u REG 253,0 0 3148662
/usr/local/u-mail/data/dovecot/run/dovecot/login-master-notify7400f77e8b2eb8b1
(deleted)

httpd 11983 umail_df -h 出来的容量与du -sh。apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

df -h 出来的容量与du -sh。httpd 15024 umail_apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

df -h 出来的容量与du -sh。httpd 20518 umail_apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

httpd 21333 root 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7 (deleted)

httpd 21950 umail_apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

httpd 23138 umail_apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

httpd 27809 umail_apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

imap 31025 umail 13u REG 253,2 27458 9712981
/home/mailbox/fslzz.com.cn/0/zhudg/dovecot-uidlist (deleted)

httpd 31924 umail_apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

httpd 31925 umail_apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

httpd 31926 umail_apache 10u REG 253,0 0 1310725 /tmp/ZCUDSP6pa7
(deleted)

[root@mail /]#

见到里边有个经过有不行大小也正如大。依据ID查相关的历程,然后得知这些文件是mysql的general_log那几个日志文件开启所导致的。

找到:/usr/local/u-mail/config/mysql/my.cnf
那个布局文件,将内部的

图片 1

图片 2

这两行注释掉。

同一时候重启umail_mysqld的服务,然后再利用df -h查看一下经过。

图片 3

图片 4

看看进度及体量已经被管理掉了。恢复生机寻常。不易

发表评论

电子邮件地址不会被公开。 必填项已用*标注