Re: Xen/dom0/FreeBSD + NAS4Free WebGUI.

2015-12-28 Thread Daisuke Aoyama

Hello,

--
From: "Roger Pau Monne" <roy...@freebsd.org>
Sent: Monday, December 28, 2015 10:20 PM
To: "Daisuke Aoyama" <aoy...@peach.ne.jp>; <freebsd-...@freebsd.org>
Cc: <freebsd-current@freebsd.org>
Subject: Re: Xen/dom0/FreeBSD + NAS4Free WebGUI.


Hello,

El 26/12/15 a les 15.26, Daisuke Aoyama ha escrit:

Hi all,

I'm creating NAS4Free dom0 edition.
This is simple wrapper of Xen/dom0/FreeBSD.

You can upgrade by same way of NAS4Free.
You can manage HDD, ZFS, iSCSI target, NFS share by same way of NAS4Free.
You can manage DomU(VM) via WebGUI.

Japanese blog:
http://shell.peach.ne.jp/aoyama/archives/3149
http://shell.peach.ne.jp/aoyama/archives/3135

NAS4Free dom0 topic in English:
http://forums.nas4free.org/viewtopic.php?f=17=10028

Latest download:
http://www.peach.ne.jp/archives/nas4free/test/2244-dom0/

How to install:
1.Download LiveCD iso image.
2.Burn to CD/DVD-RW blank disc.
3.Boot from it.
(if your server don't have an optical drive, please use an external USB
optical drive)
4.Install to USB Flash drive (2GB or more) from menu #9.
5.Reboot the server after ejecting CD/DVD media.

How to upgrade:
1.Navigate to System|Firmware in global menu from web browser.
2.Click "Enable Firmware Update".
3.Select NAS4Free-dom0-embedded-*.img.xz. (don't decompress the image)
4.Click "Upgrade Firmware".


I forget to write. You should backup the config from System|Backup/Restore 
before upgrading.



Note:
At least you need a bridge interface before using.
Please create it from Network|Interface Management|Bridge.
You can change boot parameters from System|Advanced|loader.conf.
If you are interested in the xl.cfg, it is created in
/usr/local/etc/xen/vm-.cfg.


Thanks for doing this, I just gave it a try and it worked out of the
box, I was able to create and launch a Windows VM in less than 2min,
quite impressive :).


Thank you for trying.




Known issues:
uuid generation of ports/sysutils/xen-tools is broken. You cannot
control by UUID.
(quick hack patch is attached this mail)


I've given a look at the patch, but I have to admit I know very little
about UUID, yet it seems like you should not poke directly at the
internal uuid_t fields. I've created another patch which I *think*
should solve the UUID issues, could you test it please? It should apply
cleanly against Xen 4.5.

https://people.freebsd.org/~royger/uuid.patch


Your patch does not work as expected.
You can test it under normal FreeBSD. First create UUID by uuidgen(1):

# uuidgen
4c90eb5a-adee-11e5-a747-001b2157b424

Insert the UUID to your VM config (see also /usr/local/etc/xen/vm-.cfg):
uuid = "4c90eb5a-adee-11e5-a747-001b2157b424"

Run the VM:
# xl create name.cfg

Check by xl list:
# xl list -v
# xl list -l

Your patched result is here:
[root@nas4free-xen ~]# xl list -v
NameID   Mem VCPUs  State   Time(s)   UUID 
Reason-Code   Security Label
Domain-0 0  4096 4 r- 202.8 
------
nas4free 4  2048 2 -b  51.1 
------



xnb device performance is terrible.
(it eats 100% CPU on intr while transferring via bridged 10GbE)


I haven't seen this, but I'm not surprised (I also don't have a 10GbE
card at hand right now). There's a lot of fine tuning and bug fixing to
do regarding the backends. I plan to get with this once the PVH
implementation is stable.


I feel UUID is very small thing than performance 70% drop down via xnb.

Regards,
--
Daisuke Aoyama


___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Xen/dom0/FreeBSD + NAS4Free WebGUI.

2015-12-26 Thread Daisuke Aoyama

Hi all,

I'm creating NAS4Free dom0 edition.
This is simple wrapper of Xen/dom0/FreeBSD.

You can upgrade by same way of NAS4Free.
You can manage HDD, ZFS, iSCSI target, NFS share by same way of NAS4Free.
You can manage DomU(VM) via WebGUI.

Japanese blog:
http://shell.peach.ne.jp/aoyama/archives/3149
http://shell.peach.ne.jp/aoyama/archives/3135

NAS4Free dom0 topic in English:
http://forums.nas4free.org/viewtopic.php?f=17=10028

Latest download:
http://www.peach.ne.jp/archives/nas4free/test/2244-dom0/

How to install:
1.Download LiveCD iso image.
2.Burn to CD/DVD-RW blank disc.
3.Boot from it.
(if your server don't have an optical drive, please use an external USB optical 
drive)
4.Install to USB Flash drive (2GB or more) from menu #9.
5.Reboot the server after ejecting CD/DVD media.

How to upgrade:
1.Navigate to System|Firmware in global menu from web browser.
2.Click "Enable Firmware Update".
3.Select NAS4Free-dom0-embedded-*.img.xz. (don't decompress the image)
4.Click "Upgrade Firmware".

Note:
At least you need a bridge interface before using.
Please create it from Network|Interface Management|Bridge.
You can change boot parameters from System|Advanced|loader.conf.
If you are interested in the xl.cfg, it is created in 
/usr/local/etc/xen/vm-.cfg.

Known issues:
uuid generation of ports/sysutils/xen-tools is broken. You cannot control by 
UUID.
(quick hack patch is attached this mail)
xnb device performance is terrible.
(it eats 100% CPU on intr while transferring via bridged 10GbE)
--
If you don't know about NAS4Free, here is the key feature of NAS4Free:

multiple architecture image for amd64, i386, rpi, rpi2, odroid-c1.
running on memory disk. (no write access on boot device)
minimum memory requirement is 512MB.
single configuration file. (except extra service like vbox, syncthing)
one click disk import. (easy hardware switchable)

For more, please visit:
http://www.nas4free.org/
--

Enjoy Xen dom0 and NAS4Free collaboration!
Thanks,
--
Daisuke Aoyama


extra-patch-tools_libxl_xl_cmdimpl.c-n4f
Description: Binary data
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: Add isboot iSCSI boot driver to FreeBSD

2015-09-24 Thread Daisuke Aoyama

Hi,

First of all, thank you for using isboot.


The basic problem with isboot is that it only works with the old iSCSI
initiator, which is now marked obsolete.  AFAIK there is no ready solution


It's started in FreeBSD 7.1.
I plan to use initiator functions at 2010.
However, I didn't know how to access it.

For more, first post on blog(Japanese):
http://shell.peach.ne.jp/aoyama/archives/1179

Now isboot has own limited builtin initiator to handle login sequence.
isboot will continue to use it instead of switching to iSCSI initiator.

So I think current problem is header file (structure in it) only.
You don't need load iscsi_initiator.ko even if you use FreeBSD 10.

I have removed these header files in 0.2.11 release.
It is not so difficult compared to that to rewrite the code.
Of course, I should replace the code later...

http://www.peach.ne.jp/archives/isboot/isboot-0.2.11.tar.gz
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-10.2-RELEASE-amd64-memstick-isboot-0.2.11.img

You can boot/install with the demo and empty disk. (see attached N4F/istgt 
config image)

build test(not jail host):
 8.4, 9.3, 10.2, 11-current.
boot/install test:
 NAS4Free 10.2.0.2(istgt) + FreeBSD 10.2 memstick + VBox + iPXE(iso).

--
Daisuke Aoyama


--
From: "Edward TomaszNapierała" <tr...@freebsd.org>
Sent: Thursday, September 24, 2015 6:25 AM
To: "John Nielsen" <li...@jnielsen.net>
Cc: "freebsd-current Current" <freebsd-current@freebsd.org>; <aoy...@peach.ne.jp>; "Yonas Yanfa" 
<yo...@fizk.net>

Subject: Re: Add isboot iSCSI boot driver to FreeBSD


On 0923T0916, John Nielsen wrote:

On Sep 23, 2015, at 2:12 AM, Yonas Yanfa <yo...@fizk.net> wrote:

> isboot is a iSCSI boot driver written by Daisuke Aoyama that allows you to boot your root 
> partition using iSCSI.

[,,,]
> This was first announced way back in June, 2010:
>
> https://lists.freebsd.org/pipermail/freebsd-scsi/2010-June/004425.html
>
> I've tested the current version (v0.2.10) and it works with FreeBSD 10.2 booting a ZFS on 
> root installation:

>
> http://www.peach.ne.jp/archives/isboot/isboot-0.2.10.tar.gz
>
> I've used iSCSI boot with Ubuntu Server for a while and it's been very useful. I'm looking 
> forward to FreeBSD having the same capability built-in.


+1. I have used this module in the past and it is extremely useful. Thanks for the pointer, I 
wasn’t aware it had been updated for FreeBSD 10.x so recently. I’ve also wondered why this 
is not part of FreeBSD by default.


Aoyama-san, do you have any objection to this code being included in FreeBSD? If not, can you 
formally assign it a BSD or other friendly license? Thank you again for the work!


Trasz (or anyone), is there other work to support iSCSI booting and/or IBFT on FreeBSD? 
Anything else isboot might conflict with? Any problems with integrating the code or with the 
code itself?


The basic problem with isboot is that it only works with the old iSCSI
initiator, which is now marked obsolete.  AFAIK there is no ready solution
that works with the new one - however, it should be possible to use upcoming
reroot support to achieve this: boot with a temporary rootfs, mounted from
a ramdisk preloaded by loader(8), setup an iSCSI session, and then replace
the temporary rootfs with the real one, mounted over iSCSI. 

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

hastd fail and panic on MAXPHYS=1m

2015-05-07 Thread Daisuke Aoyama

Hi all,

I have problem with MAXPHYS=1m. (I don't know MAXPHYS=1m works on HAST.)

I put options MAXPHYS=(1024*1024) in kernel config.
Then, update primary node to the kernel and world.
If the role back to primary on the machine, writing to the hast device cause an 
error and panic.

I didn't check carefully, but it seems that geom_gate.ko use MAXPHYS=1m and hastd use 
MAXPHYS=128k.

Of course, secondary is MAXPHYS=128k at this time.

Is it an expected result?

Here is a log while manually mounted test:
[DEBUG][2] [hast1] (primary) ggate_recv: (0x20c4b240) Request received from the kernel: 
READ(163840, 28672).

[DEBUG][2] [hast1] (primary) ggate_recv: (0x20c4b240) Moving request to the 
send queues.
[DEBUG][2] [hast1] (primary) ggate_recv: Taking free request.
[DEBUG][2] [hast1] (primary) ggate_recv: (0x20c4b1f0) 
Gotg_vfs_done():hast/hast1p1[WRITE(offset=174784512, length=393216)]error = 6

/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
/mnt: got error 6 while accessing filesystem
free request.
[DEBUG][2] [hast1] (primary) ggate_recv: (0x20c4b1f0) Waiting for request from 
the kernel.
[DEBUG][2] [hast1] (primary) local_send: (0x20c4b240) Got request.
[DEBUG][2] [hast1] (primary) local_send: (0x20c4b240) Moving request to the 
done queue.
[DEBUG][2] [hast1] (primary) [DEBUG][2] [hast1] (primary) ggate_send: 
(0x20c4b240) Got request.
local_send: Taking request.
[DEBUG][2] [hast1] (primary) ggate_send: (0x20c4b240) Moving request to the 
free queue.
[DEBUG][2] [hast1] (primary) ggate_send: Taking request.
[ERROR] [hast1] (primary) G_GATE_CMD_START failed: Cannot allocate memory.
[DEBUG][1] Unable to receive event header: Socket is not connected.
softdep_deallocate_dependencies: got error 6 while accessing filesystem
/dev: got error 6 while accessing filesystem
panic: brelvp: Buffer 0xb33129d0 not on queue.
cpuid = 3
KDB: enter: panic

--
Daisuke Aoyama


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr)

2012-12-13 Thread Daisuke Aoyama

I've created FreeBSD clang world for RPI based on svn 244112 +
eabi.diff(NOT USE) + few NetBSD code.
I didn't test with -mfloat-abi=softfp but it might work.


If you haven't seen there is the start of FreeBSD ARM support in clang:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20121210/069693.html

I'm testing this with the version of clang we have in head and hope to
bring in support for clang and ARM soon.


I didn't see this, but it's not enough.
I already adjusted clang for your EABI patch, so the patched version of 
clang can be compiled for both OABI(apcs-gnu)

and EABI(aapcs).

Note that some world code is still broken for EABI w/clang.
--
Daisuke Aoyama


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr)

