Updating path information for TSM

As I did some switching today (between the new lin_tape version by IBM and our own lin_tape version), I ended up writing those lines a dozen times. Here is (just for me, if you don’t care .. skip ahead) on how to generate a list of commands: 1 2 3 4 5 6 for i in $( seq -w 1 32 ); do token="${i/0/}" path_prefix="/dev/lt/IBMtape12245775" echo "DELETE PATH TSM1 VTL1_DR$i SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL1" echo "DEFINE PATH TSM1 VTL1_DR$i SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=VTL1 DEVICE=$path_prefix$((token+11))A1" done which should get you a list like this: ...

January 28, 2009 · 1 min · 112 words · christian

Sidenote: Amount of Slots per Virtual Tape Library

Well, I just stumbled about this again (and I don’t know right now whether or not this is documented inside a RedBook or not) today, so I thought maybe I’m gonna write it down. Slot-Amount Property of a Virtual Tape Library Please keep in mind, when creating the virtual library to think hard about the amount of slots you might need. It ain’t that bad, you just can’t decrease the amount anymore. So if you think about creating 50 different virtual tape libraries with 500 slots each on your TS7530, think again. The current software level only supports 25.000 slots on a global level.

January 27, 2009 · 1 min · 104 words · christian

Trusted vendors in SUSE Linux Enteprise 10

The other day I had a closer look at the zypper logs (well, I was digging for a time-history of installed packages). First … damn does zypper produce a lot of logs on a " productive" (or rather on a maintained - as in up-to-date) system. But glazing over the logs, I found out something new about zypper. It actually has an internal list, which only purpose is to identify a trusted vendor … ...

January 19, 2009 · 1 min · 145 words · christian

Cleaning up /tmp

Well, I just looked into /tmp on one of our boxes and noticed that SSHd left behind some (try 400) directories .. Now, I could use a simple rm -rf /tmp/ssh-*, but I didn’t want to kill my current agent forward file. After looking at the man-page of find, I stumbled about -mtime. And that seems to work out quite well. 1 find /tmp -name "ssh-*" -mtime +5 | xargs rm -rf

January 18, 2009 · 1 min · 72 words · christian

VI Client: Changing the language from the system default

Well, as I am in fact running a german Windows XP, the VI Client started displaying all menus and operations in German when I updated to 2.5u2. Normally, I wouldn’t have much of a problem with that, but recently it started to annoy me, since the translation is a bit off from the real meaning of much of the operations. So today, in the morning I started looking for ways to revert the VI Client back to displaying everything in English. And guess what. There’s no way to switch the language from the VI Client itself. There’s just a workaround. ...

January 14, 2009 · 1 min · 138 words · christian

Removing newlines (n) with sed

Today I had to search again on how to remove newline special characters with sed. Thanks to Kamil over at linux.dsplabs.com.au, I found it again rather quickly. Now, this is just for my own safekeeping, so I don’t end up googling for it again … 🤷 1 echo -e "Line containing nnewlines!" | sed ':a;N;$!ba;s/n//g'

June 24, 2008 · 1 min · 55 words · christian

Retiring people

I’m not sure whether or not I blogged about this before, but here it is just for me to actually remember what, in which order I need to do. If you got the list in form of a csv file, simply do the following: 1 2 3 4 wget -q http://tinyurl.com/4atkz7 -O - | grep "(" | cut -d'(' -f2 | cut -d')' -f1 | awk '{ print tolower($1) }' > retirements for developer in $( < retirements ); do retire.py --metadata $developer /cvs/gentoo-x86/ | diffstat > ~/metadata.$developer done That’ll give you a detailed list of which metadata.xml need to be changed.

May 28, 2008 · 1 min · 102 words · christian

Rescuing a rebooting machine that's hanging

One of my co-worker approached me today with a weird problem. Yesterday he had a disk in a 900GiB array failing which he replaced. After that, he run a rebuild/verification, fsck’ed the file system and tried to mount the volume again. Apparently the mount produced a kernel oops (guess what, the 900GiB is running reiserfs), thus leaving the kernel tainted (or what do they call it ?). So he tried to reboot the box but it didn’t reboot. It started rebooting but then hung (as in not continuing the reboot). He tried to ssh back to the box, and it worked just fine. ...

May 24, 2008 · 1 min · 160 words · christian

Getting a FC HBA to rescan it's attached devices

If you’re using a 2.6 based distribution, the FC HBA (or more correctly the corresponding driver) should create entries in /sys/class/scsi_host. Now you only need to get the host-number (basically the # of the host bus adapter) and you can get started .. Simply doing this, is going to tell the FC HBA “rescan” and discover new devices .. 1 echo "1" > /sys/class/fc_host/host/issue_lip That should do the trick, and you should be able to get udev to recognize the new devices attached via FibreChannel without the need to reboot the whole box (which might be a bit tricky).

May 19, 2008 · 1 min · 99 words · christian

Flushing the disk cache

I’ve been looking for this over and over and over, until I had some inspiration today (thanks to Andew and Chris) .. this has one and only one sole purpose: safekeeping, so I don’t end up searching for it all over again … To free pagecache: 1 # sync; echo 1 > /proc/sys/vm/drop_caches To free dentries and inodes: 1 # sync; echo 2 > /proc/sys/vm/drop_caches To free pagecache, dentries and inodes: ...

February 5, 2008 · 1 min · 90 words · christian