True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten

Wolverine

Archive for the ‘linux’ Category

vnc to linux vncserver

Wednesday, October 26th, 2005

Figured out how to VNC from my laptop to my linux server. Forwarded X conections were too slow so I gave VNC a try. It was harder to set up than I expected. I googled around and after many tries found a post online that worked.

Here’s the stiuation. I need to connect to my lab computer from my laptop at home. The lab computer is behind UK’s firewall. Run vncserver on the lab computer–that’s the easy part. It runs on display :1 by default:

elegans.uky.edu> vncserver

Turns out I need to enable port forwarding on the lab computer’s sshd:
As root add this line to /etc/ssh/sshd_config

AllowTcpForwarding yes

then restart sshd:
/etc/rc.d/init.d/sshd restart

Then forward the ssh connection. On my laptop I run this command from a terminal:

ssh -L 5901:localhost:5901 me@elegans.uky.edu

And run the VNC client. My laptop runs OS X, so I downloaded “Chicken of the VNC. By default it uses port 5900, enter display 1 (so it goes to 5900+1 = 5901) and the host is localhost. Starts up and runs fast!

Install new hard drives with Software RAID 1

Thursday, June 16th, 2005

This turned out to be pretty straightforward once I got the order of steps right. Don’t make the filesystems before the mkraid, you will end up with “bad superblock” errors later.

I added two 400Gb SATA hard drives in RAID1 to an existing system. I already had one pair of drives in RAID 1, the new drives form a new RAID array.

1) Phyiscally add the drives.

2) Run fdisk, make one partition on each drive.
fdisk /dev/hdc
fdisk /dev/hdd

3) Edit /etc/raidtab, add section for /dev/md1:
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
chunk-size 256
persistent-superblock 1
nr-spare-disks 0
device /dev/sdc1
raid-disk 0
device /dev/sdd1
raid-disk 1

4) Make RAID, needed ‘force’ flag:
mkraid -f /dev/md1
mkraid -R /dev/md1

5) Make filesystems:
mke2fs -j /dev/sdc1
mke2fs -j /dev/sdd1

This takes 10 min or so.

6) Add new filesystem to /etc/fstab for automounting:
/dev/md1 /home ext3 defaults 1 2

And now the keychain drive gets pushed from sdc to sde:
/udev/sde1 /mnt/key vfat owner,kudzu 0 0

7) Mount new RAID:
mkdir /data
mount /data

Useful RAID commands:
more /proc/mdstat
mdadm -D /dev/md1

Useful guide:
Software-RAID-HOWTO

Kernel upgrade

Thursday, April 21st, 2005

Upgraded the kernel on my linux server and it was the easiest thing ever:

yum upgrade kernel-smp

It updated grub and everything! Color me surprised. Linux is getting *so* easy to use.