• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to use Linux as file server?

hasu

Senior member
I am thinking of building a file server to store all my data files so that it can be shared across the network. My requirements are:

1. Must use Linux as the OS for the file server box
2. Shared folders must appear in Windows' Explorer (as folders or drives)
3. Must be able to secure the file server (so that one will have to use valid login credentials to get access)
4. Must work in a DHCP environment (machines in the network will have dynamic IP addresses)
5. Client s/w must be compatible with both Linux and Windows. Optionally like to have compatibility with OS-X too.

What are my options? I googled and found some information about Samba. It was also suggested in some other thread in this forum. I have a few questions:

1. Is SAMBA the best option available?
2. What is the best file system for a file server?
3. Can I still use a file in NFS as an encrypted volume by TrueCrypt.
4. Is 802.11g (54Mpbs) has sufficient bandwidth for such a requirement? There will be a maximum of 10 machines in the network.
5. Do you have any specific advice for me?

TIA

Edit: modified the message to make it clearer
 
Samba is your best option. The best FS for Linux is debatable, but I use ext3 on all of my systems. Wireless will be slow, but usable.
 
And if you don't want to deal with all the complexity that is Linux, there are a number of WebMin web management front end interfaces, and there are a number of Linux distros that minimize the administration bits. FreeNAS and such can help with some of this.

Windows Home Server rocks, though. It has an agent to handle backups, nightly, of all your Windows clients - in an effortless and simple manner. It's grand.
 
1. Is SAMBA the best option available?

It's just about the only one, sure you could try NFS and install SFU on the Windows boxes but that seems stupid and there's a lot of other problems that come with NFS.

2. What is the best file system for a file server?

Best is subjective, personally I use XFS whenever possible but ext3 is generally the safer option.

4. Is 802.11g (54Mpbs) has sufficient bandwidth for such a requirement? There will be a maximum of 10 machines in the network.

Depends on how patient the users are. 54Mbps only gives you like 6MB/s max and then there's the added overhead and latency of using wifi.
 
Samba is your only option for sharing files from Linux to Windows. Unless you want to install Microsoft's NFS client, which I have not been able to get working. The only other possibility would be using WinSCP to share files over ssh, but I don't think WinSCP lets you map a drive.

Ext3 is the linux standard file system, however XFS is just as reliable (but a little more risky in the even of a power failure, though I've had no problems) and XFS is much faster. I use XFS *almost* everywhere, and if I don't use XFS, I use Ext3. FreeNAS is very nice and easy to use if all you want is a file server, but personally I like to use Debian or Ubuntu Dapper Server so I can make other uses of my servers.
 
You probably won't need a fast filesystem as you will be limited by your network. ext3 is safe.

As for the networking, it would probably be a better idea to have the server hardwired via at least 100Mbit (Gbit is better of course) to the access point/switch/whatever that your wireless clients connect to. That way you'll be insulated against slowdowns from having multiple clients transferring files.
 
Thanks for all the replies!

While browsing for other options I came across NFS and thought it may have best performance since it is integrated into the kernel. May be I should stick with Samba.
I will install Samba on Ubuntu 6.10 Server edition and if possible WebMin tonight so that I can ask more meaningful questions ;-) I will try out other options later such as FreeNAS before finalizing on one.
 
Originally posted by: silverpig
You probably won't need a fast filesystem as you will be limited by your network. ext3 is safe.

As for the networking, it would probably be a better idea to have the server hardwired via at least 100Mbit (Gbit is better of course) to the access point/switch/whatever that your wireless clients connect to. That way you'll be insulated against slowdowns from having multiple clients transferring files.

Very true that the network will negate the speed advantage of XFS. I am not pushing XFS, but I would push the OP to look into using LVM and taking snapshots, so he can take advantage of using Samba's shadow volumes and Microsoft's Previous Versions client. For this, XFS has some great features to use with taking snapshots.
 
Update:

Last night I installed Samba and WebMin on my PCLinuxOS machine for a trial. WebMin is so cool -- server management couldn't be easier, I guess.

There were minor hurdles on the way. Default configuration of WebMin did not detect all Samab executables probably because the package manager did not install files in the default path. I used "which" command but it would search only the "search Path". Later I found the utility locate and used it to find all the files to update WebMin configuration. Samba is now up and running and I can access (for read/write) my Linux home folder in Windows!

I am sure I might not have touched even 5% of Samba. Next step is to install it in my server machine, which by the way is a dual CPU 2 x 1.13GHz Intel P-III with 2GB of PC133.

Thanks again
 
So far I could share only home folders. I created a new share in Samba for another folder and named it as "myfiles". It has all the properties of the default home share, but Windows does not recognize that. What am I missing?
 
Did you restart Samba after you added the share? Also, you can run testparm from the cli to make sure the syntax of smb.conf is correct.
 
Originally posted by: Nothinman
Did you restart Samba after you added the share? Also, you can run testparm from the cli to make sure the syntax of smb.conf is correct.

Great!

testparm loaded the configuration file from /etc/samba/smb.conf where as WebMin was using /usr/share/samba/smb.conf

I copied the later to /etc/samba/smb.conf and all my shares are seen in Windows. Now I have to update WebMin configuration with the new path. Since I am new to Linux there is always something new to learn -- including the fact that cli stands for Command Line Interface in addition to Common Language Infrastructure 🙂
 