2012-12-12 Thread Daisuke Aoyama

Hi,

I've created FreeBSD clang world for RPI based on svn 244112 + eabi.diff(NOT 
USE) + few NetBSD code.

I didn't test with -mfloat-abi=softfp but it might work.

The first version is released at my Japanese blog:
http://shell.peach.ne.jp/aoyama/archives/2357

Thank you for many comments to previous versions.
Thank you for adding RPI support to FreeBSD.
Thank you for porting latest clang to head!
It's very useful for RPI developing now.

You can get the pre-build image from my archives:

http://www.peach.ne.jp/archives/rpi/
(At this time, freebsd-pi-clang-20121213.img.gz is the latest version.)

Download and decompress it, then write it to SD. This image requires SD 4GB 
or more.
I'm using as headless server. So, you need a serial console for seeing the 
boot log.
If you need to change the value on it, please mount the second partition 
(e.g. /dev/da0s2a).
If you want the video out, please remove the line of set 
console=comconsole in /boot/loader.rc.


Note: first time, it takes about 2 minutes for generating the SSH keys.
This version includes axe(ASIX AX88x7x/760) driver because smsc is not 
stable.
Now cc is clang instead of gcc. If you want to use gcc, specify or 
edit /etc/make.conf.

The initial setup code is taken from NetBSD.

Using config is here:
http://www.peach.ne.jp/archives/rpi/config/RPI-B-test8

Source and pacth is here:
http://www.peach.ne.jp/archives/rpi/patch/


Pre-configured for:

MEM 496MB/GPU 16MB/SWAP 512MB
I/O: multi-console (primary serial)
IP address: 192.168.1.240
Default router: 192.168.1.1
DNS: 192.168.1.1
sshd: enabled

