Slow ZFS write performance

A note to self more than anything.

While I was rebuilding my HP N40L Microserver storage to use new drives and ZFS I experienced very slow (<20MB/s ) First I thought that it was because the source was a degraded RAID5 and performance was lost due to parity. But when the target was a network share instead of the local ZFS pool write speeds went to a more respectable 60-70MB/s.

Since I use more than 4 drives I used the modified BIOS available for this machine that enables lots of extra options, including switching the ODD SATA port to enhanced. I entered the bios and enabled write caching.

Sure enough speeds went to ~100MB/s

Error creating zfs pools using drives that belonged to a md raid array

While migrating a file server from mdadm software raid to zfs I encountered the following error while creating the pool:
[cce_bash]
zpool create -f tank mirror /dev/disk/by-id/xxx /dev/disk/by-id/yyy
the kernel failed to rescan the partition table: 16
cannot label ‘sdb’: try using parted(8) and then provide a specific slice: -1
[/cce_bash]
Even if the old mdadm array was no longer being mounted (as more than one disk was missing and it was a raid5) they were still being added to md0:
[cce_bash]
cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md0 : inactive sdd1[4](S) sdb1[1](S)
3907025072 blocks super 1.2

unused devices:
[/cce_bash]
The fix was easy enough:
[cce_bash]
mdadm –stop /dev/md0
mdadm: stopped /dev/md0
zpool create -f tank mirror /dev/disk/by-id/xxx /dev/disk/by-id/yyy
zpool status
pool: tank
state: ONLINE
scan: none requested
[…]
[/cce_bash]
zpool label clear was mentioned as a fix for this error and I tried that without success before realizing that the drives are still added to a md array.

Install blinkstick on Slacware

I recently built a blinkstick, a cool little device. Using it under linux is very easy using the command line, but I had some issues installing it under Slackware:
[cce_bash]
pip install blinkstick
Downloading/unpacking blinkstick
Downloading BlinkStick-0.7.0.tar.gz
Running setup.py egg_info for package blinkstick

Requirement already satisfied (use –upgrade to upgrade): grapefruit==0.1a3 in /usr/lib64/python2.7/site-packages (from blinkstick)
Requirement already satisfied (use –upgrade to upgrade): webcolors in /usr/lib64/python2.7/site-packages (from blinkstick)
Downloading/unpacking pyusb (from blinkstick)
Could not find a version that satisfies the requirement pyusb (from blinkstick) (from versions: 1.0.0a2, 1.0.0a2, 1.0.0a3, 1.0.0a3, 1.0.0b1)
Cleaning up…
No distributions matching the version for pyusb (from blinkstick)
Storing complete log in /root/.pip/pip.log
[/cce_bash]

Checking the log shed some light:
[cce_bash]
Downloading/unpacking pyusb (from blinkstick)

Getting page https://pypi.python.org/simple/pyusb/
URLs to search for versions for pyusb (from blinkstick):
* https://pypi.python.org/simple/pyusb/
Analyzing links from page https://pypi.python.org/simple/pyusb/
Found link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0a2.tar.gz#md5=f6bed3e9b8a869a0043c36366ff28a14 (from https://pypi.python.org/simple/pyusb/), version: 1.0.0a2
Found link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0a2.zip#md5=530240f21aabf1fa9a69739a1e0c9389 (from https://pypi.python.org/simple/pyusb/), version: 1.0.0a2
Found link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0a3.tar.gz#md5=28f72453a7c0562cb8bd572758f6f7e1 (from https://pypi.python.org/simple/pyusb/), version: 1.0.0a3
Found link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0a3.zip#md5=45a5ba190ca7a86fe71cfe9f6fb3065e (from https://pypi.python.org/simple/pyusb/), version: 1.0.0a3
Found link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0b1.tar.gz#md5=5cc9c7dd77b4d12fcc22fee3b39844bc (from https://pypi.python.org/simple/pyusb/), version: 1.0.0b1
Ignoring link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0a2.tar.gz#md5=f6bed3e9b8a869a0043c36366ff28a14 (from https://pypi.python.org/simple/pyusb/), version 1.0.0a2 is a pre-release (use –pre to allow).
Ignoring link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0a2.zip#md5=530240f21aabf1fa9a69739a1e0c9389 (from https://pypi.python.org/simple/pyusb/), version 1.0.0a2 is a pre-release (use –pre to allow).
Ignoring link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0a3.tar.gz#md5=28f72453a7c0562cb8bd572758f6f7e1 (from https://pypi.python.org/simple/pyusb/), version 1.0.0a3 is a pre-release (use –pre to allow).
Ignoring link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0a3.zip#md5=45a5ba190ca7a86fe71cfe9f6fb3065e (from https://pypi.python.org/simple/pyusb/), version 1.0.0a3 is a pre-release (use –pre to allow).
Ignoring link https://pypi.python.org/packages/source/p/pyusb/pyusb-1.0.0b1.tar.gz#md5=5cc9c7dd77b4d12fcc22fee3b39844bc (from https://pypi.python.org/simple/pyusb/), version 1.0.0b1 is a pre-release (use –pre to allow).
Could not find a version that satisfies the requirement pyusb (from blinkstick) (from versions: 1.0.0a2, 1.0.0a2, 1.0.0a3, 1.0.0a3, 1.0.0b1)
[/cce_bash]

Apparently my version of pip would not install pyusb by default, so I had to do:
[cce_bash]
pip install –pre blinkstick
[/cce_bash]
I plan to use it in my hp microserver behind the logo so I can glance server and raid status, as the default rgb led broke in mine and it also only turned red for fan or other hardware issues. What for would you use yours?

