Contents
7系にすると「/」パーティションがに引き続きファイルシステム・ネタ
ある日k222というマシンのコンソールが延々とスクロールしていて、その先頭は、
May 22 18:49:54 k222 kernel: May 22 18:49:54 k222 mysqld[1176]: warning: /etc/hosts.allow, line 2: can't verify hostname: getaddrinfo (undefined.bjgwbn.net.cn, AF_INET) failed May 22 18:49:55 k222 kernel: May 22 18:49:55 k222 mysqld[1176]: warning: /etc/hosts.allow, line 2: can't verify hostname: getaddrinfo (undefined.bjgwbn.net.cn, AF_INET) failed May 22 18:49:55 k222 kernel: May 22 18:49:55 k222 mysqld[1176]: warning: /etc/hosts.allow, line 2: can't verify hostname: getaddrinfo (undefined.bjgwbn.net.cn, AF_INET) failed May 22 18:49:56 k222 kernel: May 22 18:49:56 k222 mysqld[1176]: warning: /etc/hosts.allow, line 2: can't verify hostname: getaddrinfo (undefined.bjgwbn.net.cn, AF_INET) failed May 23 23:11:00 k222 kernel: May 23 23:11:00 k222 kernel: pid 59626 (dd), uid 2 inumber 117828 on /var: filesystem full May 23 23:22:00 k222 kernel: May 23 23:22:00 k222 kernel: pid 80929 (dd), uid 2 inumber 117866 on /var: filesystem full May 23 23:27:05 k222 kernel: May 23 23:27:05 k222 kernel: pid 1006 (freshclam), uid 106 inumber 118199 on /var: filesystem full May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 kernel: pid 99006 (bounce), uid 125 inumber 23629 on /var: filesystem full May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 postfix/bounce[99006]: fatal: append file defer 4F70D5C4E: No space left on device May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 postfix/bounce[99004]: fatal: append file defer AA8345C4B: No space left on device May 23 23:33:00 k222 kernel: May 23 23:33:00 k222 kernel: pid 2329 (dd), uid 2 inumber 117829 on /var: filesystem full May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 kernel: pid 8866 (bounce), uid 125 inumber 23631 on /var: filesystem full May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 postfix/bounce[8866]: fatal: append file defer 585FC5C50: No space left on device May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 postfix/bounce[8867]: fatal: append file defer 5AD0F5C57: No space left on device May 23 23:37:24 k222 kernel: May 23 23:37:24 k222 kernel: pid 10832 (bounce), uid 125 inumber 23638 on /var: filesystem full
ですと・・・May 22 のメールでは
Disk status: Filesystem Size Used Avail Capacity Mounted on /dev/ar0s1a 496M 96M 360M 21% / devfs 1.0K 1.0K 0B 100% /dev /dev/ar0s1e 496M 398K 456M 0% /tmp /dev/ar0s1f 443G 42G 365G 10% /usr /dev/ar0s1d 2.9G 1.2G 1.4G 47% /var devfs 1.0K 1.0K 0B 100% /usr/home/scponly/dev
と、まぁ、危なげではあるが、まだ、危険というほどでもないかと・・・? 思っておりましたが、
74 16:26 df Disk status: Filesystem Size Used Avail Capacity Mounted on /dev/ar0s1a 496M 96M 360M 21% / devfs 1.0K 1.0K 0B 100% /dev /dev/ar0s1e 496M 398K 456M 0% /tmp /dev/ar0s1f 443G 42G 365G 10% /usr /dev/ar0s1d 2.9G 3.2G -321M -12% /var <=この行うろおぼえ^^ devfs 1.0K 1.0K 0B 100% /usr/home/scponly/dev
で、対処方法としては、パーティションを切り直す。というのが正攻法なのだろうが、ちょっとコストが高そう(≒めんどくさい^^)ので、/var以下の大きいファイル群を余裕のある/usrへ移してslする事にしてみた。副作用が有るかどうかは知らない^^
verのなかで、比較的サイズの大きなdbを/usrへ移動する
mkdir /usr/var/ cp -Rp /var/db /usr/var/ #シンボリックリンクをそのまま移す mv /var/db /var/db-stop ln -s /usr/var/db /var/db
あとは、du -d1 /var 等を行って、ウイルスメールなどを消去
75 16:26 cd /var 76 16:26 du 77 16:28 rm -r /var/amavis/tmp 78 16:28 df 79 16:29 du 80 16:29 rm -r /var/tmp/temproot 81 16:30 df 82 16:30 du 83 16:31 rm /var/log/all.log 84 16:32 touch /var/log/all.log 85 16:32 du 86 16:32 df 87 16:33 df 88 16:33 postfix restart 89 16:34 postfix restart 90 16:34 postfix start 91 16:34 postfix restart 92 16:34 postfix 93 16:35 touch /var/log/maillog 94 16:35 postfix 95 16:35 postfix restart 96 16:35 postfix reload 97 16:37 pwd 98 16:37 cd log 99 16:37 ll 100 16:37 reboot 101 6:46 df 102 6:46 cd var/ 103 6:46 cd /var 104 6:47 du 105 6:47 du -d1 106 6:48 cd db 107 6:48 ll 108 6:49 du 109 6:49 du -d1 110 6:49 du -d1 111 6:50 df 112 6:51 cd 113 6:51 cd /var/ 114 6:51 ll 115 6:52 mkdir /usr/var/db 116 6:52 mkdir /usr/var 117 6:52 mkdir /usr/var/db 118 6:53 cp -rp db /usr/var/db/ 119 6:55 cp -rp db/ /usr/var/db/ 120 6:56 rm -r /usr/var/db/db 121 6:57 cp -rp db/ /usr/var/db/ 122 7:11 ln -s /usr/var/db /var/db 123 7:12 df 124 7:13 mv -rp /var/db-stop/ /usr/var/ 125 7:13 tar cvfzp /usr/var/db-stop.tar.gz /var/db-stop/ 126 8:39 df 127 8:45 cd /usr/var/db/freebsd-update 128 8:45 ll 129 8:46 ln -s install.LGSBoBf465c3739385890c221dff1a05e578c6cae0 d0430e46996d319db7439f884336-rollback 130 8:47 ln -s install.LGSBoBf465c3739385890c221dff1a05e578c6cae0 d0430e46996d319db7439f884336-rollback 131 8:47 ln -s install.LGSBoBf465c3739385890c221dff1a05e578c6cae0 d0430e46996d319db7439f884336-rollback 132 8:48 ll 133 8:48 cd install.LGSBoB/ 134 8:48 ll 135 8:48 touch rollback 136 8:48 ll 137 8:49 ln -s rollback ../install.hoavcq 138 8:52 ln -s rollback install.hoavcq 139 8:52 ll 140 8:52 rm install.hoavcq 141 8:52 ll 142 8:53 ln -s rollback install.hoavcq 143 8:53 ll 144 8:53 rminstall.hoavcq 145 9:00 rm install.hoavcq 146 9:00 ll 147 9:00 rm rollback 148 9:00 cd ../ 149 9:00 ll 150 9:16 ln -s install.hoavcq install.LGSBoB/rollback 151 9:17 ln -s install.hoavcq install.hoavcq/rollback 152 9:17 ln -s install.hoavcq install.hoavcq/rollback 153 9:18 ll 154 9:26 ln -s install.hoavcq install.LGSBoB/rollback 155 9:50 cd db 156 9:50 history
k222#