User: pi
Password: raspberry
Password(root): raspberry

kernel section limit:
TS=256MB, DS=1024MB, SS=256MB

example of /etc/make.conf:
--
WITHOUT_X11=yes

WITH_CLANG=yes
WITH_CLANG_IS_CC=yes

# Now cc = clang is default
#CC=clang
#CXX=clang++
#CPP=clang-cpp

# For clang
NO_WERROR=
WERROR=

CFLAGS=-O2 -fno-strict-aliasing -pipe -march=armv6z -mtune=arm1176jzf-s 
-mfloat-abi=soft
COPTFLAGS=-O1 -fno-strict-aliasing -pipe -march=armv6z -mtune=arm1176jzf-s 
-mfloat-abi=soft

# For gcc
#CC=gcc
#CXX=g++
#CPP=cpp
--
How to use GPT USB stick in RPI:

(if you use something, delete/destory it before doing)
# gpart delete -i NN da0
# gpart destroy -F da0

(create new partition and format)
# gpart create -s gpt da0
# gpart add -t freebsd-ufs da0
# gpart show
# newfs -U -j /dev/da0p1

(mount it)
# mount /dev/da0p1 /mnt
--
Known problems:
o SD card is not configured correctly. (power on/off need if it's failed)
o hang the system. (unknown reason)
o smsc is not stable.
o alignment/padding is not same as gcc. (temporary avoid strict alignment 
now)
o call both IDCACHE_WBINV_ALL and DCACHE_WB_RANGE at switch. (can't work 
without both)

o still depend on GNU as (gas syntax).

TODO:
o modify/replace bcm2835 drivers.
o using clang -integrated-as.
o fix alignment with clang.
o self build.
o use EABI if possible.
o create build script :-)

Enjoy clang world in Raspberry Pi!
Thank you.
--
Daisuke Aoyama 


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [CFT] ZFS v15 patch (version 3)

2010-07-08 Thread Daisuke Aoyama

Hi,

Martin Matuska wrote:

For people just wanting to try the new features, I am providing mfsBSD
ISO's with ZFS-on-root install (don't forget the -V 15 flag to the
zfsinstall command):
http://mfsbsd.vx.sk/iso/8.1rc2-zfsv15-v3.iso (without symbols, 99 MB)
http://mfsbsd.vx.sk/iso/8.1rc2-zfsv15-v3-debug.iso (with symbols, 188 MB)


I'm very interested in ZFS v15. So, I made isboot integrated version.
It provides to install it to an iSCSI target directly and boot from
the iSCSI target without any configuration. You can play new features
easily on a diskless machine.

Download link:
http://www.peach.ne.jp/archives/isboot/demo/8.1rc2-zfsv15-v3-isboot-0.2.2.iso
(only add isboot.ko and isboot_load=YES to loader.conf)

Known issues:
zfsintall destroy existing loader.conf.

You must add isboot_load=YES before reboot.

# echo 'isboot_load=YES'  /mnt/boot/loader.conf

Or, load isboot.ko from loader prompt before booting, then add it.

For more detail about isboot, please refer to:
http://lists.freebsd.org/pipermail/freebsd-scsi/2010-July/004434.html
---
Here is an example configuration of istgt, and result of installed
system created by zfsinstall -V15 -d da0 -d da1 -r mirror

Note: this iSCSI test server is very poor.
(celeron 430, single core 1.8GHz, 2GB of RAM, 3 HDDs for iSCSI)
If you have better CPU/RAM, you can get more performance.
At least, istgt can handle upto Read 110MB/s and Write 103MB/s
at single path, Read 190MB/s and Write 173MB/s at dual path.
I sent PR(148422) of tested istgt, you become to able to install it
from ports soon.
---
[InitiatorGroup200]
 InitiatorName iqn.2007-09.jp.ne.peach:pluto
 Netmask 192.168.3.0/24
 Netmask 192.168.4.0/24

[LogicalUnit200]
 TargetName iqn.2007-09.jp.ne.peach:isboot-zfs15
 Mapping PortalGroup1 InitiatorGroup200
 AuthMethod Auto
 UseDigest Auto
 UnitType Disk
 QueueDepth 64
 LUN0 Storage /iscsi2/istgt-isboot-disk2 64GB
 LUN1 Storage /iscsi3/istgt-isboot-disk3 64GB
---
zfs15# zpool status
 pool: tank
state: ONLINE
scrub: none requested
config:

   NAMESTATE READ WRITE CKSUM
   tankONLINE   0 0 0
 mirrorONLINE   0 0 0
   da0p2   ONLINE   0 0 0
   da1p2   ONLINE   0 0 0

errors: No known data errors
zfs15# diskinfo -tv da0
da0
   512 # sectorsize
   68719476736 # mediasize in bytes (64G)
   134217728   # mediasize in sectors
   0   # stripesize
   0   # stripeoffset
   8354# Cylinders according to firmware.
   255 # Heads according to firmware.
   63  # Sectors according to firmware.
   1200# Disk ident.

Seek times:
   Full stroke:  250 iter in   0.124733 sec =0.499 msec
   Half stroke:  250 iter in   0.124850 sec =0.499 msec
   Quarter stroke:   500 iter in   0.257124 sec =0.514 msec
   Short forward:400 iter in   0.199661 sec =0.499 msec
   Short backward:   400 iter in   0.199841 sec =0.500 msec
   Seq outer:   2048 iter in   1.034727 sec =0.505 msec
   Seq inner:   2048 iter in   1.033702 sec =0.505 msec
Transfer rates:
   outside:   102400 kbytes in   1.768069 sec =57916 kbytes/sec
   middle:102400 kbytes in   1.786156 sec =57330 kbytes/sec
   inside:102400 kbytes in   1.759042 sec =58214 kbytes/sec
zfs15# camcontrol tags da0 -v
(pass0:isboot0:0:0:0): dev_openings  63
(pass0:isboot0:0:0:0): dev_active0
(pass0:isboot0:0:0:0): devq_openings 63
(pass0:isboot0:0:0:0): devq_queued   0
(pass0:isboot0:0:0:0): held  0
(pass0:isboot0:0:0:0): mintags   2
(pass0:isboot0:0:0:0): maxtags   255
---
--
Daisuke Aoyama




___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [Need Help]isboot (iSCSI boot driver) version 0.2.1

2010-07-04 Thread Daisuke Aoyama

Hi,


Notes/Known Issues/Limitations:
FreeBSD can't use transfer length  64KB.


Since 8.0 FreeBSD can use any transfer lengths. 64K is a safety limit
for CAM SIMs that do not report maximum transfer size. If your driver
supports bigger transactions (and even if not), you should fill maxio
field in XPT_PATH_INQ response.


I set maxio=1024*1024 in version 0.2.2. As a result, the request (each ccb)
have 256 blocks (128KB). I don't know why it is 128KB.


It seems CAM tag is used only 2 of 64 tags.
I don't know a reason, but MAXPHYS limit?


How many concurrent requests you are submitting? If you are testing it
with sequential read from file system - make sure you have sysctl
vfs.read_max set high enough. MAXPHYS does not affects number of
concurrent requests, only size of each one.


I used vfs.read_max=32 and run only one dd. Now vfs.read_max=2048.
I tried to run dd 4 times at background, then I got 4 x 30MB/s (read) and
4 x 21MB/s (write). Write is still slower than read, but it is enough.
I can see 1 or 2 tags when reading, around 10 tags when writing.
I guess that reading tag exists only for a short time.
(or my execution order is not good)

Thank you.
Daisuke Aoyama 
___

freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [Need Help]isboot (iSCSI boot driver) version 0.2.1

2010-07-04 Thread Daisuke Aoyama

Updated to 0.2.2

I noticed a bug after writing previous mail.
sosend was called from XPT_SCSI_IO with locked mutex.
It caused sleeping thread owns a non-sleepable lock.

What's new?:
add auto sense.
add maxio=1m.
modify max tags by iSCSI command window.
fix locked sleep problem.

Download links:
http://www.peach.ne.jp/archives/isboot/isboot-0.2.2.tar.gz

Download links(for testing purpose only):
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-7.3-RELEASE-amd64-isboot-0.2.2.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-7.3-RELEASE-i386-isboot-0.2.2.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-8.1-RC2-amd64-isboot-0.2.2.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-8.1-RC2-i386-isboot-0.2.2.iso
http://www.peach.ne.jp/archives/isboot/demo/unionfs-mkisboot.sh

--
Daisuke Aoyama


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [Need Help]isboot (iSCSI boot driver) version 0.2.1

2010-07-04 Thread Daisuke Aoyama
)
istgt_iscsi.c: 744:istgt_iscsi_write_pdu: Data write 262144
istgt_iscsi.c: 367:istgt_iscsi_write: Write 262144 bytes (no padding)
istgt_iscsi.c:2811:istgt_iscsi_transfer_in: Transfer=1048576, Offset=524288, 
Len=262144
istgt_iscsi.c:2814:istgt_iscsi_transfer_in: StatSN=15352, DataSN=2, 
Offset=524288, Len=262144

istgt_iscsi.c: 678:istgt_iscsi_write_pdu: BHS write 48
istgt_iscsi.c: 367:istgt_iscsi_write: Write 48 bytes (no padding)
istgt_iscsi.c: 744:istgt_iscsi_write_pdu: Data write 262144
istgt_iscsi.c: 367:istgt_iscsi_write: Write 262144 bytes (no padding)
istgt_iscsi.c:2811:istgt_iscsi_transfer_in: Transfer=1048576, Offset=786432, 
Len=262144
istgt_iscsi.c:2814:istgt_iscsi_transfer_in: StatSN=15352, DataSN=3, 
Offset=786432, Len=262144

