February 03, 2004

Playing with filesystems    [ Software ]

After a bit of hacking around, I've finally gotten my filesystems arranged the way I wanted them on my Athlon workstation/development box.   I had originally set it up as a gaming box running Win2K, but wanted a faster machine to use for Linux development work, so I carved out half of the 40GB UDMA100 drive for Debian and left Win2K's filesystem on there after shrinking it with Partition Magic. I kept Debian up all the time on it, and didn't use Win2K at all, so I decided to move my aging production box's data over to the new box - I yanked out the Tekram LVD SCSI controller + two 18GB IBM LVD SCSI disks from the old Pentium Pro 180 box, put 'em into the Athlon, and booted off those disks.

I've done a lot of shuffling since then:

* Copied the /, /usr, /var and /export filesystems from the SCSI drives over to the / filesystem on the UDMA100 drive
* Pulled off the web development files onto the spare SCSI drive for a temporary holding place, since I only had half the space I needed on the UDMA100 disk
* Copied the / filesystem from the UDMA100 drive back to SCSI drive (sda) after re-partitioning to use /boot, swap and one big / filesystem
* Re-partitioned the UDMA100 drive using /boot, swap and big / filesystem with JFS
* Copied the / filesystem back to the UDMA100 drive and copied the web dev files back onto /

Whew, all done now. Couple of gotchas that I ran into:

* Make sure that your initrd (if you're using a modularized kernel and have things like your SCSI controller, root filesystem, etc. compiled as modules) has the necessary bits you need - I had to add 'sym53x8xx' to /etc/mkinitrd/modules with Debian, then run 'mkinitrd' to re-generate my initrd so I could mount the / filesystem off of the SCSI disk (kernel booted fine, but it got a kernel panic when it couldn't mount the root fs)
* Don't switch around the order of your boot devices in your BIOS (if it allows you to toggle IDE vs SCSI boot), settle on one and keep it there, makes maintaining your /etc/lilo.conf 'boot=' value much easier
* 'cd /source-filesystem && tar cfl - ./ | (cd /destination-filesystem && tar xf -)' is your friend
* Create separate entries in your /etc/lilo.conf for each bootable disk when you're moving back and forth, makes it easier to recover in event of a problem and spares you the hassle of pulling out your boot media
* Using the 2.4 kernel from the Debian media is nice (rescbf24 root=/dev/whatever at the prompt), but since it's modularized, god help you if your NIC driver's not compiled into the kernel
* Keep track of your /etc/fstab changes with RCS or another method so you can "pull back" to an earlier config

And I've got a nice happy 40GB JFS filesystem on a decently fast disk. The UDMA100 drive is a bit slower than the 80MB/s LVD SCSI drives, but it's still good, and this way I can swap the two SCSI drives into my Visualize C200 to make it a usable system - can't do a whole lot with the 2x 4GB drives in there right now. Next question is whether I should keep HP-UX on the C200, turn it into a mail/fileserver, and build a separate box for web/ssh access (maybe FreeBSD on one of the PPro's?); or go with Debian/hppa and make that into my DMZ services box.

Posted by edobbs at 03:20 PM