Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

My 2nd hand P4 server is starting to fail (bad Dell capacitors probably) and I have been looking at replacing this with a 2 bay NAS. This is for home usage with both samba & nfs shares for Windows & Linux PCs with a several Tb of videos/mp3/photos/documents/system backups etc. I also use sshfs to mount drives remotely. Very useful to back up photos while on holiday. Speed is important to me for archiving & viewing HD video. Piano recitals in HD video takes up a few Mb as turns out.

I was amazed at the cost for a 2 bay system such as QNAP TS-212-US. The cost seems to range from $200 to $500+. There are cheaper systems but they have very poor reviews.

I could build a system based on a 2 core Celeron 847/Intel HM70 (Asus C8HM70-I) mini ITX motherboad/CPU combo with a 150 Watt enclosure (Athenatech A1089BB) for less than $200 and as far as I can see it will be at least as fast as even the most expensive NAS systems. I understand that a dedicated NAS makes it very easy: just add a disk & go but the price premium seems high to me. Also, if there is a hardware failure in a NAS I imagine troubleshooting a headless system would be painful & data recovery would be difficult if it was stored in a proprietary way.

It seems that a custom server beats a dedicated NAS systems almost from any point of view and yet these systems seems to be very popular. Am I missing something?

The freenas project might interest you. I haven't looked to see where it has got to recently but new features are being added from time to time. As all nas boxes are running linux anyway it's well worth building your own.

I have been using a d-link nas but I'm not totally thrilled with it. A disc went down fairly rapidly presumably because the box is small, discs close together and running rather hot. Could run the built in fan faster but that would add noise.

I set the nas up to works with cifs and that's where the problems started. Samba have grabbed cifs and made it their own. It was initially added to the kernel for diskless work stations. It's very fast unlike samba. That becomes very apparent when navigating directory structures. It also allows files to be launched and even run remotely and that is what has caused samba to play with it. They keep getting asked if it's secure, can't answer so the cripple it and force people to use samba. What I wanted was a nas that behaved just like a local disc. I've bug reported what they have done several times and they are rather touchy about it. On opensuse 11.4 it's possible to find the 2 cifs handling files and edit them to allow cifs to run unhindered. Comments in the files indicate where the changes have been made. Personally I feel that they should make unhindered cifs an install option. As they currently have it, fully operational and the same with just remote app running disabled.

As things stand I log on to the nas in the console when I want to use it

This requests the my nas password - interesting really as this makes the set up secure. The command links to a folder called NAS on my desktop. I did try to write a kde script to tidy this up but the commands didn't work on my current kde.

When done I enter this to disconnect.

Code:

/sbin/umount.cifs //home/????/Desktop/NAS

I've also connected via my wife's windoze laptop.

Why did I do it like this? Without the changes files couldn't be read, modified, written etc and the speed samba offers when navigating directory structure was completely unacceptable to me. I also don't want it up and running on my machine when there is no need for it. Also a diskless box appeals to me from time to time but I've resisted so far. The set up also allows me to send files to other members of the family without messing about with desktop/folder sharing etc. There is an all user directory on the nas.

Mount.cifs is the file that needs modifying if any one else wants to do this. The other file that is associated with this is mount.cifs.install. As I did this some time ago I can't remember the precise details. Another option is probably mount.nfs without any mods at all but I'm not sure how that would work out with windoze users.

John
-

I should add that there is lots of interest in quiet pc's. Booting from the network which can be done via cifs means that the bulk of the noise, the disks, can be some where else. ;-) Not sure if motherboards always offer the option though.
-

A NAS offers a complete out of the box solution with minimum setup time i.e. plug and play for those that do not want a do it yourself project. I have several salvaged P4s that I use for NAS that are good enough for my needs.

openfiler is another option for a dedicated NAS distribution.

samba is the linux implementation of the windows SMB/CIFS protocol for sharing files and printers. CIFS is the extension to the original SMB protocol.

It did take me a while to sort out samba shares when I set up a server based on an old P4 initially, particularly the permissions. I have looked at freeNAS & openfiler but now that I have a good recipe for configuring the samba & nfs shares it will hopefully be faster.

Quote:

I have been using a d-link nas but I'm not totally thrilled with it. A disc went down fairly rapidly presumably because the box is small, discs close together and running rather hot. Could run the built in fan faster but that would add noise.

I was wondering about this aspect. All the nas boxes seem to cram the drives & computer hardware into fairly confined space.

This requests the my nas password - interesting really as this makes the set up secure. The command links to a folder called NAS on my desktop. I did try to write a kde script to tidy this up but the commands didn't work on my current kde.

The samba hacks prevent that from working for me Stefan - on opensuse. I initially tried to set it up as you have done and it just wouldn't work. Drove me nuts trying. The password aspect suits me anyway and allows me to log on with any machine on our home network whatever OS they are running.

On the smb/cifs aspect I did find some old kernel documentation on why it's there. In essence it's implemented in the kernel so is completely transparent as far as anything else in the system is concerned and long may it remain so. Using it like that is just like using a local disk. I also bug reported the changes to Novel's samba people and they eventually told me why it had been crippled. In a nutshell no one is prepared to do a security check on it. Also pointed out that I could edit the source files if I really wanted to use it directly. I had done that previously by rolling back mount.cifs to a version off an earlier release. With 11.4 I found that they had confused it more by adding the other file. I have no idea what they have done on 12.3 - yet. From my point of view a nas isn't any good unless I can at least read modify write from it and launch files on it to any application I have. Some aspects of KDE made that difficult. Some apps would some wouldn't. All do using cifs directly be they kde, qt or anything else that runs. The fact that I can also launch an application that is installed on the nas is a side effect but handy if I ever get tired of disc noise from my desktop. Actually I suspect it's the easiest route to a very quiet PC.

I assume the same thing could be done with nfs with less bother but that may be as clunky as samba is. Samba reminds me of using a remote terminal over a leased high speed acoustic type land line. If I remember correctly those ran at 100 odd k baud.

Consider energy use in this analysis. Those expensive nas devices may reduce energy use and more so if you have to air condition the space.

Also consider using iscsi if you can.

The energy usage is another reason for retiring the P4 - it used about 60 W. It seems that power usage is celeron > atom > arm. On the other hand the celeron only seems to use about 20 W.
The iscsi looks interesting - I will look into it.

There doesn't seem to be any mention of cifs and discless work stations any more. All mention NFS. It seems there is some variation in the file transfer protocols that network cards use to initially get things going.

I did run a version of windoze once at work via an early plug and play network card connected to a netware server. Performance was far better than the local disk but it was a fairly potent server at the time. Once more than 2 or 3 people were booting at the same time speed dropped off but general use still wasn't a problem speed wise even with 1/2 dozen people using it.

iSCSI is a protocol to transmit SCSI commands over IP (http://en.wikipedia.org/wiki/ISCSI). It allows a server to provide a virtual block device over the network. That's a SAN technique, not a NAS technique. NAS provides file systems over the network; SAN provides block devices.

Storage appliance operating systems exist only to provide a pre-packaged, “easy to use” view into running a storage server. In concept this is nice, but there are real problems with this method. The biggest problems come from the packaging process which pulls you a step away from the enterprise OS vendors themselves making your system more fragile, further behind in updates and features and less secure than the traditional OS counterparts. It also leaves you at the mercy of a very small company for OEM-level support when something goes wrong rather than with a large enterprise vendor with a massive user base and community. The appliancization process also strips features and options from the systems by necessity. In the end, you lose.

If you are comfortable administering a mainstream Linux distribution, a DIY project would be a better choice.

If you put a high priority on ease and less on finance, a mainstream NAS device would suit.

data recovery would be difficult if it was stored in a proprietary way.

This should be no concern at all, since you will have a backup of the data, won't you?

Anyways, I am using a dual-core Atom CPU on an Intel mini-ITX mainboard for some years now as a home-server (usually about 12 clients that sporadically connect, serving Samba, NFS, rsync, FTP, Apache, Transmission and SSH) and it is idling most of the time. If you don't do heavy computations an Atom CPU should be all you need and you get the advantage of lower energy consumption (my Atom 330 uses about 8W under full load, I doubt that the whole system has a typical consumption of over 30W).

I found a good tutorial on this here. I did briefly consider using nfs but Windows Services for Unix (free add on for Win XP) was not made available for Windows 7. Always good to be reminded why I moved away from Windows as my primary OS. Either way, it looks like iSCSI might be a fast alternative for a shared environment as an alternative to samba.

Quote:

If you are comfortable administering a mainstream Linux distribution, a DIY project would be a better choice.

Setting up samba certainly did make a good DIY project. A few hours googling + cursing and eventually it worked.

Regards,
Stefan

PS Thanks for the quote from "Choosing an Open Storage Operating System": it never crossed my mind that the dedicated nas operating systems will lag behind somewhat in terms of security updates.

OpenFiler
Based on the obscure and now defunct rPath distro which uses the obscure Conary packaging system (RPM fork).

Free but the admin doc is €40, plugins for high performance hardware (Advanced iSCSI Target and Fibre Channel Target) are €1000 each and HA Failover and replication "starts at Euro 2400" (as listed at http://www.openfiler.com/).

Why it's difficult to get community support: From http://community.spiceworks.com/topi...ing-openfiler:
"Yeah, we have a lot of OF users but one of the issues with OF is that the people that you would want to support it, those with a lot of Linux or storage experience, don't use it so you have a hard time finding the people who are familiar with the obscure rPath Linux base or OF's own quirks on top of it. Anyone experienced enough to support OF would get more mileage out of a standard Linux distro. So it is a difficult product to find support for because of the use case factors".

:-) I don't fully understand why some one would want to turn one into a samba server though. As I understand it most similar nas's also run linux. The problem with them is cost once they hold more than 2 discs. As I see a nas it should be a hot fix set up and that is a bit of a problem as things start getting useful at the raid 5 level / 3 or more discs. What seems to be lacking on the web is instructions for building up a linux based system that can accept say a 6 port raid card etc.

One other aspect I don't understand is when I access my nas directly via cifs without using samba am I effectively connected to a samba server. Some of the nas hacks seem to suggest that I am not so I wonder exactly what I am connected too. I would be grateful if some one could clear this up. It may be a case that samba will function with a client that is using cifs directly.

Building a nas up using a cheap motherboard and a sata II raid controller is a very attractive option. The nas I have offers CIF's for comms and NFS as an option with a warning that offering both will slow things down. Thanks to windoze popularity disabling CIF's doesn't seem to be an option.