header pictures for dedicated hosting services header image of world
Guests Visit the FreeBSD Forums  •  Login to the FreeBSD Forums  •  Register for FREE

iSCSI, Ethernet frames and raw disks - SAN for home network

 
Thread Tools Display Modes
  #1  
09-07-2006, 12:40 AM
perfrej
BSD n00b
 
Join Date: Sep 2006
Location: Saltsjöbaden, Sweden
Posts: 4
iSCSI, Ethernet frames and raw disks

Folks!
I'm currently in the process of making a low end SAN for my home network and opted for OpenBSD, mostly because I trust the BSD-tree more than the Linux-tree.

The iSCSI target works very well, however there are a few quirks that elude my mind.

1) Raw disks
I would like to use a totally unprepared disk for the target persistant storage. No filesystem from the BSD at all, just the raw blocks. I first tried with files just to verify everything, and it works fine. Now, in my config file I try the following:

extent0 /dev/wd1 0 117GB
target0 rw extent0 0/0

Now, this gives some interesting results... A 117GB file named /dev/wd0 is created. I did not see that one coming, and it took me a while to realize that wd1 wasn't event touched by iSCSI Target. I also tried /dev/rwd1 with the same result - a large file... And /dev/wd1e after preparing a partition on the disk... No go...

So, the question is, how the heck do I handle a completely raw device and expose it with iSCSI to the point that I theoretically could move it to another machine and actually use what iSCSI put on it from my remote system?

2) Ethernet. Occasionally, from Microsofts Initiator 2.1, I get 1516-byte ethernet frames that produce errors on the OpenBSD box. How do I tune OpenBSD to handle that size (yes, I know it is probably an MS problem and that 1514 is the going rate)?

All help appreciated!

Per Frejvall,
Saltsjöbaden, Sweden
  #2  
09-07-2006, 04:13 AM
 
wilfried
Port Monkey
 
Join Date: Jun 2003
Location: Malmö, Sweden
Posts: 320
Quote:
Originally Posted by perfrej
1) Raw disks ...

Slice c is always the entire physical disk, so use /dev/rwd1c.
__________________
eMac G4 1.0GHz, Sun Blade 150, Alpha PWS 433, Compaq ProLiant ML370/Smart Array 431
Commell EMB-564, AMD64 3000+, Dual P3-800, AMD XP 2400+, Dual Opteron 265/Adaptec 3200S
  #3  
09-07-2006, 06:34 AM
perfrej
BSD n00b
 
Join Date: Sep 2006
Location: Saltsjöbaden, Sweden
Posts: 4
Wow!

Thanks!

Amazing how simple answers can do a lot for you. It worked (of course).

Next, I'll try to make Windows 2003 send decent Etherenet frames in terms of MTU...

/perf
  #4  
09-07-2006, 07:26 AM
perfrej
BSD n00b
 
Join Date: Sep 2006
Location: Saltsjöbaden, Sweden
Posts: 4
Premature joy...

Nope...

***ERROR*** error opening "/dev/rwd1c"
***ERROR*** device_ini() failed

....

/perf
  #5  
09-07-2006, 07:58 AM
perfrej
BSD n00b
 
Join Date: Sep 2006
Location: Saltsjöbaden, Sweden
Posts: 4
Monologue...

It appears that /dev/wd1d works and should be the entire disk including partition table and all. Slice c seems to be the entire NetBSD partition. The "raw" type of device doesn't work, but the non-raw does. After having initialized and partitioned the iSCSI target pointed to by /dev/wd1d from a Windows-based iSCSI initiator, I can see the new partitioning from NetBSD with "fdisk /dev/wd1".

So, I guess it's non-raw.

Mission accomplished! Thanks!

/perf
  #6  
09-07-2006, 08:33 AM
J65nko
Moderator
 
Join Date: Mar 2003
Location: Netherlands
Posts: 5,528
In OpenBSD disklabel "c:" designates the complete disk. In FreeBSD, where you can have a disklabel set for each FreeBSD slice, label "c" covers the complete slice/MBR partition.

In NetBSD is like OpenBSD, just one disklabel for the complete disk, but NetBSD it is labelled as "d".
__________________
I paint like a barbarian in these barbarian times - Karel Appel (1921-2006)

 

 

 

Looking for our FreeBSD Forums? We have moved them off our main page,just follow the link to our FreeBSD Forums page.


Copyright © 2009, WEBSERVER CONSUMER GUIDE

Privacy Policy

Please note:
(1) FreeBSD is a registered trademark of The FreeBSD Foundation.
(2) WEBSERVER CONSUMER GUIDE is in no way affiliated with The FreeBSD Foundation