iSCSI

iStor Problem gelöst / can’t find block in cyl 0 / cg 0: bad magic number

Nach über einem Jahr Zusammenarbeit mit Danny Braniss in dem wir mehrere tausend Optionen, Einstellungen und Konfigurationen getestet haben, konnte ich nun das iStore iSCSI-device unter FreeBSD zum Laufen bringen.

Zur Erinnerung. Der folgende Fehler trat auf, wenn man versuchte ein UFS Filesystem anzulegen:

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

Im dangerously dedicated mode:

# newfs -O2 /dev/da0

Die Erstellung des Filesystems schlug mit dieser Meldung fehl:

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

Den entscheidenten Hinweis erhielt ich bei einem Test mit einem PetaStor-System, welches auf Anhieb und ohne Probleme perfekt unter FreeBSD funktionierte. Den letzten Teil des Puzzles fand ich dann in der FreeBSD-FS Mailingliste. Mit den folgenden Befehlen kann das Filesystem geschrieben werden:

# gpart create -s GPT da0"
# gpart show da0
# gpart add -b 34 -s 20971519 -t freebsd-ufs -l AnosLabel da0
# newfs -O2 /dev/da0p1

Wichtiger Hinweis: Die Zahl 20971519 ist durch die device-Größe zu ersetzen, welche einem von gpart show da0 ausgegeben wird.

iSCSI for amd64 FreeBSD with integraStor iStor (GigaStor)

Die Lösung des Problems ist: 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.

Die Lösung des Problems ist: here

Get in contact:

Kategorien