Author Archives: Simon

Debian Lenny cannot load Broadcom NIC drivers missing firmware bnx2-06-4.0.5.fw during install

If you come across this annoying error download the firmware for lenny from the following url:

Broadcom Firmware Lenny

Copy it to a usb stick and insert the stick when prompted to. Do not unpack the deb package the installer will do that for you. Then you will be able to use you broadcom nic. This happend to me on a HP DL360 G5 server

Turning off safe_mode and register_globals in Plesk

Create a file called “vhost.conf” in the directory “/var/www/vhosts/example.com/conf/”

<Directory /var/www/vhosts/example.com/httpdocs>
php_admin_value safe_mode off
php_admin_flag register_globals on
</Directory>

Rebuild the domain config for the particular vhost with:

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=example.com

Or rebuild all vhosts if you changed more than one with:

usr/local/psa/admin/sbin/websrvmng -a

You can also change other settings this way here are some examples:

php_admin_value post_max_size 25M
php_admin_value upload_max_filesize 20M
php_admin_value open_basedir none

Devils and Penguins Save Taz

linux.conf.au 2009: Tuz

Impact: help prevent extinction of species

The Tasmanian Devil is a shy iconic Australian creature named for its
spine-chilling screech.  It is threatened with extinction due to a
scientifically interesting but horrific transmissible facial cancer.

This one is standing in for Tux for one release using the far less-known
Devil Facial Tux Disguise.

Save The Tasmanian Devil  tassiedevil.com.au

This is what he looks like:

20090318tuz

3ware RAID Controller

Check the card

To enter the 3ware command line interface, type tw_cli. Enter ? or help to view help. For more information about the 3ware CLI, see the man page or the 3ware knowledge base linked at the bottom of this document.

First we need some info on our setup:

Code: Getting info on setup

3ware CLI> info
List of controllers
Controller 0: 8006-2LP (2)

Here we see that we have one controller 0 with two drives. Let’s get more info on controller 0.

Code: Getting info on controller 0

3ware CLI> info c0
Controller: c0
Driver:   1.02.00.033
Model:    8006-2LP
FW:       FE7S 1.05.00.065
BIOS:     BE7X 1.08.00.048
Monitor:  ME7X 1.01.00.038
Serial #: F14902A4110263
PCB:      Rev5
PCHIP:    1.30-66
ACHIP:    3.20
# of units: 1
Unit 0: RAID 1 111.79 GB ( 234439600 blocks): DEGRADED
# of ports: 2
Port 0: WDC WD1200JD-22GBB0 WD-WMAET1426272 111.79 GB (234441648 blocks): OK(unit 0)
Port 1: WDC WD1200JD-00GBB0 WD-WMAET1626327 111.79 GB (234441648 blocks): OK(unit 0)

Now we can see the RAID at unit 0 is degraded. Let’s find out which disk is giving us a problem. For the rest of the document, I’ll exit from the program and run it as a command instead.

Code: Finding out which disk is degraded

[root@myputer ~]# tw_cli info c0 u0
Unit /c0/u0
Status:        DEGRADED
Unit Type:     RAID 1
Stripe Size:   N/A
Size: 111.79 GB (234439600 blocks)
# of subunits: 2
Subunit 0:    CBOD: OK
Physical Port: 0
Logical  Port: 0
Subunit 1:    CBOD: DEGRADED
Physical Port: 1
Logical  Port: 1

Ok, port 1 is the disk that needs our attention.

Rebuild The RAID

First we need to remove the drive. This is like unmounting a filesystem so that we can work on it.

Code: Removing the drive

[root@myputer ~]# tw_cli maint remove c0 p1
Removing port /c0/p1 ... Done.

Now let’s have the software rescan the drives.

Code: Rescaning the drives

[root@myputer ~]# tw_cli maint rescan c0
Rescanning controller /c0 for units and drives ...Done.

At this point, we need to see if the rescan picked the drive back up. If the port is N/A this is likey a bad drive and isn’t responding. You’ll need to replace the drive and rescan:

Code: Checking if the rescan picked the drive back up

(Third party note: This is confusing, ignore this block. I suspect that this is supposed to be an example of a drive that is N/A, not a continuation of the example.)

[root@myputer ~]# tw_cli info c0 u0
Unit /c0/u0
Status:        DEGRADED
Unit Type:     RAID 1
Stripe Size:   N/A
Size:         111.79 GB (234439600 blocks)
# of subunits: 2
Subunit 0:    CBOD: DEGRADED
Physical Port: N/A
Logical  Port: 0
Subunit 1:    CBOD: OK
Physical Port: 1
Logical  Port: 1

Otherwise all that’s left to do is rebuild the drive.

Code: Rebuilding the drive

[root@myputer ~]# tw_cli maint rebuild c0 u0 p1
Rebuild started on unit /c0/u0

To check the status, just give it the info option

Code: Checking the status

[root@myputer ~]# tw_cli info c0 u0
Unit /c0/u0
---------------------
Status:        REBUILDING (0%)
Unit Type:     RAID 1
Stripe Size:   N/A
Size:          111.79 GB (234439600 blocks)
# of subunits: 2
Subunit 0:    CBOD: OK
Physical Port: 0
Logical  Port: 0
Subunit 1:    CBOD: DEGRADED
Physical Port: 1
Logical  Port: 1

Since it’s rebuilding as it’s running, this could take a really long time.

More Information

3ware Knowledge Base

Man page for tw_cli

Some notes from 3ware support

They said the way it should be done:
Assuming port0 is bad
1.tw_cli maint remove c0 p0
2. remove the Old drive and Hotswap a new drive
3. tw_cli maint rescan c0
This will bring the new drive up
4. tw_cli maint createunit c0 rspare p0
5. tw_cli maint rebuild c0 u0 p0

Check our knowledge base article’s for rebuild information.
https://www.3ware.com/3warekb/article.aspx?id=11647
https://www.3ware.com/3warekb/article.aspx?id=11956
https://www.3ware.com/3warekb/article.aspx?id=11306

This Howto is copied from the old gentoo wiki. Since the wiki is down and i need this information quite often.

Installing nagios-nrpe-server on Debian Lenny

In Debian Lenny installing the package nagios-nrpe-server pulls in a load of dependencies. Nagios-plugins-standard samba and snmp and load of other stuff. Which i don’t need because we have our own nrpe plugins for nagios. To install nagios-nrpe-server without the dependencies issue the following command:

aptitude install -vv --show-deps --without-recommends nagios-nrpe-server

Which shows you the package dependencies but doesn’t install them.