FreeBSD /var が溢れました
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
#counter([total|today|yesterday]);
RIGHT:&lastmod;更新
----
Contents
#contents
----
*/var/db/freebsd-update [#o26abad3]
きっかけ?は、でかいスパムメールを投げてくる test@live.c...
Out: 250-SIZE 204800000
In: MAIL FROM: <test@live.com>
Out: 452 4.3.1 Insufficient system storage
などとなっていたため、当該のサーバの/varの空きが150MBしか...
/var/以下で一番容量を喰ってたのが /var/db/freebsd-update...
/etc/freebsd-update.conf
# WorkDir /var/db/freebsd-update
WorkDir /usr/db/freebsd-update
して、
129 12:23 mkdir -p /usr/db/freebsd-update
130 12:24 freebsd-update fetch
してみて、よさそうなので、
132 12:27 cd /var/db
133 12:27 ll
134 12:27 rm -r freebsd-update/
した。
[[7系にすると「/」パーティションが]]に引き続きファイルシ...
*/var が溢れました [#aaec541f]
ある日k222というマシンのコンソールが延々とスクロールして...
May 22 18:49:54 k222 kernel: May 22 18:49:54 k222 mysqld...
warning: /etc/hosts.allow, line 2: can't verify hostname...
(undefined.bjgwbn.net.cn, AF_INET) failed
May 22 18:49:55 k222 kernel: May 22 18:49:55 k222 mysqld...
warning: /etc/hosts.allow, line 2: can't verify hostname...
(undefined.bjgwbn.net.cn, AF_INET) failed
May 22 18:49:55 k222 kernel: May 22 18:49:55 k222 mysqld...
warning: /etc/hosts.allow, line 2: can't verify hostname...
(undefined.bjgwbn.net.cn, AF_INET) failed
May 22 18:49:56 k222 kernel: May 22 18:49:56 k222 mysqld...
warning: /etc/hosts.allow, line 2: can't verify hostname...
(undefined.bjgwbn.net.cn, AF_INET) failed
May 23 23:11:00 k222 kernel: May 23 23:11:00 k222 kernel...
2 inumber 117828 on /var: filesystem full
May 23 23:22:00 k222 kernel: May 23 23:22:00 k222 kernel...
2 inumber 117866 on /var: filesystem full
May 23 23:27:05 k222 kernel: May 23 23:27:05 k222 kernel...
(freshclam), uid 106 inumber 118199 on /var: filesystem ...
May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 kernel...
uid 125 inumber 23629 on /var: filesystem full
May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 postfi...
fatal: append file defer 4F70D5C4E: No space left on dev...
May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 postfi...
fatal: append file defer AA8345C4B: No space left on dev...
May 23 23:33:00 k222 kernel: May 23 23:33:00 k222 kernel...
2 inumber 117829 on /var: filesystem full
May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 kernel...
uid 125 inumber 23631 on /var: filesystem full
May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 postfi...
fatal: append file defer 585FC5C50: No space left on dev...
May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 postfi...
fatal: append file defer 5AD0F5C57: No space left on dev...
May 23 23:37:24 k222 kernel: May 23 23:37:24 k222 kernel...
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/...
と、まぁ、危なげではあるが、まだ、危険というほどでもない...
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/...
で、対処方法としては、パーティションを切り直す。というの...
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
/var/amavis も大きいので移してみる
mkdir /usr/var/amavis
cp -Rpv /var/amavis /usr/var/ #シンボリックリンクを...
mv /var/amavis /var/amavis-stop
ln -s /usr/var/amavis /var/amavis
tar cvfzp /usr/var/amavis-stop_20100708.tar.gz /var/amav...
rm -r /var/amavis-stop
あとは、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...
126 8:39 df
127 8:45 cd /usr/var/db/freebsd-update
128 8:45 ll
129 8:46 ln -s install.LGSBoBf465c3739385890c221df...
d0430e46996d319db7439f884336-rollback
130 8:47 ln -s install.LGSBoBf465c3739385890c221df...
d0430e46996d319db7439f884336-rollback
131 8:47 ln -s install.LGSBoBf465c3739385890c221df...
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/rollb...
151 9:17 ln -s install.hoavcq install.hoavcq/rollb...
152 9:17 ln -s install.hoavcq install.hoavcq/rollb...
153 9:18 ll
154 9:26 ln -s install.hoavcq install.LGSBoB/rollb...
155 9:50 cd db
156 9:50 history
k222#
終了行:
#counter([total|today|yesterday]);
RIGHT:&lastmod;更新
----
Contents
#contents
----
*/var/db/freebsd-update [#o26abad3]
きっかけ?は、でかいスパムメールを投げてくる test@live.c...
Out: 250-SIZE 204800000
In: MAIL FROM: <test@live.com>
Out: 452 4.3.1 Insufficient system storage
などとなっていたため、当該のサーバの/varの空きが150MBしか...
/var/以下で一番容量を喰ってたのが /var/db/freebsd-update...
/etc/freebsd-update.conf
# WorkDir /var/db/freebsd-update
WorkDir /usr/db/freebsd-update
して、
129 12:23 mkdir -p /usr/db/freebsd-update
130 12:24 freebsd-update fetch
してみて、よさそうなので、
132 12:27 cd /var/db
133 12:27 ll
134 12:27 rm -r freebsd-update/
した。
[[7系にすると「/」パーティションが]]に引き続きファイルシ...
*/var が溢れました [#aaec541f]
ある日k222というマシンのコンソールが延々とスクロールして...
May 22 18:49:54 k222 kernel: May 22 18:49:54 k222 mysqld...
warning: /etc/hosts.allow, line 2: can't verify hostname...
(undefined.bjgwbn.net.cn, AF_INET) failed
May 22 18:49:55 k222 kernel: May 22 18:49:55 k222 mysqld...
warning: /etc/hosts.allow, line 2: can't verify hostname...
(undefined.bjgwbn.net.cn, AF_INET) failed
May 22 18:49:55 k222 kernel: May 22 18:49:55 k222 mysqld...
warning: /etc/hosts.allow, line 2: can't verify hostname...
(undefined.bjgwbn.net.cn, AF_INET) failed
May 22 18:49:56 k222 kernel: May 22 18:49:56 k222 mysqld...
warning: /etc/hosts.allow, line 2: can't verify hostname...
(undefined.bjgwbn.net.cn, AF_INET) failed
May 23 23:11:00 k222 kernel: May 23 23:11:00 k222 kernel...
2 inumber 117828 on /var: filesystem full
May 23 23:22:00 k222 kernel: May 23 23:22:00 k222 kernel...
2 inumber 117866 on /var: filesystem full
May 23 23:27:05 k222 kernel: May 23 23:27:05 k222 kernel...
(freshclam), uid 106 inumber 118199 on /var: filesystem ...
May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 kernel...
uid 125 inumber 23629 on /var: filesystem full
May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 postfi...
fatal: append file defer 4F70D5C4E: No space left on dev...
May 23 23:31:21 k222 kernel: May 23 23:31:21 k222 postfi...
fatal: append file defer AA8345C4B: No space left on dev...
May 23 23:33:00 k222 kernel: May 23 23:33:00 k222 kernel...
2 inumber 117829 on /var: filesystem full
May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 kernel...
uid 125 inumber 23631 on /var: filesystem full
May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 postfi...
fatal: append file defer 585FC5C50: No space left on dev...
May 23 23:36:22 k222 kernel: May 23 23:36:22 k222 postfi...
fatal: append file defer 5AD0F5C57: No space left on dev...
May 23 23:37:24 k222 kernel: May 23 23:37:24 k222 kernel...
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/...
と、まぁ、危なげではあるが、まだ、危険というほどでもない...
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/...
で、対処方法としては、パーティションを切り直す。というの...
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
/var/amavis も大きいので移してみる
mkdir /usr/var/amavis
cp -Rpv /var/amavis /usr/var/ #シンボリックリンクを...
mv /var/amavis /var/amavis-stop
ln -s /usr/var/amavis /var/amavis
tar cvfzp /usr/var/amavis-stop_20100708.tar.gz /var/amav...
rm -r /var/amavis-stop
あとは、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...
126 8:39 df
127 8:45 cd /usr/var/db/freebsd-update
128 8:45 ll
129 8:46 ln -s install.LGSBoBf465c3739385890c221df...
d0430e46996d319db7439f884336-rollback
130 8:47 ln -s install.LGSBoBf465c3739385890c221df...
d0430e46996d319db7439f884336-rollback
131 8:47 ln -s install.LGSBoBf465c3739385890c221df...
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/rollb...
151 9:17 ln -s install.hoavcq install.hoavcq/rollb...
152 9:17 ln -s install.hoavcq install.hoavcq/rollb...
153 9:18 ll
154 9:26 ln -s install.hoavcq install.LGSBoB/rollb...
155 9:50 cd db
156 9:50 history
k222#
ページ名: