Malicious enjoyment derived from observing someone else’s misfortune
 

Tag Archives: sysadmin

Fill an LVM volume group completely with a single logical volume

I learned a cool LVM trick today – how to resize a logical volume to use a certain percentage of a volume group.  Since I just have one logical volume in the group, I did the following: [root@nyu ~]# lvextend -l +100%FREE /dev/diclonius/vector Extending logical volume vector to 7.28 TiB Logical volume vector successfully resized Thanks Redhat Documentation! In other news, I ran a performance test on my 5-drive RAID-5 using HD204UI drives from Samsung: [root@nyu tmp]# dd if=/dev/zero of=foo [...]

How to set the RTC max_user_freq in newer kernels

I found out today how to set the real time clock max frequencies in Ubuntu since they removed the possibility to do it from sysutil.conf from newer kernels. Add the following to your /etc/rc.local or another startup script: echo 2048 >/sys/class/rtc/rtc0/max_user_freq echo 2048 >/proc/sys/dev/hpet/max-user-freq Reboot, and you should get better performance from things like mplayer.

0install: A package manager for the lusers

Zeroinstall is my new friend. It’s a package manager that’s decentralized, and can be used on machines where users need applications, but don’t know how to compile (or are unwilling to). Installing applications happens in the home directory, and once a program is run once, it is stored in the home directory for later use. All packages can be signed with GPG keys, and the packaging GUI is amazingly awesome. Check out my 0install repository. You can run things like [...]

GNU Screen’s hardstatus

I use GNU Screen. A lot. I found an article linked from DIgg today that showed me how to use a setting called hardstatus to set the little bar at the bottom to my liking. I decided to mess around with it a bit, and I ended up with this: It shows my hostname, IP, uptime, screen window number and name, date and time, and load averages. Pretty cool, huh? This is how you do it: First, create a .screenrc [...]

Fixing .Xdefaults in Ubuntu

I have been having a problem getting .Xdefaults to be loaded in X. This is a major issue for me since I like my fonts to be a certain size in aterm, but I don’t want to hack up my runline in fluxbox to reflect all the custom settings. Therefore, I have all my settings defined in the .Xdefaults file. So, tonight, after I upgraded to Edgy Eft, I decided that this needed to be fixed. After a quick google [...]

Do you have some Chage?

This makes it so the user has to change their password on login: # chage -M 1 <user> # chage -d 1 <user> Make sure to set -M back to normal afterwards # chage -M 99999 <user> This makes it so easy. Too bad it’s named like saying ”’change”’ with a cold…

Easy Global Change of CAPS to Ctrl in X

Thanks to this page, I found what I was looking for: Option “XkbOptions” “ctrl:nocaps”

Magical SVN Remove

Have you ever wanted to batch remove some Subversion files? Try this on for size: svn rm `svn stat | grep ! | sed -e ‘s/^\!\s\+//;s/$/ /’ | tr -d ‘\n’` That will remove all the entries from svn stat that start with !. Very handy. Took a few minutes to write (sed wouldn’t get rid of my newline, so I used tr …), but it’s worth it.

Ubuntu Ruby Woes Crushed

I installed Ubuntu Dapper Drake on the ole’ laptop today, and needed ruby, but it wouldn’t compile correctly. Luckily, the internet saved me again. Here’s how to compile it without getting errors on Gem Setup