Welcome, Guest. Please login or register.
May 24, 2013, 11:20:43 PM
Pages: [1]   Go Down
  Print  
Author Topic: Help: Linux file server  (Read 1106 times)
fall-apart
Ace

Posts: 7,858

Join Date: Sep, 2002


« on: February 19, 2007, 07:07:21 PM »

Okay, so I'm basically starting from scratch here.  I have an old Compaq Presario 5177 that someone who just upgraded gave to me.  It has a 10GB hard drive in it.  I'm hoping that I can add another (much larger) hard drive, put a Linux distro on the 10GB and use the machine as a file server.  I have a couple of questions:

1)  Is a JBOD file server an okay way to go?
2)  Which distro is best suited for this type of application?
3) How much do I need to know about Samba to get the file server to appear as just a network hard drive on WindowsXP Home computers?

Thanks!
Logged
hydran
Ace

Posts: 4,168

Join Date: Aug, 2005


« Reply #1 on: February 19, 2007, 08:22:59 PM »

good question - I am sure other people are thinking exactly the same thing for their older computers.

I'll wait to see what one of the others say, but I don know that Linux is really all about networking, so this should be relatively easy to do.
Logged
hugh
Ace

Posts: 4,371

Join Date: Nov, 2005


« Reply #2 on: February 19, 2007, 08:32:39 PM »

i tried ubuntu and set samba up, everything looked as it was meant to, everything got ticked, i dotted my i's and crossed my T's but i couldn't get it to show up on windows fo shiz innit blud!

i could see the computer under network machines, i could double click but it just asked for a password and user name that didn't exist, regardless of changing all user rights etc etc in the config files of samba
Logged
MrbLOB9000
Ace

Posts: 12,896

Join Date: Apr, 2002


« Reply #3 on: February 20, 2007, 06:30:31 AM »

I'm pretty sure JBOD has no speed improvement (like RAID0) and no redudancy/repair (like RAID5)
Logged
Pudge
Member

Posts: 706

Join Date: Nov, 2002


« Reply #4 on: February 20, 2007, 06:59:52 AM »

1) Is a JBOD file server an okay way to go?

Most Operating Systems will support most levels of RAID, although JBOD might be the least supported.  I agree with MrbLOB9000, and I would stay away from JBOD.  It was the first form of RAID and was invented in the days of expensive Hard Drives.  It's sole purpose was to take a bunch of cheap (usually used) small capacity hard drives and make them appear as a single larger capacity hard drive.  The cost of Gigabytes per dollar is now so low that JBOD doesn't offer any real advantages.  RAID 0 doesn't gain you any speed advantage on a server because the ethernet connection is the bottleneck that determines your final transfer rate.  So, the only RAID option that would offer any advantage would be RAID 2 or RAID 5 which would offer redundancy for your data.  The drawback there is that you need 2 or more hard drives that are exactly alike.  They say you can use a 30 Gig WD hard drive with a 40 Gig Seagate and end up with a 30 Gig Raid 2, but a lot of people have found this to be unreliable.  It's best to have matching hard drives. which can get expensive.

2) Which distro is best suited for this type of application?

Almost any Linux distro offers NFS, SSH, and SAMBA.  NFS & SSH would allow access to the server for Linux boxes, Samba would allow access to the server for Windows boxes.  The BSDs are noted as being the most secure systems, such as FreeBSD or NetBSD.  Also you could install http://www.freenas.org/.  With FreeNAS they start with FreeBSD and eliminate everything that's not necessary for a server then further refine it to be a NAS (Network Attached Server) only.  Usually, you buy a NAS as a pre-assembled device with an embedded OS, much like you buy a router.  With FreeNAS you can turn a computer into a NAS the same as you can use m0n0wall http://m0n0.ch/wall/ to turn a computer into a router/firewall.  Note that m0n0wall is also based on FreeBSD.  In both these cases, it is usually cheaper, faster, easier, and better to just buy the specialized device as opposed to making a general use computer act like a NAS or router/firewall.  Actually, for most people I would recommend just buying a NAS.  Here
http://www.macmall.com/macmall/shop/detail.asp?dpno=394112&Redir=1
you can buy a box that does it all.  A Tritton Technology 200GB NAS/Router/FireWall/VPN/Switch Advanced Server Applicance TRI-ASA1200.  Buy one of these and all your needs are fulfilled.  Of course there are devices out there that are a NAS only.  The only reason NOT to buy something like this is if you want the learning experience, such as you want.

Go to
http://compnetworking.about.com/od/itinformationtechnology/l/bldef_nas.htm?iam=momma_100_SKD&terms="nas+server"
and
http://compnetworking.about.com/od/itinformationtechnology/l/aa070101a.htm
for more information on Network Attached Servers.

3) How much do I need to know about Samba to get the file server to appear as just a network hard drive on WindowsXP Home computers?

Like anything else in the computing world, the first time you use something there will be a learning curve.  First of all, Samba does not exactly get the file server to appear as just a network hard drive on WindowsXP Home computers.  Your Samba shares on the Linux computer will appear under "Network Neighborhood" not "My Computer" on your WIndows machine.  To get your server to appear as just a hard drive on Windows, you would need Microsoft Server 2003.  Using Linux and Samba to share files between a Windows machine is kinda like a server, but not exactly.  

Here are some resources you may find helpful:

http://www.brennan.id.au/ sections 16, 18, and 19 in particular.

also

http://us3.samba.org/samba/ click on the "Learn Samba" links on the left.

I hope you enjoy your learning experience.  The best thing to do is to just jump in, get frustrated as heck, then back off for a few days and try again.  Repeat as necessary.

Pudge
Logged
Shagbag
Ace

Posts: 1,336

Join Date: Dec, 2005


« Reply #5 on: February 20, 2007, 11:10:18 AM »

Great advice Pudge - a gold mine of open source information, as always.  Good to see you on the new 'dedicated' linux forum Wink
Logged
fall-apart
Ace

Posts: 7,858

Join Date: Sep, 2002


« Reply #6 on: February 20, 2007, 07:48:31 PM »

Thanks a ton - lots of reading to do... the main reason I want to build my own file server is cost - the Triton NAS you linked to is $300USD.  All I really need to spend is $100CDN to get a 250gb hard drive and I'm set (I think).  Good points about JBOD - maybe RAID isn't the way to go.  With the Linux solution you've proposed, can I just mount more disks as I buy them without having to worry about RAID?
Logged
Babar
Sudhian Administrator

Posts: 5,470

Join Date: Jul, 2003



« Reply #7 on: February 20, 2007, 08:18:46 PM »

Samba is a pain in the ass. When it works, it works awesomely, but when it doesn't work, well, it just causes you to swear and hit things. True story, with one computer I got Samba working perfectly. One day, I copied all my config files down, and tried going back to XP before deciding that I wanted to learn more about Linux. So I reinstalled Linux and set everything up the exact same as it was before. Only this time Samba didn't work at all. I had to fiddle with it for days to get it to work, and to this day, I don't know why it didn't work in the first place. The config files were exactly the same. Usernames and passwords the exact same. That's the pain with Linux sometimes...
Logged
Shagbag
Ace

Posts: 1,336

Join Date: Dec, 2005


« Reply #8 on: February 20, 2007, 09:03:19 PM »

Not a truer word written Babar.  When linux works it's a James Blunt moment ("you're beautiful...").  When it doesn't you have to be patient.  VERY patient.  Only the other day did I solve my sound problem with Rhythmbox on my new Gentoo install.  It turns out that I was running two versions of gStreamer (the sound engine of choice in the Gnome desktop environment).  The older version was needed for Rhythmbox because the latest version of Rhythmbox (compiled against the latest version of gStreamer) wasn't in Gentoo's repos.  The GUI configuration tool worked 100% - but for the newer version of gStreamer on my install.  All I had to do was use gconf-editor and configure the old gStreamer by checkin two boxes and it worked.  100%.  This took me 2 weeks to sort this out Sad  That's on top of the first 2 weeks it took to install Gentoo and Gnome.  I cannot describe it as anything other than frustrating.  I was at the point of just tossing it in and going to Arch Linux (which is great, btw) but the Gentoo forum members kept me going by providing encouragement.  One of the guys simply reminded me that nothing worth having comes easy.  And that's the truth.  After 5 weeks, I've now got my Gentoo install working with:

(a)  a custom kernel (optimised for the hardware it runs on)
(b)  a completely themed GUI (see the screenies post on this forum)
(c)  a completely customised gensplash (you know the black Windoze XP screen with the oscillating progress bar when you boot - that's a gensplash)

And I LOVE Gentoo's configurability.  I can attest that it's true when they say Gentoo is the ultimate power user's distro.  5 weeks of frustration and now I can't get enough of its configurability.  Don't get me wrong, I still love Arch Linux, but I've got a new toy and it's called Gentoo!
Logged
Pudge
Member

Posts: 706

Join Date: Nov, 2002


« Reply #9 on: February 21, 2007, 05:29:28 AM »

Quote from: "fall-apart" date="1172018911"
Good points about JBOD - maybe RAID isn't the way to go.  With the Linux solution you've proposed, can I just mount more disks as I buy them without having to worry about RAID?

Most people try to use software RAID for their RAID solutions.  IMHO software RAID has never really panned out.  The only RAID I've had any luck with is a hardware RAID solution from 3Ware.  With software RAID, every 2 to 3 months the RAID matrix would collapse and I would end up starting from scratch.  With the hardware RAID, I used it for over a year without any problems.  I've got to the point where I totally avoid RAID.  On the typical home computer you just don't get enough advantages/improvements to make the head aches worthwhile.  Sure, if you do benchmarks you will see a speed improvement with RAID 0.  However, in everyday computer usage I just don't see any difference.  As far as RAID 2 or 5, it slows down your computer during writes to the hard drive.  I would just as soon do regular backups on my data.  Just my 2 cents.

Yes, with Linux you can add more disks as you go.  You would have to run a program from the command line to partition, format and prepare the disk.  Then you would have to configure your fstab file to automatically mount the drive at boot up.  But it is a pretty straight forward process.

Here is a suggestion for your server.  When you get your 250 Gig hard drive, divide it into 2 or 3 partitions.  In one partition, put stuff that seldom or never changes.  Such as JPEG, MP3, and other such files.  An archive as such.  Then once you back up that partition you don't have to back it up again until you add more stuff to it.  In another partition, put the stuff that changes constantly.  That partition can be backed up frequently without having to back up EVERYTHING.  The files that are constantly changing or that are very important, should be in the smallest partition so that they can be quickly and frequently backed up.  Use the third partition for files that only change occasionally or that aren't really that important.  Devise a strategy on how to store your files on your server, and BACKUP, BACKUP, BACKUP.  It pays in the long run.  I have a script that runs every night at 2 A.M. through crontab that backs up certain directories by putting those directories in a compressed tarball and then it copies that tarball to another computer on my network.  The tarballs are named by the days in the week, such as monday.tar.gz  tuesday.tar.gz, etc.  So, I always have the last seven days worth of backups, and no more than seven as it overwrites each file every seven days.   Those backups are safely stored on a totally different computer.  The odds of both computers crashing at the same time are very remote.

Pudge
Logged
Shagbag
Ace

Posts: 1,336

Join Date: Dec, 2005


« Reply #10 on: February 21, 2007, 09:55:10 AM »

I don't know much about networking and even less about RAID, but isn't there something called Logical Volume Management (LVM) that also makes adding/moving/changing storage easy?
Logged
Pudge
Member

Posts: 706

Join Date: Nov, 2002


« Reply #11 on: February 21, 2007, 05:47:34 PM »

Quote from: "Shagbag" date="1172069710"
I don't know much about networking and even less about RAID, but isn't there something called Logical Volume Management (LVM) that also makes adding/moving/changing storage easy?

Good point Shag, I never even thought of that.  Way to go, Mate.

Fall-apart could use LVM on his Linux server.  Fedora Core 6 comes with LVM built into their standard distribution.  I assume CentOS would also have LVM standard.  In a lot of Distros, including Arch Linux, you would have to add LVM after installation or perhaps during installation.  Total flexibility.  That is both the beauty of Linux, and the curse of Linux.  With Linux, by choosing the right distro, then adding or subtracting features, you can come up with the perfect OS for your needs.  

Definition of LVM  http://linux.about.com/cs/linux101/g/logical_volume_.htm?iam=momma_100_SKD&terms="lvm"

On the plus side, LVM could be the perfect solution to fall-apart's hard disk management.  On the negative side, it will add complexity and a steeper learning curve for a Linux newb.  However, I think fall-apart is up to it.

More on CentOS.  Quote from their Web page http://www.centos.org/
Quote
CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.  CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. (CentOS mainly changes packages to remove upstream vendor branding and artwork.)  CentOS is free.

The "prominent North American Enterprise Linux vendor" initials are R H.  So, CentOS 4.4 is basically a free version of R H Enterprise 4.4.  The Linux GPL requires complete open source availability to anyone who wants it.  Once again, that is the beauty of Linux, and the curse of Linux.

Also from CentOS

Quote
CentOS 4 offers a Single Server CD. This CD contains a subset of packages used for most server installs on a single CD for installation. This CD can be a time saver

Pudge
Logged
Timster
Ace

Posts: 2,845

Join Date: Jan, 2004


« Reply #12 on: February 23, 2007, 12:47:51 AM »

Quote from: "hugh" date="1171935159"
i tried ubuntu and set samba up, everything looked as it was meant to, everything got ticked, i dotted my i's and crossed my T's but i couldn't get it to show up on windows fo shiz innit blud!

i could see the computer under network machines, i could double click but it just asked for a password and user name that didn't exist, regardless of changing all user rights etc etc in the config files of samba

I had the same thing happen, then I had to add the user through the "smbpasswd" command.

smbpasswd -a username
The user name and password I used was the same one I used to sign onto the windows machines. After that, it didn't prompt for a password.  The user was also added to the linux box.
Logged
Pudge
Member

Posts: 706

Join Date: Nov, 2002


« Reply #13 on: February 26, 2007, 07:20:42 AM »

I downloaded FreeNAS today and played around with it.  FreeNAS doesn't work for me.

Traditionally, NFS is used to share files between Linux computers.  However, NFS is old technology, not very secure, and a PITA to setup.

I already had SSH (actually OpenSSH) installed on all my Linux boxes.  The limitation with SSH is you can copy files between computers quite easily, either from the command line or with Nautilus, but you can't access a file on another computer.  In other words, you could copy a MP3 from another computer then play it locally, but you can't access the MP3 and play it FROM the other computer across the network.

Then I found sshfs.  sshfs uses openssh and fuse to make the computer think that a remote directory is a local directory.  Directories on remote computers appear to the OS as though it was a local directory.  You can now access the remote files with almost any app.  It does the same thing as NFS, but since it uses ssh it is more secure and a lot easier to set up.  You don't set up one computer as a server and the rest as clients, you simply issue one command and any filesystem that is accessible through ssh can be mounted locally.  As an example

sshfs   don@folding3:/home/don   /home/don/server

With the above command, my home directory and all subdirectories at the computer named folding3 would be mounted locally as /home/don/server.  I can now access those files the same as any file on my local filesystem.

fusermount -u /home/don/server

would unmount the remote filesystem.

Between Samba and sshfs I can share files between any of my computers quite easily.  I actually like this better than having a dedicated server because with sshfs I can be sharing files with one computer one minute, and sharing files with another computer the next minute.  Actually, with sshfs, I can be sharing files with two different computers simultaneously.

@Shagbag
Arch Linux has a Wiki that tells how to install and use sshfs.  On Arch, it was quite simple.

Pudge
Logged
Shagbag
Ace

Posts: 1,336

Join Date: Dec, 2005


« Reply #14 on: February 26, 2007, 08:50:44 AM »

Thanks Pudge.  I'll put that one on the list just after 'creating my own gensplash' Wink
Logged
fall-apart
Ace

Posts: 7,858

Join Date: Sep, 2002


« Reply #15 on: February 26, 2007, 07:34:00 PM »

Thanks, Pudge - having people who know what they're doing trying stuff means less of me beating my head against the wall Wink .
Logged
fall-apart
Ace

Posts: 7,858

Join Date: Sep, 2002


« Reply #16 on: March 06, 2007, 01:42:24 AM »

Okay, still waiting for my large drive (I picked up a 400GB for ~$150CDN)... anyways, I remembered hearing about ClarkConnect... does anyone know if this would be easier for me to set up than any other distro, or is it going to be the same thing?
Logged
fall-apart
Ace

Posts: 7,858

Join Date: Sep, 2002


« Reply #17 on: March 08, 2007, 05:22:45 PM »

Argh!  Okay, the stupid Compaq does not appear to have a BIOS setting for changing the boot-from order, and every time I try to boot from a floppy, the generic CD driver doesn't recognise that there's a CD plugged in, so I can't get Linux up and running at all... stupid Compaq...
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: