How To Use vi as Default Editor and Viewer in Midnight Commander

Posted on in Categories File system, Howto, Linux, Shell scripting, Tips, UNIX last updated November 3, 2008

Midnight Commander (mc) is an user-friendly text-based file manager UI for Unix. Using mc, you can browse the filesystem easily and manipulate the files and directories quickly. You will not miss the standard command line prompt, which is also available within the mc itself. If you are new to mc, Midnight Commander (mc) Guide: Powerful Text based File Manager for Unix article will give you a quick jumpstart. In this article, let us review how to solve couple of common annoyance about viewing a file in mc.

RAID 5 vs RAID 10: Recommended RAID For Safety and Performance

Posted on in Categories File system, FreeBSD, Hardware, Linux, OpenBSD, RedHat/Fedora Linux, Storage, Suse Linux, UNIX, Windows server last updated October 22, 2008

A Redundant Array of Independent Drives (or Disks), also known as Redundant Array of Inexpensive Drives (or Disks) (RAID) is an term for data storage schemes that divide and/or replicate data among multiple hard drives. RAID can be designed to provide increased data reliability or increased I/O performance, though one goal may compromise the other. There are 10 RAID level. But which one is recommended for data safety and performance considering that hard drives are commodity priced?

Seagate Barracuda: 1.5TB Hard Drive Launched

Posted on in Categories Business, data center, Data recovery, File system, Hardware, Linux, Linux desktop, Storage, Sys admin, UNIX last updated October 21, 2008

Wow, this is a large size desktop hard disk for storing movies, tv shows, music / mp3s, and photos. You can also load multiple operating systems using vmware or other software for testing purpose. This hard disk comes with 5 year warranty and can transfer at 300MB/s. But, How reliable is the 1.5TB hard disk?

CentOS / Red Hat Enterprise Linux 5.2 Poor NFS Performance and Solution

Posted on in Categories Apache, CentOS, data center, File system, High performance computing, Howto, Linux, Linux distribution, Networking, package management, RedHat/Fedora Linux, Security Alert, Storage, Sys admin, Troubleshooting, Tuning last updated August 22, 2008

A few days ago I noticed that NFS performance between a web server node and NFS server went down by 50%. NFS was optimized and the only thing was updated Red Hat kernel v5.2. I also noticed same trend on CentOS 5.2 64 bit edition.

Red Hat / CentOS Linux 4: Setup Device Mapper Multipathing

Posted on in Categories CentOS, data center, fedora linux, File system, Hardware, High performance computing, Howto, kernel, Linux, Linux Scalability, Linux Virtualization, Networking, RedHat/Fedora Linux, Tips last updated July 6, 2008

Multipath I/O is a fault-tolerance and performance enhancement technique whereby there is more than one physical path between the CPU in a computer system and its mass storage devices through the buses, controllers, switches, and bridge devices connecting them.

A simple example would be a SCSI disk connected to two SCSI controllers on the same computer or a disk connected to two Fibre Channel ports. Should one controller, port or switch fail, the operating system can route I/O through the remaining controller transparently to the application, with no changes visible to the applications, other than perhaps incremental latency.

This is useful for:

  1. Dynamic load balancing
  2. Traffic shaping
  3. Automatic path management
  4. Dynamic reconfiguration

Linux device-mapper

In the Linux kernel, the device-mapper serves as a generic framework to map one block device onto another. It forms the foundation of LVM2 and EVMS, software RAIDs, dm-crypt disk encryption, and offers additional features such as file-system snapshots.

Device-mapper works by processing data passed in from a virtual block device, that it itself provides, and then passing the resultant data on to another block device.

How do I setup device-mapper multipathing in CentOS / RHEL 4 update 2 or above?

Open /etc/multipath.conf file, enter:
# vi /etc/multipath.conf
Make sure following line exists and commented out:

devnode_blacklist {
        devnode "*"
}

Make sure default_path_grouping_policy option in the defaults section set to failover. Here is my sample config:

defaults {
       multipath_tool  "/sbin/multipath -v0"
       udev_dir        /dev
       polling_interval 10
       default_selector        "round-robin 0"
       default_path_grouping_policy    failover
       default_getuid_callout  "/sbin/scsi_id -g -u -s /block/%n"
       default_prio_callout    "/bin/true"
       default_features        "0"
       rr_min_io              100
       failback                immediate
}

Save and close the file. Type the following command to load drivers:
# modprobe dm-multipath
# modprobe dm-round-robin

Start the service, enter:
# /etc/init.dmultipathd start
multipath is used to detect multiple paths to devices for fail-over or performance reasons and coalesces them:
# multipath -v2
Turn on service:
# /sbin/chkconfig multipathd on
Finally, create device maps from partition tables:
# kpartx -a /dev/mapper/mpath#
You need to use fdisk on the underlying disks such as /dev/sdc.

References:

  • man page kpartx,multipath, udev, dmsetup and hotplug

How To Measure Linux Filesystem I/O Performance With iozone

Posted on in Categories File system, High performance computing, Linux, Linux distribution, RedHat/Fedora Linux, Storage, Sys admin, Tips, UNIX last updated July 4, 2008

IOzone is a filesystem benchmark tool. The benchmark generates and measures a variety of file operations. Iozone has been ported to many systems and runs under many operating systems including Windows, UNIX, Linux and BSD. This article gives you a jumpstart on performing benchmark on filesystem using iozone a free Filesystem Benchmark utility under Linux.

Linux Configure Netconsole To Log Messages Over UDP Network

Posted on in Categories CentOS, Debian Linux, File system, FreeBSD, Gentoo Linux, GNU/Open source, Hardware, kernel, Linux, Linux distribution, Linux Log Management, Security, Sys admin, Tips, Troubleshooting, Ubuntu Linux last updated July 2, 2008

Linux netconsole kernel module allows dmesg output to be transmitted via the syslogd network. It is kernel-level network logging over udp allowing debugging of problem where disk logging fails and serial consoles are impractical. This is a step-by-step mini howto about netconsole configuration under Red Hat, CentOS, Fedora and Debian Linux.