HOWTO: Convert Dangerously Dedicated Disks to FreeBSD 8.0 with 3ware 9650SE RAID

I recently did an upgrade from FreeBSD 6.2 to FreeBSD 8.0. Because my FreeBSD 6.2 system was partitioned as “dangerously dedicated”, I encountered a number of issues that would impede the ability of many FreeBSD users to complete a similar upgrade.

For reference, my server has an Intel D975XBX2 system board, an Intel Core2 Quad CPU, 4GB of DDR2 RAM, a 3ware 9650SE-4LPML RAID disk controller running in a RAID 10 configuration, and four Seagate Barracuda 300 GB SATA drives. I installed FreeBSD AMD-64 using the standard DVD distribution. This install was complicated by two factors:

1) The driver for the 3ware 9650SE-4LPML controller is provided with FreeBSD 8.0, but it is not loaded by default. You must manually load it before doing an install.

2) The previous FreeBSD system used the "dangerously dedicated" disk partition for the disk, which is no longer supported by FreeBSD 8.0. As a result, I had to reformat the disk in order to upgrade to FreeBSD 8.0. There are issues with this conversion, so keep reading even if you don't have a 3ware disk controller.

Before doing anything to your system, be sure to backup the data on your server as you will need to completely erase your disk during this installation procedure.

Before upgrading to FreeBSD 8.0, now is a good time to update the firmware in the 3ware 9650SE disk controller. Go to the 3ware website, download the distribution titled "9.5.3-Codeset-Complete.iso", burn a CD with the ISO image, and boot your server with the disk to upgrade your disk controllers firmware (follow the prompts on the screen to do the firmware update).

The 3ware 9650SE controller uses the twa device driver on FreeBSD 8.0. There is a two step process required to have the system load and use the driver for the 3ware 9650SE controller. First, you need to load the twa driver manually at boot time before you begin the install process. Simply insert the FreeBSD 8.0 DVD in your drive, boot your system, and select Option 6 at the boot menu, "Escape to loader menu". At the OK prompt, type the following commands:

load twa
boot

This will load the twa driver and then boot the install disk for FreeBSD 8.0. The second step requires you to modify the boot loader configuration so the driver loads automatically each time the system boots. This step is performed after installing FreeBSD on the disk, just before you exit the install and reboot. It is discussed later on in this HOWTO.

If your original disk was "dangerously dedicated", you will need to overwrite the original partition before the system will allow you to put a standard partition table on your disk. There is no warning about this, and if you attempt to create the partition and the various mount points using the "Standard Installation", you will receive the following error when you attempt to commit the configuration to the disk:

Code:
  Unable to find device node for /dev/da0s1b in /dev!
  The creation of filesystem will be aborted.

To prevent (or correct) this condition, you must overwrite the current disk partition with zeros. This can be done by going to the "Fixit" option on the install menu, and then select "Use the live filesystem CDROM/DVD". The system will drop you into a shell with a "Fixit#" prompt. At the prompt, type the following command:

dd if=/dev/zero of=/dev/da0 count=15000

This will destroy the current disk partition by overwriting the first 7.68 MB of your disk with binary zeros. Once the partition is destroyed, you will be able to create a standard disk partition using the "Standard" install in the installation menu. To exit the shell on the live file system, type "exit" at the Fixit# prompt. Then select "Exit this menu" and return to the main install menu. You can now begin the standard installation.

If you have never installed a standard partition on a disk before, and you intend to use the entire disk for FreeBSD, then the partition is straight forward -- use the "A" option for "Use Entire Disk", then move the selection line to the entry that has a value of "165" for the Subtype column (this is the file system type for BSD disks), and select the "S" option for "Set Bootable". The physical partition is done. Type "Q" to exit, and then select the "Standard" option to install a standard master boot record (no boot manager).

The disk label editor, and the rest of the install process should be familiar at this point. When the installation has completed, you will be asked to perform a basic configuration of your server. At the end of this configuration process, the system will ask:

Code:
  Visit the general configuration menu for a chance
  to set any last options?

Choose the "Yes" option and press Enter -- you will be taken to the install options screen. In this step, we need to modify /boot/loader.conf to automatically load the twa driver each time the system starts. To perform this task, you will need to open a shell using the Alt-4 key combination. When you see the prompt, enter the following commands:

cd /boot
vi loader.conf

Edit the loader.conf file and add the following statement to the file (note that the loader.conf file is usually empty at this point):

Code:
twa_load="YES"

Once that statement has been added, save your changes and exit vi. Then switch back to the install menu using the Alt-1 key sequence. Exit the install menu, remove the install disk from the CD drive, and reboot the system. You are done. I hope someone finds this useful. Best,

Dave Stoddard
 
Uhm, the twe(4) and twa(4) drivers for 3Ware RAID controllers have been part of the GENERIC kernel since at least the early 6.x days (when I started using them), if not longer. No need to manually load them, or edit loader.conf. They're part of the installer kernel as well.
 
Back
Top