istgt_iscsi.c: 678:istgt_iscsi_write_pdu: BHS write 48
istgt_iscsi.c: 367:istgt_iscsi_write: Write 48 bytes (no padding)
istgt_iscsi.c: 744:istgt_iscsi_write_pdu: Data write 262144
istgt_iscsi.c: 367:istgt_iscsi_write: Write 262144 bytes (no padding)
istgt_iscsi.c:4760:worker: kevent sock 40 (timeout 2ms)
---
--
Daisuke Aoyama


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


[Need Help]isboot (iSCSI boot driver) version 0.2.1

2010-07-03 Thread Daisuke Aoyama

Hi all,

I uploaded isboot 0.2.1.
Now isboot supports R2T command and non-immediate mode.
I believe that the compatibility of iSCSI target is improved.
Please check it with your iSCSI target and NIC.
Also this version supports task queue, which improves performance.
My test machine got read 74MB/s, write 60MB/s (at bs=1m).

Notes/Known Issues/Limitations:
FreeBSD can't use transfer length  64KB.
It seems CAM tag is used only 2 of 64 tags.
I don't know a reason, but MAXPHYS limit?


How to build/upgrade:

# cd /usr/src
# tar xvf /path/to/iscsi-2.2.4.tar.gz
# tar xvf /path/to/isboot-0.2.1.tar.gz

# make buildkernel
# make installkernel
or
# cd /usr/src/sys/modules/iscsi/isboot
# make obj
# make depend
# make clean
# make all
# make install

After installation, please reboot the server to take effect.
Confirm the log shows iSCSI boot driver version 0.2.1.

What's new?:
* support CHAP/Mutual CHAP
* add task queue
* R2T command and non-immediate mode

Performance(without digest):
# dd if=/dev/da4 of=/dev/null bs=1m count=1k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 14.374117 secs (74699672 bytes/sec)
# dd if=/dev/zero of=/dev/da4 bs=1m count=1k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 17.823493 secs (60243064 bytes/sec)

Download links:
http://www.peach.ne.jp/archives/isboot/isboot-0.2.1.tar.gz

Download links(for testing purpose only):
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-7.3-RELEASE-amd64-isboot-0.2.1.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-7.3-RELEASE-i386-isboot-0.2.1.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-8.1-RC2-amd64-isboot-0.2.1.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-8.1-RC2-i386-isboot-0.2.1.iso
http://www.peach.ne.jp/archives/isboot/demo/unionfs-mkisboot.sh

gPXE + isboot + istgt(for reference):
http://lists.freebsd.org/pipermail/freebsd-scsi/2010-June/004432.html

Previous versions:
http://lists.freebsd.org/pipermail/freebsd-scsi/2010-June/004431.html
http://lists.freebsd.org/pipermail/freebsd-scsi/2010-June/004425.html

I hope this helps you. Enjoy it.
Daisuke Aoyama 


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


isboot (iSCSI boot driver) version 0.1.3

2010-06-26 Thread Daisuke Aoyama

Updated isboot to 0.1.3. Try this.

How to build/upgrade:

# cd /usr/src
# tar xvf /path/to/iscsi-2.2.4.tar.gz
# tar xvf /path/to/isboot-0.1.3.tar.gz

# make buildkernel
# make installkernel
or
# cd /usr/src/sys/modules/iscsi/isboot
# make obj
# make depend
# make all
# make install

After installation, please reboot the server to take effect.
Confirm the log shows iSCSI boot driver version 0.1.3.

What's new?:
* improve session recovery mode.
* fix panic when socket is lost.

Download links:
http://www.peach.ne.jp/archives/isboot/isboot-0.1.3.tar.gz

Download links(for testing purpose only):
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-7.3-RELEASE-amd64-isboot-0.1.3.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-7.3-RELEASE-i386-isboot-0.1.3.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-8.1-RC1-amd64-isboot-0.1.3.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-8.1-RC1-i386-isboot-0.1.3.iso
http://www.peach.ne.jp/archives/isboot/demo/unionfs-mkisboot.sh

I hope this helps you. Enjoy it.
Daisuke Aoyama


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: iSCSI boot driver version 0.1.1 for iBFT

2010-06-26 Thread Daisuke Aoyama

---

Notes:
You have to configure DNS (/etc/resolv.conf) and hostname manually.
Or must set exactly matched IP/mask/route in iBFT by sysinstall.
This is current limitation. (sysintall breaks booted NIC parameter.)

--
Daisuke Aoyama


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: iSCSI boot driver version 0.1.1 for iBFT

2010-06-25 Thread Daisuke Aoyama

Sorry, isboot-0.1.1 was broken under i386 kernel + loader.
The version 0.1.2 is uploaded in my blog.
Also I uploaded isboot integrated FreeBSD 7.3 disc1, 8.1-RC1 dics1 and
making script. Use at your own risk.

