We Got Served Forums: Freenas On Acer Easystore H340 - We Got Served Forums

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Freenas On Acer Easystore H340 Freenas, h340, acer, easystore, freebsd, marvell,paininmyass

#1
User is offline   swartz 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 09-November 09
For those who read my posts on not being able to get FreeNas to work on Acer easyStore H340... Well, I finally was able to get it working for the most part (just a few minor issues remaining).

Instead of adding this as a reply to another thread about FreeBSD/OpenSolaris on H340, I thought this guide deserved a thread of its own. But you can see my earlier posts in the other thread over here: http://forum.wegotse...solarisfreebsd/

After days of researching, debugging, and trying things out I'm happy to get FreeNAS to work on H340.

First things first, get either a X1 PCIe Video card like I did or buy a set of special cables for the debug header. I bought an ATI FireMV 2250 X1 PCIe video card for CAD ~$100. There may be cheaper ones available but that was all I could find locally on a short notice. If someone can find a cheaper X1 or X4 video card, let me know I'd be interested. If you're interested in the cables, this guy sells them: http://www.mediasmar....php?f=6&t=3980 . Alternatively you can make your own.

In theory, you could do this install blindly using nothing but keyboard, but I would not suggest doing that. Especially if something does not go according to plan.

Things you need:
H340 service manual, read it. It gives you a lot of information about the location of things on the motherboard, chipsets, etc. Available here or you can Google to find it:
http://support.acer....OK_20080226.pdf

You need 2 USB sticks.
One with FreeNAS embedded install. You can consult FreeNAS website on how to image it onto a USB stick. The other USB stick with Marvell driver for FreeBSD (if_myk.ko) and libmbpool.ko (dependency for the driver). Read the FreeBSD/OpenSalaris thread I linked to above for info on where to get these files. Make sure that they're both either 32bit or 64bit variety. Do not mix and match them. My install uses 64bit FreeNAS and, consequently, 64bit driver and module.

You could install FreeNAS onto a harddrive on another machine and then plug into H340, but I like FreeNAS much better when its running off a USB stick. This eliminates at least one point of failure (spinning disk) for my NAS and keeps the actual NAS OS install as small and as simple as possible. You need something like a 64Mb USB stick as a minimum for FreeNAS. I used 256Mb stick for FreeNAS and another one for the drivers.

How to:
1. Jump JP3 jumper on the H340 motherboard to enter BIOS
2. Attach your USB drive with FreeNAS and a keyboard to H340
3. Start the H340 and enter BIOS by hitting F2.
4. Change the BIOS boot order to let you USB drive be the first boot device and save the BIOS settings
5. Reboot you H340 and let FreeNAS boot up from your USB stick. Once it is done you will have no ethernet connection as the driver has not been loaded yet.
6. Attach the USB stick with two .ko files on it
7. Enter shell console (option 6) in FreeNAS menu
8. Create a mount point for your USB device and mount your USB drive to it. I created /mnt/usb. Also your device might be called differently. So you might have to change this around. Another assumption is that the USB stick with drivers is FAT/FAT32 formatted.
mkdir /mnt/usb
mount_msdosfs /dev/da0s1 /mnt/usb


9. Run these two commands in order that they appear. This will load driver dependency and then the driver itself.
kldload /mnt/usb/libmbpool.ko
kldload /mnt/usb/if_myk.ko


10. You should now have your Marvell GigE interface brought up and connected to your network.
11. Exit the shell
exit