One more question. Samba can be used to share files between Linux to Linux also right? (I was wondering about that because every where it is called Samba Windows Linux file sharing)
 
Originally posted by: Nothinman
Did you restart Samba after you added the share? Also, you can run testparm from the cli to make sure the syntax of smb.conf is correct.

Webmin probably has an "apply settings" button for Samba, which may either restart the Samba service or execute an "smbcontrol smbd reload-config" which is not as violent as restarting the service but settings changes might not show up until you log of you Windows computer and log back in.

Personally, I like to edit the Samba config files directly (though I do use Webmin for many many other things). You could post the contents of everything in /etc/samba (I hope PCLinuxOS put it's samba config files there) and we'll have a look at 'em.

There could be additional issues with PCLinuxOS or at least with using Webmin with PCLinuxOS. I would highly suggest trying out Debian Etch for your linux distro. I switched to Debian from Redhat and my only regret is that I didn't switch sooner.
 
Originally posted by: hasu
One more question. Samba can be used to share files between Linux to Linux also right? (I was wondering about that because every where it is called Samba Windows Linux file sharing)

yep. You use the Samba client to mount samba shares in linux. The command is "smbmount ". Personally, I like to use NFS to mount between linux computers, but samba will work just fine.
 
Originally posted by: Brazen
Originally posted by: Nothinman
Did you restart Samba after you added the share? Also, you can run testparm from the cli to make sure the syntax of smb.conf is correct.

Webmin probably has an "apply settings" button for Samba, which may either restart the Samba service or execute an "smbcontrol smbd reload-config" which is not as violent as restarting the service but settings changes might not show up until you log of you Windows computer and log back in. .......................
sooner.

I used "Restart Samba Servers" button in WebMin. It's easier to use GUI rather than stop and start the service from the command line. Thanks to my long acquaintance with Windows I often restart my machine after installing any new software! That also will confirm that all the necessary services are configured to start automatically. The issue in fact was that I configured WebMin to use wrong configuration file.
 
Originally posted by: hasu
Originally posted by: Brazen
Originally posted by: Nothinman
Did you restart Samba after you added the share? Also, you can run testparm from the cli to make sure the syntax of smb.conf is correct.

Webmin probably has an "apply settings" button for Samba, which may either restart the Samba service or execute an "smbcontrol smbd reload-config" which is not as violent as restarting the service but settings changes might not show up until you log of you Windows computer and log back in. .......................
sooner.

I used "Restart Samba Servers" button in WebMin. It's easier to use GUI rather than stop and start the service from the command line. Thanks to my long acquaintance with Windows I often restart my machine after installing any new software! That also will confirm that all the necessary services are configured to start automatically. The issue in fact was that I configured WebMin to use wrong configuration file.

yeah, I was writing my post, evidently, as you posted your answer previously.
 
Most definately SAMBA. It's very easy to use, and works damn well. As long as you have a webbrowser you can configure it with SWAT and you shouldn't have a problem.
 
testparm loaded the configuration file from /etc/samba/smb.conf where as WebMin was using /usr/share/samba/smb.conf

One more reason not to use webmin, IMO there's no real reason for it.

It's easier to use GUI rather than stop and start the service from the command line

Is typing '/etc/init.d/samba restart' really so difficult?
 
Sometimes it's just easier to work through a gui. For Samba, I like to edit config files, but there are some things that I like doing through Webmin, even though I know the commands.
 
Sometimes it's just easier to work through a gui. For Samba, I like to edit config files, but there are some things that I like doing through Webmin, even though I know the commands.

Meh, it's much simpler to type '/etc/init.d/samba restart' and then ^Rrestart after that to restart it when you're trying things, mostly because you're also probably running testparm and looking through the samba logs so you have to be at a shell anyway.
 
Originally posted by: Nothinman
testparm loaded the configuration file from /etc/samba/smb.conf where as WebMin was using /usr/share/samba/smb.conf

One more reason not to use webmin, IMO there's no real reason for it.

It's easier to use GUI rather than stop and start the service from the command line

Is typing '/etc/init.d/samba restart' really so difficult?
Certainly not! Knowing and memorizing the command and its options could be. Another reason would be resistance to change. Having been used to GUI for quite a while, it might be a little hard to use CLI again. I had the same issue when I moved from DOS to windows 95. It is quite funny when I think about that now! Moreover in Unix (and hence Linux) you can do everything in command line along with all of the options. I am creating a cheat sheet with all the commands and options I need.
 
Certainly not! Knowing and memorizing the command and its options could be.

It's not about memorization, although you'll obviously keep the ones in your mind that you use a lot, but just being able to find what you need. Knowing where to find certain types of files (like /etc/init.d for startup scripts, /usr/share/doc/packagename for a package's documentation, /var/log for system logs, etc) and reading man pages will probably answer 99% of your questions as you go.

Another reason would be resistance to change. Having been used to GUI for quite a while, it might be a little hard to use CLI again.

Yes, but if you were truly resistant to change then you wouldn't want to use Linux in the first place. The cli can be a little daunting at first since it's hard to know where to start, but if you're really serious about using Linux then you pretty much have go there.
 
Back
Top