Click here to Skip to main content
15,893,508 members
Articles / All Topics

Ubuntu in Action… – NDAS

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
29 Dec 2013CPOL5 min read 8K  
Ubuntu in action... - NDAS

Image 1

Last week, my Windows PC stopped working. (I have to look into it later). At the moment, I am working with my taxes and I needed some files from the old machine, desperately. Luckily, I’ve been backing up. For this, I use IOCell Networks (also Ximeta)1, NetDisk. NetDisk is a Network Direct Attached Storage (NDAS) device. This seems to be a combination of Network Attached Storage (NAS) and Direct Attached Storage (DAS). As a device, NetDisk is really an external hard disk enclosure that is network enabled and you add hard disk (I added a 1TB drive to it). The difference from other external drive enclosures is that this is network enabled, so once plugged into Ethernet, it can be accessed from any PC on the network. And Direct Access because, you can just plug in the device directly to Ethernet, not through any computer or server.  To add security, they have added a software layer (IOCell/Ximeta NDAS) that you need to install on each PC to access the drive. You will have to register the software with the specific serial # of the NetDisk. Thus, only specific PCs with the right software and serial # register can access the drive. I had installed this software on my Vista machine and that worked like a charm. (This post relates only to the Linux version of this software. If you need help with Windows version, please refer to their user manual.)

Now, at this critical moment, when I needed to access the back up, I couldn’t. My main (Vista) PC is dead. My wife’s laptop runs Windows 7 and is not capable of running Ximeta NDAS software (It freezes – even the version 2.72 they suggest to fix the issue). Then my other PC, where I am typing this from, is running Ubuntu 12.04 for which Ximeta does not have a driver or programs for NDisk. At least, not any installation binaries!

But there was hope. Luckily, Ximeta provides (open source) source code at https://github.com/iocellnetworks/ndas4linux/tree/master/ for Linux. Download the source code (If you go to zip tab in the above page, it will download a file named ndas4linux-master.zip. The source directory has several versions. Which version to use depends on your kernel version. (To find your kernel’s version, you can use uname -r on Linux terminal). For Ubuntu 12.04, I used version 3.2.0. Though I work with large systems at work, I never venture to compile big programs at home. This time, it’s different. Desperate situations require desperate measures. I ventured on compiling the driver for Linux myself. I was amazed. Huge sets of files got compiled while I watched, without major issues. Once the source code is compiled, we need to install and load it. Here is a list of things to do from their documents:

  1. Download a source tarball
  2. Unpack
  3. CD into the right folder and run make
  4. Change to root or sudo make install
  5. Start ndas as root
  6. As root, or by sudo, register and enable ndas devices with ndasadmin

Apart from the documents provided, each directory inside the main folder has a README. Read these for instructions on how and where to compile. Here are slightly better instructions on how to build it.

Because their instructions are spread across different documents, I’ve gathered and summarized the steps here for the newcomer.

Building the Software

This is really confusing, as there are many directories and many make files. To do this correctly, you need to be in the right directory. Change to ndas4linux-master/3.2.0/doc (I use 3.2.0; change to the right version) and read how_to_export.txt first. Here is the summary of how to compile:

cd ndas4linux-master/3.2.0
make linux-rel

This creates a new directory, ndas4linux-master/3.2.0/build_x86_linux. linux-rel is one of the options. This is the final version. But, you can also build dev or debug versions. Take a look at the doc files.

Installing the Software

Once you compiled, you need to install the driver and start it. Below commands do that. This step actually builds the ndasadmin program and installs it.

cd ndas4linux-master/3.2.0/build_x86_linux/ndas-3.2.0.x86
make

The make command compiles so many files and actually builds ndasadmin and “installs” in /usr/sbin. This is the command we will use to work with (mount, dismount, etc.) NetDisk.

ndasadmin has several options. To run this command, you need to be root or use sudo. If you just type sudo ndasadmin on command prompt, it will display various options available.

Starting ndas Driver

After building and installing the driver software, you need to start the driver before you can use the device.

sudo ndasadmin start

Mounting the Device

You also need to register the device serial #, before you can mount the device volumes. The readme file, how_to_use_ndasadmin.txt inside the version folder (3.2.0 in my case) lists the steps to install and run NDAS software. To register the device, you need to find the serial number (and write key) of the NetDisk device. These are available at the bottom of the Netdisk box.

sudo ndasadmin register <SERIAL_NUMBER> -n NetDisk1
sudo ndasadmin enable -s 1 -o r

brings up the NetDisk volumes. NetDisk1 is just a name I gave to the device. This can be anything. Also, register option has a slight variation with Serial # and Write key. See the readme file mentioned above.

First, I didn’t see them come up. Then I found them listed in “Places” option in Gnome desktop menu. To see the device listing, you can use the following command:

cat /proc/ndas/devs

To disable/unmount the device, use the following commands:

sudo ndasadmin unregister -n NetDisk1
sudo ndasadmin disable -s 1 -o r

Further Help

Like I said earlier, the doc folder inside the version you are working with (ndas4linux-master/3.2.0/doc) actually contains all the instructions. Here are some of the files in that directory:

  • how_to_build.txt
  • how_to_export.txt
  • how_to_use_ndasadmin.txt

Note that the software seems to be constantly evolving, so it may not support all the functionalities, the actual device can support. And if you need more help, here are some links if you want to learn more about Iocell Ximeta on Linux.

  1. http://ndas4linux.iocellnetworks.com/
  2. https://github.com/iocellnetworks/ndas4linux/wiki/How-to-export-NDAS-source-for-different-architectures
  3. http://ndas4linux.iocellnetworks.com/trac/index.cgi/browser/ndas4linux/release
  4. http://ndas4linux.iocellnetworks.com/kermit/index.cgi/wiki/Usage
  5. http://ndas4linux.iocellnetworks.com/kermit/index.cgi/wiki/HowToBuildDEB

1 IOCell acquired Ximeta’s NDAS; so you will see the names used interchangeably here and the web. See here. 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) City of Los Angeles
United States United States
Originally a Physics major, fell in love with Microprocessors and switched to Computer Science 20+ years ago. Since then, dabbled in various languages including, PowerBuilder, Oracle, Java, C, C++, Perl, Python etc. Constantly striving for quality and performance too.

I try to help fellow developers with technology as a way of "giving back to the community". Blogging became a natural extension of that effort. Still learning to perfect that art. If one new programmer out there benefits from this blog, my time and effort are fully worth it.

The underlying theme in my blogs is power and beauty of programming (and technology in general). A well written program gives me the sense of awe you get when you look at a man made wonder like Angkor Wat. You experience poetry, art, mystique, power all at once. A program and the troubleshooting that ensues also gives you a feeling you get while reading a mystery novel!

Comments and Discussions

 
-- There are no messages in this forum --