<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3262514976145210042</id><updated>2024-10-24T07:22:32.047-07:00</updated><category term="ruby on rails"/><category term="shell script"/><category term="git"/><category term="logger"/><category term="rsync"/><category term="subnetmask"/><category term="1tb usb ubuntu"/><category term="2 ISP&#39;s IPTables"/><category term="82574 intel ethernet"/><category term="CPU 32 64 bit PAE"/><category term="CentOS"/><category term="DNS"/><category term="DOS attack"/><category term="GSLB DNS"/><category term="IDS DOS DDOS SAMHAIN"/><category term="JFS ReiserFS XFS"/><category term="LinuxToDo&#39;s"/><category term="NFS Active Passive using DRBD Heartbeat Cent OS 5"/><category term="Nagios"/><category term="Nameserver"/><category term="Nconf"/><category term="Rails"/><category term="SAN"/><category term="SMS"/><category term="STARTTLS=client"/><category term="Ubuntu 4GB RAM"/><category term="Veritas"/><category term="Vsftpd"/><category term="amazon webservices ec2 webhosting"/><category term="apache rewrite rules"/><category term="atop linux"/><category term="autosuggest autocomplete solr"/><category term="changelog"/><category term="column headings"/><category term="core dump linux"/><category term="cron"/><category term="curl"/><category term="curl or lwp-request"/><category term="dd"/><category term="delete 1 history command"/><category term="dell firmware update"/><category term="dentry"/><category term="download jdk"/><category term="ec2 instance type"/><category term="ftp"/><category term="git usage"/><category term="graylog2"/><category term="ike"/><category term="inotify"/><category term="ipsec cisco asa site to site vpn"/><category term="iptables"/><category term="iptables ratelimit connection limiting"/><category term="java"/><category term="kernel"/><category term="line break"/><category term="linux disk space"/><category term="linux dns client cache ttl"/><category term="linux history"/><category term="linux memory issues"/><category term="lvm"/><category term="memory"/><category term="mozilla firefox java"/><category term="mysql"/><category term="mysql binary logs"/><category term="mysql replication"/><category term="ntfs usb on linux"/><category term="one-liner"/><category term="overcommit"/><category term="port"/><category term="prashanth"/><category term="ps column headings"/><category term="ps command"/><category term="puppet pysa"/><category term="root space"/><category term="ror"/><category term="routes etho eth1;"/><category term="rpm"/><category term="rpm history"/><category term="rsync delete"/><category term="rsync port"/><category term="script"/><category term="seagate 1tb"/><category term="seagate 1tb ubuntu"/><category term="sendmail"/><category term="shrewsoft vpn"/><category term="snmp centos"/><category term="socket"/><category term="socket stats"/><category term="split lines in vi editor"/><category term="squid"/><category term="ss command"/><category term="ssh tunnel"/><category term="starling"/><category term="stderr"/><category term="stdin"/><category term="swap"/><category term="sysadmin tool"/><category term="sysctl"/><category term="syslog"/><category term="tar exclude"/><category term="usb hard drive"/><category term="verify=FAIL"/><category term="version=TLSv1/SSLv3"/><category term="vim whitespace"/><category term="vlan"/><category term="webapps"/><category term="wget"/><category term="wget jdk"/><category term="xsos"/><category term="zabbix"/><title type='text'>Tune2Linux</title><subtitle type='html'>A collage on Linux / Windows Networking / MySQL many more .... Stay tuned!!!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tune2linux.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>106</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-9160418644672781680</id><published>2017-03-21T19:49:00.002-07:00</published><updated>2017-03-21T19:49:55.535-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rsync"/><category scheme="http://www.blogger.com/atom/ns#" term="rsync delete"/><category scheme="http://www.blogger.com/atom/ns#" term="rsync port"/><title type='text'>rsync with delete option and different ssh port</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;How to rsync e.g PIPELINE dir from Source to Destination?&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #272727;&quot;&gt;#rsync -avzr&amp;nbsp;&lt;/span&gt;&amp;nbsp;--delete-before&amp;nbsp;&lt;span style=&quot;color: #272727;&quot;&gt;-e &quot;ssh -p $portNumber&quot; &amp;nbsp;/local/path/&lt;/span&gt;.&amp;nbsp;&lt;span style=&quot;color: #272727;&quot;&gt;user@remoteip:/path/to/files/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;#rsync -avzr --delete-before -e &quot;ssh -p 5555&quot; /root/PIPELINE root@192.168.10.203:~/&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;How to rsync from Destination to Source?&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #272727;&quot;&gt;#rsync -avzr -e &quot;ssh -p $portNumber&quot; user@remoteip:/path/to/files/ /local/path/&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;#rsync -avzr -e &quot;ssh -p 5555&quot; root@192.168.10.203:~/PIPELINE&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/9160418644672781680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/9160418644672781680'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2017/03/rsync-with-delete-option-and-different.html' title='rsync with delete option and different ssh port'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-2945813757891449267</id><published>2016-12-06T01:55:00.001-08:00</published><updated>2016-12-06T01:55:28.934-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iptables ratelimit connection limiting"/><title type='text'>iptables ratelimit connection limiting </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Steps:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;1. Create a file&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;iptables.rules with below content.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;2. Load rules #iptables-restore &amp;lt; iptables.rules&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;3. Also Start http service. #service httpd restart&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;4. cd /var/www/html and create a index.html file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;5.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;From other system try to ping firewall machine- Observe what happens?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;6. From other system try $curl &lt;ip span=&quot;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;firewall machine&amp;gt; - Observe what happens after 10 requests.&lt;/span&gt;&lt;/ip&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Happy firewalling ;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# cat iptables.rules&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Generated by iptables-save v1.4.7 on Wed Jun &amp;nbsp;8 00:51:34 2016&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;*filter&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:INPUT DROP [0:0]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:FORWARD ACCEPT [0:0]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:OUTPUT ACCEPT [0:0]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:ICMPCHK - [0:0]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:tcpchk - [0:0]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:ssh - [0:0]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:http - [0:0]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Rule will pass to ssh chain&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A INPUT -p tcp -m tcp --dport 5555 -j ssh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#Rule will pass to ICMPCHK chain&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A INPUT -p icmp --icmp-type echo-request -j ICMPCHK&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#Rule will pass to http chain&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A INPUT -p tcp -m tcp --dport 80 -j http&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Any traffic to port 80 will be accepted&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Drop all packets&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A INPUT -j DROP&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Output chain&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A OUTPUT -p udp -m udp --dport 5555 -j ACCEPT&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A OUTPUT -p tcp -m tcp --dport 5555 -j ACCEPT&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A OUTPUT -j DROP&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ssh -p tcp -m tcp --dport 5555 -m state --state NEW -m recent --set --name DEFAULT --rsource&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ssh -p tcp -m tcp --dport 5555 -m state --state NEW -m recent --rcheck --seconds 60 --hitcount 2 --name DEFAULT --rsource -m limit --limit 2/min -j LOG --log-prefix &quot;SSH-ATTACK : &quot; --log-level 5&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ssh -p tcp -m tcp --dport 5555 -m state --state NEW -m recent --update --seconds 60 --hitcount 2 --name DEFAULT --rsource -j REJECT --reject-with tcp-reset&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ssh -p tcp -m tcp --dport 5555 -j ACCEPT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ssh -j RETURN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#Rule for counting of incoming connections.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A http -p tcp --dport 80 -m conntrack --ctstate NEW -m recent --set --name DDOS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#Rule to write log&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A http -p tcp --dport 80 -m conntrack --ctstate NEW -m recent --update --name DDOS --seconds 30 --hitcount 10 -j LOG --log-prefix &quot;DDOS : &quot; --log-level 5&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Rule check number of connection made from an ip to port 80. If count is &amp;gt;10, Client is made to wait for 30 seconds and allowed.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A http -p tcp --dport 80 -m conntrack --ctstate NEW -m recent --update --name DDOS --seconds 30 --hitcount 10 -j DROP&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Generally accept http&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A http -j ACCEPT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;-A http -j RETURN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#Rule to limit pings&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ICMPCHK -p icmp --icmp-type echo-request -m limit --limit 3/min --limit-burst 5 -j ACCEPT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ICMPCHK -p icmp --icmp-type echo-request -m limit --limit 3/min --limit-burst 5 -j LOG --log-prefix &quot;ICMP-CHK-LIMITED: &quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ICMPCHK -p icmp &amp;nbsp;-j DROP&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A ICMPCHK -j RETURN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;COMMIT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;*nat&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:PREROUTING ACCEPT [15030:976242]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:POSTROUTING ACCEPT [5423:372090]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:OUTPUT ACCEPT [4987:357161]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;COMMIT&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/2945813757891449267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/2945813757891449267'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2016/12/iptables-ratelimit-connection-limiting.html' title='iptables ratelimit connection limiting '/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-1435525979158190900</id><published>2016-12-02T07:21:00.002-08:00</published><updated>2016-12-02T07:21:26.336-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="tar exclude"/><title type='text'>creating tar archive by excluding file</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;how can i exclude files when creating tar archive?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;tar -zcv -f target.tar.gz --exclude-from=&#39;exclude.txt&#39; source/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now, in your exclude.txt file you can place the paths to exclude:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;logs/*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;errors&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;data/*.bin&lt;/span&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/1435525979158190900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/1435525979158190900'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2016/12/creating-tar-archive-by-excluding-file.html' title='creating tar archive by excluding file'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-8636530704032139736</id><published>2016-11-03T04:42:00.001-07:00</published><updated>2016-11-03T04:42:53.389-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sysadmin tool"/><category scheme="http://www.blogger.com/atom/ns#" term="xsos"/><title type='text'>xsos tool for sysadmins and support techs</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h1 class=&quot;title&quot; style=&quot;box-sizing: border-box; color: #252527; font-family: Overpass, &#39;Open Sans&#39;, Helvetica, sans-serif; font-size: 2.625rem; font-weight: 800; line-height: 1.286em; margin-bottom: 6px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-rendering: auto;&quot;&gt;
a tool for sysadmins and support techs&lt;/h1&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;curl -Lo ./xsos bit.ly/xsos-direct;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;chmod +x ./xsos;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;./xsos -ya&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
Refer:&amp;nbsp;&lt;a href=&quot;https://access.redhat.com/discussions/469323&quot;&gt;https://access.redhat.com/discussions/469323&lt;/a&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8636530704032139736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8636530704032139736'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2016/11/xsos-tool-for-sysadmins-and-support.html' title='xsos tool for sysadmins and support techs'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-3781811210602329361</id><published>2015-11-06T03:31:00.002-08:00</published><updated>2015-11-06T03:31:13.604-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux dns client cache ttl"/><title type='text'>linux dns client cache ttl</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;Checking TTL&#39;s DNS&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Incidentally to check what the TTL is for a given entry you can use dig with the following switches.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Example&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;$ dig +nocmd www.google.com +noall +answer | tail -1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;www.google.com. &amp;nbsp; &amp;nbsp; 137 IN &amp;nbsp;A &amp;nbsp; 74.125.225.82&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;$ dig +nocmd www.google.com +noall +answer | tail -1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;www.google.com. &amp;nbsp; &amp;nbsp; 135 IN &amp;nbsp;A &amp;nbsp; 74.125.225.115&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;So the TTL for this response is 137 seconds. Waiting ~2 seconds and running it again shows 135 seconds. The TTL means how much time is left until the DNS entry expires, and we need to go query the authoritative server for the domain.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Checking Max TTL&#39;s&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;If we were to query the authoritative server.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;$ dig @ns1.google.com +nocmd www.google.com +noall +answer | tail -1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;www.google.com. &amp;nbsp; &amp;nbsp; 300 IN &amp;nbsp;A &amp;nbsp; 74.125.225.210&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;So the actual TTL for this entry is 300 seconds.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;NOTE: The authoritative server is also known as the SOA - Start of Authority.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;SOA information&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;You can query the domain further for SOA information.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;$ dig +nocmd dyndns.org any +multiline +noall +answer&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 596 IN SOA ns1.dyndns.org. hostmaster.dyndns.org. (&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 863998266 &amp;nbsp;; serial&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 600 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;; refresh (10 minutes)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 300 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;; retry (5 minutes)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 604800 &amp;nbsp; &amp;nbsp; ; expire (1 week)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 600 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;; minimum (10 minutes)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 85904 IN NS ns5.dyndns.org.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 85904 IN NS ns1.dyndns.org.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 85904 IN NS ns2.dyndns.org.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 85904 IN NS ns3.dyndns.org.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 85904 IN NS ns4.dyndns.org.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 12268 IN MX 10 mail.dyndns.com.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 12268 IN MX 20 mx2.mailhop.org.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;dyndns.org. &amp;nbsp; &amp;nbsp; 179 IN A 204.13.248.116&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Changing TTLs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;The only way to change a DNS entry&#39;s TTL (outside of some sort of API that your registrar might provide) is through the server.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Example&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Within Bind you could setup your zone file like so:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;;Zone file for exampleweb.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$TTL 14400&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@ &amp;nbsp; &amp;nbsp; &amp;nbsp;86400 &amp;nbsp; &amp;nbsp;IN &amp;nbsp; &amp;nbsp; &amp;nbsp;SOA &amp;nbsp; &amp;nbsp; ns.exampleweb.com. admin.exampleweb.com. (&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;2009022402 &amp;nbsp; &amp;nbsp; &amp;nbsp;; serial, todays date+todays&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;86400 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ; refresh, seconds&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;7200 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;; retry, seconds&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;3600000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ; expire, seconds&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;86400 ) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ; minimum, seconds&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;exampleweb.com. 86400 IN NS &amp;nbsp; ns.exampleweb.com.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;exampleweb.com. 86400 IN NS &amp;nbsp; ns1.exampleweb.com.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;exampleweb.com. &amp;nbsp;IN A &amp;nbsp; 209.59.139.21&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;localhost &amp;nbsp;IN A &amp;nbsp; 127.0.0.1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;exampleweb.com. &amp;nbsp;IN MX 0 &amp;nbsp; exampleweb.com.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mail &amp;nbsp;IN CNAME &amp;nbsp;exampleweb.com.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;www &amp;nbsp;IN CNAME &amp;nbsp; exampleweb.com.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ftp &amp;nbsp;IN A &amp;nbsp; 209.59.139.21&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cpanel &amp;nbsp;IN A &amp;nbsp; 209.59.139.21&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;webmail &amp;nbsp;IN A &amp;nbsp; 209.59.139.21&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;The above macro, $TTL would set the TTL to 14400 seconds for any entries, unless it get&#39;s overridden for particular entries.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/3781811210602329361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/3781811210602329361'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/11/linux-dns-client-cache-ttl.html' title='linux dns client cache ttl'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-6623189112407872249</id><published>2015-09-17T23:41:00.000-07:00</published><updated>2015-09-17T23:41:12.284-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="swap"/><title type='text'>Linux add swap</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; sudo dd if=/dev/zero of=/swap bs=1M count=1024&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; sudo mkswap /swap&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; sudo swapon /swap&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/6623189112407872249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/6623189112407872249'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/09/linux-add-swap.html' title='Linux add swap'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-8533331585599387936</id><published>2015-06-10T18:19:00.000-07:00</published><updated>2015-06-10T18:19:06.800-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ike"/><category scheme="http://www.blogger.com/atom/ns#" term="shrewsoft vpn"/><title type='text'>Shrewsoft vpn disconnects frequently</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-text-decorations-in-effect: initial; background-color: #6aa84f;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;white-space: pre-wrap;&quot;&gt;The workaround is to set&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap;&quot;&gt;Phase1 key life time to 180 sec while keeping 
Phase2 key life time on default 28800.&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap;&quot;&gt;This will force a rekey before the SA is deleted from the SRX. Tunnel connectivity is not disrupted and the tunnels stays up.&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap;&quot;&gt;Good luck!&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8533331585599387936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8533331585599387936'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/06/shrewsoft-vpn-disconnects-frequently.html' title='Shrewsoft vpn disconnects frequently'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-8483774656065261237</id><published>2015-06-08T00:35:00.005-07:00</published><updated>2015-06-10T18:17:13.384-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="shell script"/><title type='text'>email previous day log files</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;cd /var/log&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;fil=$(mktemp)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;stat -c &quot;%y|%n&quot; rpmpkgs-*.gz | grep `date &amp;nbsp;--date=&quot;1 days ago&quot; +%Y-%m-%d` | awk -F&quot;|&quot; &#39;{print $2}&#39; &amp;gt; $fil&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;for i in `cat $fil`;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;do&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;/usr/bin/uuencode $i | &amp;nbsp;mail -s &quot;$i&quot; youremail@example.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;done&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Courier New, Courier, monospace;&quot;&gt;rm $fil&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Have a great day!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8483774656065261237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8483774656065261237'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/06/email-previous-day-log-files.html' title='email previous day log files'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-7979975305186629148</id><published>2015-04-18T22:02:00.001-07:00</published><updated>2015-04-18T22:02:22.756-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="zabbix"/><title type='text'>zabbix trigger on changed values</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[03:37:20] root@simba:[/etc/zabbix]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# zabbix_get -s 192.168.1.51 -k redis[llen,storeapp:failed]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;525&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[05:19:44] root@simba:[/etc/zabbix]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# zabbix_get -s&amp;nbsp;192.168.1.52 -k redis[llen,storeapp:failed]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;1470&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;changed trigger for failed jobs:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{redis.host:redis[llen,storeapp:failed].change()}&amp;lt;&amp;gt;0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;so it will fire up when Items in Failed Queue is changed, not related on how many items we do have in queue.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/7979975305186629148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/7979975305186629148'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/04/zabbix-trigger-on-changed-values.html' title='zabbix trigger on changed values'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-7915915516065823991</id><published>2015-04-12T22:19:00.001-07:00</published><updated>2015-04-12T22:19:15.748-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="socket stats"/><category scheme="http://www.blogger.com/atom/ns#" term="ss command"/><title type='text'>ss command socket stats</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Check socket stats on e.g ip 192.168.1.10&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;ss -tnao dst 192.168.1.10&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;a href=&quot;http://www.binarytides.com/linux-ss-command/&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;http://www.binarytides.com/linux-ss-command/&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/7915915516065823991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/7915915516065823991'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/04/ss-command-socket-stats.html' title='ss command socket stats'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-7547951776779774803</id><published>2015-01-12T22:21:00.003-08:00</published><updated>2015-01-12T22:21:55.553-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql binary logs"/><title type='text'>mysql binary logs</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Please do not just delete them in the OS.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You need to let mysqld do that for you. Here is how mysqld manages it:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The file mysql-bin.index keeps a list of all binary logs mysqld has generated and auto-rotated. The mechanisms for cleaning out the binlogs in conjunction with mysql-bin.index are:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: #393318; font-size: 12px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background-image: none; border: 0px; color: #222222; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PURGE BINARY LOGS &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TO&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;binlogname&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
PURGE BINARY LOGS BEFORE &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;datetimestamp&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;These will clear all binary logs before the binlog or timestamp you just specified.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For example, if you run&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: #393318; font-size: 12px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background-image: none; border: 0px; color: #222222; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PURGE BINARY LOGS &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TO&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;mysql-bin.000223&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;this will erase all binary logs before &#39;mysql-bin.000223&#39;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If you run&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: #393318; font-size: 12px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background-image: none; border: 0px; color: #222222; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PURGE BINARY LOGS BEFORE DATE&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;NOW&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; INTERVAL &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; DAY&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; INTERVAL &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; SECOND&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;this will erase all binary logs before midnight 3 days ago.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If you want to have binlog rotated away automatically and keep 3 days woth, simply set this:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: #393318; font-size: 12px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background-image: none; border: 0px; color: #222222; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;mysql&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;SET&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; GLOBAL expire_logs_days &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;then add this to&amp;nbsp;&lt;code style=&quot;background-color: #f3f3f3; border: 0px; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;/etc/my.cnf&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: #393318; font-size: 12px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background-image: none; border: 0px; color: #222222; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;mysqld&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
expire-logs-days&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #953838; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;and mysqld will delete them logs for you&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;background-color: white; border: 0px; color: #222222; font-size: 20px !important; line-height: 1.3 !important; margin: 0px 0px 1.2em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;SHOW SLAVE STATUS\G&lt;/span&gt;&lt;/h1&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This is critical. When you run&amp;nbsp;&lt;code style=&quot;background-color: #f3f3f3; border: 0px; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;SHOW SLAVE STATUS\G&lt;/code&gt;, you will see two binary logs from the Master:&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; color: #222222; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; line-height: 1.3em; margin: 0px 0px 0.5em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;background-color: #f3f3f3; border: 0px; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Master_Log_File&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; line-height: 1.3em; margin: 0px 0px 0.5em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;background-color: #f3f3f3; border: 0px; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Relay_Master_Log_File&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;When replication has little or no lag these are usually the same value. When there is a lot of replication lag, these values are different. Just to make it simple, choose whatever&amp;nbsp;&lt;code style=&quot;background-color: #f3f3f3; border: 0px; font-size: 12px; margin: 0px; padding: 1px 5px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Relay_Master_Log_File&lt;/code&gt;&amp;nbsp;is, and go back to the Master and run&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-sql prettyprint prettyprinted&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: #393318; font-size: 12px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;background-image: none; border: 0px; color: #222222; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;PURGE BINARY LOGS &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #8a4a0b; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;TO&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: black; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;Whatever Relay_Master_Log_File Is&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #145680; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;That way, replication is not interrupted.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #222222; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Give it a Try !!!&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/7547951776779774803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/7547951776779774803'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/01/mysql-binary-logs.html' title='mysql binary logs'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-8405550837169574789</id><published>2015-01-12T18:26:00.001-08:00</published><updated>2015-01-12T18:26:08.594-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="logger"/><title type='text'>how to redirect stdout &amp; stderr to logger?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: red; font-family: Verdana, sans-serif;&quot;&gt;logger come in handy&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif;&quot;&gt;* * * * * &amp;nbsp;cd /usr/local/bin; sh test_hi.sh 2&amp;gt;&amp;amp;1 | logger&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;# cat test_hi.sh&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;echo &quot;Hi testing logger.. thanks&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;Test&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;# tail -f &amp;nbsp;/var/log/messages&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;Jan 13 02:20:01 simba-c1 root: Hi testing logger.. thanks&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;If you don&#39;t need any log then you may simple use like&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;* * * * * cd /usr/local/bin; sh&amp;nbsp;sh test_hi.sh&amp;nbsp;&amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8405550837169574789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8405550837169574789'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/01/how-to-redirect-stdout-stderr-to-logger.html' title='how to redirect stdout &amp; stderr to logger?'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-5206551278194545483</id><published>2015-01-11T23:35:00.001-08:00</published><updated>2015-01-11T23:36:52.948-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sysctl"/><title type='text'>Kernel parameters for high-load Linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;header class=&quot;entry-header&quot; style=&quot;background-color: #222222;&quot;&gt;&lt;h1 class=&quot;entry-title&quot; style=&quot;border: 0px; clear: none; margin: 0px 56px 5px 0px; outline: 0px; padding: 5px 36px 0px 0px; text-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: white; font-family: Lucida Grande, Arial, Lucida Sans Unicode, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 2.2rem; line-height: 1.2;&quot;&gt;Kernel&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 35px; line-height: 42px;&quot;&gt;parameters&lt;/span&gt;&lt;span style=&quot;font-size: 2.2rem; line-height: 1.2;&quot;&gt;&amp;nbsp;for&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 35px; line-height: 42px;&quot;&gt;high-load&lt;/span&gt;&lt;span style=&quot;font-size: 2.2rem; line-height: 1.2;&quot;&gt;&amp;nbsp;Linux&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;/header&gt;&lt;br /&gt;
&lt;div class=&quot;entry-content&quot; style=&quot;background-color: #222222; border: 0px; color: #aaaaaa; font-family: &#39;Lucida Grande&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; font-size: 13px; line-height: 19px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Edit two config files:&lt;br /&gt;
&lt;span id=&quot;more-32&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 1.2rem; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;% vi /etc/sysctl.conf&lt;/code&gt;&lt;/div&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 1.2rem; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 1.2rem; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;net.ipv4.ip_forward = 0&lt;br /&gt;net.ipv4.conf.default.rp_filter = 1&lt;br /&gt;net.ipv4.conf.default.accept_source_route = 0&lt;br /&gt;kernel.sysrq = 0&lt;br /&gt;kernel.core_uses_pid = 1&lt;br /&gt;net.ipv4.tcp_syncookies = 1&lt;br /&gt;kernel.msgmnb = 65536&lt;br /&gt;kernel.msgmax = 65536&lt;br /&gt;kernel.shmmax = 68719476736&lt;br /&gt;kernel.shmall = 4294967296&lt;br /&gt;kernel.domainname=servername&lt;br /&gt;net.ipv4.tcp_max_syn_backlog = 10240&lt;br /&gt;net.ipv4.tcp_max_tw_buckets = 400000&lt;br /&gt;net.ipv4.tcp_max_orphans = 60000&lt;br /&gt;net.ipv4.tcp_synack_retries = 3&lt;br /&gt;net.ipv4.tcp_fin_timeout = 3&lt;br /&gt;net.core.rmem_max = 16777216&lt;br /&gt;net.core.wmem_max = 16777216&lt;br /&gt;net.core.rmem_default = 1048576&lt;br /&gt;net.core.wmem_default = 1048576&lt;br /&gt;net.core.somaxconn = 16384&lt;br /&gt;net.ipv4.tcp_rmem = 4096 87380 16777216&lt;br /&gt;net.ipv4.tcp_wmem = 4096 65536 16777216&lt;br /&gt;net.core.netdev_max_backlog = 3000&lt;br /&gt;#net.ipv4.tcp_congestion_control = htcp #for centos 5&lt;br /&gt;net.ipv4.tcp_congestion_control = cubic #for centos 6&lt;br /&gt;net.ipv4.ip_local_port_range = 1024 65535&lt;br /&gt;net.ipv4.tcp_tw_reuse = 1&lt;br /&gt;net.ipv4.neigh.default.unres_qlen = 6&lt;br /&gt;net.ipv4.neigh.default.proxy_qlen = 96&lt;br /&gt;net.ipv4.ip_nonlocal_bind = 1&lt;br /&gt;net.ipv4.tcp_keepalive_time = 60&lt;br /&gt;net.ipv4.tcp_keepalive_probes = 3&lt;br /&gt;net.ipv4.tcp_keepalive_intvl = 10&lt;br /&gt;fs.file-max = 360000&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 1.2rem; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;% vi /etc/security/limits.conf&lt;/code&gt;&lt;/div&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 1.2rem; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/code&gt;&lt;br /&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 1.2rem; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;* soft nofile 360000&lt;br /&gt;* hard nofile 360000&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
and reboot…&lt;br /&gt;
&lt;a href=&quot;http://wenxueliu.github.io/blog/10/10/2014/linux-tuning/&quot;&gt;http://wenxueliu.github.io/blog/10/10/2014/linux-tuning/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/5206551278194545483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/5206551278194545483'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2015/01/kernel-parameters-for-high-load-linux.html' title='Kernel parameters for high-load Linux'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-7879530436427234900</id><published>2014-11-26T22:40:00.002-08:00</published><updated>2014-11-26T22:43:16.213-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="overcommit"/><title type='text'>What is Overcommit? And why is it bad?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h1&gt;
What is Overcommit? And why is it bad?&lt;/h1&gt;
&lt;br /&gt;
From kernel source/Documentation:&lt;br /&gt;
When this flag is 0, the kernel attempts to estimate the amount&lt;br /&gt;
of free memory left when userspace requests more memory.&lt;br /&gt;


When this flag is 1, the kernel pretends there is always enough&lt;br /&gt;
memory until it actually runs out.&lt;br /&gt;


When this flag is 2, the kernel uses a &quot;never overcommit&quot;&lt;br /&gt;
policy that attempts to prevent any overcommit of memory.&lt;br /&gt;
Note that user_reserve_kbytes affects this policy.&lt;br /&gt;


This feature can be very useful because there are a lot of&lt;br /&gt;
programs that malloc() huge amounts of memory &quot;just-in-case&quot;&lt;br /&gt;
and don&#39;t use much of it.&lt;br /&gt;


The default value is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a lot of misunderstandings of memory management on Linux,
leading to a lot of bad software that fails to robustly handle
low-memory conditions. This all stems from a basic &lt;b&gt;myth&lt;/b&gt;:

&lt;br /&gt;
&lt;blockquote&gt;
On Linux, &lt;tt&gt;malloc&lt;/tt&gt; never fails. It always returns a
pointer to allocated memory, but later your application might crash
attempting to access that memory if not enough physical memory is
available.&lt;/blockquote&gt;
Where does this myth come from? Something called overcommit.

&lt;br /&gt;
When a system such a Linux utilizing virtual memory allocates
memory to a userspace process (via &lt;tt&gt;brk&lt;/tt&gt; or &lt;tt&gt;mmap&lt;/tt&gt;),
there is no fixed correspondence between the virtual memory created in
the process&#39;s virtual address space and the physical memory of the
machine. In fact, before the memory is first used, it&#39;s likely that
there&#39;s not any correspondence at all to physical memory; only after
the first attempt to access the memory does the kernel have to setup a
physical memory corresponding to it.

&lt;br /&gt;
&lt;b&gt;Overcommit refers to the practice of giving out virtual memory
with no guarantee that physical storage for it exists.&lt;/b&gt; To make an
analogy, it&#39;s like using a credit card and not keeping track of your
purchases. A system performing overcommit just keeps giving out
virtual memory until the debt collector comes calling — that is, until
some program touches a previously-untouched page, and the kernel fails
to find any physical memory to instantiate it — and then stuff starts
crashing down.

&lt;br /&gt;
What happens when “stuff starts crashing down”? It can vary, but
the Linux approach was to design an elaborate heuristic “OOM killer”
in the kernel that judges the behavior of each process and decides
who’s “guilty” of making the machine run out of memory, then kills the
guilty parties. In practice this works fairly well from a standpoint
of avoiding killing critical system processes and killing the process
that’s “hogging” memory, but the problem is that no process is really
“guilty” of using more memory than was available, because everyone was
(incorrectly) told that the memory was available.

&lt;br /&gt;
Suppose you don’t want this kind of uncertainty/danger when it
comes to memory allocation? The naive solution would be to immediately
and statically allocate physical memory corresponding to all virtual
memory. To extend the credit card analogy, this would be like using
cash for all your purchases, or like using a debit card. You get the
safety from overspending, but you also lose a lot of fluidity.
Thankfully, there’s a better way to manage memory.

&lt;br /&gt;
The approach taken in reality when you want to avoid committing too
much memory is to &lt;i&gt;account for&lt;/i&gt; all the memory that’s allocated.
In our credit card analogy, this corresponds to using a credit card,
but keeping track of all the purchases on it, and never purchasing
more than you have funds to pay off. This turns out to be the Right
Thing when it comes to managing virtual memory, and in fact it’s what
Linux does when you set the &lt;tt&gt;vm.overcommit_memory&lt;/tt&gt; sysctl
parameter to the value 2. In this mode, all virtual memory that could
potentially be modified (i.e. has read-write permissions) or lacks
backing (i.e. an original copy on disk or other device that it could
be restored from if it needs to be discarded) is accounted for as
“commit charge”, the amount of memory the kernel
as &lt;i&gt;committed&lt;/i&gt;/promised to applications. When a new virtual
memory allocation would cause the commit charge to exceed a
configurable limit (by default, the size of swap plus half the size of
physical ram), the allocation fails.



&lt;br /&gt;
Unfortunately, a lot of application developers like overcommit,
presumably for two reasons:

&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;It allows you to allocate a ridiculous amounts of memory as long
as you know you’ll only make sparse use of it. In our credit card
analogy, this is like a contractor going to a building supply store
and buying twice the amount of materials they expect to need using a
credit card, knowing they’ll be safe as long as they go back and
return the unused materials for a refund before the credit card bill
is due.
&lt;/li&gt;
&lt;li&gt;It gives you an excuse to be lazy handling errors. You can
rationalize ignoring the return value of &lt;tt&gt;malloc&lt;/tt&gt; on the basis
that, due to overcommit, even if you check the return value you can’t
be sure to avoid crashing later when the kernel doesn’t have enough
physical memory to instantiate your virtual memory.
&lt;/li&gt;
&lt;/ol&gt;
The first reason is actually fairly legitimate, but overcommit is
not the right solution. Instead, applications which want to use large
amounts of virtual memory without getting charged for it should use
the right protections to ensure that memory that won’t be written is
mapped read-only. This is robust and portable, unlike relying on
overcommit.

