Skip to main content

Posts

My first post at Medium.com

Today I write my first post at Medium.com. I realize that I have an account at this blogging platform for a long time when I was searching some topics ( I forgot the keywords ;P). Here is my medium blog siryanto.medium.com . So, now I have two blogs, this blog, and the medium blog 😌
Recent posts

Let's Start !

Bismillah. Mari mulai kembali ngeblog. Awalnya blog ini mau kutulis pake bahasa inggris saja, tapi sepertinya malah jadi jarang posting 😛ya sudah dwi bahasa saja. Well , lagi-lagi terinspirasi dari blogger millenial yang menurutku inspiring banget. Jarang lho, hari gini anak millenial ngeblog, secara socmed sudah masif banget. Enggak di-mention dulu deh orangnya, mungkin suatu hari.  Sebenernya postingan dia biasa aja sih, just an ordinary blog , tapi sering kali kujumpai satu dua kalimat yang mungkin baginya biasa, tapi cukup notice di otakku. Ok let's start.

BUG: system-config-firewall-tui won't start in Centos 6.6

As reported in BUG 1123919 in Red Hat Bugzilla, system-config-firewall-tui (text user interface to configure firewall in RH family) also won't start in Centos 6.6 (complaining about python module): # system-config-firewall-tui Traceback (most recent call last): File "/usr/bin/system-config-firewall-tui", line 29, in <module> import fw_tui File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module> import fw_nm ImportError: No module named fw_nm  And, here is easy way to fix this bug: Install system-config-firewall yum -y install system-config-firewall copy file started with fw_n from /usr/share/system-config-firewall to temporary location (we use our home dir) cp /usr/share/system-config-firewall/fw_n* ~ Remove system-config-firewall yum -y remove system-config-firewall Move file started with  fw_n back to /usr/share/system-config-firewall mv fw_n* /usr/share/system-config-firewall/

List file / directory and show the size

Easy way to list file and sub directory within a directory and show the size, we can use du command combined with ls command. For example, in above screenshoot we know that there are 3 sub directories and 1 file under /var/www. du command will show estimate disk space usage in current directory. Above screenshoot show that the size of /var/www is 5,4 GB. Option -s (summarize) will display only a total for each argument, -h will print the result in human readable format (5,4G instead of 5559480). Now, we combine two commands ( du and ls ): Now, we know that the size of temp subdir  is 5,3G

Shrink LVM without data loss

assume we have 3 logical volume: lv1 40GB, lv2 8GB, lv3 200GB in volume group called data . we want to resize lv3 become 180GB. here is the steps: booting to single mode enter init 1 (type: init 1) umount logical volume that you want to resize, e.g. umount /dev/data/lv3 check the filesystem: e2fsck -f /dev/data/lv3 resize the filesystem: resize2fs -p /dev/data/lv3 180G lvreduce -L -20G /dev/data/lv3 Ref: askubuntu.com

Ping to many host/node in one command

We can use "for loop" in interactive command, here is the example: we want to ping host/node from 10.100.11. 1 until 10.100.11. 10 : We use "i" as a variable, values of "i" are 1 until 10. In the ping option, we use "-c 1" this means that we send ping packet only one (default in linux is continues until stopped). here is the result: [syam@borneo03 ~]$ for i in {1..10}; do ping 10.100.11.$i -c 1; done PING 10.100.11.1 (10.100.11.1) 56(84) bytes of data. 64 bytes from 10.100.11.1: icmp_seq=1 ttl=64 time=1.58 ms --- 10.100.11.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 1ms rtt min/avg/max/mdev = 1.587/1.587/1.587/0.000 ms PING 10.100.11.2 (10.100.11.2) 56(84) bytes of data. 64 bytes from 10.100.11.2: icmp_seq=1 ttl=64 time=1.09 ms --- 10.100.11.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 1ms rtt min/avg/max/mdev = 1.093/1.093/1.093/0.000 ms PING 10.100