So I received this 500 internal Server Error when trying to save my long posts on my WordPress 2.6.2. In my case I have 1and1.com hosting and at first impressions, the problem appeared to be with MySQL and the time it took to save a post. On top of this, my host doesn't allow access to the error_log files (HTTPD Error Log files) and only to the Access Log files (access_log) so I can't really see what the real issue is. Here's how I solved the problem in my case:
Read the rest of this entry »
April 6th, 2012 | Posted in Web | No Comments
Overview:
HTPC / Home Backup: MDADM, RAID6, LVM, XFS, CIFS and NFS
In this post we'll take a look at setting up a 4TB storage, HTPC, and active backup using basic components that can be bought from the local PC store and freely available software. Here I set out to try and consolidate my storage to something central running RHEL Linux (Or a clone, such as the Scientific Linux that's freely available) that could also serve as a makeshift entertainment center in replacement of my current one. In other words, upgrade my HTPC and turn it into an HTPC+B, if you will, with the following statistics:
- 4TB usable storage (6TB HDD - 2 HDD for RAID6).
- XFS Filesystem
- 317MB/s WRITES.
- 300 MB/s READS.
- A Wireless N card + 1GIG ETH in a bonding configuration. (Redundancy in case of failure)
- Scientific Linux 6.1 (RHEL 6.1).
Read the rest of this entry »
April 2nd, 2012 | Posted in NIX Posts, Network, Perl, Web | 3 Comments
Here we'll look at obtaining persistent naming rules for SATA devices so we can reference these hardware devices through a constant name. This is particularly useful when one needs a persistent name to a device through unique serial and model numbers that remains the same throughout reboots / restarts and shutdowns.
In this post, we'll create six unique naming rules to uniquely identify those HDD we'll need for our RAID6 HTPC+B configuration. Amongst other things, the rules would help to uniquely identify those devices that belong to the RAID6 array and those that don't to help prevent human error and remove confusion.
Read the rest of this entry »
April 1st, 2012 | Posted in NIX Posts | 1 Comment
PROBLEM
You've got a set of devices but their names, such as NIC / Network card names keep changing on each reboot or reconnect. This is a continuation of Linux Networking: device eth0 does not seem to be present, delaying initialization. where we resolved a similar issue due to naming but here we'll make it persistent using this simple naming system for Linux. At the end of this very short post, we'll have a constant name for our physical device on reboots. In particular, it is to make the line ip link set dev wlan1 name wlan0 permanent across reboots.
Read the rest of this entry »
February 27th, 2012 | Posted in NIX Posts | 6 Comments
This is a quick and dirty AWK tutorial demonstrating the most common usages and features that one can use on a daily basis. Three variants: AWK standalone, integrated into ksh, and one-liner are provided.
On my system, AWK pointed to GAWK. GAWK has an expanded command set but here we will only focus on specific to AWK.
AWK is a powerful language rarely used beyond printing a few columns but often can stack up better in performance, then other scripting languages. AWK can also make for a relatively easy learn due to it's small set of functions. This is similar to C without the complexities of such things as pointers:
Read the rest of this entry »
January 28th, 2012 | Posted in NIX Posts | No Comments
Just happened to have forgotten a password for one of my user accounts on my workstation and remembered a handy little thing one can do to reset a pass.
If you have root access, one can simply regenerate the MD5 hash with:
Read the rest of this entry »
January 14th, 2012 | Posted in NIX Posts | No Comments
In this post we'll configure network booting through PXE. PXE stands for Preboot eXecution Environment and has been available for Network Devices (or NIC's) for some time. Such a network boot setup has many uses in particular in OS setup and deployment. In this post I'll introduce the steps to quickly set one up. The only thing required is some patience, persistance and a second NIC (NIC also known as Network or Network Interface Card) card on the second PXE server together with a network cable. Some of the benefits are:
- The target environment where the OS will be installed does not need any external storage devices such as USB or CD/DVD drives.
- There is no CD burning. It is all software based.
- Most motherboards and computers support PXE today.
- You are not limited to a single file size limit in place on some USB devices.
- There's no OS size restrictions. The amount of data available to the boot software is only limited by the amount of free hard disk space on the PXE server.
These are just a few advantages that PXE has and the cost of setup, as we will see, is only time and a little patience.
Read the rest of this entry »
September 26th, 2011 | Posted in NIX Posts | 5 Comments
So you've lost the password to the root account. Worst, you've had a boot password and it was the same. Here are some instructions on how to get back into your system:
Read the rest of this entry »
September 25th, 2011 | Posted in NIX Posts | No Comments
This post is designed as a blind test, meaning its sole purpose is for testing and learning LVM functionality. In this process we will work with an existing LVM that contains live data to grow, shrink and move it's contents around. Before we do anything, a disclaimer is in order:
DISCLAIMER: Aside from the disclaimer already present on the site at the bottom, I do not recommend you to follow these instructions. The exception exists where you wish to learn and test functionality on non PRODUCTION environments (ie meaning DEVELOPMENT or QUALITY ACCEPTANCE testing environments). Using these steps puts you at risk of loosing your data. BACKUP YOUR DATA BEFORE PROCEEDING. By reading the below and following any steps, you are agreeing to undertake any and all risks associated with the resulting consequences of following the steps on this site and post below.
Having said that, let's begin. First, we'll begin by getting some information and marking our LVM for change. The goal here is to eventually resize this partition that spans the entire 1.5TB to something much smaller (around 200GB) that we can copy to a smaller part of the hard drive to free space for a new installation and VG. NOTE: Only one hard drive will be used here to do this with:
Read the rest of this entry »
September 25th, 2011 | Posted in NIX Posts | No Comments
It may become necessary to recover or rebuild an LVM in case either a backup /etc/lvm/backup/<VOLGROUP> is not available or becomes lost or other conditions arise causing loss of system volume data. What might otherwise appear destroyed, deleted or inaccessible, LVM comes with a few backup options in case of disaster. Here are the recovery steps I took to recover previously lost data without either a backup and using only a few open source tools:
Read the rest of this entry »
September 19th, 2011 | Posted in NIX Posts | 2 Comments