Tag Archives: NAS

Finally: A Fix for Python 2.7 Aborts on Import of ctypes

This has been bugging me for quite some time now: Every time I tried to import the ctypes module into Python 2.7, all I would get was the famous “Aborted” message. With some time to spare I could trace the problem down to the file closures.c of the libffi submodule. Most likely due to a compiler/optimization bug in older versions of gcc a double-free is happening there in line 151.
Since the surrounding function only checks for the presence of SELinux on the host and since the box I need to run Python 2.7 on doesn’t have SELinux installed, I opted for simply removing the whole thing:

--- a/Modules/_ctypes/libffi/src/closures.c 2012-04-10 01:07:33.000000000 +0200
+++ b/Modules/_ctpyes/libffi/src/closures.c 2012-06-20 17:35:40.277850045 +0200
@@ -119,52 +119,7 @@
 #define LACKS_SYS_MMAN_H 1
 
 #if FFI_MMAP_EXEC_SELINUX
-#include <sys/statfs.h>
-#include <stdlib.h>
-
-static int selinux_enabled = -1;
-
-static int
-selinux_enabled_check (void)
-{
-  struct statfs sfs;
-  FILE *f;
-  char *buf = NULL;
-  size_t len = 0;
-
-  if (statfs ("/selinux", &sfs) >= 0
-      && (unsigned int) sfs.f_type == 0xf97cff8cU)
-    return 1;
-  f = fopen ("/proc/mounts", "r");
-  if (f == NULL)
-    return 0;
-  while (getline (&buf, &len, f) >= 0)
-    {
-      char *p = strchr (buf, ' ');
-      if (p == NULL)
-        break;
-      p = strchr (p + 1, ' ');
-      if (p == NULL)
-        break;
-      if (strncmp (p + 1, "selinuxfs ", 10) != 0)
-        {
-          free (buf);
-          fclose (f);
-          return 1;
-        }
-    }
-  free (buf);
-  fclose (f);
-  return 0;
-}
-
-#define is_selinux_enabled() (selinux_enabled >= 0 ? selinux_enabled \
-                 : (selinux_enabled = selinux_enabled_check ()))
-
-#else
-
 #define is_selinux_enabled() 0
-
 #endif /* !FFI_MMAP_EXEC_SELINUX */
 
 #elif defined (__CYGWIN__)

Compile, install – works. Now on to some other stuff that needs Python 2.7 to run properly ;)

Make your ReadyNAS a Wake-on-LAN Hub

Today an interesting request came up in the ReadyNAS forums: Would it be possible to build an add-on that could send Wake-on-LAN (WoL) packets to any host on your local network? You bet it is ;) Took me a bit time to fiddle in the password protection but here you go:

Version for the x86 ReadyNAS line: ReadyWOL_0.1-readypro-0.1.3.bin
Version for the Sparc ReadyNAS line: ReadyWOL_0.1-readynas-0.1.3.bin

After installation you can wake any machine on your LAN by requesting a special URL from your ReadyNAS. And once you’ve properly configured your router, you can even wake up machines while you’re on the road.

Dropbear for ReadyNAS (Sparc)

DropbearUsing SSH to connect to the ReadyNAS has many advantages for the experienced user. However, OpenSSH is kind of a resource hog which is especially true when being used together with rsync. To make rsync over SSH run a bit smoother I decided to replace OpenSSH with Dropbear on my Sparc line of ReadyNAS boxes. So here’s the latest addition to my add-on collection:

DropbearSSH_0.52-readynas-0.1.1.bin

Dnsmasq for ReadyNAS (Sparc & Intel)

Two things I’ve always missed on the ReadyNAS were a DNS server to serve my local network and a fully fledged DHCP server allowing me to assign IP addresses to my machines based on their MAC address. Dnsmasq can do both and more. It even integrates a TFTP/BOOTP/PXE server to boot diskless machines off the network. So I dived into the realms of add-on programming again and baked some add-ons ;)

Continue reading

iSCSI Enterprise Target 1.4.20.1 for ReadyNAS (Sparc)

And yet another update: Took me some fixing of the sources but I finally was able to build a new release of the iSCSI Add-On for ReadyNAS. This release adds a lot of stability fixes of which mainly Solaris and Windows users will profit.

Get it here: iSCSItarget_1.4.20.1-readynas-1.0.3.bin (ReadyNAS Sparc only!)

Continue reading

Subversion 1.6.11 for ReadyNAS (Sparc & Intel)

Since I had some spare time I decided to upgrade my Subversion add-on for the ReadyNAS line. For a complete list of changes since the last version (1.6.6) see the official changelog.

