Re: [FreeBSD Questions] Filesystem image as root

2009-11-16 Thread James Phillips


--- On Sun, 11/15/09, CyberLeo Kitsana cyber...@cyberleo.net wrote:
 James Phillips wrote:
  Date: Sat, 14 Nov 2009 20:29:59 -0600
  From: CyberLeo Kitsana cyber...@cyberleo.net
  Subject: [FreeBSD Questions] Filesystem image as
 root
 
  The single IDE connector is accessible via the
 legacy ISA
  ports, and is
  thus limited to PIO modes (about 1.6MB/sec max,
 even with
  an actual hard
  drive instead of a CF card).
  
  You are off by an order of magnitude (base 2 or 10):
  Pio mode 0 is ~3.3 MB/s
  Pio mode 4 is ~16.7 MB/s
  
  http://www.pcguide.com/ref/hdd/if/ide/modesPIO-c.html
  
  You can probably set PIO mode 4 for with:
  # atacontrol mode ad0 PIO4
 
 If only that were true in this case.
 
 (85eef1f3)[r...@ss4200 ~]# atacontrol mode ad0 PIO4
 current mode = PIO2
 (85eef1f3)[r...@ss4200 ~]# atacontrol mode ad0 PIO4
 current mode = PIO2
 (85eef1f3)[r...@ss4200 ~]# dd if=/dev/ad0 of=/dev/null
 bs=4096 count=4096
 4096+0 records in
 4096+0 records out
 16777216 bytes transferred in 10.111748 secs (1659181
 bytes/sec)
 
 Nothing I've tried seems to boost the throughput, hence the
 desire to
 use a compressed cached filesystem image.
 
 Thanks for the suggestions, though!
Ouch!

I thought the laptop I was fixing last week was bad: running Vista with a 
10MB/s transfer rate :P

The drive in my Pentium 166 gets 11-12MB/s.

I actually looked up both the PIO modes:
http://en.wikipedia.org/wiki/Programmed_input/output