You need only iBFT supported NIC and iSCSI target.

Please see Intel's site about iBFT supported NIC.
http://www.intel.com/support/network/adapter/pro100/sb/CS-028681.htm

If you can connect to iSCSI target by NIC BIOS, isboot.ko shows the
following log.

In this case, em0 is configured automatically with NIC0 parameter in iBFT,
and you can install FreeBSD to da1 directly and you can boot from da1.

If you want to try to copy existing FreeBSD, then configure NIC and
loading isboot.ko via loader.conf or kldload isboot.ko from shell.
Then, use normal way such as dump/restore.

Note: do not set IP to em0 when installation. it might be a problem.
---
iSCSI boot driver version 0.1.2
IS: Initiator name: iqn.2007-09.jp.ne.peach:pluto
NIC0: IP address: 192.168.3.48
NIC0: Prefix: 24
NIC0: Gateway: 0.0.0.0
NIC0: MAC address: 00:15:17:97:85:ab
TGT0: Target IP address: 192.168.3.36
TGT0: Target Port: 3260
TGT0: Target LUN: 2
TGT0: Target name: iqn.2007-09.jp.ne.peach:isboot1
Boot NIC: em0
Configure IPv4 by NIC0
Attempting to login to iSCSI target and scan all LUNs.
... cut ...
da0 at isboot0 bus 0 scbus0 target 0 lun 0
da0: FreeBSD iSCSI DISK 0001 Fixed Direct Access SCSI-5 device
da0: 40960MB (83886080 512 byte sectors: 255H 63S/T 5221C)
da1 at isboot0 bus 0 scbus0 target 0 lun 2
da1: FreeBSD iSCSI DISK 0001 Fixed Direct Access SCSI-5 device
da1: 10240MB (20971520 512 byte sectors: 255H 63S/T 1305C)
da2 at isboot0 bus 0 scbus0 target 0 lun 3
da2: FreeBSD iSCSI DISK 0001 Fixed Direct Access SCSI-5 device
da2: 1024MB (2097152 512 byte sectors: 64H 32S/T 1024C)
... cut ...
Boot device: da1
---

Download links:
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-7.3-RELEASE-amd64-isboot-0.1.2.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-7.3-RELEASE-i386-isboot-0.1.2.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-8.1-RC1-amd64-isboot-0.1.2.iso
http://www.peach.ne.jp/archives/isboot/demo/FreeBSD-8.1-RC1-i386-isboot-0.1.2.iso
http://www.peach.ne.jp/archives/isboot/demo/unionfs-mkisboot.sh

Try it you self :)
Daisuke Aoyama


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


iSCSI boot driver version 0.1.1 for iBFT

2010-06-24 Thread Daisuke Aoyama

Hello,

I made small device driver for the first time. It is published on my blog.
Because it is written in Japanese, I try to write here.

This module provides initial connection of the iSCSI target with setting
via iBFT (iSCSI Boot Firmware Table). Currently, it is intended to use
Intel NIC and istgt (iSCSI target). Any other cards, targets may not work.
Also, I'm developing under FreeBSD 7.3. (build check under 8.1)

Please refer to Microsoft website about iBFT:
http://www.microsoft.com/whdc/system/platform/firmware/ibft.mspx

I did't use iscsi_initiator.ko within kernel module. So, I'm creating
a small version of initiator based on iscsi-2.2.4 and istgt-20100606.
Now it have only one cmd holding space in the iSCSI session and use
polling. It should be added the queuing/asynchronous operation :)

After loading it via /boot/loader.conf, you can install to/boot from the
iSCSI target as same as a local SCSI harddisk. Complex settings such as
TFTP, NFS, DHCP and PXE are no longer needed. Just use /dev/da0 and so on.

How to compile:
isboot is a stand alone iSCSI initiator, but source code is depend on
the header file of iscsi-2.2.4. You need to extract iscsi-2.2.4 before
compiling isboot.

# cd /usr/src
# tar xvf /path/to/iscsi-2.2.4.tar.gz
# tar xvf /path/to/isboot-0.1.1.tar.gz

# make buildkernel
# make installkernel
or
# cd /usr/src/sys/modules/iscsi/isboot
# make obj
# make depend
# make all
# make install

After above install, you have /boot/kernel/isboot.ko.

Using as module:
Add isboot_load=YES to /boot/loader.conf.
Setup iSCSI target. (recommend istgt-20100407 or later)
Configure NIC BIOS to connect the target.
Try to boot the server.

If the NIC find the target, iBFT can be found by isboot.
Then, isboot create own bus for CAM device with iBFT parameters.
All LUNs in the target are appeared in the bus.
Once FreeBSD + isboot is booted, you can handle it by camcontrol and
other normal way as same as SCSI HDD.

