A slow updating blog I write for no particular reason.

Discovering New Disks Without Rebooting

This is going to be a quick post. If you just added a disk to an online Linux node and you don’t have the luxury of rebooting so the system and discover the new disk you can simply run the following:

echo "- - -" > /sys/class/scsi_host/host#/scan

Replace host# with what appears in /sys/class/scsi_host/. Kicking off an fdisk -l will show your new unformatted disk.

I tend to use this when I need to grow an partition created under a logical volume on a Linux VM.

Online resize of Raid 6 post reshape

Previously I described the process I followed to move my Raid 5 to a newer version of CentOS as well as a newer version of MDADM. I outlined how I recovered the raid and LVM sitting on top of it and showed how to convert it to a raid 6. Now I am going to lay out the steps I took to grow the Logical Volume and resize the filesystem once the raid had completed the reshape process.

I started by resizing the physical volume:
# pvresize /dev/md127
Physical volume "/dev/md127" changed
1 physical volume(s) resized / 0 physical volume(s) not resized

I then verified that I could see Free Extents:
# pvdisplay
--- Physical volume ---
PV Name /dev/md127
VG Name lvm_data
PV Size 4.55 TiB / not usable 3.44 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1192333
Free PE 238466
Allocated PE 953867
PV UUID VT8iLZ-3J04-mT0Z-S2dd-1lxS-vl5X-rcMlLo

Read the rest of this entry »

MDADM Raid5 + LVM migration to Centos 6.3

So time had come to do something about my raid.  I had been limping along for sometime now nursing 100GB free on my 4TB software raid and had purchased two additional WD 1TB Caviar Black drives bringing my device count up to 7 physical disks (the two new drives currently added as hot-spares).  It then dawned on me that maybe now would be a good time to migrate my raid level to raid6.  But as with most things in life, things eventually hit a speed bump.  Seems my trusty do-it-all storage server was unable to change the raid level of /dev/md0 due to a limitation between kernel and mdadm versions I was running on a dated Centos 5.8 install.  I decided to do several things.

  1. Move to Centos 6.3
  2. Run a newer version of MDADM (3.0+)
  3. Migrate current raid and LVM config to new install
  4. Not loose years of data.

Read the rest of this entry »

And Gibbling Sed “/s *Let their be non-standard ssh/Ports/”

We are working to automate as much as we can in regards to environment provisioning so naturally we began looking at some automation tools like Pupppy and Chef.  We hope to assign all the little things that need to be done to a fresh install of CentOS before we can give it to a team of devs.  One of these things is uncommenting Port 22 from /etc/ssh/sshd_config and configuring a nonstandard port.  With Chef I can have a recipe that can simply run a command or it can pulldown and install packages, modify attributes, generate users and a hell of alot more.  Depending on your Ruby knowledge you can automate almost anything.  I simply wanted to run a command to replace #Port 22 with Port 2202. This is where sed comes into play. I can simply have a recipe run sed -i.backup "s/^ *.*Port .*/Port 2202/" /etc/ssh/sshd_config and I’m that much closer to simply kicking off a knife bootstrap and watching all the little mundane things that need to be done to a minty fresh install.

Dwarf Fortress 64bit hell

OK, real quick. I just wanted to get this up before I got sidetracked with Ogres or fucking Werewolves. If you are fighting with Dwarf fortress on 64bit Linux (native linux version) don’t forget to load your 32bit video libs (xorg-x11-drv-nvidia-libs.i586 for nvidia. Be sure to add RPMFusion repo first).  This should cut down on some of the issues.  Keep in mind,  you will still need to install all the other 32bit libs required.  So have fun with that.

Firefox… The Betrayal!

I had been battling a frustrating problem with my install of firefox on my HP nx7400 (Ubuntu 9.04). I have had Ubuntu on this laptop since 7.04 Beta and have had very few issues post upgrade. The upgrade to 9.04 was as easy as the others and I had no issues post upgrade this time. Shortly after I decided to get my feet wet with WPA pass-phrase cracking. I had installed SQLite-3.0.4 via an .lzm so I could compile aircrack-ng with airolib-ng. Everything worked fine until a recent update on the 24th of July. It seems something had broken my firefox and left me with an annoying problem that would haunt me for the rest of my life.

Read the rest of this entry »

MySQL vs Root

I’m an easy going guy, except for the uncontrollable rage I work everyday to suppress.  But I was extremely upset when I installed mysql on a slave server in my replication testbed and found I could not log into the mysql console.

[root@slave ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

Luckily I found help on the MySQL forums.  Here are the steps I took to resolve this issue.

Read the rest of this entry »

Samba security and AD

I finally decided to get my two Linux servers integrated with my Windows domain. It was pretty straight forward if you follow the tutorial found here. I had to add an additional line of code to /etc/pam.d/login to have domain user home folders properly created when logging in via SSH. Edit the login file in /etc/pam.d/ if you recieve the “could not chdir to ‘homefolder'” when you login with a domain account via SSH. Place the line below before any other session entries. Thanks go out to rjerrido over at for helping me out with that one.

session    required skel=/etc/skel/ umask=0022

Once you have everything setup and working fine and you can list domain groups and user accounts with:

> wbinfo -u

> wbinfo -g

Read the rest of this entry »

The Battle Against MythTV…

I spent a good portion of this weekend fighting MythTV. I have encountered many obstructions on the back roads of DVR supremacy. I am able to display live TV on my 27″ LCD HDTV but it is significantly smaller that the resolution on my TV. I have altered the MythTV GUI settings to accommodate the resolution of my TV but the image size never really changes. I will be investigating the capture card settings when I get home.

Read the rest of this entry »


Construction on the box that shall become GibbTV has begun. It is a HP PC854n Media Center PC that I’m stripping down and throwing in this box to make everything pretty. Then since it came with a cheap no-name brand tuner card that isn’t supported by MythTV (the DVR software that I will be running on this box), I am adding a new Hauppauge PVR-150 MCE Tuner Card. The I thought to myself “Hey! This new DVR box is gonna look pretty snazzy. Why do I want to disturb the overall coolness of it by using it with a shitty 13″ Samsung TV?” So I went ahead and purchased a TV worthy of becoming the forefront of GibbTV, a 27″ LCD HDTV from Olevia.

Read the rest of this entry »