Archive for August, 2012

Evict MS Cluster node from the command line.

I have verified this in a Windows 2008 server cluster.

To evict a Microsoft cluster member from the command line, you need to first stop the Cluster Service.

net stop “Cluster Service”

Then, execute the following command to evict the node:
cluster clustername node nodename /evict

If really messed up and need to force the eviction, use:
cluster clustername node nodename /force

Android 4.1.1 (Jelly Bean) on a Samsung Galaxy Tab

Note: Definitely backup if you care about anything on your Tab. Also, do not do this if you are not prepared for the worse case scenario (bricking your device).

Note: This was done from a previous rooted installation of Ice Cream Sandwich on a T-Mobile Samsung Galaxy Tab. See http://jim-zimmerman.com/?p=763 for those instructions used.

Note: This is early stage stuff and an unofficial CyanogenMod10 release. One known issue I have verified is that the Camera application crashes when using the read camera. That is fine with me, since the camera is so poor that is hardly worth the effort of using.

The key is to have CWM Recovery installed, which I already had per the instructions used in the ICS documentation. Having CWM Recovery already installed meant that I just had to get the CyanogenMod10 ROM download and copied to the Galaxy Tab along with Google Apps.

CyanogenMod10 Samsung Galaxy Tab: cm-10-20120826-UNOFFICAL-p1-erezak.zip http://forum.xda-developers.com/showthread.php?t=1848555

Google App: http://goo.im/gapps/gapps-jb-20120726-signed.zip

Modem.bin downloads: http://devphone.org/files/gtab7/modems/

There any number ways to get the file to your device. I used my USB cable connected to my computer to mount the Tab as USB storage on my computer. I copied the files (cm-10-20120826-UNOFFICAL-p1-erezak.zip and gapps-jb-20120726-signed.zip) to the root directory of my Galaxy Tab.

Once copied, you need to boot in CWM Recovery.

Power off the device by holding the Power button and selecting the Power off option.

Once powered off, hold the Volume Up button and the Power button. This is a timing thing. I found if I hold the Voume Up and Power until I see the cyanogen(mod) screen, and then release them and push them again for a moment. However, I don’t think that is the key. I think it is just timing that I have not quite figured out yet. Nonetheless, you will know you are in when you get to the CWM Recovery menu.

First, choose wipe data/factory reset. (Hope you backed if you wanted to keep anything.)

Then, choose “install zip from sdcard.” Then, select “choose zip from sdcard” and browse to the cm-10-20120826-UNOFFICAL-p1-erezak.zip and install it.

Once that is complete, browse to the gapps-jb-20120726-signed.zip and install the Google Apps.

Select the “reboot the system now” from the menu to boot Jelly Bean.

So far, I have to say it isn’t bad. I hope to see more nightly builds with significant improvements. I have had a number of locks up and crashes. It seems a little slower than ICS, but I am looking forward to more improvements.

Update 1: The best place to find these UNOFFICIAL nightly builds is http://romsbuild.appspot.com/

Update 2: Now it is in the official p1 downloads: http://get.cm/?device=p1. This is experimental stuff right now, and it has been behaving as such. It seems that I usually have lock up when I am using GPS and downloading at the same time. Had a heck of time when I first tried using the Navigation this weekend.

Update 3: The first official build I used in Update 2 was marked experimental. The very next day I noticed that the ROM for the Galaxy Tab was now officially in the nightly builds. So, I gave it another try. I have been running 10-20120907-NIGHTLY-p1 for five days now. I cannot say how impressed I am with the stability of the build. I have not have to reboot once, or had one lock up. It has been great. The only thing I have noticed is that the Amazon AppStore is slow, but everything else has been decent.

Adding a new disk, volume group and volume in CentOS6 from the command line.

I needed to add more storage to my CentOS6 machine for my remote system backups. I decided to allocate a completely new volume group and volume to facilitate this need. Here are the steps I used to create the volume:

The new disk was added via vSphere, since this a VM. I determined the correct device file by looking to the dmesg output.

Initialize the whole disk using pvcreate.
# pvcreate /dev/sde

For partitions, use pvcreate /dev/sde[x].

Create a volume group
# vgcreate vg_vmlinux01_backup /dev/sde

To add multiple disks or partions, use vgcreate volume_group_name /dev/sdx /dev/sdy …

Activate the volume group:
# vgchange -a y vg_vmlinux01_backup

Create logical volume
This will allocate all remaining available space to the volume. You can use -L to specify a particular size. Not needed in my case.
# lvcreate -l 100%FREE -n lv_rmbackup vg_vmlinux01_backup

Write the filesystem with the desired label.
# mkfs -t ext4 -j -L /rmbackup /dev/vg_vmlinux01_backup/lv_rmbackup

If you need to create the filesystem with more than the default number of inodes:
# mkfs -t ext4 -j -N 20000000 -L /rmbackup /dev/vg_vmlinux01_backup/lv_rmbackup

Modify the /etc/fstab:
# vi /etc/fstab

LABEL=/rmbackup /rmbackup ext4 defaults 1 0

Mount it:
# mount /rmbackup

Change a MacOS icon.

Annoyed by a link to an application that has the wrong icon? This is one of those things that seems so obvious once you do it, but you just don’t think to try it. Note: when I say “select”, I mean just click on it once. Also, when I say “menu”, I mean the one at the very top of your screen (Apple menu?). Get Info is usually under the File option.

Find something with the icon you want and select it.

From the menu, click on Get Info.

Select the icon in the top left corner, and hit Command+C.

Select the link you want to change.

From the menu, click on Get Info.

Select the icon in the top left corner, and hit Command+V.

Remove dead Favorites in Finder (MacOS)

Picked up a nefty little trick to remove those pesky Favorites in Finder that are dead. The ones you click on and nothing happens. Well, to get them back, you need to restablish the connection to the share/folder and drag them to your Favorites. However, sometimes this does not fix the dead ones. To remove those, hold down option+command and drag the dead Favorite to the Trash.

Disabling Gatekeeper in MacOS Mountain Lion

Well, it didn’t take long. I needed to install opensource software that is not in App Store. Goodbye Gatekeeper. I definitely don’t this direction Apple is taking with MacOS.

Go to System Preferences and select Security & Privacy.

If locked, unlock to make changes and enter your password.

Under “Allow applications downloaded from:”, select Anywhere.

Click “Allow From Anywhere” to acknowledge that you could be making your computer less secure.

Lock Security & Privacy.

Limit bandwidth utilization using iptables.

I used the following in an attempt to the limit bandwidth utilization of the few IP address on my network. Used this on a CentOS6 firewall. I will see how it works over time. It seems to work fine, but I need to do more testing. I used the limit numbers I did based on the total amount of bandwidth available, and how much I wanted to limit it. I basically tested different settings to get the numbers right. Now, I just need to see how it impacts the usage. In other words, is it usable as a solution for a small network?

Create the chain:
iptables -N MYCHAIN

Send traffic I want to the chain:

iptables -I INPUT -s IPSorSUBNET -j MYCHAIN
iptables -I FORWARD -s IPSorSUBNET -j MYCHAIN

Configure the limit module to limit bandwidth in the chain:
iptables -A MYCHAIN -m limit –limit 5/second –limit-burst 10 -j ACCEPT

Drop any traffic that exceeds the limit:
iptables -A MYCHAIN -j DROP

Update: I found using a different limit-burst unusable. However, keeping the limit and the limit-burst equal seems to actually be working well thus far. I have found that having the limit and limit-burst equal to 10 per second on my 1.3Mb/s connection works well.

Return top

INFORMATION