Archive for January, 2011

h1

Linux server maintenance

2011-01-09

For a server that was put in place mid-2007 and remained in service with only three or four reboots until being taken offline near the end of 2010, it has performed quite well. I was asked to perform some maintenance tasks on it, with the expectation that it will be reactivated and placed back online within the next month or so. Here are a few retrospective thoughts that arose during the routine:

The hardware was a solid choice. I had already used the chosen motherboard and identical RAM sticks in my own desktop machine and verified their usability and reliability. When I upgraded my desktop’s RAM to 4 GB, I simply bought new sticks instead of maxing out the available slots, since by that point, the original sticks were no longer sold. This left me with a spare set which I installed in the server as a last step. The hard drives were also a good decision, even if they do tend to run hotter than my own comfort level (hence the heat-sinks and fans).

On to software. Arch Linux is still my OS of choice for servers, mainly because I find it quick and easy to deploy. Plus, if I use the same OS everywhere, I can share configuration files and even binaries more readily, as well as reduce my own administrative learning curve. However, there were a few things that I did differently with this system. I decided upon a custom kernel, which turned out to be a headache when it comes to upgrades. Arch Linux likes to be up-to-date before installing any new software, since it is a rolling distribution and two months down the line dependencies may differ. Since it was a system intended to have guaranteed access at all hours, and wanting to reduce maintenance costs, I had decided not to upgrade the software on the operating system. In practice, this was a good thing, but when it came time to do maintenance more recently, it was a bit of a headache.

Security is another area in which this server performed mightily. Although it may have not been intentional, any and all passwords that I had set on my account (and on the root account) had long since been forgotten. Only the .htpasswd and userland passwords were ones that anybody in the company could recall. This required me to reset the passwords. In the process, I learned that it’s important to reassemble the array before changing passwords; otherwise the /etc/shadow file gets jumbled. Changing the data on each drive individually is not a valid solution! After rebooting several times and performing more than one contiguity check using fsck, I finally managed to set the passwords to more familiar strings. Having a separate partition with a copy of the root filesystem’s /etc folder was also an important feature that was designed-in. It made configuration using the install CD (using mdassemble) much quicker.

The kernel remaining at version 2.6.23 became problematic after running a full system upgrade. Since I had GRUB configured to only boot my custom kernel, and since my custom kernel would not be recompiled by the automatic system update using pacman, I was left with no choice but to burn an installer CD to get the system back up and running. The process taught me how to reinstall all packages in the system (just in case glibc or some other major component got zapped), and revealed to me some of the nuances that took place over the years of Arch Linux’s evolution, such as the way RAID is handled at boot-time by an initrd. I also learned that the operating system itself can stripe swap data across several physical disks, reducing the need for RAID configuration on the swap partitions. This of course means that instead of one mirrored 0.5 GB partition, the OS can now stripe over 1.5 GB on three separate disks. In principle, it should be way more efficient.

All said and done, the server is ready to be redeployed; software has been fully upgraded, and it even has more memory than before.

h1

Image aspect ratios

2011-01-06

It’s 2011, and digital broadcast TV is now the norm. Not being the proud owner of a shiny new LCD HDTV, I still watch cable received through NTSC channels sent via coaxial cable from my ISP and cable provider. One thing that annoys me is the lack of attention to detail that often surfaces in broadcast media, specifically when the aspect ratio of a source image is discarded and rendered improperly on a screen.

Most people who owned TV sets before the digital transition watched their programs in the standard NTSC-prescribed 4:3 “almost square” format. Of course, most moves are shot with different aspect ratio, such as 16:9 and end up being reformatted to fit your screen. The proper way to go about this is either to letter-box it (“black bars”) or to crop off the sides (“zoom”). I’m more a fan of letter-boxing personally, but in either case, the aspect ratio was preserved so that peoples’ faces appear with the same roundness that they would in real life.

Most recently I’ve noticed some networks’ commercials have been distorted and stretched, as if the person who performed the editing and final rendering of the video didn’t bother to consider how it would appear on standard televisions. Of course, it could be something the cable company is doing wrong, but having worked in broadcast, it’s my opinion that the broadcaster should not be responsible for poorly formatted material – the buck stops at the producer who is ultimately responsible for transmitting the material to the broadcast site and making sure that it looks and sound correct on-air.

Stretching or compressing an image originally designed for 16:9 to fit into a 4:3 box literally makes people look like pin-heads. In audio terms, it’s the equivalent of playing playing a 33 RPM vinyl record in 45 RPM mode. Sure, it sounds “cool” but you’d hardly want to listen for pleasure and relaxation that way.

Another prime example of this lack of attention to detail is currently evidenced on the Musician’s Friend website. When clicking on an image to view the enlarged version, at first it comes up normally, but when clicking on a next or previous image, it comes up distorted. I’ve written to them about this in hopes of going back to my normal browsing habits when shopping for gear. I’ll post an update when I get a response.

Follow

Get every new post delivered to your Inbox.