Archive

Archive for the ‘FreeBSD’ Category

iSCSI for amd64 FreeBSD with integraStor iStor (GigaStor)

01:05 PM No comments

The solution for this problem you can find: here

Ok – today comes a nice problem, that cost me about 80 hours of work, 2,8 liters of coffee and several kilometers for the pizza-guy:

I wanted to use a 920GB SAN from iStor with my amd64 FreeBSD (should work for 7.0 too – I used the 7.1RC1). The bad news is, there is no solution to the problem at the moment. The good news is: Danny Braniss from the FreeBSD SCSI-Team is now working on that problem.

I started with a very detailed tutorial from Vivek Gite, that can be found on cyberciti.biz FAQ site.

Vivek is using a i386 FreeBSD, that makes (I tested with i386 too) no difference to the amd64. Up to the part

# mount /dev/da1s1 /iscsi

everything is fine, but when trying to mount my device, I got the following error:

mount: /dev/da0s1 : Invalid argument

Ok – that is what I expected to happen, since no filesystem / labels has been installed on the device. So I tried to write a label with the command: newfs -O2 /dev/da0s1

After a while, the newfs command failed with the following error:

newfs -O2 /dev/da0s1
/dev/da0s1: 782023.5MB (1601584044 sectors) block size 16384, fragment size 2048
using 4256 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
160, 376512, 752864, … … …
1601377920
internal error: can’t find block in cyl 0

So I tried the same in dangerously dedicated mode:

# newfs -O2 /dev/da0

Creating the lable in this mode fails with the message:

newfs -O2 /dev/da0
/dev/da0: 782023.5MB (1601584044 sectors) block size 16384, fragment size 2048
using 4256 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
160, 376512, 752864, … … …
1601377920
internal error: cg 0: bad magic number

I spent a lot of hours in reading Mailinglists, Manuals and FAQs and finally started a thread in the freebsd-scsi Mailinglist. The thread can be found here: Problem with disklabel and filesystem over iSCSI.

Danny Braniss is now trying to get some SCSI-specialists and the guys from iStor at one table, to find a solution to this problem. As soon as there will be more information on this issue, I’ll post it here.

The solution for this problem you can find: here

Post to Twitter Tweet This Post

Tyan S2925 and FreeBSD 6.3 onboard LAN problem solution

10:37 AM No comments

Today I had to install a FreeBSD 6.3 on a server with a “Tyan S2925 Tomcat n3400B” mainboard. Unfortunatly, the chipset of this board (nForce Pro 3400 / MAC with Marvell 88E1116-CAA Gigabit Ethernet PHY) isn’t supported by FreeBSD 6.3. So after successfully installing the system, the ifconfig looked like this:

/root# ifconfig
lo0: flags=8049 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0×4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000

In this special case the onboard network interfaces had to be used, so I checked up FreeBSD 7.0 – and – I was lucky!

After downloading the driver-files from the FreeBSD sourectree, I made a Makefile for this driver:

.PATH: ${.CURDIR}
KMOD= if_nfe
SRCS= if_nfe.c miibus_if.h opt_bdg.h device_if.h bus_if.h pci_if.h

.include <bsd.kmod.mk>

So, the directory with the files looked like this:

drwxr-xr-x 4 root wheel 512 Dec 22 17:11 ..
-rw-r–r– 1 root wheel 156 Nov 24 2007 Makefile
-rw-r–r– 1 root wheel 82631 Nov 24 2007 if_nfe.c
-rw-r–r– 1 root wheel 10223 Nov 24 2007 if_nfereg.h
-rw-r–r– 1 root wheel 3633 Nov 24 2007 if_nfevar.h

Compiling the driver with a simple “make” on the commandline made no problems, but after installing the driver, there were some wired effects, that prevent the driver from working fine (You shouldn’t install the driver at this time, so I explain this later). After a lot of more work I found out, that the native nve-Support in the kernel must be disabled (you should do this first):

By editing the Kernel Config (Here you find how to make a new kernel for FreeBSD) and commenting out the following line:

device nve # nVidia nForce MCP on-board Ethernet Networking

change to:

#device nve # nVidia nForce MCP on-board Ethernet Networking // removed 21.12.2008 sch

After building the new kernel, the devices can be used as expected. To install the driver you compiled, you must copy the resulting driver into the modules directory:

/root# cp if_nfe.ko /boot/modules/.

To load this driver at boot-time of the system change the /boot/loader.conf, by adding the following line:

if_nfe_load="yes"

You do not need to restart the system. To load the driver during runtime, simply type the following into your command-line:

kldload if_nfe

After this, your ifconfig will look like this:

/root# ifconfig
nfe0: flags=8843 mtu 1500
options=1b
inet 192.168.1.110 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:e0:81:b5:45:08
media: Ethernet autoselect (100baseTX )
status: active
nfe1: flags=8802 mtu 1500
options=1b
ether 00:e0:81:b5:45:09
media: Ethernet autoselect (none)
status: no carrier
lo0: flags=8049 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0×4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000

That’s it – happy networking!

Post to Twitter Tweet This Post

Categories: FreeBSD Tags: , , , , ,