Author Archive

Before

Friday, July 21st, 2006

This will one day be my train room/workbench area. I moved all the stuff out (we were using it for storage) and am ready to clean and etch the floor. The Dry-Lok epoxy paint I plan to use works best if you etch clean concrete with a weak acid solution and then prime.

In the future doorway looking slightly left In the future doorway looking straight ahead
Looking back towards stairs Looking back towards future doorway

Linux Quiz #004

Tuesday, July 11th, 2006

Logfiles galore! (Submit Answer)

Write a bash script that will compress all files named *.log in the directory “/usr/local/app/logs” that have not been accessed in the last day.

The script should only produce output if:

  • The directory does not exist
  • An error occurs compressing the file

If you need a hint, here is a good article on using find.

The beauty of LVM

Friday, July 7th, 2006

I was running low on disk space on one of my servers. Luckily I had set up LVM, was using XFS and had some room to spare on my physical volume. With just 2 commands I added 1GB of space to the filesystem.

root ~> lvextend -L+1G /dev/vg00/rra
root ~> xfs_growfs /usr/local/cacti/rra

I found out how much space I had to spare using the vgdisplay command.

root ~> vgdisplay
— Volume group —
VG Name vg00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 7
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 5
Open LV 5
Max PV 0
Cur PV 1
Act PV 1
VG Size 67.10 GB
PE Size 4.00 MB
Total PE 17178
Alloc PE / Size 9728 / 38.00 GB
Free PE / Size 7450 / 29.10 GB
VG UUID vYM9vS-mmUn-2JUm-GLJB-B1gk-dJ2r-FHuCZU

Looking at “Free PE” you can see I have 29GB to use on down the road.

To learn more about lvm, check out the HOWTO

Linux Quiz #003

Thursday, July 6th, 2006

Panic! (Submit Answer)

Let’s say you are troubleshooting a remote system and have no physical access to the hardware. How would you ensure that you can regain control of the system if/when a kernel panic occurs?

Assume you have serial console access both during POST and after kernel bootstrap. There is more than one correct answer.