If you want full install and boot demo, please download
FreeNAS 0.7.2 5226 p4 from my blog and try it without local harddisk.

FYI: FreeNAS 0.7.1 5127 (stable) includes istgt-20100407.
FYI: FreeNAS 0.7.2 5226 p3 includes istgt-20100606.
FYI: FreeNAS 0.7.2 5226 p4 includes istgt-20100606 + isboot-0.1.1.

sysctl MIBs (read only):
net.isboot.version
net.isboot.nic
net.isboot.device
hw.ibft.nic_gateway
hw.ibft.nic_prefix
hw.ibft.target_lun
hw.ibft.target_port
hw.ibft.target_address
hw.ibft.target_name
hw.ibft.initiator_address
hw.ibft.initiator_name

Performance (read from the target):
All using Intel PRO/1000 PT Server Adapter.
istgt 20100606 + isboot 0.1 with header/data digest(CRC32C):
# dd if=/dev/da6 of=/dev/null bs=1m count=1k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 20.452429 secs (52499477 bytes/sec)

istgt 20100606 + isboot 0.1 with header digest:
# dd if=/dev/da6 of=/dev/null bs=1m count=1k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 17.684945 secs (60715022 bytes/sec)

istgt 20100606 + isboot 0.1 without digest:
# dd if=/dev/da6 of=/dev/null bs=1m count=1k
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 17.508400 secs (61327239 bytes/sec)

Notes/Known Issues/Limitations:
bootup/reconnect time might be a little long.
ifconfig(8),route(8),etc should not change booted NIC and critical path.
Unload the module will cause to panic.
IPv6 is not tested.
DNS is not configured.
Queuing is not supported at this time.
CHAP is not supported at this time.
Can't configure iSCSI parameter without modifing soure code.
Can't reject running XPT command when the socket is lost.
Can't exchange the session to iscsi_initiator.ko.
The source code depend on iscsi initiator's structure.
(first I tried to use it, but finally gave up)
The controller such as iscontrol(8) is not provided.
Documentation is not written.
I'm new to the kernel land. If you have any suggestion, please tell me.

Download here (the page is Japanese only):
isboot-0.1.1
http://shell.peach.ne.jp/aoyama/archives/1179

FreeNAS 0.7.2 5226 p4
http://shell.peach.ne.jp/aoyama/archives/1181

FYI: danny's iscsi initiator:
ftp://ftp.cs.huji.ac.il/users/danny/freebsd/iscsi-2.2.4.tar.gz

Regards,
Daisuke Aoyama 
___

freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


[PATCH] VirtualBox headless VNC support by LibVNCServer (20100211)

2010-02-14 Thread Daisuke Aoyama

Hi, all

First, thank you for using my patch.
This archive contains individual patch files and modified Makefile.
Please select options you want before building. then make with normal way.

What's new?:
Send ScrollLock when press Ctrl+Scroll or Ctrl+Pause.
Fixed 16bpp mode have incorrect settings.
(it may cause the viewer confuse, now is send 32bpp instead of 16bpp)
Show port 0 when VNC Server disabled.
Code cleanup.

# cd /usr/ports/emulators/virtualbox-ose
# tar xvf /path/to/vboxvnc-20100211.tar.gz
# make config
# make

It provides VNC server for guest OS console access in VBoxHeadless frontend.
Supported Options:
  -v, -vnc, --vnc on|offEnable (default) or disable the VNC
Server
  -a, -vncaddress, --vncaddress ipIP address the VNC server will bind
to
  -p, -vncport, --vncport portPort number the VNC server will
bind to
  -k, -vnckeymap, --vnckeymap keymap  Keyboard mapfile (default: builtin
US)
  -S, -vncsecret, --vncsecret secret  VNC Authentication secret

three options at one line is an equivalent option, for example:
-v on, -vnc on, --vnc on are same feature.

-v option specify whether VNC server starts in the machine.
default is on (enable).

-a and -p options specify IP address and port number of VNC server.
default IP is wildcard, port is 5900. If you have multiple IPs(NICs) in your
system,
you can select the listen address of the server.

-k option specify the keyboard layout convert from VNC keys to Scancodes.
default is US standard 101keys. (I tested only US 101 keyboard)
If you want another keyboard, you can spcify the path of kbdmap(5).
In standard installation of FreeBSD, it's located in
/usr/share/syscons/keymaps/.
for example, -k /usr/share/syscons/keymaps/jp.106.kbd uses JP 106
keyboard.

-S option specify the password of the VNC server.
However, it have security risk in common server. It assumed used with
FreeNAS
(limited user environment). Please consider the risk by using command line.

When starting the VM, the proctitle is changed like below (you can see by
ps axww):
VBoxHeadless: VM: TestVM4 Port: 5900 Auth: off (VBoxHeadless)

Regards,
Daisuke Aoyama


vboxvnc-20100211.tar.gz
Description: Binary data
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org