Archive

Posts Tagged ‘Linux’

How-To disable IPv6 on RHEL6 / CentOS 6 / etc

March 14th, 2013 14 comments

Proper way of disabling IPv6 subsytem in RedHat Linux 6 / CentOS 6 (dont unload modules or so)

in /etc/sysctl.conf  :  net.ipv6.conf.all.disable_ipv6 = 1

in /etc/sysconfig/network  : NETWORKING_IPV6=no

in /etc/sysconfig/network-scripts/ifcfg-eth0 : IPV6INIT=”no”

disable iptables6 – chkconfig –level 345 ip6tables off

reboot

done 😉

PS: if you have more eth interfaces, use brain 😉

Categories: Linux Tags: ,

Shrink Thick Linux virtual disk (vmdk) in ESX

March 11th, 2013 No comments

I have thick provisioned server, and I need move it and shrink it. As Thick option provides flat file of full size , even if OS is few GB, I have full size vmdk file ;( which is harder to copy around.  Thin provisioned vmdk disk is possible shrink via ESX shell command ( vmkfstools –punchzero *.vmdk) but what to do if disk is in Thick state ? Its possible, but little bit more complicated.

Excellent post to explain in depth dafuq – http://blogs.vmware.com/vsphere/2012/03/thin-provisioning-whats-the-scoop.html

Read more…

Categories: Linux Tags: , , ,

Linux “find” cheat sheet

April 16th, 2012 No comments

Some collection on various find tasks I experienced from time to time. Find is powerfull tool, often overlooked, but its lifesaver. Enjoy, if you have something more, please, share in comments.

Read more…

Categories: Linux Tags: , , ,

How create and use pipes in Linux

April 22nd, 2010 No comments

Create a named pipe using mkfifo: mkfifo -p /var/adm/syslog.pipe

Make syslog.conf to points to this file (for example /var/adm/syslog.pipe)

*.info                        |/var/adm/syslog.pipe

Relaunch syslogd:
  kill -HUP `cat /var/run/syslogd.pid`

Create processing script that read the pipe. It should run constantly and be launched from RC scripts

#!/bin/ksh
cat /var/adm/syslog.pipe | grep -v “denied update from” | while read LINE
do
  echo $LINE >>/var/adm/denied_update.log

Categories: Linux Tags: ,