&lt;br /&gt;
The second reason is pure laziness and foolishness. The fact that
you can’t detect all errors on a system that’s configured in a
non-robust way (the Linux default) is not an excuse for failing to
detect other errors (like exhausting &lt;i&gt;virtual&lt;/i&gt; address space) and
crashing on systems that were intentionally configured for maximum
robustness. In fact, even in the default configuration, Linux tries to
avoid severe overcommit; it just doesn’t do detailed accounting.

&lt;br /&gt;
Overcommit is &lt;b&gt;harmful&lt;/b&gt; because it encourages, and provides
a &lt;b&gt;wrong&lt;/b&gt; but &lt;b&gt;plausible&lt;/b&gt; argument for, writing bad
software. While the number of applications that completely ignore the
failure of &lt;tt&gt;malloc&lt;/tt&gt; seems to be shrinking, plenty of
applications and even &lt;i&gt;libraries&lt;/i&gt; intended for use in serious
software utilize “xmalloc” wrappers that abort (!!) the caller
when &lt;tt&gt;malloc&lt;/tt&gt; returns a null pointer, and the justification is
almost always that, since the program could OOM-crash anyway if
allocation fails, it’s no worse to &lt;tt&gt;abort&lt;/tt&gt;. And of course this
line of reasoning completely neglects systems that were intentionally
configured to be robust under memory exhaustion.

&lt;br /&gt;
Correct software, especially library code which may be used in
applications requiring maximum reliability, should be written to
assume the operating system does not overcommit, and to handle failure
of &lt;tt&gt;malloc&lt;/tt&gt; by backing out whatever operation was in place and
reporting failure. This approach will ensure safety on systems
configured to do commit accounting, and will give behavior no worse
than the operating system’s default on systems that do overcommit. &amp;nbsp; &amp;nbsp; &lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/7879530436427234900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/7879530436427234900'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2014/11/what-is-overcommit-and-why-is-it-bad.html' title='What is Overcommit? And why is it bad?'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-6934575041700800492</id><published>2014-10-28T10:21:00.005-07:00</published><updated>2014-10-28T10:21:59.567-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sendmail"/><category scheme="http://www.blogger.com/atom/ns#" term="STARTTLS=client"/><category scheme="http://www.blogger.com/atom/ns#" term="verify=FAIL"/><category scheme="http://www.blogger.com/atom/ns#" term="version=TLSv1/SSLv3"/><title type='text'> sendmail STARTTLS=client version=TLSv1/SSLv3, verify=FAIL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: orange;&quot;&gt; STARTTLS=client version=TLSv1/SSLv3, verify=FAIL&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;Another way is to edit the current sendmail.cf file and make sure
 this line is in it and uncommented:
 
  O TLSSrvOptions=V
 
 This tells sendmail to NOT request the client&#39;s certificate.  Note that
 this option is not safe and is only present in sendmail V8.12.x.

