Configuring Boot Behavior for Alpha Systems

Configuring Boot Behavior for Alpha Systems

Whilst playing with my Alpha 600a workstation (Cheers Andres!), I’ve been struggling to find out how to automate booting from the bios (well the alpha version of a bios!).
Well

Show bootdef_dev

will show you the default boot device.

set bootdef_dev

will set it. In my case this is a SCSI device on ID3. so
set bootdef_dev dkc

running ,code>boot now boots from that device. Rather than having to run boot dkc

Now all I just need to do is find out how to make it boot without prompting…!!!

EDIT… Aha!!!  when a default boot device is set, it will be booted automatically!!  Cool!

Repairing MythTV tables

MySQL 5.0 Reference Manual :: 5.10.4.3 How to Repair Tables

I’ve just been trying to backup my MythTV tables. Previously I’ve used PHPMyAdmin. However, I thought I would try command line and automate it.

mysqldump -u root -p mythconverg > mythconverg-`date +%F`.sql
However, I constantly got a error message
Can't open file: (errno: 145) when using LOCK TABLES mythtv

So i discovered I needed to repair the tables. The above docuimentation is pretty easy but basically.

cd /var/lib/mysql.mythconverg
myisamchk -e *.MYI

Then run the following command on each table that shows errors:
myisamchk -r -q program.MYI

Easy peaasy lemon squeezy!

Raid 5 to 6 conversion possible?

A recent post on Raj’s blog made me think about giving RAID6 a play. This then makes me wonder whether a RAID 5 to 6 conversion is possible? I guess this is completely impossible without a complete reformatting. But there again growing a RAID 5 array is also a similar experience, and this is now possible. I would suggest that both require adjustment of stripes. or am I really talking out of my behind?

I recently used mdadm’s new grow function to increase my 3 drive RAID5 array to 4 drives. This worked perfectly. I trust my backups, so am quite happy to risk its integrity to convert to RAID6. Hmmmm!

Growing a RAID5 array – MDADM

With the release of kernel 2.6.17, there’s new functionality to add a device (partition) to a RAID 5 array and make this new device part of the actual array rather than a spare.

I cam across this post a while ago on the LK list.

LKML: Sander: RAID5 grow success (was: Re: 2.6.16-rc6-mm2)

So I gave it a go. My HOME directory is mounted on a 3x70gb SCSI RAID5 array. so I tried adding a further drive.

Although with the release of mdadm > 2.4 the only real critical part of the process is safer (it backs up some live data that is being copied), I didn;t fancy risking growing a mounted array. So I did plenty of backups, then switched to single user run level.

Basically the step includes adding a disc to the array as a spare, then growing the array onto this device.

mdadm --add /dev/md1 /dev/sdf1
mdadm --grow /dev/md1 --raid-devices=4

This then took about 3 hours to reshape the array.

The filesystem the needs to be expanded to fill up the new space.

fsck.ext3 /dev/md1
resize2fs /dev/md1

I then remounted the drive and wahey. Lots extra space….! Cool or what

EDIT  It’s over 18 months since I wrote this post, and Linux kernel RAID and mdadm have continued to move on. All the info here is still current, but as extra info check out the Linux RAID Wiki.

EDIT 2  The Linux Raid Wiki has moved

mdadm: what a cool utility.

mdadm is really a cool utility. I decided to move my 6 drive RAID 5 array from my normal workstation to a fileserver stuck somewhere in the attic. prompted in no small part by excess heat and noise in my little office. The fileserver is an old dual Xeon pIII running Debian Sarge that should suffice.

Anyway I umounted the array, stopped it and turned it off. Plugged it into the new server. Booted it. I then just ran:

mdadm --assemble /dev/md1 /dev/sd[cdefgh]and off it goes!! Since the array was never degraded, it doesn’t even need to be resynced.

I then mounted it as usual and Bob is most deffo your uncle!

This is the first time I have installed Debian for 3 years. I am pretty impressed by the new Debian Installer. More or less 1 hour from burning the CD to booting the machine. Nice!

Software vs Hardware Raid in Linux

Software vs Hardware Raid in Linux

An interesting real case experiment of various raid levels, and file system options.

Using RAID 5 with chunk of 128k, and Ext3 with a stride of 16 and block of 4k seems to be the best!
..and something that suprises me is that raid 50 was slower and less cost effective in terms of available storage than Raid 5.

I spent last night reformatting my raid array into RAID 10, then kernel RAID 10 level (rather than a RAID 0 array of RAID 1 arrays), then RAID 50, before going back to RAID 5. There was no real difference in output, and since RAID 5 maximises the storage space, it was an easy decision.

Which indicates that I need a much faster external SCSI box. All the discs are 10k u160 or better. The box is only a SUN UW Box. e.g. u40. I guess the bus is completely saturated!

For anybody who wants to experminent with software RAID in linux, MDADM is really the way to go. It’s just so easy….!

mdadm -v --create /dev/md0 --raid-devices=6 --level=raid5 /dev/sd[abcdef]1

mkfs.ext3 /dev/md0

mount /dev/mdo /mnt/raid

will create, build a filesystem and mount a 6 drive RAID 5 array. I should mention that between steps 1 and 2, you really should wait until the array has finished synchronising and reconstructing itself. Although this point is not essential, it will slow things down. Also MDADM is quite clever, and leaves a drive out as a spare. It constructs the array in degraded mode. That is the array is missing a drive. This speeds things up as there are less drives to saturate the bus.