Tiny Core Linux

Off-Topic => Off-Topic - Tiny Core Lounge => Topic started by: Anubis on August 27, 2012, 05:47:53 AM

Title: How to netwrok several TinyCore workstations and a server?
Post by: Anubis on August 27, 2012, 05:47:53 AM
Hello all,
I need to setup a server with a small number of workstations not more than 12. The workstations will be running TinyCore and would have to run an application hosted on the server.

Now I thought about setting up NFS in order to export the directory containing the program to run and mount such folder on the workstations.

I was thinking of using TinyCore on the server to match the clients so there are no conflicts between nfs versions, as I read there are issues sometimes.

So my question is, should I just setup a FTP server instead?


Any advice is welcomed.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: ananix on August 27, 2012, 07:47:05 AM
  I would scp it.                                                                                                                                                                     
                                                                                                                                                                                       
  But you are not naming any issues but just ways to access network resources, in that regards i also wanna mention rcp.

  Is it because you dont want a local copy and want to execute it from its network location? That would be a reason for NFS, but then i dont understand the ftp surgestion :)

  -- Regards Andreas
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: Anubis on August 27, 2012, 11:36:36 AM
Thanks for your reply ananix
What I need is to export a directory on the server "lets call it /share" in which I will have a number of batch files.
I would then boot TinyCore from USB drives for example, and I need to mount the remote /share folder locally upon boot.
I do not have experience doing this but assumed the proper setup would be using NFS correct?
I realize FTP is not the solution I need.

In other words I have to run a program on multiple systems, and to make it easy to update (as it has several updates a year).
The decision   was made to have the program run remotely so the files were updated on the server side and only once instead of wasting time deploying multiple copies across each workstation.

I wanted to know if anyone had experience setting something similar to this if they could throw me a couple of tips.

Also, I was concerned of mixing different versions of linux  for example a fedora o ubuntu as the server might cause issues if using a tinycore/minicore Linux workstations by mixing different  versions of NFS. I read somewhere that sometimes non matching versions of NFS cause issues. (For that reason I chose to use Tinycore as both server and client.

Sorry for the redundant information.

To the moderators, sorry I posted this in the wrong category.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: ananix on August 27, 2012, 12:19:52 PM
NFS is for sharing files only, you can always experience problems with any protocol implementation between any platforms, but in a homogenous env as you describe its gonna be minimal.
NFS is not for online transactions.
From the sounds of what you are gonna use it for NFS is just the right thing as it sounds like it only loads the batch job from there not its data.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: tinypoodle on August 27, 2012, 12:34:55 PM
The way I understand, ssh might be an approach.

Do you have to execute any apps depending on X or not?
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: ananix on August 27, 2012, 01:10:33 PM
using ssh sounds more like a distributed computing solution.
The server that holds the batch jobs executes them on the remote nodes and they log to the server syslog which in return can act upon the different status of the nodes and their jobs.

Thats diffidently also an approach, but it sounds like the program setup is already decided only the tools are needed. Besides that its stated we are talking batch in that case only the location of the job data is interesting in regards to nfs.

PS I have failed to mention that my experience is that NFS needs a reliable network connection as it locks the terminal for æons when trying to access a dead mount and also when booting offline but you can work out the setup to fit your scenario.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: Anubis on August 27, 2012, 02:33:29 PM
Folks I would like to thank you all again for your help.

BTW due to NDA I can't be as open as I would like to.

I will try to detail a bit more what was requested from me.

We have regular desktops where I would say MiniCore Linux runs (no GUI just CLI) booting of USB drives.
The systems are used to test a piece of hardware (add on card)  in house programmers make  a batch file that provides the operater with multiple settings that pick the specific executable and passes on some parameters.

My guess was trowing this main folder and booting of a minimal mini-core that would mount upon boot the  share/exported folder as something local. For this reason I don't think ssh would work.
I could be wrong.

The test diagnostics software has to run on the local workstation and be able to access the hardware. 
Would a ssh session not run the diagnostic program against the server's hardware? Would using NFS be any different?

I have been reading some other posts regaring NFS on Tiny/Minicore 4 and there seems to be issues with it. Not so with Tiny/Mini core 3.

Again, you guys have been great.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: tinypoodle on August 27, 2012, 07:42:34 PM
ssh is not suitable for running apps locally.

In order to transfer files, both scp and ftp could be used - ftpget/ftpput (client) is already in base, scp would require the dropbear or openssh extension.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: gerald_clark on August 27, 2012, 07:44:32 PM
I use NFS extensively with TC.  There is nothing wrong with it.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: curaga on August 28, 2012, 03:59:53 AM
So if I read that right, you only need to get the latest software from the server each boot, and then send back results?

If so, then NFS might be a bit heavy for that use, and any file serving solution from FTP, TFTP, SCP, etc will work.


On the other hand, if the clients need to see updates while live, then NFS is exactly what you need.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: Rich on August 28, 2012, 06:53:16 AM
Hi Anubis
So your mission is:
1. To set up a number of PCs to act as test stations to check out a piece of hardware.
2. Centralize the test software so that revision control can be done at a server.

The right tool for the job is a remote directory that gets mounted locally. That means NFS, Samba, or any of the
other file sharing packages that may be out there. Here's a basic layout with the following assumptions:
1. The test stations should be identical, including the USB drives.
2. You want to save records of the test results.
3. This might be a military contract, in my day, they wanted printouts of everything.

The test station:
1. Mount the remote directory, lets call it ATE, to /mnt/ATE
2. Add /mnt/ATE/bin to the END of your path so your test programs/scripts can be found.
3. Add a link to /mnt/ATE/results to /home/tc/testresults
4. Add a link to /mnt/ATE/printqueue to /home/tc/printqueue
The test program would query the operator for the test station number and the serial number of the UUT before the
test begins. At the end of the test, the program sends the results file to testresults. If a hardcopy is required, it also
sends a copy to printqueue. If you use a file naming format something like:
Code: [Select]
TS#.YYMMDDHHMM.SERIALNUMBER.resultsit makes it easy to retrieve test results at a later date based on test station number, timestamp, and/or serial number.
This may be important if you find out during production one of the test stations behaved incorrectly and you need to
find out the serial numbers of the effected units.

The server:
1. Shares the ATE directory containing subdirectories  bin, testresults, and printqueue
2. Runs a script, let's say once a minute, that prints out whatever it finds in ATE/printqueue
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: ananix on August 28, 2012, 07:43:28 AM
Hi Rich your solution might work just fine if you are running it all as scheduled batch, print and all, and do no online transactions or else you are traveling down a path to bad performance or even failure now you are including prints.
NFS is not for online transactions-
NFS is only for sharing file systems.
CIFS should not be a consideration if its only for sharing file systems, CIFS is for sharing all kinda network recourses with more overhead as result if you just need to share filesystems.
If you need to transfer online transactions from clients to server one should make a real socket solution or the like for instance a networked database.
NFS is not a online database system, but a network file system.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: Rich on August 28, 2012, 12:45:27 PM
Hi ananix
I don't know what you mean by "online transactions", I'd Google it, but I'd just get back a bunch of websites offering
online transactions.
Quote
NFS is only for sharing file systems.
And that is exactly what I suggested. When the operator goes to start a test. the kernel will search the PATH to find
the test program, which it will find on the share when it reaches the end of the PATH variable. It will load the
executable in local RAM and proceed to run the test. All the test stations share the same test programs.
When the test is complete, the test station sends the results file to a shared directory.
If a printout is desired, the test station sends that file to a shared directory. The server decides when to print it.
Quote
NFS is not a online database system, but a network file system.
No one said anything about an online database. Chances are that these would just be report files that get archived
as a record to show that the tests were performed. I just suggested a possible naming convention that would ease
tracking down one or a group of particular reports in case of a problem. That's not a database, that's organizing
your files.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: ananix on August 28, 2012, 01:31:03 PM
:)

