Wednesday, 13 August 2014

Openfiler progress - pump up the volumes

I have been making some progress with the update to Openfiler. So far I have the basic authentication happening, but haven't really touched anything to do with LDAP or AD/Samba integration. System date/time needed a bit of work to overcome the fact that 'timeconfig' cli no longer exists. Networking didn't need much and seems to be reasonably solid. Similarly with the rest of the basic system administration.

Most of my time has been taken up with getting the volume management working. First thing was to get it to even see the disks. 'list_disks.pl' relies on 'parted print-fdisk' to get a list of the disks and their partitions, but the 'print-fdisk' option is another Openfiler-ism. It was a simple case to replace this with a call to 'fdisk -l', which gives the same information.

By far the most effort has gone into getting the RAID configuration working. Once again, Openfiler utilised a patched version of a standard utility - in this case mdadm - to provide output in an Openfiler-specific format.  Since I am trying to avoid this, I had to do some digging into where the information is used within Openfiler, which included digging into the original source of mdadm to understand exactly what standard mdadm outputs vs what the Openfiler patch does, and then working out how to do the same without a patch. I started down the same path as I had previously with 'authconfig', but now realise that was a bit of a hack.  In the end I have put the code where it should be, in 'md.inc', which I find a far more satisfying solution.  In the process, my understanding of PHP has grown measurably. This has given me the impetus to go back and do the same for 'authconfig' but I will probably leave that to a later time.

Having gotten RAID and LVM workable, at least for simple 'volumes with file-systems', I now need to tackle iSCSI.  The original Openfiler uses the iSCSI Enterprise Target implementation, with it's command set scattered throughout the product. The standard iSCSI that comes with CentOS 6 is the Linux SCSI Target Framework with a completely different command set and configuration (which has already been superceded in the standard kernel by the LIO framework). SCST is also another viable contender with a lot of support. I could take the easy way and simply build and install IET, but that wont necessarily be a long term option (and, once again, means it will be one more thing 'out-of-band'). So it looks like I will be doing a lot of 'find-and-replace' but at the same time, I will think about re-architecting to maybe make iSCSI a 'plugin' where I will come up with a generic API, and the implementation will be done in include files that are chosen at install time.

After that, I think the next major task is sorting out services, particularly managing both 'init.d' based and xinetd-based services.

4 comments:

  1. I've been using Openfiller for a good number of years and have also started hacking around the CentOS alpha release.
    I would be extremely grateful to receive copies of your work as I started writing a mdadm parser to present the information in the format Openfiler expects it.
    I usually simply use Openfiler as a mdadm + LVM + iSCSI stack...
    RAID rebuilds on rPath, when using 3TB discs or larger is painfully slow (8M/s) whilst relishing the system with CentOS 6 yields 118M/s.

    ReplyDelete
    Replies
    1. Hehe... relishing = reloading

      Delete
    2. Hehe... relishing = reloading

      Delete
    3. Hi David

      To be honest, I haven't looked at this for a while, having decided it was just turning into too much work. If I find my earlier work I will post links to it here. Otherwise, I have moved on to using Openmediavault as my NAS of choice - at least for any virtual builds. Cheers.

      Delete