PDA

View Full Version : I need to build a file server...


Mini-Me
11-25-2007, 03:08 AM
Hi.

After several(unsuccessful) experiments with USB hard-disk arrays, I have decided that what I need, is an NTFS file server.

Can anyone give me any hints or links to suitable systems?

I have been looking at several Linux-based file-server systems, but the major(and I mean MAJOR) drawback with these type of file server, is that they use the Linux filesystem.

That in itself is not a problem, but ALL my files are NTFS, and every one of the Linux-based file server applications I have looked at, does not support NTFS.

While I could buy some new hard-drives, and transfer the files to the Linux-based server, I don't really want to go to the expense, as I would need about 2TB, say, 4x 500GB drives.
Even though 500GB drives are getting quite cheap, 4 of them still represent a large investment, when I already have the capacity, just spread over several physical hard-drives.

Therefore, I am considdering basically just another XP Home machine, with a large collection of hard-disks in it, plugged into the network, however, I would like to use a dedicated server OS if possible.

Paul Komski
11-25-2007, 04:12 AM
Surely if you are intending to have a file server you are going to need to transfer all the files to the server - otherwise doesn't it rather defeat the object?

Thereafter, does it matter what format the files are stored in on the server? When the server is accessed it should dish out the files in whatever format the client is using. One client might be using FAT32 on Win98 and another NTFS on WinXP.

You can also just run a straightforward Linux box with Samba enabled and simply network with the shares on Window systems on the same LAN.

Incidentally, modern distros have absolutely no problems in reading NTFS and most have no problems writing to them either. This would only apply to locally accessed disks.

If you can get a decent host controller card or cards you should be able to setup nice spanned sets using JBOD to create one or two large volumes using your existing drives.

PS I recently linked to http://howtoforge.net/samba_setup_ubuntu_5.10 in another thread, which was thought to have been of use. It relates to an older version of ubuntu but should be equivalent in a more modern distro.

Paul Komski
11-25-2007, 05:06 AM
Entry level PCI host controller with support for WinXP/2000, Red Hat7.3/8, SuSE Linux 8.x maybe. Four dedicated channels (one drive per channel).

http://www.newegg.com/Product/Product.aspx?Item=N82E16816102019

I'm sure if you look around you will find higher-end cards and for really good performance you want a true hardware card (that does its own processing and doesnt share with the CPU). This is of the greatest relevance when using RAID 5 or 6 rather than JBOD.

Mini-Me
11-25-2007, 06:39 AM
Surely if you are intending to have a file server you are going to need to transfer all the files to the server - otherwise doesn't it rather defeat the object?

In an ideal world, yes.
However, I want to be able to take the drives WITH THE FILES ON THEM, put them into a dedicated server box WITHOUT having to re-copy them to a new disk format.

In other words, the drives I am using NOW are NTFS.
I want to take those drives, and put them into a server box, which can access them DIRECTLY, and dish the files on them up to the network.

Hope that clarifies my position.
:)

The server OS I am looking at very seriously, is NasLite (http://www.serverelements.com/index.php), which looks very cute, and would do what I need, but it does not support NTFS - not even reading NTFS volumes, according to their customer support when I e-mailed them.

Rick
11-25-2007, 07:44 AM
Or read this little story and replace the price of his drives used with your

[quote]How To: A Complete Terabyte File Server For About $500[/quote
http://www.informationweek.com/hardware/personaltech/184400017

In my network I did the NAS route and shut down the old linux file server
But to each his/her own

Mini-Me
11-25-2007, 06:07 PM
Cheers for that link - checking it out...
:)

ADDITIONAL: A very interesting article. Thanks. I have printed it.

Paul Komski
11-25-2007, 10:08 PM
See no reason for you to not just move the drives with ntfs volumes directly to the server. I'm sure Ubuntu can be configured to serve NTFS partitions to a Windows network. If not I know for sure that Knoppix 5.1 on a Live CD can - and that would be very easy for you test out without even having to install an operating system to the "Linux Box".

Under Knoppix 5.1
To make all volumes accessible to a Windows network first from "KNOPPIX START" >> "Services" >> "Startup Samba Server"and give the user (knoppix by default) a password. Export all volumes. Now when you go to Workgroup Computers on a Windows PC you should be able to log in and access the partitions on the Knoppix machine.

I can certainly read and write NTFS partitions using this method after loggin onto the Knoppix PC from a WinXP installation on the network.

Mini-Me
11-26-2007, 01:53 AM
Thanks Paul.
:)

