HP Microserver Gen8 FreeNAS Tips and Tricks

Well I’ve been spending some time with the new HP Microserver Gen8 (G2020T), and wanted to post a few little tips and tricks for using it with FreeNAS

  1. Make the internal USB slot external
  2. Use MicroSD for swap space
  3. Bind CIFS to certain interfaces

Make the Internal USB slot External

With my older HP N40L NAS I was used to accessing the bootable internal USB by opening the front door. With the new NAS, you can’t get to the internal bootable USB without taking the case cover off. I had a spare USB extension cable so I put it to work as per the following photos:

I can now sit it on top of my NAS which gives me the following benefits:

  1. I can get to it easy. The rear USB2 are practically blocked by the two NIC ports I’m using, so I don’t have to reach around the back to get to them.
  2. It keeps the two front USB ports clear, so I don’t have a stick jutting out, and I can keep them free for if I need to plug in a mouse and keyboard.

Just so you know, you can boot from the external USB ports – the USB2 ones at least. I’m pretty sure I read somewhere that you can only boot from USB2 though – the USB3 ports are made available via OS drivers post-boot. It was quite easy to bend back the bit of metal and feed the plug through.  BTW – you can see my Intel 2-port server NIC there that I use to team two interfaces into my ESXi box for iSCSI disks straight off the NAS.

Use the MicroSD for the FreeBSD/FreeNAS OS Swap Space

This is my favorite tip. See the MicroSD card slot on the photo above? I thought about what use that could be for a dedicated NAS box, where I boot off the USB drive and use the HDD array for storage – surely it’s useless? Well I found a use for it that I’m quite happy with.

What I didn’t know is that by default, not all of your HDD space is used for data storage. In the default settings of FreeNAS (8 and now 9.1) is that it reserves 2GB per-disk for OS swap space.

Where it’s set is SETTINGS -> ADVANCED… “Swap size on each drive in GiB, affects new disks only. Setting this to 0 disables swap creation completely (STRONGLY DISCOURAGED).”

Here is a discussion on the matter.  If a disk fails and you’re using the swap space on it, that could leave your server inoperable. I don’t like that sound of that. What you can do is use the MicroSD for OS swap. This will then leave your HDD’s purely for ZFS data storage.

There are new MicroSD cards from Sandisk  (the creators of the format) that can transfer up to 80MB/s that should be adequate for emergency swap space. Mind you I say “emergency” swap. I am using my box as a NAS with 8GB and soon to be 16GB RAM – I don’t expect to be using swap at all, but like to have it for any emergency needs, which is preferable to the server crashing.  If you are smashing the swap space, then you’d need more RAM, and if you’re still smashing it, then perhaps get a dedicated SSD that can sit in the thin optical drive bay (there are third-party solutions for this).

To set this up this is what you do:-

Set swap size on each drive to “0” before you create any ZFS volumes! Otherwise you’ll have to blow those away and start again.

Put the MicroSD card in. I’m not sure if it’s hot swap, but since it’s a one-off task I do it cold. You can can either check the “dmesg” or via the GUI check that it shows up as a drive. On FreeNAS 9.1 it shows up on my server as “da1”.

On the CLI you type:

swapon /dev/da1

Check that it’s using it:

freenas# swapctl -l
Device:       1024-blocks     Used:
/dev/da1         992000         0

That’s a tiny 1GB MicroSD I pulled from a mobile phone as I didn’t have any others spare. I’ll put the order in for a 16GB Sandisk Extreme soon enough. I think it’s good form to be at least as big as the size of your RAM.
You also need to make sure it enables the swap on boot, so in the FreeNAS web GUI in “System” then under the pre-init scripts section, add a new pre-init script of:

swapon /dev/da1

If your ZFS volumes already have swap on them you might see something like this:

 freenas# swapctl -l
 Device:       1024-blocks     Used:
 /dev/ada0p1.eli   2097152         0
 /dev/ada1p1.eli   2097152         0
 /dev/ada2p1.eli   2097152         0

…because /etc/fstab will have these entries:

 freenas# cat /etc/fstab
 /dev/ufs/FreeNASs1a / ufs ro 1 1
 /dev/ufs/FreeNASs3 /cfg ufs rw,noauto 2 2
 /dev/ufs/FreeNASs4 /data ufs rw,noatime 2 2
 /dev/ada0p1.eli none                    swap            sw              0       0
 /dev/ada1p1.eli none                    swap            sw              0       0
 /dev/ada2p1.eli none                    swap            sw              0       0

You’ll need to build your volumes from scratch to get rid of that swap, unless you know how to hack this and extend the ZFS volume(s) to fill that extra space, which sounds problematic for live data. For me I copied the data off and rebuilt the volumes and datasets, just to be safe.

Bind CIFS to Only Certain Interfaces

