Category: Linux administration

Tips and trick for Linux administraion

Misaligned partitions (and filesystems) cause increased i/o.

See eg 3Par doc: http://h20195.www2.hp.com/V2/GetPDF.aspx%2F4AA4-4519ENW.pdf “All RAID devices, including HP 3PAR arrays, incur the overhead of calculating new parity after a write. A single write that spans two RAID sets will require two parity calculations. Aligning Linux disk partitions to…

How to get CORRECT memory usage for Linux

One of the most common mistakes made by Linux users, is to run free (Mem: line) or sar to get memory utilization.   The memory used fields include the space used by the OS to cache files and directory info cace,…

Lunix Core Files

To enable core file generation.. Configure core files to use the PID as a extension.   Set “kernel.core_uses_pid = 1” in /etc/sysctl.conf  and run “/sbin/sysctl -p /etc/sysctl.conf: or to add it temporarily run “/sbin/sysctl -w kernel.core_uses_pid=1” to change the running kernel.  …

How to Reduce/Shrink a ext[234] File System

In order to shrink a file system, the file system must be unmounted.   For example with a LVM Logical volume called testfilesystem in volume group testVG mount on  /opt/testfilesystem  ( /dev/testVG-testfilesystem or /dev/mapper/testVG-testfilesystem) that we want to make 162 GB in sise.   First…

Listing Full RPM Package Name

To get a full list RPM name, like the RPM file name use the Query Format option (–qf or –queryformat). This is useful in comparing 2 systems, seeing 32 bit and 64 bit packages and finding the RPMs. This lists…

Increasing Linux Ring Buffer Size

This doesn’t work on all drivers, but on the bnx2x and other it does.   In particular, if you are seeing packet drops this can help.   Use ethtool –g <interface> to see the buffer settings. # ethtool -g eth0 Ring…