I might try that!
In the article that Rick pointed to, they use Puppy Linux.
I have just downloaded that about a month ago, so would like to use it.

I think I will try the Knoppix version you suggest first.

It's all good Linux practice!!!
:D

I thought that reading NTFS was not much of a problem, but writing NTFS was.
My understanding of this, was that NTFS is a "Closed" filesystem, in that MS don't want people to know how it actually works.

The fact that you mention that Knoppix 5 can read AND write NTFS, suggests that the open-source world have worked out how NTFS works.
Correct?

And lastly, how safe is it these days, with a modern Linux kernel, to write to NTFS volumes?

Rick
11-26-2007, 02:04 AM
With the newest distro's
You need to check for R/W compatibility to mounted NTFS drives

As in the link.
One drive with distro installed and your NTFS drives mounted at bootup
You would/could be up and running in a short time

BUT It requires you to get Samba working

In past versions it could be and was a real headache for some to get samba working and reliably serving files

Paul Komski
11-26-2007, 02:19 AM
Until recently it was pretty rock-solid - with the exception of compressed or encrypted files. Even those areas have, I believe, now been overcome but if you want to play it safe don't encrypt or compress.

http://www.linux-ntfs.org/doku.php?id=ntfs-en#can_i_write_to_an_ntfs_volume

http://www.ntfs-3g.org/

As long as Knoppix can detect your LAN it has proved, even in my hands, to be very straightforward to use and all volumes are mounted, by default, at startup.

Paul Komski
11-26-2007, 03:47 AM
BUT It requires you to get Samba working
Just thought I must try out Puppy. The Samba client is OK for looking at the Windows PCs but I cant find the Samba Server (if its there) on it to allow the network to access the Puppy box. Any clues?

Rick
11-26-2007, 04:24 AM
I am in the middle of downloading Knoppix dvd iso now and will be looking at IF I have time

But as you have found out
Samba is not the friendliest of programs

In the mean time
here is a link to an FAQ for samba in knoppix
http://www.knoppix.net/wiki/Samba_Quick_FAQ

I hope it helps

Rick
11-26-2007, 06:24 AM
Update

After some time downloading and burning the dvd
I have found out as others have that
it does not support my hardware

The error then dropped to the command prompt so fast I can't say what the error is/was

I have to assume like others it is a problem with the sata controller that my dvd's are connected to.
OR like the earlier versions of XP ( pre sp2 ) it cant handle the quad core in my Q6600 unless the extra cores are disabled

I don't have the time to debug this
I will say from what I have read that these bootable cd/dvd versions will NOT work as a server
at least not with samba and a windows network

Why?
Simple as stated in many posts
This version needs to find and see Your preexisting network

However
For Samba to work.
it needs to be first and ALL other attached systems need to see and connect to it

It can be added / booted into after the network is up and running
however it as a server needs to be logged into and works on a domain not a work group
Getting anything beyond FTP support with these cd/dvd disks may require more effort then it is worth

Correction
Samba server can be booted and run after network is up and running
In fact Vista will see it as Samba (a server) and display it's full name and allow you to log in
http://home.wi.rr.com/nasons/samba.jpg

I have linked this image before and forgot all about it till I tested the old system this morning
I was not able to log into it with XP
That maybe due to the fact that I don't use a login with XP
Without a true login Samba will NOT allow you access

Paul Komski
11-26-2007, 07:35 AM
But as you have found out
Samba is not the friendliest of programs

In the mean time
here is a link to an FAQ for samba in knoppix
http://www.knoppix.net/wiki/Samba_Quick_FAQ
I have always found Samba a real cinch under a Knoppix live CD as indicated in post #7 and in my own backup link in my sig.