And the spec sheet (assuming Tom's hardware was wrong) before composing my 
original reply:
Intel® Entry Storage System SS4200-E
Technical product specification [PDF]
http://download.intel.com/support/motherboards/server/ss4200-e/sb/ss4200e_tps_11.pdf

I noted that the ATA port is not listed as a feature, which is not a good sign. 
It does appear in the block-diagram labeled:DOM
Glossary definition: Disk On Module

If I had to guess: Intel did something weird or non-standard to the port, 
so the standard BSD driver does not work properly.
Have you read the ata(4) manual page?
The following  /boot/device.hints are suggested for ISA:
hint.ata.0.at=isa
hint.ata.0.port=0x1f0
hint.ata.0.irq=14
. . . port '1' probably not needed
I had a thought: it could just as easily be pc98 if they don't intend for you 
to touch the firmware.


The firmware has source code available under a GPL license.
EMCLifeLineOEMSW-1.0-GPLComponents.tar.gz
Ver:1.0 Date:9/24/2009  Size:125585 (KB)

EMCLifeLineOEMSW-1.1-GPLComponents.tar.gz
Ver:1.1 Date:9/24/2009  Size:244406 (KB)

If you are worried about license contamination, you may have to get somebody to 
look through that and document any changes (to the ATA interface). Hopefully it 
is based on a well-know code-base like Linux and the diff utility can be used.

Of course, the term components implies they only expose a HAL of some kind.

Regards,

James Phillips

PS:# atacontrol mode ad0 will simply print out the current mode.



  __
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [FreeBSD Questions] Filesystem image as root

2009-11-16 Thread CyberLeo Kitsana
James Phillips wrote:
 
 --- On Sun, 11/15/09, CyberLeo Kitsana cyber...@cyberleo.net wrote:
 James Phillips wrote:
 Date: Sat, 14 Nov 2009 20:29:59 -0600
 From: CyberLeo Kitsana cyber...@cyberleo.net
 Subject: [FreeBSD Questions] Filesystem image as
 root
 The single IDE connector is accessible via the
 legacy ISA
 ports, and is
 thus limited to PIO modes (about 1.6MB/sec max,
 even with
 an actual hard
 drive instead of a CF card).
 You are off by an order of magnitude (base 2 or 10):
 Pio mode 0 is ~3.3 MB/s
 Pio mode 4 is ~16.7 MB/s

 http://www.pcguide.com/ref/hdd/if/ide/modesPIO-c.html

 You can probably set PIO mode 4 for with:
 # atacontrol mode ad0 PIO4
 If only that were true in this case.

 (85eef1f3)[r...@ss4200 ~]# atacontrol mode ad0 PIO4
 current mode = PIO2
 (85eef1f3)[r...@ss4200 ~]# atacontrol mode ad0 PIO4
 current mode = PIO2
 (85eef1f3)[r...@ss4200 ~]# dd if=/dev/ad0 of=/dev/null
 bs=4096 count=4096
 4096+0 records in
 4096+0 records out
 16777216 bytes transferred in 10.111748 secs (1659181
 bytes/sec)

 Nothing I've tried seems to boost the throughput, hence the
 desire to
 use a compressed cached filesystem image.

 Thanks for the suggestions, though!
 Ouch!
 
 I thought the laptop I was fixing last week was bad: running Vista with a 
 10MB/s transfer rate :P
 
 The drive in my Pentium 166 gets 11-12MB/s.
 
 I actually looked up both the PIO modes:
 http://en.wikipedia.org/wiki/Programmed_input/output
 
 And the spec sheet (assuming Tom's hardware was wrong) before composing my 
 original reply:
 Intel® Entry Storage System SS4200-E
 Technical product specification [PDF]
 http://download.intel.com/support/motherboards/server/ss4200-e/sb/ss4200e_tps_11.pdf
 
 I noted that the ATA port is not listed as a feature, which is not a good 
 sign. It does appear in the block-diagram labeled:DOM
 Glossary definition: Disk On Module

The model I have is the SS-4200EHW. Identical, save the lack of a DOM
and firmware. And price.

 If I had to guess: Intel did something weird or non-standard to the port, 
 so the standard BSD driver does not work properly.
 Have you read the ata(4) manual page?
 The following  /boot/device.hints are suggested for ISA:
 hint.ata.0.at=isa
 hint.ata.0.port=0x1f0
 hint.ata.0.irq=14

This is actually how I got the amd64 build to recognize the port. These
lines were present in x86, but missing in amd64 device.hints.

 . . . port '1' probably not needed
 I had a thought: it could just as easily be pc98 if they don't intend for 
 you to touch the firmware.

Hm. This might be something to look into.

 The firmware has source code available under a GPL license.
 EMCLifeLineOEMSW-1.0-GPLComponents.tar.gz
 Ver:1.0   Date:9/24/2009  Size:125585 (KB)
 
 EMCLifeLineOEMSW-1.1-GPLComponents.tar.gz
 Ver:1.1   Date:9/24/2009  Size:244406 (KB)

I checked previously, and Linux has the same limitations. The port is
recognized as a legacy ISA IDE port by the ide-generic driver, and maxes
out at a ludicrously low throughput. The official firmware gets around
this by preloading filesystems into RAM.

 If you are worried about license contamination, you may have to get somebody 
 to look through that and document any changes (to the ATA interface). 
 Hopefully it is based on a well-know code-base like Linux and the diff 
 utility can be used.
 
 Of course, the term components implies they only expose a HAL of some kind.
 
 Regards,
 
 James Phillips
 
 PS:# atacontrol mode ad0 will simply print out the current mode.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
cyber...@cyberleo.net

Furry Peace! - http://.fur.com/peace/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


[FreeBSD Questions] Filesystem image as root

2009-11-14 Thread CyberLeo Kitsana
I have been thinking and experimenting for weeks, but I cannot figure
this out.

I have an Intel SS4200 NAS that I wish to use as a ZFS NAS with FreeBSD 8.0.

The device has 4 SATA bays, and I don't want to use one for a UFS root disk.

I don't want to use up hundreds of megabytes of RAM preloading an
mfsroot that can never shrink.

The single IDE connector is accessible via the legacy ISA ports, and is
thus limited to PIO modes (about 1.6MB/sec max, even with an actual hard
drive instead of a CF card).

Performance is acceptable when using a geom_uzip image from a CF card on
the IDE connector, as a lot of it ends up cached in RAM (and is
evictable in case of memory pressure, unlike an mfsroot).

Try as I might, I am unable to figure out how to use a uzip imagefile on
UFS as a root filesystem, without dedicating a slice/partition to it.
There seems to be nothing approximating GNU/Linux's pivot_root, and
using a stub init (which cannot be a shellscript...?) to mdconfig and
mount the image, then chroot to that to exec /sbin/init appears to lead
to instant deadlock.

I don't really like the idea of mounting the image somewhere below root,
and using symlink spaghetti to get everything proper; especially since I
wish to place such essentials as /sbin and /etc thereupon, which leads
to a bit of a chicken-and-egg problem with setting up and mounting an
image that contains its mdconfig and mount...

Am I missing something obvious here, or am I truly treading unexplored
territory?

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
cyber...@cyberleo.net

Furry Peace! - http://.fur.com/peace/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org