12. Select option (1) in the FreeNAS menu to assign interface and select your interface. Should be myk0 (not lo0!)
13. Select option (2) in FreeNAS menu to set lan IP address (or configure via DHCP)
14. Now you device should have an IP address.
15. Using a web browser connect to this IP to get FreeNAS WebGUI.
16. Add a disk, format it if necessary and mount the volume/partition. Make sure you know what you're doing here, otherwise you might lose your data. Consult FreeNAS guides for more info.
17. Let's presume that your partition is mounted on /mnt/my_first_disk
18. Copy the two .ko modules (driver and its dependency) from /mnt/usb to /mnt/my_first_disk or some directory thereof. You can do it via shell or from FreeNAS WebGUI -> Advanced -> Execute command and run the copy command below. This will put the two drivers on your hard drive. Meaning without that drive mounted at that point your H340 wont have the network if you reboot it without these drivers available. I'm working out on how to slip these drivers straight into FreeNAS embedded image. And someone else already posted a feature request to include these drivers in the future releases of FreeNAS here: https://sourceforge....51&atid=782619. The more people will request it the more likely it will become available. So, please, go there, sign up and make a request to show that this is a highly requested feature (thanks!).
cp /mnt/usb/*.ko /mnt/my_first_disk/


19. In FreeNAS WebGUI -> System -> Advanced -> Command scripts add following commands (one at a time and in the order listed) as PostInit. This will load the dependency, and driver automatically. This assumes that they're on the whatever drive at that mount point.
kldload /mnt/my_first_disk/libmbpool.ko
kldload /mnt/my_first_disk/if_myk.ko
ifconfig myk0 -txcsum

The last command will turn off hardware checksumming (for both tx and rx as they get turned on/off as a pair as per Marvell driver readme file). There is a bug in the driver and/or FreeNAS/FreeBSD that prevents FreeNAS from properly functioning after reboot/shutdown. At this point in time, if you do not turn off hardware checksumming on Marvell, FreeNAS will not be responsive upon a reboot. This was a stumbling block for me until I was able to narrow it down to checksumming issues after debugging things for a while. See this ticket for more info: http://sourceforge.n...951&atid=782619 . Possible fix exists in FreeBSD-current , but you have to backport the changes to msk(4) driver to FreeBSD 7.2 and then to FreeNAS . I'm not at the point to be able to do that.
20. In FreeNAS WebGUI -> System -> Advanced -> rc.conf, add variable called if_myk_load with value YES . No quotes. This enables Marvell NIC
21. You can restart your system now and it should come back up with no problems.



There exist some minor issues that I yet to find a solution for:
a.) i icon just flashes the whole time when booted in FreeNAS
b.) hard drive icons are off the whole time
c.) Additional drivers have to reside somewhere other than FreeNAS boot disk, but this might be solved in the next FreeNAS release by simply including the new Marvell driver and its dependency into the distribution. As I mentioned above there exists a feature request for this in FreeNAS bugtracker. So please stop by there and ask for this as well. Here's the link again: https://sourceforge....951&atid=782619
d.) At the moment, soft Power Off does not turn the machine completely off, FreeNAS goes through the shutdown process but then sits at this msg idling
ACPI Error: (psargs-0459): [HPEN] Namespace lookup failure, AE_NOT_FOUND
ACPI Error (psparse-0626): Method parse/execution failed [\_PTS] (Node 0xffffff00073c40a0), AE_NOT_FOUND
Powering system off using ACPI


Both a.) and b.) are purely cosmetic problems and relate to not having the LED driver. If someone knows how to reverse engineering those lights and write a driver module, it would be much appreciated. c.) is a matter of including the two driver modules in the default FreeNAS distribution
For d.) I have not had enough time to figure things out. It might be something really simple. Hopefully someone can provide more input.

Hopefully this will give someone else a chance to explore FreeNAS/FreeBSD on Acer easyStore H340 further and contribute back in some way. I will keep this thread updated if I have anything else new to add. I encourage for others to do the same.

Thanks for your attention and enjoy FreeNAS on your H340 (I know I do).
1

#2
User is offline   swartz 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 09-November 09
On a related note...

I had kept my WHS boot drive as it was 'coz I wanted to be able to boot into WHS in an emergency by simply unplugging the USB stick with FreeNAS. However with that video card in I was not able to successfully boot into WHS. I would get H340 POST screen, WHS logo and windows boot progress indicator, and then BAM! --> a restart. It would continues restarting indefinitely like this. I tried un-jumping JP3 back to factory state. Didn't help.

After removing the video card I was able to boot back into WHS.

So I must assume there is some confilic that exists between the onboard video and the one I added. The BIOS is so minimal that it does not provide an option to select between video cards.

I'd be interested if someone could try booting WHS with another video card in the PCIe slot and let us know how it went. Perhaps this is just a problem with my video card.
1

#3
User is offline   swartz 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 09-November 09
An update to the post above.

This constant WHS rebooting with PCIe vidcard can be solved by disabling the on-board video in WHS.

To do so:
1. Boot your WHS without the video card
2. RDP (remote desktop) into your H340's WHS
3. Via Device Manager disable the on-board video
4. Shut down H340 and add the PCIe video card
5. Boot H340 and everything should work just fine (at least it did for me with my ATI FireMV 2250 card).

PS. I'm adding this here as I had a lot of PM's in regards how to fix the WHS rebooting. Hopefully people will use the forum search before sending off PM's and asking the same questions.
1

#4
User is offline   aceruser999 

  • Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: 11-November 09
I have tried FreeNAS. Nice piece of software but recompiling it to meet my needs seems to be a hassle. So I did some looking around the Internet.

I have successfully loaded "Tiny Core Linux" (TCL) into the SMI USB partition (256 MB) and booted Acer from that partition, but TCL runs from RAM. Even with a number of TCL extensions loaded, I still have about 50% of SMI USB available.

TCL supports "mdadm" but not "lvm2", so that limits some choices for me, but for others that want to do some basic NAS hacking, "mdadm" should do nicely. In TCL it supports RAID 0,1,5 and sees all 4 drive bays. TCL has a number of other extensions and a fairly active development community.

Knoppix, like most other "custom distros", requires extensive hacking to fit into the Acer SMI USB.
0

#5
User is offline   MrWGT 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 19-February 10
Hi...

i own a H340 since 2010/02/17 and i've installed freenas according do "happybisons guide" (i tried also swartz guide). Now my freenas is running with a 4 drive zfs raidz configuration and is serving samba and upnp. The following little (?) problems i've found:

1) The h340 reboots 1-5 times during BTX is loading its configuration files and kernel (before first menu). When the first menu appears the system will boot up ok. Is this only a problem of my system?
2) Shutdown does not shutdown system (already known).
3) Marvel MYK must use -rxcsum (already known).

I've done some test for samba speed, iperf with standard configuration and "tuned configuration":

1) samba transfer speed is widely variing from 15-35MByte/s read and write. Sometimes its high, sometimes ist low.
2) iperf -s on nas and jperf on windows 7 with one thread will reach 25-40MByte/s.

I've tried a lot of "tune tweaks" found over google but none really speed up the transfer. So i've tried and tried and... :) And after all i'm getting 40-50 MB/s read/write over samba (most of the time) and ~72MByte/s with iperf and 6 threads.

1) Enable rxcsum after boot over ssh
2) Enable delay_ack !
3) Enable inflight... 8)

All set parameters can be seen on image 3.

Now i'm really happy - with one exception: I've to enable RXCSUM over SSH after the system has fully booted (second menu is shown on console). Trying to add it to a POSTINIT cmd doesn't work. Any suggestions how to do it?

Kind regards

Gerd

Attached File(s)


0

#6
User is offline   BillyPrefect 

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 27-August 09
Just wondering, but if you read the maintenance guide, there is a jumper to set whether this model is an Acer or an Altos. I am guessing that by messing with this jumper, an owner could play with some variation of linux and it would be completely natural. I don't know what variation or how to load it or ... ???


This could be really neat.... "google" the Altos Easystore M2 - it has a different face, but seems in my opinion to be the same guts, which runs some sort of linux as a server!

I am putting this out there, mine is "en route" (I am not french speaking, don't start that please). When mine does get here I have a bit of time to mess with it before I actually need it.

Does anyone know what variation of linux the Altos M2 runs?
0

#7
User is offline   swartz 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 09-November 09

View PostMrWGT, on 19 February 2010 - 01:03 PM, said:


All set parameters can be seen on image 3.

Now i'm really happy - with one exception: I've to enable RXCSUM over SSH after the system has fully booted (second menu is shown on console). Trying to add it to a POSTINIT cmd doesn't work. Any suggestions how to do it?

Kind regards

Gerd


Thanks MrWGT for contributing to my original post and for providing some tweaked settings.
I'm glad to see another FreeNAS tinckerer on H340.

I'm not surprised to see that turning on hardware checksumming increases network throughput.
Once I get some free time, I'm going to look at re-enabling checksumming after boot time as well as see if your tweaks provide any benefit for my system.
0

#8
User is offline   swartz 

  • Member
  • PipPip
  • Group: Members
  • Posts: 56
  • Joined: 09-November 09

View PostBillyPrefect, on 20 February 2010 - 04:01 AM, said:

Just wondering, but if you read the maintenance guide, there is a jumper to set whether this model is an Acer or an Altos. I am guessing that by messing with this jumper, an owner could play with some variation of linux and it would be completely natural. I don't know what variation or how to load it or ... ???


This could be really neat.... "google" the Altos Easystore M2 - it has a different face, but seems in my opinion to be the same guts, which runs some sort of linux as a server!

I am putting this out there, mine is "en route" (I am not french speaking, don't start that please). When mine does get here I have a bit of time to mess with it before I actually need it.

Does anyone know what variation of linux the Altos M2 runs?


I heard of the easyStore M2 as per H340 service manual. Which appears to be exactly the same hardware underneath.

However, for the life of me, I am unable to find the GPL source code on Acer's website for Altos M2. If they in fact used Linux they are required by the GPL license to release the source code.

Does anyone know where it could be found?

While looking for the source code I also stumbled on another incarnation of a storage server:

http://support.acer-...aeasystore.html

How many easystore/altos versions are there???
0

#9
User is offline   MrWGT 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 19-February 10
Hi...

over there at the freenas forum (https://sourceforge....t=5598&start=90) they found the reason for slow samba reads:

disable SENDFILE in Samba Configuration!

Up to 81MByte/s read rate... :)
Attached File  speedyread_81MB.jpg (14.38K)
Number of downloads: 18

My /boot/loader.conf:
kernel="kernel"
bootfile="kernel"
kernel_options=""
kern.hz="100"

# Intel pro/1000 ct tune
hw.em.rxd=4096
hw.em.txd=4096
hw.em.rx_int_delay=0
hw.em.tx_int_delay=0
hw.em.rx_abs_int_delay=9
hw.em.tx_abs_int_delay=9

# ZFS kernel tune
vm.kmem_size_max="1024M"
vm.kmem_size="1024M"
vfs.zfs.arc_min="512M"
vfs.zfs.arc_max="512M"
vfs.zfs.vdev.min_pending=2
vfs.zfs.vdev.max_pending=20
vfs.zfs.zfetch.block_cap=8
vfs.zfs.txg.synctime=20
vfs.zfs.zfetch.max_streams=2


My sysctl.conf:
Attached File  sysctlconf.jpg (101.76K)
Number of downloads: 20

My CIFS/SMB setting:
auxiliary parameters: 
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=131072 SO_RCVBUF=131072 SO_KEEPALIVE IPTOS_THROUGHPUT
write cache size = 67108864

send buffer size: 131072
write buffer size: 131072
use send file: UNTICKED


Have fun...

Gerd

PS: I used the new FREENAS 0.7.1 build 5038 from aoyamas site http://shell.peach.n...a/archives/857. Currently i'm using the version with new ZFS13 (you cannot go down if pool is converted to version 13!)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users