It looks straightforward under Ubuntu and the Ubuntu PC is added to the Windows Workgroup for access from other PCs but I haven't cracked the logon and password methodology (maybe it does depend on the Windows user name and logon) - so, to date, I dont get access even though the shares are looking me in the face.

My biggest problem has been with Puppy and I just cant find, so far, whether it is native or needs to be installed.

Rick
11-26-2007, 08:50 AM
The log-on can be solved with a script

I can't help with puppy

Paul Komski
11-27-2007, 02:05 AM
Ubuntu proved to be relatively simple to sort-out. I hadn't realised that the you must provide a specific samba name and password (http://screencasts.ubuntu.com/SAMBA_Filesharing). Once I did that and mounted any relevant drives it was plain-sailing. I guess all I need to do now is to add the desired shares to /etc/fstab so that they are mounted automatically at runtime.

Mini-Me
11-27-2007, 02:13 AM
Is there an app for Linux for file serving/sharing that is NOT Samba?
I have had a look at it via Puppy, and it is too basic, and not that easy to work with.

What other options are there in the Linux system for doing this kind of thing?

Paul Komski
11-27-2007, 02:58 AM
I have had a look at it via Puppy
How did you access it in Puppy?

In Ubuntu when setting shares you can choose between Samba (windows networks) and NFS (Unix Networks). Don't know anything about NFS however.

Paul Komski
11-27-2007, 03:37 AM
Actually having had a very brief look around, NFS looks very interesting. The server basically shares out some disk space as folders or whatever and the clients access this allocated space as thin clients (like a terminal on a mainframe I guess).

Presumably the clients access by Telnet or SSH rather than TCP so if anyone understands this - well a wee tutorial would be great ... and can one access a Linux box from a Windows box using this methodology?

Paul Komski
12-02-2007, 09:01 AM
One of the things I liked about Knoppix 5.1.0 was the real (or relative) simplicity of both File-sharing with Windows PCs using Samba and that NTFS volumes were (for me to date anyway) no different to access than FAT or ext2 partitions on the system.

I had expected it to be similar with Ubuntu 7.0.4 but, through trial and error, I have discovered and now ironed out a couple of quirks.

Quirk1.
NTFS volumes need to be made accessible. There are a number of approaches but I found the most straightforward was to install NTFS-3g and edit fstab appropriately.

To install ntfs-3g enter the following at a prompt:
sudo apt-get install ntfs-3g
To enable any ntfs partitions to be available for read/write access at runtime you need to edit fstab by adding a line for each NTFS partition in line with the following example but with the devices and folders modified approriately:
/dev/sda2 /media/sda2 ntfs-3g defaults,locale=en_US.utf8 0 0
You can edit fstab (many recommend first making a backup of the original) by entering the following:
sudo gedit /etc/fstab
You will then need to create the relevant folder in the /media folder and reboot.





Quirk2.
Samba needs to be installed, smbfs needs to be installed and a SMB password set.

At a command prompt enter the following command to install the SAMBA server and client applications.
sudo apt-get install samba smbclient
To mount Windows filesystems using SMB, you will also need smbfs. Enter the following command at a prompt.
sudo apt-get install smbfs

By default Samba is configured to use "user-level security" and the samba password is different than the user password. So you must explicitly set a special SMB password which is associated with your normal ubuntu user's name.

First get to a root console (eg by using sudo -i or from Applications>SystemTools>RootTerminal)
Say you have a user name called username then at the root prompt enter the following command:
smbpasswd username
You will then be prompted (twice for confirmation) for the new SMB password.

Setup the folders you want to share from System>>Administration>>SharedFolders. This will not require a domain logon.

Set up the folders to share on the SharedFolders Tab
Set up the workgroup on the General Tab

Now you can check from within Ubuntu from the Places>>Network area or from a Windows PC's Network Places that you have access to the shares.

Finally, if there are problems copying files to such NTFS partitions from withing or without Ubuntu then it is possible that the cause is a fragmented MFT. One way to resolve this is to copy the files or partition elsewhere, reformat the dodgy partition as NTFS and copy back the files as files.