Archive for November, 2010

“Ata Boy”

0

Probably one of the most important aspects of system administration is working with hardware and one of the most important pieces of hardware is the drive your data and OS are located on. A handy tool included with OpenBSD for working with SATA drives is atactl(8). With atactl you can do some pretty useful things such as getting the serial number for your drive (nice not having to physically remove the drive, isn’t it?), the S.M.A.R.T. status, enabled features, etc.

# atactl /dev/wd0 identify

Model: ST380815AS, Rev: 4.AAB, Serial #:

Device type: ATA, fixed

Cylinders: 16383, heads: 16, sec/track: 63, total sectors: 156301488

Device capabilities:

ATA standby timer values

IORDY operation

IORDY disabling

Device supports the following standards:

ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6 ATA-7

Master password revision code 0xfffe

Device supports the following command sets:

READ BUFFER command

WRITE BUFFER command

Host Protected Area feature set

Read look-ahead

Write cache

Power Management feature set

Security Mode feature set

SMART feature set

Flush Cache Ext command

Flush Cache command

Device Configuration Overlay feature set

48bit address feature set

Set Max security extension commands

DOWNLOAD MICROCODE command

SMART self-test

SMART error logging

Device has enabled the following command sets/features:

READ BUFFER command

WRITE BUFFER command

Host Protected Area feature set

Read look-ahead

Write cache

Power Management feature set

SMART feature set

Flush Cache Ext command

Flush Cache command

Device Configuration Overlay feature set

48bit address feature set

DOWNLOAD MICROCODE command

If we wanted to check the health of our drive we could do something like this:

# atactl /dev/wd0 smartstatus

No SMART threshold exceeded

This let’s us know our drive has passed its physical exam.

There’s a number of different things you can do with this utility. Check out the man page for further reading.

…and we’re back

0

As most of you know, yesterday 4.8 was released if you’ve been following the OpenBSD news at all. I’ve finally got the server upgraded after a frustrating day.

I requested KVM and to have the 4.8 ISO mounted from my hosting provider. That was done but I had nothing but headaches while using the ISO. I believe there must have been quite a number of latency issues between the KVM and the server they put the ISOs on. The virtual CD would lock up constantly and the KVM kept rebooting the server. When I got it to work at all and begin the upgrade process I kept getting errors which again I believe were caused by latency issues where the CD would seem to disappear. Fortunately I was at least able to get the 4.8 ram disk copied over from the ISO to run my upgrade off from it and just installed everything from FTP. Once I got this done the upgrade was pretty smooth. Sysmerge can be a little fickle as I saw. I also had to recompile the sendmail binary as it was overwritten which resulted in Cyrus SASL support being dropped.

Lesson learned: unless you have physical access to your machine, don’t upgrade from an ISO! Instead, throw the bsd.rd for the new version onto the existing machine at the root of the file system in “/” and boot from it when you get the boot prompt on startup like this:

boot> boot bsd.rd

That’s about it. This will behave the same as inserting a physical CD into the drive. You can also use the RAM disk to fix any problems with a non-working installation. All the rest of the upgrade instructions are very well explained in the release notes on OpenBSD’s site. Make sure that you follow them all the way through to make sure your config files in /etc get updated too. The upgrade doesn’t do this for you.

Go to Top