in regards to online vs batch transactions i stand corrected the school book term is online processing of transactions ;)

http://wiki.answers.com/Q/What_is_the_difference_between_batch_processing_Online_Processing_and_real-time_processing

In short its the two basic ways of doing computing.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: Rich on August 28, 2012, 01:43:25 PM
Hi ananix
I still don't see a problem here, maybe you could provide an example.
Title: Re: How to netwrok several TinyCore workstations and a server?
Post by: ananix on August 28, 2012, 02:09:30 PM
I have pointed out a potential problem with NFS and distributed computing as its difficult to know the details of how the thread initiaters program setup and true working is, from what i wrote i think the thread initiater can evaluate hi's system and setup himself. But i think a system as your describe would properly work just fine but again the exact details of your system is not availble either only you can judge.

I take you dont mean an example of an online system and batch system given the url i handed to you but of the potential problem i point out. I can give an example but understanding online and batch processing is better for making good solutions and understand systems.

Example by V. Edward Gold, Excuse me for no more follow up for now its to much and im working tired and late.

"Every month, the company needed to process several million records from an input file. Fortunately, each record could be processed independently of all the other records, so there was no restriction on separating the file into multiple pieces and sending each piece to a different CPU for processing. Each machine would read a record from this file, retrieve a data item from that file, use that data to look up an entry in another file, and then write out a record. In the end, the various output files would be combined.

Initially, I used NFS to allow each of the machines to access the lookup file, which had about 10 million entries in it. This turned out to be a huge mistake! Each time a machine read a record from its data file, it needed to do at least 23 seek operations on the lookup table file, using a binary search algorithm to identify the record of interest. All these random reads across NFS were absolutely killing the throughput! Instead of using this method, I copied the lookup table to a local disk on each machine. This copy operation took less than 15 minutes, and then the main processing job could run in two hours instead of 40 hours. The process might have taken 20 times longer using NFS."