Parallels Cloud Storage Cheat Sheet

Scanning Dirty Container Filesystem
for vps in `vzlist -aHo ctid`; do find /vz/private/$vps/root.hdd/. -type f -name "*{*"; done
Merging Dirty Container Filesystem
prl_disk_tool merge --hdd /vz/private/3967014/root.hdd

To be continued 🙂

Advertisements
Posted in General | Leave a comment

Monitoring Physical Disk with SMART under LSI 2108

This is a very short post. You may find it useful or consider it as piece of crap post, it depends on how you interpret it. I post this for my personal note. So please don’t complain .. lol.
Basically this post is about how to monitor physical disk using SMART under hardware RAID LSI 2108. It may applies to other controller supported by SMART (list of supported controller can be found here)
Continue reading

Posted in Linux | Tagged , , , , | 1 Comment

Using dstat to Find per Process IO Consumption

As simple as :

dstat -d –top-io –top-bio

Dstat can be installed through yum. That’s all 🙂

Posted in General | Tagged | Leave a comment

Your Server Got Hacked? Get Linux Process Detail Information

Once you server compromised, hacker usually put some backdoor on your server and it might be a tricky process on how to find it. Standard “netstat -anlp” let you see if there’s any unusual listening port on your server. It will display port number, pid, and process name.

Thing is that they usually hiding the process into another regular process name to make it harder to find. Continue reading

Posted in CPANEL, Linux | Tagged | Leave a comment

Disable Crontab Mail Report

Crontab generated mail report can be such pain 😦
It will be generated on each scheduled cron time. Server filesystem performance will suffer from it.
This is how to disable crontab mail report :

  1. Add “>/dev/null 2>&1” or “&> /dev/null” at the end of cron line
  2. Nulling MAILTO variable. Run crontab -e and add ‘MAILTO=""' at the top of the file

Those steps above will save you a lot of time deleting huge number of mail files generated by cron report.

 

Posted in Linux | Tagged , , | Leave a comment

Install Flashcache on CloudLinux and Centos

Major issue on a hosting server which serve hundreds of website is remain the same: I/O bottleneck. My curiosity began when I received a newsletter from a VPS provider in US, they said they have added SSD as filesystem cache to their server fleet. I asked my Russian virtualization platform support fellow and he gave me link to Flashcache page.

Flashcache is a kernel module released by Facebook engineer back in April 2010 to speed up database I/O on a standard rotational drive with the speed of SSD. Since it works by caching filesystem blocks, so it can speed anything on the slow rotational disk.
We’ve already use RAID10 with SAS disk on all of our hosting servers, but still I/O bottleneck often happens. Continue reading

Posted in Linux | Tagged , , | 7 Comments

Install Munin Node on Virtuozzo Hardware Node

Default Virtuozzo monitoring is not detailed enough. I consider monitor all aspect of servers including CPU, IO, RAM, and many other aspects via Munin. Here’s how to Install Munin on a Virtuozzo Hardware Node :
Install EPEL Repo first :


rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Disable EPEL Repo by default :


nano /etc/yum.repos.d/epel

Change enabled=1 to enabled=1

Install Munin Node


yum --enablerepo=epel install munin-node

Next is to configure munin-node configuration :


nano /etc/munin/munin-node.conf

Put your Munin IP address after “allow” :


#allow ^127\.0\.0\.1$
allow ^192\.168\.1\.10$

Add Munin-node on startup :


chkconfig munin-node on

By default we need to configure disktats data update to work. Make a config file :


nano /etc/munin/plugin-conf.d/disktat

Paste :


[diskstats]
user root

Now start munin :


/etc/init.d/munin-node start

Posted in Virtuozzo | Tagged , , | Leave a comment