With the extra NIC that I didn’t have before, I decided to use the extra port for “Out of Band Management”. This is handy for security so that only computers on the OOBM network can access the web GUI (if you pin the web GUI to a certain IP address). It’s good practice to have all your network devices managed this way where possible. I like to use the default VLAN for this, with general data on VLAN10 and voice traffic on VLAN20, and if I have a dedicated “SAN” (with jumbo frames usually), then I use VLAN30 for this.
Of course I could have set this up previously with VLAN interfaces which is fine from a security perspective, but I do like the idea of OOBM being on a totally separate physical interface for a pure OOBM setup.

You can either bind Samba to individual interfaces, or a range of interfaces by specifying a network. The latter is my preference as it requires less thought. The commands I  use are:

interfaces = 10.10.10.0/24
bind interfaces only = yes

Where you apply this is under “Services –> CIFS –> Auxiliary parameters

That subnet listed is what I have on my data VLAN10. It’s good for me as my PC has NICs on both Data and OOBM, and means I don’t accidentally mount Samba shares across the OOBM network. BTW that “interfaces” statement doesn’t have to match the subnet mask of your interface. You can just have written “10.0.0.0/8” which depending on your setup might match one or more interfaces. Otherwise you can specify interface names like “bge0”, or “em0” – i.e. the OS-given device name – not the name you gave it with the FreeNAS web GUI.

FreeNAS USB3.0 on the New HP Gen8 G2020T Microserver

Well the long-running saga of not having any working USB3.0 on my microserver NAS continues. In my previous post I said “It works perfectly”. Well when I dug a bit further I found that to not be the case. I assumed quite incorrectly that since the 4TB Seagate Expansion Desktop spun up, that it was working at USB3.0 speeds. Bad assumption.

To recap, I needed an external disk drive to my NAS so I can backup files from the NAS using ZFS snapshots that I can browse through with Windows VSS.

Here’s what happens when I plug into Renesas D720201-powered USB3 card:

 umass1: <vendor 0x0bc2 product 0x3312, class 0/0, rev 3.00/3.19, addr 1> on usbus0
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 00 00 00 24 00
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Retrying command
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 00 00 00 24 00
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Retrying command
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 00 00 00 24 00
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Retrying command
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 00 00 00 24 00
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Retrying command
 (probe0:umass-sim1:1:0:0): INQUIRY. CDB: 12 00 00 00 24 00
 (probe0:umass-sim1:1:0:0): CAM status: CCB request completed with an error
 (probe0:umass-sim1:1:0:0): Error 5, Retries exhausted
 ugen0.2: <vendor 0x0bc2> at usbus0 (disconnected)
 umass1: at uhub0, port 1, addr 1 (disconnected)

I also tried another card that has a newer Renesas D720202 chip – same deal. Here’s what happens plugging into USB2

 ugen2.2: <Seagate> at usbus2
 umass1: <Seagate Expansion Desk, class 0/0, rev 2.10/3.19, addr 2> on usbus2
 da1 at umass-sim1 bus 1 scbus7 target 0 lun 0
 da1: <Seagate Expansion Desk 0319> Fixed Direct Access SCSI-6 device
 da1: 40.000MB/s transfers
 da1: 3815447MB (976754645 4096 byte sectors: 255H 63S/T 60800C)
 da1: quirks=0x2<NO_6_BYTE>

The disk shows up fine, but of course is slow being USB2.

Not happy with that, I bit the bullet and bought the new HP G2020T Gen8 Microserver.  It was a big outlay but when an issue gets under my skin like this – I go all out! I was hoping that somehow it was the Renesas line of chipsets at fault not being properly supported in FreeBSD/FreeNAS. Surely the Intel native chipset will work?!

As an aside, when I was swapping disks over from my old NAS I dropped a disk and it was a write off. I ended up buying four new 4TB Seagate NAS drives as I’m a big fan of Seagate’s reliability.

Unfortunately, even with the newly-released FreeNAS 9.1, I still can’t get USB3.0 working with my Seagate external drive, even on the new Gen8 Microserver! I believe it’s an issue with the FreeBSD XHCI USB3.0 driver. I’ll have to run it at USB2.0 speeds for the time being and keep an eye on the errata for new versions of FreeNAS.

Update: in my new Gen8 Microserver with FreeNAS, I have a MicroSSD card and it shows up as “da1”, and the external USB2 drive shows up as “da2”. In the old NAS, the external USB2 drive shows up as “da1”. Be mindful of this if upgrading NAS and copying your settings across.

Renesas D720201 USB3.0 Card and FreeNAS

I use a HP Microserver N40L for my home NAS, which  run the fantastic FreeNAS operating system and 4x 2TB drives in a RAID-Z2 configuration. I wanted to back up the NAS onto an external drive, with the great feature that is ZFS snapshots.

