如果我运行 iostat,我会看到:
avg-cpu: %user %nice %system %iowait %steal %idle
15.36 0.78 9.66 21.46 0.00 52.74
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 180.34 494.08 5741.44 28772164 334347968
sdc 0.01 0.08 0.00 4492 8
sdb 0.01 0.09 0.01 5412 736
sdd 0.32 6.64 12.68 386732 738656
dm-0 93.32 110.10 731.99 6411692 42626904
dm-1 0.01 0.05 0.00 2680 0
dm-2 647.62 383.52 5009.47 22333866 291722528
看起来像 dm-0,dm-2 是罪魁祸首。很可能是读变成了写,因为 iotop 显示:
10583 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10582 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10705 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10733 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10766 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
8894 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10974 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
9059 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
9156 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
1011 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
7272 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
11409 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
11445 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
11447 be/4 mortgage 0.00 B/s 60.34 K/s 0.00 % 0.00 % [php]
4298 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
11454 be/4 mortgage 0.00 B/s 218.73 K/s 0.00 % 0.00 % [php]
5698 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
1440 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10030 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10061 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10093 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10094 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
6073 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
10231 be/4 nobody 0.00 B/s 7.54 K/s 0.00 % 0.00 % httpd -k start -DSSL
2048 be/4 named 0.00 B/s 0.00 B/s 0.00 % 0.00 % named -u named
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
4 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0]
5 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
6 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/0]
我的 fstab 是这样的:
/dev/mapper/VolGroup-lv_root / ext4 usrjquota=quota.user,jqfmt=vfsv0 1 1
UUID=1450c2bf-d431-4621-9e8e-b0be57fd79b6 /boot ext4 defaults 1 2
/dev/mapper/VolGroup-lv_home /home ext4 usrjquota=quota.user,jqfmt=vfsv0 1 2
/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/usr/tmpDSK /tmp ext3 defaults,noauto 0 0
/dev/sdb1 /home2 auto auto,defaults 0 0
/dev/sdc1 /home3 auto auto,defaults 0 0
/dev/sdd1 /home4 auto auto,defaults 0 0
问题是dm-0、dm1、dm-2是哪一个?我想我只是将默认值更改为 defaults,relatime,但是哪些行?
如果我执行 ls -l /dev/disk/by-id/
我有
lrwxrwxrwx. 1 root root 10 Dec 26 05:03 dm-name-VolGroup-lv_home -> ../../dm-2
lrwxrwxrwx. 1 root root 10 Dec 26 05:03 dm-name-VolGroup-lv_root -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Dec 26 05:03 dm-name-VolGroup-lv_swap -> ../../dm-1
lrwxrwxrwx. 1 root root 10 Dec 26 05:03 dm-uuid-LVM-U0gpPI6UFcotbgHEwlPqKQOw6tPYQ1pjamluUcU2YJ5xYPp2re51sVkE0LyxI2qy -> ../../dm-2
lrwxrwxrwx. 1 root root 10 Dec 26 05:03 dm-uuid-LVM-U0gpPI6UFcotbgHEwlPqKQOw6tPYQ1pjjec2s02YQq8Dpw65ynU42qYnSWuTlPc2 -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Dec 26 05:03 dm-uuid-LVM-U0gpPI6UFcotbgHEwlPqKQOw6tPYQ1pjVufBZh0L0hG8uFJ9cWxsBkEJQ0OvNX1H -> ../../dm-1
/dm-0 到 dm-2 有 2 个条目。我想知道为什么。我想我得到了我现在需要的东西。我怀疑,交换不是问题。Root 和 home 是一个有点奇怪的问题,因为 /home 中的所有帐户都已被转移到其他地方。
ls -l /dev/disk/by-id/
应该做的伎俩