Archive for the ‘Hacking’ Category

Getting lost

Thursday, June 25th, 2009

At Byte-code meetup I just launched the idea for a new projet to support the Prince2 project management methodology.

Right now, I just registered at sourceforge and nothing else. But the plan is clear (and will be managed in a Prince2 manner, by the way):

  • Django / Python powered
  • GPL v2
  • Integration with external tools ( trac comes to mind, but also taskjuggler )

Django is a little hazard – never programmed seriously in Python, and the Django world is a new one for me. Anyway, I am just willing to move away from the Java world for a while.

Now comes the best – I will try to do it using Fedora way . This means that every additional package (Python or Django) will be rpm’ed.

Django by itself it’s a no-brainer – just yum install Django (observe the capital ‘D’ here), but I was looking at Pinax and some more Django extensions, mostly hosted at google code.

Benefits of this plan:

  • Enhance package building knowledge
  • Easy installation
  • Really join fedora community

So I will create a new category, starting today, where I will summarize my steps. Stay tuned.

Home Server – Part Three

Friday, June 12th, 2009

Well, a six month release cycle make me wonder, so instead of keeping my home server up to date with fedora, I decided to give Centos 5.3 a try.

It went…well, apart from a known issue with my motherboard network card. CentOS 5.3 installs all right without complaining, but every few seconds the network card delays the response.

Given that I use the little beast for dhcp, DNS and iscsi, this is not what i was looking for. Luckily enough, after searching for a while, I found the issue (module r8169) and built the r8168 with dkms provided by rpmforge.

Now all is going well. Another addition to the setup, I bought a Western Digital MyBook Studio II for backup and safety purposes. Two disks, one terabyte each, raid 1 setting.

Exported part of it through iscsi for the mac (storage of all digital photos through iPhoto, thanks) and the rest is for me. Connection is fast (esata2), and, anyway, I am using it mostly through WiFi, so anything could be fast enough (except USB 1.1, i think).

Happy? Yes, now I am confident my backups will survive a disk failure. I did not find iscsi-target (IET implementation) in a CentOS 64 bit package, through.

Regione Lombardia does it partially right – second post

Wednesday, October 22nd, 2008

I have found that a partially, x86 only package exist for the ACR38 smart card reader. Also, looking on DAG repository, there is some packaging for RH5. So here start my first shot at packaging for Fedora….stay tuned.

iSCSI – Nice Solution

Monday, October 20th, 2008

Prior Events

I like my Linux Notebook. I really do. I started to dual boot Suse Linux back in 2002, I set it up as primary OS in 2003, I removed dual booting in 2005, using some virtualization solution or the other for things that required Windows. By the way, during these years, I saw less and less needs to do that.
During these time, as professional, I bought several notebooks (If I remeber correctly, about five notbeooks from 2001 to 2008). In these times, when I was to change my notebook, the old one would be used by my wife in our home network.
Well, let me say that – it was a pain, getting back to 2000/XP to fix things, with all the cycle of installation, maintenance and antivirus.
These year, i asked to my wife if she were willing to try a Mac. Shock and horror, but less shock than a windows machine in my house. Also, I am attracted to Mac OS X. I admit that.
So this MacBook ended in our home, and my wife is using that mainly by herself. No maintenance required.

Backup, backup, always backup

I am quite fearful to lose my digital data. Projects, documentation, invoices, mails, mostly reside on thin slices of metal with some magnetic coating… scratching heads hanging over them with only microns of thin air. Scary, indeed? It’s your hard disk.
So, for the macbook, the solution in Leopard was… time machine. Quite ambitious as a backup application, indeed easy to setup and use.
One drawback: only directly attached (firewire and USB) disks, or the Apple time capsule. See, a year ago I ended up aquiring this NAS device (Freecom FSG-3 250 GB, wireless) which, altough useful, i found somewhat limited.
Anyway, i could back to this NAS with some hacking, which was not recomended. In the meantime, i replaced the FSG-3 with a dual desktop abaco computer ( Abaco ) . So now I have this full featured x86 dual core low power machine. I began thinking again of the backup over the network with time machine.

What I did

Initialize Time Machine

First step, was to take the USB disk i was willing to use as a backup unit, partition it, and format as a HFSplus file system. HFSplus is the Mac OS X journaled file system, think ext3. On this unit, attached via USB, i started to use Time Machine through the control panel. This way, first backup is done locally, probably faster than on the network.

Install iSCSI Target
iSCSI target is the Server machine which exports file systems and / or devices. A client uses an iSCSI Initiator to connect to a target. When connected, the device is seen as a local device, with all defaults options available. Exposing a target is a simple three line configuration file:

Target iqn.yyyy-MM.domain.name:uniqueidentifier
Lun 0 Path=/dev/sdc,Type=fileio
Alias MacLacie

Test iSCSI
Before going further in the iSCSI path I checked the configuration installing the Linux Initiator on my machine. After some fiddling with the console, a sudden iscsi start opened a nautilus connection with the content of remote, iSCSI attached disk. Server was working.

MacOS side
I was under the impression that Leopard had a native iSCSI initiator, but that is not the case. I downloaded and installed the free (but not open source) globalSAN iSCSI Initiator from studio network solutions

Reconfigure Time Machine
You can attach the iSCSI device through the control panel applet in System Preferences. After that, the device is sensed and usable from Time Machine. Backup through wireless of a delta (around 600 MB) then took around ten minutes. Not bad.

What I have to do

  • Hal rules rewrite the device is seen as /dev/sdc through HAL. I have to rewrite some rules to force device location (cannot use UUID for device…)
  • Services check Shut down the machine and restart – everything should work ok