After over one year working together with Danny Braniss and testing several thousands of options, settings and configurations, I managed to get the iStore iSCSI-device working together with FreeBSD.
Just to remember. The following error occured, when trying to write an UFS filesystem to the device:
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
And 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
The important hint I got from a test with a PetaStor system, where everything worked perfectly. On the FreeBSD-FS mailinglist, I got the last part of the puzzle. Creating the filesystem works with these commands:
“# gpart create -s GPT da0"
# gpart show da0
# gpart add -b 34 -s 20971519 -t freebsd-ufs -l AnosLabel da0
# newfs -O2 /dev/da0p1
Important: Replace 20971519 by the size of your device, given by gpart show da0.
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 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