{"id":19669,"date":"2017-08-15T06:18:08","date_gmt":"2017-08-14T22:18:08","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/08\/15\/vmware-esxi-ghettovcb-%e6%8e%92%e7%a8%8b%e5%82%99%e4%bb%bd\/"},"modified":"2017-08-15T06:18:08","modified_gmt":"2017-08-14T22:18:08","slug":"vmware-esxi-ghettovcb-%e6%8e%92%e7%a8%8b%e5%82%99%e4%bb%bd","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/08\/15\/vmware-esxi-ghettovcb-%e6%8e%92%e7%a8%8b%e5%82%99%e4%bb%bd\/","title":{"rendered":"VMware ESXi &#8211; ghettoVCB \u6392\u7a0b\u5099\u4efd"},"content":{"rendered":"<p>1. \u5099\u4efd <span style=\"color: #0000ff;\">\/var\/spool\/cron\/crontabs\/root<\/span> \u5230 <span style=\"color: #0000ff;\">\/vmfs\/volumes\/ST500G\/crontabsroot<\/span><br \/>[root@esxi:~] <span style=\"color: #ff0000;\">cp \/var\/spool\/cron\/crontabs\/root \/vmfs\/volumes\/ST500G\/crontabsroot<\/span><\/p>\n<p>2. \u9032\u884c\u4fee\u6539<br \/>[root@esxi:~] <span style=\"color: #ff0000;\">cat \/vmfs\/volumes\/ST500G\/crontabsroot<\/span><br \/><span style=\"color: #0000ff;\">#min hour day mon dow command<\/span><br \/><span style=\"color: #0000ff;\">1\u00a0\u00a0\u00a0 1\u00a0\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 \/sbin\/tmpwatch.py<\/span><br \/><span style=\"color: #0000ff;\">1\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 \/sbin\/auto-backup.sh<\/span><br \/><span style=\"color: #0000ff;\">0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 \/usr\/lib\/vmware\/vmksummary\/log-heartbeat.py<\/span><br \/><span style=\"color: #0000ff;\">*\/5\u00a0 *\u00a0\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 \/bin\/hostd-probe.sh ++group=host\/vim\/vmvisor\/hostd-probe\/stats\/sh<\/span><br \/><span style=\"color: #0000ff;\">00\u00a0\u00a0 1\u00a0\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 localcli storage core device purge<\/span><br \/><span style=\"color: #ff0000;\">30\u00a0\u00a0 1\u00a0\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 *\u00a0\u00a0 \/opt\/ghettovcb\/bin\/ghettoVCB.sh -g \/opt\/ghettovcb\/ghettoVCB.conf -f \/vmfs\/volumes\/ST500G\/ghetto.lst &gt; \/dev\/null 2&gt;&amp;1[@more@]<\/span><br \/> 3. \u5efa\u7acb<span style=\"color: #0000ff;\"> \/vmfs\/volumes\/ST500G\/crondtab.sh<\/span><br \/>[root@esxi:~] <span style=\"color: #ff0000;\">vi \/vmfs\/volumes\/ST500G\/crondtab.sh<\/span><br \/><span style=\"color: #0000ff;\">#!\/bin\/sh<\/span><br \/><span style=\"color: #0000ff;\">#add backup crond shell<\/span><br \/><span style=\"color: #0000ff;\">\/bin\/kill $(cat \/var\/run\/crond.pid)<\/span><br \/><span style=\"color: #0000ff;\">cp \/vmfs\/volumes\/ST500G\/crontabsroot \/var\/spool\/cron\/crontabs\/root<\/span><br \/><span style=\"color: #0000ff;\">\/usr\/lib\/vmware\/busybox\/bin\/busybox crond<\/span><\/p>\n<p>4. \u66f4\u6539\u6a94\u6848\u6b0a\u9650<br \/>[root@esxi:~] <span style=\"color: #ff0000;\">chmod 755 \/vmfs\/volumes\/ST500G\/crondtab.sh<\/span><\/p>\n<p>5. \u5c07 <span style=\"color: #0000ff;\">crondtab.sh<\/span> \u52a0\u5165\u958b\u6a5f\u8a2d\u5b9a\u6a94<span style=\"color: #0000ff;\"> \/etc\/rc.local.d\/local.sh<\/span><br \/> [root@esxi:~] <span style=\"color: #ff0000;\">vi \/etc\/rc.local.d\/local.sh<\/span><br \/><span style=\"color: #0000ff;\">#backup crond<\/span><br \/><span style=\"color: #0000ff;\">\/vmfs\/volumes\/ST500G\/crondtab.sh<\/span><br \/><span style=\"color: #0000ff;\"># \u6642\u5340\u8a2d\u5b9a<\/span><br \/><span style=\"color: #0000ff;\">if [ -e \/etc\/localtime ];then<\/span><br \/><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0 rm -rf \/etc\/localtime<\/span><br \/><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0 cp \/vmfs\/volumes\/ST500G\/localtime \/etc<\/span><br \/><span style=\"color: #0000ff;\">else<\/span><br \/><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0 cp \/vmfs\/volumes\/ST500G\/localtime \/etc<\/span><br \/><span style=\"color: #0000ff;\">fi<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5099\u4efd \/var\/spool\/cron\/crontabs\/root \u5230 \/vmfs\/volumes\/ST5 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2017\/08\/15\/vmware-esxi-ghettovcb-%e6%8e%92%e7%a8%8b%e5%82%99%e4%bb%bd\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008VMware ESXi &#8211; ghettoVCB \u6392\u7a0b\u5099\u4efd\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[197],"tags":[],"class_list":["post-19669","post","type-post","status-publish","format-standard","hentry","category-c-105209"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["690491"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19669"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19669"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19669\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}