I started looking at 4TB external drives. The N40L has eSATA and only USB2.0, so I thought that eSATA was my only real option. I quickly learned that eSATA is fast becoming a dead technology, as USB3.0 takes over.

The pure eSATA drives seemed to top out at about 1 or 2TB. The ones that go up to 4TB – the cheapest ones are pure USB3.0. The ones (from Lacie and others) that have eSATA, USB3.0 and FireWire are very expensive, and it is actually cheaper to get a USB3.0-only 4TB drive plus cheap USB3.0 controller card, than it is to get one that supports eSATA. My decision was further solidified by the fact that the new “Gen8” HP Microservers don’t even have eSATA. Buying a USB3.0 controller card became a no-brainer.

I went for a Astrotek 2 Port External / 1 Internal PCI Express USB3.0 Card from the fine folk at Scorpion Technology. The specs as copied from Scorpiontech:

Chipset : RENESAS 720201
PCI Express Base Specification 2.0
2 x USB 3.0 Downstream Port
1 x ICC USB 3.0 (2 x USB 3.0) Internal Downstream Port
1 x ATX Molex Power connector
Compliant with USB specification 3.0 rev. 1.0 compliant
Max. 5 Gb/s transfer rate per port
Supports Super-speed (5 Gb/s), High-speed (480 Mb/s), Full-speed (12 Mb/s), & Low-speed (1.5 Mb/s)
Supports USB 3.0, USB 2.0 & USB 1.1 devices
Compliant with Intel xHCI (eXtensible Host Controller Interface) specifications Revision 1.0
Supports USB Battery Charging Specification Rev. 1.2
Supports PCI Bus Power Management Interface Specification rev. 1.2
Supports USB Wake-up function(total max. 5V/600mA)
1.5A MOSFET Power Switch Protection & Over-current sensing for each port
Supports Hot Swap, Plug & Play
Drivers support Windows XP, Vista, 7, & Server 2008 Release 2 (x86 & x64)
Linux Kernel 2.6.31 native support
Low Profile support

I’ve bolded the items that appeal to me the most.

The Renesas 720201 seems to be one of the best performing USB3.0 controllers, according to a VR Zone review.

Since FreeNAS is built on FreeBSD, any spec sheet that lists an open source OS is good news. I was thus hopeful it would work in FreeNAS.

I plugged in with FreeNAS 8.3 and got no joy. I saw that the card was recognized by the BIOS and was given an IRQ, but it was dead in FreeNAS.  I downloaded a copy of the new FreeNAS 9.1.0RC2 and to my pleasant surprise found that it worked perfectly. Since I’m not ready to upgrade to beta code for my NAS, I’m in for a bit of a wait until I can use my external USB3.0 drive, but shouldn’t take too long.

HDD Noise Control – Part 2

Well after many weeks of testing I’ve found that the performance of AAM sucks ass when the machine is heavily loaded doing a lot of stuff, especially when burning CDs and DVDs. I was especially disappointed to find that burns would fail, even with BURNProof on.

I plan to get a 2-platter Seagate 7200.8 250GB drive to replace the 3-platter 200GB Maxtor drive I have currently. It’ll run cooler and quieter. The new Seagates don’t have AAM due to a patent dispute, but that doesn’t matter as I now have a NoVibesIII drive cage. The Maxtor without AAM doesn’t make much noise in the NoVibesIII, and the Seagate should be even better. My main concern with the NoVibesIII is that my Maxtor runs at a whopping 48 degrees. I’m hoping the Seagate will run under 40 degrees.

HDD Noise Control

Lately I’ve been on a quest for blissfully quiet computing. I’ve bought a new quiet case and quiet CPU fan, as well as silicon washers and vibration-absorbing pads for just about everything that moves in my PC. The results have been amazing and I’m encouraged to go further by replacing my medium-noise two-fan Antec PSU with a single-fan quiet model. I also plan on ditching my new Leadtek GF6600GT video card for a fanless Gigabyte model.

They say that with quiet computing, once you eliminate the noise from your loudest component, the next loudest component becomes ‘loud’, so the quest continues on and on until nothing has been left untouched. Quiet computing really is an addictive hobby (the quest for a super-quiet rig), much like the quest for a performance rig is addictive.

One item which had hitherto avoided the silent treatment is my Maxtor 6Y200M0 200GB SATA HDD. It had been set at the factory to an Automatic Acoustic Management (AAM) Level of 256, which means bloody noisy seeks! I used a nifty tool called Active SMART (v2.42) to read the AAM value. It also told me that the vendor’s recommended setting is 192. I found a program that would let me change the drive’s AAM value here. It’s called “Feature Tool” by Hitachi, and comes on a DOS boot disk image (a bootable CD image is also available). The results are amazing, because now I can barely hear the drive. It no-longer rumbles and chatters like a drive possessed. The noise is still audible but only barely so. It’s so much more pleasant than before that there’s no comparison! The drive was always quiet when the heads were still and the drive was just spinning due to its Fluid Dynamic Bearings. It just used to explode with rumbling chatter when reading but now this tweak has clobbered that on the head.