Really a bad idea to edit the sendmail.cf directly. Each service restart
will delete such a manual direct setting in the .cf file! And editing
the sendmai.cf directly often causes errors. Even the OP did set that
with define(`confTLS_SRV_OPTIONS&#39;, `V&#39;) in the sendmail.mc file.&lt;/span&gt;

&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/6934575041700800492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/6934575041700800492'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2014/10/sendmail-starttlsclient.html' title=' sendmail STARTTLS=client version=TLSv1/SSLv3, verify=FAIL'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-1521698336522112969</id><published>2014-07-05T20:06:00.000-07:00</published><updated>2014-07-14T07:38:26.320-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux disk space"/><title type='text'>Reclaim disk space in Linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;If you can&#39;t kill your application, you can truncate instead of deleting the log file to reclaim the space. If the file was not open in append mode (with O_APPEND), then the file will appear as big as before the next time the application writes to it (though with the leading part sparse and looking as if it contained NUL bytes), but the space will have been reclaimed.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;To truncate it: #&amp;gt; /path/to/the/file.log&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;If it was already deleted, on Linux, you can still truncate it by doing:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#&amp;gt; &quot;/proc/$pid/fd/$fd&quot;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Where $pid is the process id of the process that has the file opened, and $fd one file descriptor it has it opened under (which you can check with lsof -p &quot;$pid&quot;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;If you don&#39;t know the pid, and are looking for deleted files, you can do:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;#lsof -nP | grep &#39;(deleted)&#39;
Or (on Linux):&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;#find /proc/*/fd -ls | grep  &#39;(deleted)&#39;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Or to find the large ones with zsh:

ls -ld /proc/*/fd/*(-.LM+1) | grep &#39;(deleted)&#39;
An alternative, if the application is dynamically linked is to attach a debugger to it and make it call close(fd) followed by a new open(&quot;the-file&quot;, ....).&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/1521698336522112969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/1521698336522112969'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2014/07/reclaim-disck-space-in-linux.html' title='Reclaim disk space in Linux'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-8512375497625615899</id><published>2014-02-23T05:25:00.000-08:00</published><updated>2014-03-09T08:40:50.669-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="1tb usb ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="seagate 1tb"/><category scheme="http://www.blogger.com/atom/ns#" term="seagate 1tb ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="usb hard drive"/><title type='text'>1TB USB Seagate external harddrive does not detect in ubuntu</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Just plugged in a&amp;nbsp;newly&amp;nbsp;purchased USB external hard drive 1TB - &amp;nbsp;Stunned with my Ubuntu OS simply did not detect!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;dmesg&#39;s&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;130.433880] scsi8 : uas&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;151.820010] scsi 8:0:0:0: uas_eh_abort_handler tag -1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;151.820024] scsi 8:0:0:0: uas_eh_device_reset_handler tag -1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;151.820030] scsi 8:0:0:0: uas_eh_target_reset_handler tag -1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;151.820036] scsi 8:0:0:0: uas_eh_bus_reset_handler tag -1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;151.824027] usb 1-1.1: URB BAD STATUS -71&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;151.892010] usb 1-1.1: reset high speed USB device number 6 using ehci_hcd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;151.984903] scsi 8:0:0:0: Device offlined - not ready after error recovery&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;302.577810] usb 1-1.1: USB disconnect, device number 6&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;[ &amp;nbsp;307.634478] usb 1-1.1: new high speed USB device number 7 using ehci_hcd&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Steps to resolve the issue:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Disconnect the drive&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;$rmmod uas&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Create a new file and like :&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;$cat &amp;nbsp;/etc/modprobe.d/blacklist-uas.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;blacklist uas;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: orange; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Connect the drive it&amp;nbsp;simply works! Voila...&amp;nbsp; ;)&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://affiliate.webnode.com/scripts/banner.php?a_aid=5315587ef0ae3&amp;a_bid=39027a56&quot;&gt;&lt;/script&gt;&lt;noscript&gt;&lt;h2&gt;&lt;a href=&quot;http://www.webnode.com/&quot; title=&quot;Webnode&quot; rel=”nofollow” &gt;Webnode&lt;/a&gt;&lt;/h2&gt;&lt;/noscript&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a target=&quot;_blank&quot; href=&quot;http://www.shareasale.com/r.cfm?b=232148&amp;u=924030&amp;m=47&amp;urllink=&amp;afftrack=&quot;&gt;&lt;img src=&quot;http://www.shareasale.com/image/47/725x90.gif&quot;  border=&quot;0&quot;&gt;&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8512375497625615899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8512375497625615899'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2014/02/1tb-usb-seagate-external-harddrive-does.html' title='1TB USB Seagate external harddrive does not detect in ubuntu'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-3504253290471852122</id><published>2014-02-07T20:20:00.001-08:00</published><updated>2014-03-03T20:59:11.687-08:00</updated><title type='text'>CentOS 6 installation on software RAID1 and LVM</title><content type='html'>&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;344&quot; src=&quot;//www.youtube.com/embed/TMdfkikpB6M&quot; width=&quot;459&quot;&gt;&lt;/iframe&gt;

&lt;br&gt;&lt;br&gt;
&lt;div&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://affiliate.webnode.com/scripts/banner.php?a_aid=5315587ef0ae3&amp;a_bid=39027a56&quot;&gt;&lt;/script&gt;&lt;noscript&gt;&lt;h2&gt;&lt;a href=&quot;http://www.webnode.com/&quot; title=&quot;Webnode&quot; rel=”nofollow” &gt;Webnode&lt;/a&gt;&lt;/h2&gt;&lt;/noscript&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/3504253290471852122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/3504253290471852122'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2014/02/centos-6-installation-on-software-raid1.html' title='CentOS 6 installation on software RAID1 and LVM'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-8361938260549421533</id><published>2014-02-07T19:09:00.001-08:00</published><updated>2014-02-07T19:09:48.757-08:00</updated><title type='text'>Recover deleted partitions using Testdisk in Ubuntu #11</title><content type='html'>&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;//www.youtube.com/embed/EncqYP1ijFg&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8361938260549421533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/8361938260549421533'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2014/02/recover-deleted-partitions-using.html' title='Recover deleted partitions using Testdisk in Ubuntu #11'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-4183183743975714370</id><published>2014-02-07T19:05:00.001-08:00</published><updated>2014-03-11T19:45:43.913-07:00</updated><title type='text'>Data Recovery on a Formatted Drive with TestDisk by Britec</title><content type='html'>&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;//www.youtube.com/embed/jhWbSM-630E&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;

&lt;a target=&quot;_blank&quot; href=&quot;http://www.shareasale.com/r.cfm?b=547763&amp;u=924030&amp;m=37723&amp;urllink=&amp;afftrack=&quot;&gt;&lt;img src=&quot;http://www.shareasale.com/image/37723/All-in-one-eCommerce_00.gif&quot; alt=&quot;Create your online store and start selling. Try it free at Weebly.com!&quot; border=&quot;0&quot;&gt;&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/4183183743975714370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/4183183743975714370'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2014/02/data-recovery-on-formatted-drive-with.html' title='Data Recovery on a Formatted Drive with TestDisk by Britec'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-4616099680902880956</id><published>2013-12-12T19:40:00.002-08:00</published><updated>2013-12-12T19:40:25.750-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ec2 instance type"/><title type='text'>AWS EC2 Instance types</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: x-small;&quot;&gt;http://aws.amazon.com/ec2/instance-types/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/4616099680902880956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/4616099680902880956'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2013/12/aws-ec2-instance-types.html' title='AWS EC2 Instance types'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-4214430032242621702</id><published>2013-12-12T19:01:00.000-08:00</published><updated>2013-12-12T19:01:00.575-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="snmp centos"/><title type='text'>snmp setup on CentOS </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: orange; font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Install the SNMP service on CentOS.
&lt;br /&gt;&lt;br /&gt;
yum install net-snmp
&lt;/span&gt;

&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;br /&gt;
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.org
&lt;/span&gt;

&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
vim /etc/snmp/snmpd.conf
&lt;br /&gt;&lt;br /&gt;
rocommunity public 192.168.x.x
&lt;/span&gt;

&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;br /&gt;
P.S. - Replace 192.168.x.x with the IP address of the server that you want to allow SNMP lookups from:
&lt;/span&gt;

&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;br /&gt;
/etc/init.d/snmpd start
&lt;/span&gt;

&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
chkconfig snmpd on
&lt;br /&gt;&lt;br /&gt;
In firewall open UDP port 161 to your SNMP lookup server.
&lt;/span&gt;

&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;br /&gt;
And Test - 
&lt;/span&gt;

&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
snmpwalk -v 2c -c public 192.168.x.x

                &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/4214430032242621702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/4214430032242621702'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2013/12/snmp-setup-on-centos.html' title='snmp setup on CentOS '/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-4836773889929298902</id><published>2013-12-04T20:28:00.001-08:00</published><updated>2013-12-04T20:28:59.474-08:00</updated><title type='text'>Git-Server in 2min with SCM-Manager</title><content type='html'>&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;344&quot; src=&quot;//www.youtube.com/embed/dntINkxOaEc&quot; width=&quot;459&quot;&gt;&lt;/iframe&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/4836773889929298902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/4836773889929298902'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2013/12/git-server-in-2min-with-scm-manager.html' title='Git-Server in 2min with SCM-Manager'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-1907832316850222664</id><published>2013-10-24T10:56:00.001-07:00</published><updated>2016-05-23T18:51:05.291-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NFS Active Passive using DRBD Heartbeat Cent OS 5"/><title type='text'>NFS Active Passive using DRBD Heartbeat Cent OS 5</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: orange; font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;NFS Active Passive using DRBD Heartbeat Cent OS 5&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;script src=&quot;http://affiliate.webnode.com/scripts/banner.php?a_aid=5315587ef0ae3&amp;amp;a_bid=39027a56&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;&lt;noscript&gt;&lt;h2&gt;
&lt;a href=&quot;http://www.webnode.com/&quot; title=&quot;Webnode&quot; rel=”nofollow” &gt;Webnode&lt;/a&gt;&lt;/h2&gt;
&lt;/noscript&gt;
&lt;/div&gt;
yum repos used - epel , rpmforge and&lt;br /&gt;
&lt;br /&gt;
wget -O /etc/yum.repos.d/pacemaker.repo http://clusterlabs.org/rpm/epel-5/clusterlabs.repo&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;VIP - 192.168.1.70&amp;nbsp; -- see in haresources file below (Heartbeat section)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log1]cat /etc/hosts&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;192.168.1.71&amp;nbsp;&amp;nbsp;&amp;nbsp; a-log1 &lt;br /&gt;192.168.1.72&amp;nbsp;&amp;nbsp;&amp;nbsp; a-log2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;DRBD setup&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log1 ~]# rpm -qa | grep drbd&lt;/span&gt;&lt;br /&gt;kmod-drbd83-8.3.15-3.el5.centos&lt;br /&gt;drbd83-8.3.15-2.el5.centos&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;config file&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log1 ~]# cat /etc/drbd.conf &lt;/span&gt;&lt;br /&gt;#&lt;br /&gt;# please have a a look at the example configuration file in&lt;br /&gt;# /usr/share/doc/drbd83/drbd.conf&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;include &quot;/etc/drbd.d/global_common.conf&quot;;&lt;br /&gt;include &quot;/etc/drbd.d/*.res&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@a-log1 ~]# cat /etc/drbd.d/res0.res &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;resource r0 {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; protocol C;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; startup { wfc-timeout 0; degr-wfc-timeout&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; disk { on-io-error detach; no-disk-barrier; no-disk-flushes; no-md-flushes; no-disk-drain; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; net {&amp;nbsp; cram-hmac-alg &quot;sha1&quot;; shared-secret &quot;nit3fl!rtZ&quot;; sndbuf-size 512k; rcvbuf-size 512k; max-epoch-size 8000; max-buffers 8000; unplug-watermark 16;}&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; syncer { rate 180M; al-extents 3389; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; device&amp;nbsp;&amp;nbsp;&amp;nbsp; /dev/drbd1;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; disk&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /dev/sdb1;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; meta-disk internal;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; on a-log1 {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; address&amp;nbsp;&amp;nbsp; 192.168.1.71:7789;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; on a-log2 {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; address&amp;nbsp;&amp;nbsp; 192.168.1.72:7789;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Let us prepare raw sdb on a-log1 and a-log2 servers i,e&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Now we have to create the metadata on both servers:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;a-log1# drbdadm create-md r0&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;a-log2#drbdadm create-md r0&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;and we can now start DRBD on both servers at the same time:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;[root@a-log1]# service drbd start&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Starting DRBD resources: [ d(main) s(main) n(main) ].&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;[root@a-log2]# service drbd start&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Starting DRBD resources: [ d(main) s(main) n(main) ].&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;You have two ways that I know to verify that DRBD is running properly:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# service drbd status&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# cat /proc/drbd&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;As you can see they say that it is connected but ro is 
Secondary/Secondary meaning that we haven’t told the system which one is
 the Primary server (master) that contains the block to be replicated. Once we tell the system who is the master it will start the synchronization.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Primary server -- Study drbd webpage - you can hardcode in config&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;a-log1 # drbdsetup /dev/drbd1 primary –o&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;The
 synchronization started and it will take a little while to be 
completed. Please wait until it is done and move to the next step.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt; ns:41941724 nr:0 dw:0 dr:41942388 al:0 bm:2560 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Now that our servers are in sync we can create format our /dev/drbd0 with our preferred file system. In my case I will use ext4.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;On primary a-log1:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;a-log1# mkfs.ext4 /dev/drbd1&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Configuring NFS exports for Heartbeat integration&lt;/span&gt;&lt;/h2&gt;
&lt;h2 style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Okay, now we have our DRBD up and 
running. Great!! Next step is to set up out NFS export and then install 
heartbeat so we can have an automatic fail over system.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Lets prepare our NFS first:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;On both servers:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# mount /dev/drbd1 /data&amp;nbsp;&amp;nbsp;&amp;nbsp; # We will mount it &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;# mkdir /data/main&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; # Create it to store data&amp;nbsp; &lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp;[root@a-log1 ~]# cat /etc/exports &lt;/span&gt;&lt;br /&gt;/data/main 192.168.1.0/255.255.255.0(rw,sync,no_root_squash,fsid=11280987)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp;[root@a-log1 ~]# ls -l /data/&lt;/span&gt;&lt;br /&gt;total 36&lt;br /&gt;drwx------&amp;nbsp; 2 root root 16384 Oct 23 13:09 lost+found&lt;br /&gt;drwxr-xr-x 14 root root 12288 Oct 23 21:55 main&lt;br /&gt;drwxr-xr-x&amp;nbsp; 5 root root&amp;nbsp; 4096 Oct 24 22:22 nfs&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;The above nfs came like this....&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log2 ~]# cat /etc/exports &lt;/span&gt;&lt;br /&gt;/data/main 192.168.1.0/255.255.255.0(rw,sync,no_root_squash,fsid=11280987)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;NFS stores some information about your NFS mounts at /var/lib/nfs and 
since those information will have to be mirrored we will have to move 
them to the DRBD device:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span style=&quot;background-color: orange;&quot;&gt;# mv /var/lib/nfs/ /data/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;this might generate an error such as:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;mv: cannot remove `/var/lib/nfs/rpc_pipefs/cache&#39;: Operation not permitted&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;mv: cannot remove `/var/lib/nfs/rpc_pipefs/nfsd4_cb&#39;: Operation not permitted&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;mv: cannot remove `/var/lib/nfs/rpc_pipefs/statd&#39;: Operation not permitted&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;mv: cannot remove `/var/lib/nfs/rpc_pipefs/portmap&#39;: Operation not permitted&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;mv: cannot remove `/var/lib/nfs/rpc_pipefs/nfs&#39;: Operation not permitted&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;mv: cannot remove `/var/lib/nfs/rpc_pipefs/mount&#39;: Operation not permitted&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;mv: cannot remove `/var/lib/nfs/rpc_pipefs/lockd&#39;: Operation not permitted&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;but do not worry about it because it will create the directories anyways.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# mv /var/lib/nfs /var/lib/nfsBackup&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Then symlink /var/lib/nfs to our /data directory:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# ln -s /data/nfs/ /var/lib/nfs&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# umount /data&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;On server2 only:&amp;nbsp; a-log2 &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# mv /var/lib/nfs/ /var/lib/nfsBackup&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# mkdir /data&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify; text-indent: 0.5in;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;# ln -s /data/nfs/ /var/lib/nfs&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify; text-indent: 0.5in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace; font-size: x-small;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;The symbolic link will be broken since the /dev/drbd1 is not mounted. This will work in case of NFS fail-over.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Heartbeat installation and configuration&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@a-log1 ~]# rpm -qa | grep heart&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;heartbeat-3.0.3-2.3.el5&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;heartbeat-libs-3.0.3-2.3.el5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log1 ~]# rpm -qa | grep pace&lt;/span&gt;&lt;br /&gt;pacemaker-1.0.12-1.el5.centos&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp;[root@a-log1 ha.d]# cat ha.cf&lt;/span&gt;&lt;br /&gt;debugfile /var/log/ha-debug&lt;br /&gt;logfile /var/log/ha-log&lt;br /&gt;logfacility local0&lt;br /&gt;keepalive 1&lt;br /&gt;warntime 5&lt;br /&gt;deadtime 10&lt;br /&gt;initdead 30&lt;br /&gt;bcast eth0&lt;br /&gt;ping 192.168.1.1&lt;br /&gt;node&amp;nbsp;&amp;nbsp;&amp;nbsp; a-log1&lt;br /&gt;node&amp;nbsp;&amp;nbsp;&amp;nbsp; a-log2&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log1 ha.d]# cat authkeys&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;auth 1&lt;br /&gt;1 sha1 n11f&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log1 ha.d]# cat haresources &lt;/span&gt;&lt;br /&gt;a-log1 IPaddr::192.168.1.70/24/eth0:0 drbddisk::r0 Filesystem::/dev/drbd1::/data::ext4 nfslock nfs&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Passive server a-log2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log2 ~]# cat /etc/ha.d/ha.cf &lt;/span&gt;&lt;br /&gt;debugfile /var/log/ha-debug&lt;br /&gt;logfile /var/log/ha-log&lt;br /&gt;logfacility local0&lt;br /&gt;keepalive 1&lt;br /&gt;warntime 5&lt;br /&gt;deadtime 10&lt;br /&gt;initdead 30&lt;br /&gt;bcast eth0&lt;br /&gt;ping 192.168.1.1&lt;br /&gt;node&amp;nbsp;&amp;nbsp;&amp;nbsp; a-log1&lt;br /&gt;node&amp;nbsp;&amp;nbsp;&amp;nbsp; a-log2&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log2 ha.d]# cat authkeys&amp;nbsp; &lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;auth 1&lt;br /&gt;
1 sha1 n11f&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;[root@a-log2 ~]# cat /etc/ha.d/haresources &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;a-log1 IPaddr::192.168.1.70/24/eth0:0 drbddisk::r0 Filesystem::/dev/drbd1::/data::ext4 nfslock nfs&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Final Important - Using nfs version 4&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;[root@a-log2 ~]# ps aux | grep nfs&lt;/span&gt;&lt;br /&gt;root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9975&amp;nbsp; 0.0&amp;nbsp; 0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&amp;lt;&amp;nbsp;&amp;nbsp; 23:05&amp;nbsp;&amp;nbsp; 0:00 [nfsd4]&lt;br /&gt;root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9976&amp;nbsp; 0.0&amp;nbsp; 0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&amp;nbsp;&amp;nbsp;&amp;nbsp; 23:05&amp;nbsp;&amp;nbsp; 0:00 [nfsd]&lt;br /&gt;root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9977&amp;nbsp; 0.0&amp;nbsp; 0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&amp;nbsp;&amp;nbsp;&amp;nbsp; 23:05&amp;nbsp;&amp;nbsp; 0:00 [nfsd]&lt;br /&gt;root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9978&amp;nbsp; 0.0&amp;nbsp; 0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&amp;nbsp;&amp;nbsp;&amp;nbsp; 23:05&amp;nbsp;&amp;nbsp; 0:00 [nfsd]&lt;br /&gt;root&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9979&amp;nbsp; 0.0&amp;nbsp; 0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&amp;nbsp;&amp;nbsp;&amp;nbsp; 23:05&amp;nbsp;&amp;nbsp; 0:00 [nfsd]&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Both servers - open # vim /etc/init.d/nfs&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #killproc nfsd -2&amp;nbsp; - comment and change to &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; killproc nfsd -9&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&amp;nbsp;Test&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;Primary a-log1&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;[root@a-log1 ~]# /etc/init.d/heartbeat stop&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Stopping High-Availability services:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&amp;nbsp; OK&amp;nbsp; ]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Check a-log2 server&amp;nbsp; -&amp;nbsp; VIP failover is successfull&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@a-log2 ~]# ip addr &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;1: lo: &lt;loopback&gt; mtu 16436 qdisc noqueue &lt;/loopback&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet 127.0.0.1/8 scope host lo&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet6 ::1/128 scope host &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valid_lft forever preferred_lft forever&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;2: eth0: &lt;broadcast&gt; mtu 1500 qdisc pfifo_fast qlen 1000&lt;/broadcast&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; link/ether 08:00:27:4a:db:2f brd ff:ff:ff:ff:ff:ff&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet 192.168.1.72/24 brd 192.168.1.255 scope global eth0&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt; inet 192.168.1.70/24 brd 192.168.1.255 scope global secondary eth0:0&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet6 fe80::a00:27ff:fe4a:db2f/64 scope link &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; valid_lft forever preferred_lft forever&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;3: sit0: &lt;noarp&gt; mtu 1480 qdisc noop &lt;/noarp&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; link/sit 0.0.0.0 brd 0.0.0.0&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;In Less than 10 seconds - NFS services will be failover from a-log1 to a-log2 server &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;Added a NFS client&amp;nbsp; a5-web server&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;[root@a5-web ~]# cat /etc/fstab&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;192.168.1.70:/data/main /mnt/storage nfs noatime,nodev 0 0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Perform continuous write&#39;s &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: orange; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;[root@a5-web ~]# for i in `seq 1 10000`;do echo &quot;hello how r u&quot; &amp;gt;&amp;gt; /mnt/storage/ashok/nf.txt;sleep 1;done&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Perform continuous read&#39;s&lt;/b&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp;[root@a5-web ~]# for i in `seq 1 10000`;do cat /mnt/storage/ashok/nf.txt | wc -l;sleep 2 ; done&lt;/span&gt;&lt;br style=&quot;background-color: orange;&quot; /&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;13175&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;In primary server - you can stop heartbeat&amp;nbsp; and watch what happens in a5-web nfs client.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;Later, start heartbeat and watch everything works as expected ;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Another test - Download a file. &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp;[root@a5-web ~]# wget --no-cookies&amp;nbsp; --no-check-certificate --header &quot;Cookie: gpw_e24=http%3A%2F%2Fedelivery.oracle.com&quot; &quot;http://download.oracle.com/otn-pub/java/jdk/6u38-b05/jdk-6u38-linux-i586.bin&quot;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;Try coping this file to &lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt; /mnt/storage/&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;While it is copying - stop heartbeat in primary server ...&amp;nbsp; it should continue to copy and finish!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange;&quot;&gt;Check md5sum of both files. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@a5-web ~]# md5sum /mnt/storage/ashok/jdk-6u38-linux-i586.bin &lt;/span&gt;&lt;br style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;5bae3dc304d32a7e3c50240eab154e24&amp;nbsp; /mnt/storage/ashok/jdk-6u38-linux-i586.bin&lt;/span&gt;&lt;br style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@a5-web ~]# md5sum jdk-6u38-linux-i586.bin &lt;/span&gt;&lt;br style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;5bae3dc304d32a7e3c50240eab154e24&amp;nbsp; jdk-6u38-linux-i586.bin&lt;/span&gt;&lt;br style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@a5-web ~]#&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Ofcourse - please watch magic happening in logs in both servers ;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: orange; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;[root@a-log1 ~]# tail -f /var/log/messages /var/log/ha-*&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: orange; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@a-log2 ~]# tail -f /var/log/messages /var/log/ha-*&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: orange; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Cool :) &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;reference -&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;http://www.linux-ha.org/wiki/Haresources &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp;http://www.gossamer-threads.com/lists/linuxha/dev/59880&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;http://www.linuxnix.com/2010/01/heartbeat-clustering.html&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/1907832316850222664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/1907832316850222664'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2013/10/nfs-active-passive-using-drbd-heartbeat.html' title='NFS Active Passive using DRBD Heartbeat Cent OS 5'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-3262514976145210042.post-2659319891679619526</id><published>2013-09-25T21:51:00.002-07:00</published><updated>2014-03-11T19:45:58.213-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ssh tunnel"/><title type='text'>ssh tunnel</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h4 style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;How do I view ntop stats without opening port 3000?&lt;/span&gt;&lt;/h4&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Setup simple tunnel using ssh, enter the following on your local UNIX / Linux desktop system:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #9fc5e8; font-size: small;&quot;&gt;&lt;code&gt;$ ssh -L 3000:localhost:3000 -N -f  user@server.yourcorp.com&lt;/code&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt; Now open browser and type the following command:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #9fc5e8; font-size: small;&quot;&gt;&lt;code&gt;http://localhost:3000/&lt;/code&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;a target=&quot;_blank&quot; href=&quot;http://www.shareasale.com/r.cfm?b=547763&amp;u=924030&amp;m=37723&amp;urllink=&amp;afftrack=&quot;&gt;&lt;img src=&quot;http://www.shareasale.com/image/37723/All-in-one-eCommerce_00.gif&quot; alt=&quot;Create your online store and start selling. Try it free at Weebly.com!&quot; border=&quot;0&quot;&gt;&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/2659319891679619526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3262514976145210042/posts/default/2659319891679619526'/><link rel='alternate' type='text/html' href='http://tune2linux.blogspot.com/2013/09/ssh-tunnel.html' title='ssh tunnel'/><author><name>aShok.......</name><uri>http://www.blogger.com/profile/02818126711699125756</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiI-NYRRoVQfJwnAYk85RfamXes0P5LndXKWvsYxi4lwz3IhfCTXfAYUhVV403cbwFKcazclTTrpa9eWR6Rko3vsEduAHRyF5ZpZFdrbyrKrE-x5nNwt9DXQ20zjrNLq4/s220/IMG_0064.jpg'/></author></entry></feed>