http://blinkstick.com/

Evernote under Wine: “already installed by another user.”

Trying to update to the latest evernote version on a linux laptop I use I hit the error mentioned in the title: “evernote was already installed by another user.”

Weird, but solvable. I ended doing the following:

Uninstall evernote:

[cce_bash]
wine uninstaller
[/cce_bash]

Trying to install still gave the same error and so I had to do some registry surgery (be sure to replace root with your username):

[cce_bash]
grep “with upgrade” ~/.wine/drive_c/users/root/Temp/EvernoteSetup.log
[01/07/2014 14:23:18] Located product {C2EECB42-2C7F-11E3-8960-00163E98E7D0} with upgrade code {AE2C091E-CF5F-4e30-8659-D640E23A8B99}.
[/cce_bash]
The first set of digits (they will be different in your case!) is of interest, in my case C2EECB42; reverse those digits and remove any entry from the registry that contains them (exporting them before removing is a good idea)

[cce_bash]
wine regedit
[/cce_bash]

CTRL+F and search for 24BCEE2C, remove the entry. Now you can install the new version.

Expose the sd-card of the Jolla phone over USB

I know there are many ways to get content onto the Jolla phone (rsync over ssh springs to mind) but for large files I still prefer USB. Having just bought a 64Gb micro-sd I wanted to copy the bulk of my music and videos using USB. BTW this is the card I bought and works great (formatted as btrfs) Kingston 64GB Class 10

There is one easy step to do. Start the terminal and create a symlink to the card on the phone:

[cce LANG=”BASH”]
[nemo@argo ~]$ devel-su
Password:
[root@argo nemo]# cd /home/nemo
[root@argo nemo]# ln -s /run/user/100000/media/sdcard/
[/cce]

That’s it, the folder sdcard in the root of your phone is actually the sd card (windows will report free space on the phone only, though)

Rename an application shortcut on the Jolla phone

Some time ago I bought OfficeSuite in the Google Play store and thought that it would be nice to have it running on my SailfishOS powered Jolla phone as well. I conacted mobisystems and they were nice enough to send me an activation code and links to the apk download. It installed and works fine (didn’t do any fancy editing yet though) but the shortcut was named “com” and the icon was blank.

You need developer mode enabled. Start the terminal or login via ssh to your device.

First you need to become root and change to the folder containing application shortcuts

[cce_bash]

[nemo@localhost ~]$ devel-su
Password:
[root@localhost nemo]# cd /usr/share/applications/
[root@localhost nemo]# ls

[/cce_bash]

In my case it was apkd_launcher_com_mobisystems_editor_office__with__reg-com_mobisystems_office_splashScreen_SplashScreenActivity.desktop (cool name, isn’t it)

I used vi to edit it and changed Name=com to Name=OfficeSuite and the Icon=some-long-name-to-a-missing-file.png to Icon=/var/lib/apkd/apkd_launcher_com_office_suite.png You could also transfer the file and edit it on your computer instead but vi works fine (I can’t remember but I think I actually installed vim using pkcon)

Then I prepared the icon for it on my pc. I searched for the officesuite png icon, resized it to 144×144 pixels and copied on the phone. Still as root I ran:

[cce_bash]
[root@localhost nemo]# cp /home/nemo/apkd_launcher_com_office_suite.png /var/lib/apkd/apkd_launcher_com_office_suite.png
[/cce_bash]

Not easy, but not really complicated either. If everything above seems like gibberish to you than please consider waiting for an application that would allow renaming of apps and changing of icons.

 

 

[updated] List of Humble Bundle Games that work on the Sailfish OS Jolla Phone

Being and old time Maemo fan I went and preordered the Jolla phone as soon as I could (March 2013 IIRC) and I’ve been happily playing with it ever since I got it. I like to play the occasional game on the go and so I bought many of the bundles that humblebundle offered. Happily they also offer an android application that functions like a store – you can see all the games you bought and download/install/update them. Follow these directions to install the Humble Bundle app.

Read bellow is a list of the games I own and as I get time to test them I will update the status.

Read more “[updated] List of Humble Bundle Games that work on the Sailfish OS Jolla Phone”

Starting 2014 Ad Free

As you probably failed to notice I removed from my blog the like/tweet/etc. buttons a while ago as I figured nobody is going to tweet about how he found the latest fix to some obscure daemon. As I find ads more and more annoying I decided to start 2014 Ad free and so I removed all the ads from the site. This is a big step as Ad Sense helped a lot to pay the server bill.

Update: Wrong choice 🙂 3 months and a big fat 0. So I’m going back to google to help a bit with the server bill. You can still say thanks in whatever way you want if I helped you in any way.

If you feel that reading this blog helped you (maybe saved you a few hours of hair pulling) and wish to offer some support/reward please consider one of the options bellow

If you think of signing up for a VPS please consider Linode and use this link. I use Linode both at work and privately (and have used them for years) and even if they are not the cheapest around they are really reliable and have exceptional support. If you sign up via the affiliate link and keep your linode for 3 months you spare me a month’s bill.

If you use virtual currency please consider a donation:

BTC: 1NFyWqzMHkMxSLC1fSUvmt7chdz7rD5yTF
LTC:LN7Trs4Bp2QFvYqbbWdNkt1E4zNssfY3fP

– You could use paypal to buy me a beer (even a case too if you feel like 🙂 ) :

(If you don’t have a PayPal account, no need to sign up for one – you can just use any credit or debit card.)