Even though the drive itself knows 192 is the recommended value, Maxtor must set it to 256 at the factory so that hardware review sites can get excited over their performance benchmarks, knowing that people will often just blindly pick the highest performing drive (oblivious to noise and reliability ratings!). Have I experienced any performance slowdown? No. Well, none that I can perceive in my daily usage. HDtach might show a smaller graph if I cared to fire it up, but I don’t notice any difference in performance and that’s the real test. The only thing I notice is that my PC is so much quieter now!

One last tweak I will do to this drive is to mount a heatsink on it. The drive is already isolated from the case by way of the Antec rubber washers in the case I have, and there is plenty of room above the drive for a heatsink. My Antec SLK3000B case is Intel TAC compliant. The TAC feature is a big funnelled air intake directly over the CPU, and grills to get airflow over the GPU. This is great for cooling my CPU as cool air sucking in from the side means I can get away with a low-RPM fan on the CPU, and a fanless GPU. Alas it robs some airflow over the HDD as my HDD temp is currently a tad high for my liking. From EVEREST Home Edition v2.0 my temps are as follows (in degrees Celsius):

Motherboard: 22
CPU: 33
CPU diode: 40
GPU: 38
GPU ambient: 26
Maxtor: 46

A heatsink should get that drive temp down to 40 I think. It’ll be interesting to see what my GPU temps are like when I get a fanless model. At stock clock speeds I’d imagine it’d be well under 50, which should be fine… but that’s for another blog post (this one’s just about my HDD).

HP Procurve 2524 Switch

I’ve been playing around with my HP ProCurve 2524 (J4813A) managed 24-port 10/100 switch today. The CLI interface is very functional and Cisco-like. It even supports CDP. You can do ‘show run’ to view your config just like in IOS. One thing I like better than Cisco IOS is that even in the configure context you can still have full access to all the ‘show’ commands. I wish IOS did that. There is the IOS-like ‘no …..’ at the front of a configuration line to remove/negate that particular configuration line.

The VLAN configuration is very straightforward. There is no switch-port ACLs like on a Nortel Baystack but not necessary if using full 802.1Q VLANs. Unlike the Baystacks, you can reconfigure VLANs on the fly without having to change any of the settings on the monitoring (mirror) port. The monitoring port can either monitor 1 VLAN, or any number of physical ports. This functionality works quite well. If you had a VLAN which you wanted to have strict control of Internet access to you could have something like this:

untagged 3
tagged 23
tagged 24
end

For this scenario –
Port 3 has the ‘computer room 3’ switch hanging off it
Port 23 is Internet gateway/router
Port 24 is the DHCP server

You would just say:

(login)
configure
vlan 3
no tagged 23

…and then voila – room 3 has no Internet but still has DHCP. You could verify this with a ‘show vlan 3’.

On the topic of DHCP you can have a different DHCP scope for each VLAN by using Intel Proset tools on the DHCP box. Just have a virtual interface on each VLAN and serve a scope to each one. I did that in testing today – worked beautifully. I setup CommTraffic today and played with it in conjunction with VLANs. It worked fine. CommTraffic has all the makings of a good program and it has accurate reporting, but it was just too inflexible in its reporting. There was no easy way to clear the totals, and it annoyed me by seemingly only computing traffic on a per-host basis. Where is the totals for each VLAN? I’d look elsewhere for a tool (possibly still Windows-based) that has better reporting, and probably a more sturdy logging database. Something that dumps to a mysql database would be nice. I think making use of SNMP functionality would be beneficial.

PearPC PowerPC Emulator for x86

I’ve been playing around with PearPC today – it’s really cool. A lot of people on forums have been complaining about how slow it is. I didn’t find it too bad, especially considering it’s emulating an entirely different CPU arch.

I might actually stick with PCs after all. Now I’m looking in earnest to the new 90nm Athlon 64 socket 939 CPUs. I think I’ll upgrade next year to a machine that has good sound, PCI Express 16x and plenty of USB2, Firewire and SATAII.

So yeah PearPC rocks. I was able to get quite a functional OSX install going. There are a few issues though. The main one on Windows is that there is no networking with the host OS (as of 0.3.1). This really sucks. To get software into the hosted OSX I’d have to move the files into an ISO filesystem image, then change the config to mount the ISO with the virtual CDROM, then boot up.

On Linux you can use the tunnel adapter device for networking. I might try PearPC under Linux and see how that goes. Other issues include no sound, and the inability to connect to the physical CDROMS and DVD drives in my system. So it’d be great to get bridged networking, physical optical drive access and sound going. Hopefully these things are coming.