Archive for July, 2009

How to Repair Corrupted rc.conf file

Posted in FreeBSD with tags on July 3, 2009 by ndok
 

Procedure on how to solve FreeBSD boot up problem with the error message:

Loading configuration files.
/etc/rc.conf:51 Syntax error: Unterminated quoted string
Enter full pathname of Shell or RETURN for /bin/sh:

This error is normally encountered if there is a misplaced or missing double quote in the configuration file of the FreeBSD installation.
Sample invalid rc.conf file:

usbd_enable="YES
dbus_enable="YES"
compat5x_enable="YES"

Note that there is a missing double quote in the example above. This error may also be triggered by a misplaced or unnecessary double quote in the configuration file.
To fix this problem:

1. (Optional) Reboot your FreeBSD and select the login option:
4. Boot FreeBSD in single user mode This can by done by pressing the number 4 upon boot up.

2. Press ENTER after the error message:
Loading configuration files.
/etc/rc.conf:51 Syntax error: Unterminated quoted string Enter full pathname of Shell or RETURN for /bin/sh:
3. Type mount -a -t ufs then press enter.
The argument following the -t is used to indicate the file system type. The type ufs is the default. The -t option can be used to indicate that the actions should only be taken on file systems of the specified type.

- or -

Type mount -a then press enter.
This will mount all the file systems described in fstab.
3. Open the configuration file by typing:
/usr/bin/ee /etc/rc.conf
You may also use your preferred editor like vi, pico, etc. by replacing ee. (/usr/bin/vi /etc/rc.conf, /usr/bin/pico /etc/rc.conf)
4. Modify rc.conf and ensure that there is no missing or misplaced characters.
5. Press ESC to exit editor.
6. Save changes.
7. Reboot by using the command:
shutdown -r now

From : http://cyberjotter.blogspot.com/2008/01/how-to-repair-corrupted-rcconf-file.html

mpt0: QUEUE FULL EVENT: Bus 0×00 Target 0×08 Depth 128

Posted in FreeBSD with tags on July 3, 2009 by ndok

 

proxy# dmesg |grep mpt
mpt0: <LSILogic SAS/SATA Adapter> port 0×4000-0×40ff mem 0xd8610000-0xd8613fff,0xd8600000-0xd860ffff irq 25 at device 3.0 on pci5
mpt0: [ITHREAD]
mpt0: MPI Version=1.5.13.0
mpt0: Capabilities: ( RAID-0 RAID-1E RAID-1 )
mpt0: 0 Active Volumes (2 Max)
mpt0: 0 Hidden Drive Members (10 Max)
da0 at mpt0 bus 0 target 8 lun 0
da1 at mpt0 bus 0 target 9 lun 0

Scenario: Performed a clean install of FreeBSD 7.1-STABLE with a SAS RAID controller, which completed without errors. After rebooting and beginning to install packages, I started seeing the following error: mpt0: QUEUE FULL EVENT: Bus 0×00 Target 0×08 Depth 128.

Solution: Searching online indicated that the problem was with support for Tagged Command Queuing in the mpt driver. The output of camcontrol was:

proxy# camcontrol tags da0 -v
(pass0:mpt0:0:8:0): dev_openings  255
(pass0:mpt0:0:8:0): dev_active    0
(pass0:mpt0:0:8:0): devq_openings 255
(pass0:mpt0:0:8:0): devq_queued   0
(pass0:mpt0:0:8:0): held          0
(pass0:mpt0:0:8:0): mintags       2
(pass0:mpt0:0:8:0): maxtags       255

proxy# camcontrol tags da1 -v
(pass1:mpt0:0:9:0): dev_openings  255
(pass1:mpt0:0:9:0): dev_active    0
(pass1:mpt0:0:9:0): devq_openings 255
(pass1:mpt0:0:9:0): devq_queued   0
(pass1:mpt0:0:9:0): held          0
(pass1:mpt0:0:9:0): mintags       2
(pass1:mpt0:0:9:0): maxtags       255

I then entered:

proxy# camcontrol tags da0 -N 119
(pass0:mpt0:0:8:0): tagged openings now 119
(pass0:mpt0:0:8:0): device openings: 119

proxy# camcontrol tags da1 -N 119
(pass1:mpt0:0:9:0): tagged openings now 119
(pass1:mpt0:0:9:0): device openings: 119

This second command limited the size of the queue to 119, preventing the error I had seen before. To ensure that this problem wouldn’t come up in the future, I added the following line to /etc/rc.local

# Set the devq_openings to 119 to prevent problems with SAS controller

camcontrol tags da0 -N 119

camcontrol tags da1 -N 119

Doing this runs the command at every boot, preventing the problem from creeping up in the future.

From : http://www.shaddihasan.com/blog/2009/02/23/dell-poweredge-t300-sas-raid-and-freebsd/