Downloads:
For ReadyNAS NV(+)/Duo/1100/X6: subversion_1.6.11-readynas-1.0.0.bin
For ReadyNAS Pro/NVX/2100/3200: subversion_1.6.11-reaypro-1.0.0.bin

Continue reading

How to build cheap cloud storage

backblaze-cheap-cloud-server-storage

At Backblaze, we provide unlimited storage to our customers for only $5 per month, so we had to figure out how to store hundreds of petabytes of customer data in a reliable, scalable way—and keep our costs low. After looking at several overpriced commercial solutions, we decided to build our own custom Backblaze Storage Pods: 67 terabyte 4U servers for $7,867. In this post, we’ll share how to make one of these storage pods, and you’re welcome to use this design.

Wow. If I had the money to spare, I’d definitely go and try to build one myself.

[ More » ]

{openx:6}

Rip, Store and Stream

ripnasJust found the RipNAS system on the web. The concept sounds interesting: Use 2.5″ notebook HDDs together with an Intel Atom CPU and plenty of RAM, add a CD-ROM drive and you get your noiseless automatic ripping station.

Continue reading

New globalSAN iSCSI Initiator for Mac

As I just found out, Studio Network Solutions have released version 3.2.0.15 of their globalSAN iSCSI initiator for OS X. I haven’t found a change log yet, but installed the new version anyway. So far no problems, Time Machine is backing up as smoothly as ever.

iSCSI Target Support for ReadyNAS updated


UPDATE: Instead of writing ever new blog posts, an always up-to-date page for the iSCSI Target Support for ReadyNAS is now available.


Since the iSCSI project has released a new stable version I felt it was time to upgrade the iSCSI Kernel Modules and Utilities for ReadyNAS. Klicking on the link will give you version 0.4.16 which contains the following changes:

{openx:6}

  • fix overzealous assert() in digest_data()
  • add checking on return value of ISCSI_PARAM_GET
  • 2.6.22, 2.6.23 and 2.6.24 compile fixes
  • add conn->rwsize check
  • avoid potential NULL-ptr dereferences in rx and tx buffer
  • fix the shell syntax in init scripts
  • fix digest endieness on LE archs
  • fix SPARC alignement issues
  • fix DISTDIR in Makefile for /etc install
  • add support to nullio for volumes > 2TB
  • remove init.d memory size adjustment
  • add error code reporting to blockio_open_path
  • blockio gen_scsiid bug fix
  • add verbosity to kernel output and task management

Installation is the same as described here with one exception: The supplied configuration example is now named /etc/ietd.conf.sample, so installing the version won’t overwrite an existing configuration file. On a fresh install you’ll have to rename the example configuration to /etc/ietd.conf before you can actually use the iSCSI target support.

ReadyNAS goes iSCSI


UPDATE: Instead of writing ever new blog posts, an always up-to-date page for the iSCSI Target Support for ReadyNAS is now available.


iSCSI target on the ReadyNAS

As much as I like the ReadyNAS, there’s one feature I’ve been missing since day one: Being able to define an iSCSI target. Well, since the code is out there, I set about to make it work on the ReadyNAS. Luckily, there’s now some sort of development kit available, and for I had a spare ReadyNAS unit to break, there was nothing to stop me. To cut a long story (with many gory details) short: Mission accomplished.

Continue reading

It still works … for now

After I halfways bricked my ReadyNAS NV (won’t tell) and needed a replacement unit for backup quickly, Netgear was nice enough to provide me with a spare unit they got returned from evaluation lease. I was warned about the shape of the unit in advance but I have to admit that I’ve never seen something like this before:

Abused ReadyNAS

As you can see, the front door is broken off, the drive bays have to have been hammered in (I needed a little crowbar to pull the one in slot one out again). Also half of the screws were missing from the chassis, the sides were dented and scratched and to top it all off the inner steel framework was bent so that the whole thing won’t get all four rubber feets on the ground when placed on a flat surface.

Hell, what kind of eval was that? How the ReadyNAS would make for a replacement football? Considering the shape and the fact that the hard drives were missing, the first thing I checked was whether the RAM was still present.  It was. So I plugged in the power and network cords, put some hard drives in the bays, pressed the power button and … hooray … the beaten up ReadyNAS NV+ still works. I’ll have to upgrade it to the latest firmware release before I can start the backup. That’s probably a good way to determine whether there are other, invisible damages to the product.

It’s really sad to see how some folks handle products they get as free evaluation units. Just the fact that you get them for free doesn’t mean that they don’t have any value. Now I understand a lot better why companies are getting more and more reluctant to provide eval units to editorial staff and freelancers.