Building a File Server

The network is the forum.

Moderators: Steel, notfred

Re: Building a File Server

Postposted on Fri Aug 27, 2010 6:34 pm

notfred wrote:
Shining Arcanine wrote:
JustAnEngineer wrote:I favor Ubuntu for ease of use.


Ubuntu's strengths do not extend to the realm of headless file servers.
I have to disagree, just install the Ubuntu Server and it will run very well as a headless file server. I also like Debian and run that on my server which is headless and sitting in the basement.


Would you consider Ubuntu to have greater ease of use than Debian in the role of a headless file server? What about CentOS? Ubuntu's strength is that it tries to do everything for you so that you never have to leave its GUI interface. You cannot use its GUI interface to setup a headless file server.
Disclaimer: I over-analyze everything, so try not to be offended if I over-analyze something you wrote.
Shining Arcanine
Gerbil Jedi
 
Posts: 1717
Joined: Wed Jun 11, 2003 10:30 am

Re: Building a File Server

Postposted on Fri Aug 27, 2010 7:02 pm

Shining Arcanine wrote:Would you consider Ubuntu to have greater ease of use than Debian in the role of a headless file server? What about CentOS? Ubuntu's strength is that it tries to do everything for you so that you never have to leave its GUI interface. You cannot use its GUI interface to setup a headless file server.

Clearly you've never even looked at Ubuntu Server (which is what the OP in fact claims to have been testing). Ubuntu Server is much closer to a stock Debian distro in overall feel (no GUI by default, and uses the Debian text-based installer). The kernel is pre-tuned for server workloads, and you still have the option to install any of the supported Ubuntu GUIs if you wish. Basically you get a Debian based server platform (but with packages which are more current than you'll get with a vanilla Debian Stable install), and 5 years of security updates. Works for me.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 36905
Joined: Tue Aug 20, 2002 9:51 pm
Location: Somewhere, having a beer

Re: Building a File Server

Postposted on Fri Aug 27, 2010 7:06 pm

Yes, just use the Ubuntu Server edition.

I would definitely enable SSH so you can get at the command line remotely (use putty on Windows if you don't have another client). I would suggest making sure that root cannot ssh in, only a standard user (I can't remember if this is the way Ubuntu is set up by default or whether I flipped the setting) then once you are logged in to the box then you can su or sudo to become root. This two stage method is a lot more secure than exposing a root login to ssh, especially given how many script kiddies are running password crackers on root ssh logins. With this setup, they first have to know your user id for the box and then get the password as well.

Once you have the basics set up, I think Ubuntu allows you to configure a lot of it through a web interface, but I just stick with the command line as that is what I'm most familiar with. Post any configuration questions to this forum if you get stuck and I'm sure plenty of the Linux users here will come up with answers for you.
notfred
Grand Gerbil Poohbah
 
Posts: 3647
Joined: Tue Aug 10, 2004 9:10 am
Location: Ottawa, Canada

Re: Building a File Server

Postposted on Sat Aug 28, 2010 9:28 am

just brew it! wrote:
Shining Arcanine wrote:Would you consider Ubuntu to have greater ease of use than Debian in the role of a headless file server? What about CentOS? Ubuntu's strength is that it tries to do everything for you so that you never have to leave its GUI interface. You cannot use its GUI interface to setup a headless file server.

Clearly you've never even looked at Ubuntu Server (which is what the OP in fact claims to have been testing). Ubuntu Server is much closer to a stock Debian distro in overall feel (no GUI by default, and uses the Debian text-based installer). The kernel is pre-tuned for server workloads, and you still have the option to install any of the supported Ubuntu GUIs if you wish. Basically you get a Debian based server platform (but with packages which are more current than you'll get with a vanilla Debian Stable install), and 5 years of security updates. Works for me.


I think you misunderstood what I said. My point was that Ubuntu Server Edition lacks a GUI, which means that it has no ease of use advantage over other distributions.

Ubuntu Server Edition does not distinguish itself in any way that would make it more desirable than a traditional server distribution like CentOS/RHEL or a minimalist distribution like Gentoo. Canonical does not have many resources in comparison to RedHat and Ubuntu is by no means a do-it-yourself distribution like Gentoo, so its security is almost entirely dependent on Canonical. The packages might be more current, but there is a greater chance of issues with binary compatibility. CentOS/RHEL have zero issues in that regard and Gentoo has a custom tool that users can run following updates to identify and correct binary compatibility issues. I really do not see the appeal of Ubuntu as a server distribution.
Disclaimer: I over-analyze everything, so try not to be offended if I over-analyze something you wrote.
Shining Arcanine
Gerbil Jedi
 
Posts: 1717
Joined: Wed Jun 11, 2003 10:30 am

Re: Building a File Server

Postposted on Sat Aug 28, 2010 9:46 am

Shining Arcanine wrote:I think you misunderstood what I said. My point was that Ubuntu Server Edition lacks a GUI, which means that it has no ease of use advantage over other distributions.

Ahh, OK. But you can still install any of the GUIs if you wish -- apt-get install [k|x|l]ubuntu-desktop, and you're done.

Ubuntu Server Edition does not distinguish itself in any way that would make it more desirable than a traditional server distribution like CentOS/RHEL or a minimalist distribution like Gentoo. Canonical does not have many resources in comparison to RedHat and it is not intended as a community-based do-it-yourself distribution like Gentoo. The packages might be more current, but there is a greater chance of issues with binary support. CentOS/RHEL have zero issues in that regard and Gentoo has its own custom tools that users can run to fix those sorts of issues. I really do not see the appeal of Ubuntu as a server distribution.

Point taken.

I can still see it as being advantageous if you're in an environment with other Debian/Ubuntu desktop systems though. Not having to learn multiple distros is a significant win if you're maintaining multiple systems. (And this is in fact the reason that I'm phasing out my use of Redhat/Fedora -- Debian/Ubuntu does everything I need, and bouncing back and forth between the two flavors gets annoying because of all the little differences in how they do things.)
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 36905
Joined: Tue Aug 20, 2002 9:51 pm
Location: Somewhere, having a beer

Re: Building a File Server

Postposted on Sat Aug 28, 2010 10:04 am

Shining Arcanine wrote:
JustAnEngineer wrote:I favor Ubuntu for ease of use.


Ubuntu's strengths do not extend to the realm of headless file servers.


I've used Ubuntu server for just that purpose. It worked very well.
FuturePastNow
Gerbil Elite
 
Posts: 601
Joined: Mon Nov 24, 2008 10:28 am

Re: Building a File Server

Postposted on Sat Aug 28, 2010 10:33 am

Even though I really like Gentoo (my first Linux distro), I wouldn't recommend it if you're going to run an Atom. Compiles will take time, and if something hiccups (and they usually do with a emerge -uD world), you'll have to add yet another post to the millions on forums.gentoo.org. For a background file server that'll always be available, Debian/Ubuntu is a better choice.

I don't even use Gentoo that much these days except in a VM, because most of the machines I consider Linux for are too slow to compile anything.
Mothership: Thuban 1055T@3.7GHz, 12GB DDR3, M5A99X EVO, GTX470+Icy Vision Rev.2@840/3800, Vertex 2E 60GB
Supply ship: Sargas@2.8GHz, 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Macbook Air Ivy Bridge
Crayon Shin Chan
Minister of Gerbil Affairs
 
Posts: 2211
Joined: Fri Sep 06, 2002 10:14 am
Location: Malaysia

Re: Building a File Server

Postposted on Sat Aug 28, 2010 11:46 am

FuturePastNow wrote:
Shining Arcanine wrote:
JustAnEngineer wrote:I favor Ubuntu for ease of use.


Ubuntu's strengths do not extend to the realm of headless file servers.


I've used Ubuntu server for just that purpose. It worked very well.


I think you misunderstood what I was saying. I was not saying that Ubuntu could not be used as a server OS, but I was saying that using Ubuntu as a server OS causes it to lose the advantages that it had over other distributions as a desktop OS.

There are two ways that server distributions can be designed. One is to go the route where a big company does things for you in terms of security updates, bug fixes, feature additions, etcetera. RedHat does that best and as a RHEL clone, CentOS inherits that strength. The other is to go the route where distribution development is community-run and end-users receive the ability to do many things on their own that would normally be reserved for the distribution vendor. Gentoo, being a source-based rolling distribution, does that extremely well and it would be difficult to find a distribution that outdoes it in that category. Ubuntu Server Edition is a slightly modified version of Debian and I do not see how Debian, even with the modifications Canonical gives to it, does things better in either of those categories than the distributions I mentioned. That is not to say that you cannot use it for anything, but that is to say that it is not the best in giving people what they want.
Disclaimer: I over-analyze everything, so try not to be offended if I over-analyze something you wrote.
Shining Arcanine
Gerbil Jedi
 
Posts: 1717
Joined: Wed Jun 11, 2003 10:30 am

Re: Building a File Server

Postposted on Sat Aug 28, 2010 1:25 pm

just brew it! wrote:
Shining Arcanine wrote:I think you misunderstood what I said. My point was that Ubuntu Server Edition lacks a GUI, which means that it has no ease of use advantage over other distributions.

Ahh, OK. But you can still install any of the GUIs if you wish -- apt-get install [k|x|l]ubuntu-desktop, and you're done.
Plus, things like the quality package management, good system configuration tools, careful handling of config file transitions between upgrades, responsible security issue tracking and patching, good installers, and the greater Debian-derived distro community all could be considered advantages.


Shining Arcanine wrote:There are two ways that server distributions can be designed. One is to go the route where a big company does things for you in terms of security updates, bug fixes, feature additions, etcetera. RedHat does that best and as a RHEL clone, CentOS inherits that strength. The other is to go the route where distribution development is community-run and end-users receive the ability to do many things on their own that would normally be reserved for the distribution vendor. Gentoo, being a source-based rolling distribution, does that extremely well and it would be difficult to find a distribution that outdoes it in that category. Ubuntu Server Edition is a slightly modified version of Debian and I do not see how Debian, even with the modifications Canonical gives to it, does things better in either of those categories than the distributions I mentioned. That is not to say that you cannot use it for anything, but that is to say that it is not the best in giving people what they want.

Seriously, what are you talking about here? Debian and derived distros are community maintained and I don't see what metric by which you determine they're "not the best in giving people what they want."
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 3:39 pm
Location: Mountain View, CA

Re: Building a File Server

Postposted on Mon Aug 30, 2010 6:47 pm

bitvector wrote:
just brew it! wrote:
Shining Arcanine wrote:I think you misunderstood what I said. My point was that Ubuntu Server Edition lacks a GUI, which means that it has no ease of use advantage over other distributions.

Ahh, OK. But you can still install any of the GUIs if you wish -- apt-get install [k|x|l]ubuntu-desktop, and you're done.
Plus, things like the quality package management, good system configuration tools, careful handling of config file transitions between upgrades, responsible security issue tracking and patching, good installers, and the greater Debian-derived distro community all could be considered advantages.


I have found Gentoo Linux to be suitable for my needs, so while I have not tried CentOS/RHEL to know how it compares to Debian in each of those categories, I do know that more companies swear by it than they do by any other distribution. I also have used Gentoo Linux, so I can say that Gentoo fares well in each of them.

Gentoo has the most advanced package manager of any Linux distribution, so Debian's package manager is not very impressive in comparison. On Gentoo Linux, system configuration tools include vim, emacs and nano, as well as various GUI text editors. Traditional UNIX software is intended to be configured via text editors and most Linux software still is that way, so Debian and its offspring do not have much of an advantage there. Configuration file transitions between upgrades are handled by etc-update, which presents all of the modified files to the user, which prevents widescale disasters like the Ubuntu 8.10 to 9.04 upgrade. When that upgrade happened, the Ubuntu forums were swamped with people trying to find out how to get their systems to work again. I had Ubuntu installed via Wubi at the time and I tried upgrading it, only to be hit with the same issue. Gentoo also has security issue tracking, although the issues are usually fixed by changes to portage, which implies that regularly updating systems resolves most security issues. System package managers eliminate the need for third party installers on Linux. Lastly, Gentoo has a large community as well. Although it might not be as large as Debian's community, the density of its technical knowledge is much higher than Debian and higher still than Ubuntu, so having more numbers is not as advantageous as it would seem, although it is a definite advantage, because it means that third party packages are more likely to be available for Debian than for Gentoo. Debian also has more first party packages. I believe Debian has >22,000 packages in its repositories while Gentoo only has 14,196 packages at the time of this post. The number of packages in Gentoo's main tree can be found by running "find /usr/portage/ -name '*.ebuild' | cut -d/ -f 4-5 | uniq | wc" on a Gentoo system that has recently been synchronized.

bitvector wrote:
Shining Arcanine wrote:There are two ways that server distributions can be designed. One is to go the route where a big company does things for you in terms of security updates, bug fixes, feature additions, etcetera. RedHat does that best and as a RHEL clone, CentOS inherits that strength. The other is to go the route where distribution development is community-run and end-users receive the ability to do many things on their own that would normally be reserved for the distribution vendor. Gentoo, being a source-based rolling distribution, does that extremely well and it would be difficult to find a distribution that outdoes it in that category. Ubuntu Server Edition is a slightly modified version of Debian and I do not see how Debian, even with the modifications Canonical gives to it, does things better in either of those categories than the distributions I mentioned. That is not to say that you cannot use it for anything, but that is to say that it is not the best in giving people what they want.

Seriously, what are you talking about here? Debian and derived distros are community maintained and I don't see what metric by which you determine they're "not the best in giving people what they want."


The community involvement is not as strong with Debian as it is with Gentoo, although it is certainly stronger than how it is with CentOS/RHEL. That is the price of having binary packages without a framework in place for anyone to compile them. RHEL has no direct community involvement and while CentOS is closer to Debian in terms of being more open to community involvement, its packages are just recompiled RHEL packages, so there is not as much room for people to do things with them, which is quite possibly a good thing. Slackware is a distribution that is renowned for its stability because it has very few distribution specific patches. Since RedHat extensively tests all of its patches, the quality of CentOS/RHEL packages should be similar to Slackware, giving it the same sort of strength. Gentoo's package maintainers also try to avoid patching code unless it is strictly necessary, so it should share similar strengths.

Anyway, a company that heavily relies upon Gentoo for servers had wonderful things to say about Gentoo in a recent interview:

http://www.gentoo.org/proj/en/pr/201008 ... erview.xml

Gentoo is primarily used in a Server environment. The servers are configured as Web/mail or as EDGE routers on test networks. Maintaining our systems is primarily done by using Portage. Gentoo has been used on various machines for many purposes within our organization. It has enabled us to test several different branches of software, as well as mix software branches for development and experimentation. Gentoo servers are pretty easy to maintain. Once they are up and configured, emerge and portage can take care of a variety of issues when and if they arise.
Disclaimer: I over-analyze everything, so try not to be offended if I over-analyze something you wrote.
Shining Arcanine
Gerbil Jedi
 
Posts: 1717
Joined: Wed Jun 11, 2003 10:30 am

Re: Building a File Server

Postposted on Tue Aug 31, 2010 12:49 am

Shining Arcanine wrote:
bitvector wrote:Seriously, what are you talking about here? Debian and derived distros are community maintained and I don't see what metric by which you determine they're "not the best in giving people what they want."

The community involvement is not as strong with Debian as it is with Gentoo, although it is certainly stronger than how it is with CentOS/RHEL.

You assign way too much value to the "community involvement" in Gentoo. A large proportion of community involvement in Gentoo is of a questionable nature when it comes to running something like a file server -- amateurs giving advice on tweaking things they don't understand, superfluous performance tuning and system component trimming, etc. And a lot of it is simply instructions to do things that are automated in other distros. Some people are very apt, but the signal to noise ratio makes it less helpful than you imply. And the whole ethos of Gentoo -- customizing everything, tracking the bleeding edge releases -- is not really aligned with the key properties you want in a server. "Community involvement" in Debian is volunteers putting out a very professionally run open source project for 17 years.

Seriously Shining Arcanine, how many threads on TR are you going to come into and spout off a bunch of extreme over-generalizations based on your barely-applicable experiences? You seem to be averaging at least one a week.

Maybe the mods should split this thread.
bitvector
Grand Gerbil Poohbah
 
Posts: 3234
Joined: Wed Jun 22, 2005 3:39 pm
Location: Mountain View, CA

Re: Building a File Server

Postposted on Tue Aug 31, 2010 6:08 am

A little update on the server situation. Last night I managed to get Ubuntu Server installed and up and running along with the program Webmin which I like very much. Tonight I plan on getting my files organized and migrated over to the server so I can at least start attempting to get shares and permissions going and seeing how that system works. I can't wait to dive into the more expansive features. Probably most I won't need but it is nice knowing they are there in case.

Overall I am throughly impressed how light the entire system is (so far). Nothing seems taxed at all. When I was running WHS it just seemed so bloated in its interface and changing any of the settings would be a click, and wait 30 seconds and then click again. (I don't blame Windows, I am running an atom)
To Start Press Any Key'. Where's the ANY key?
If something's hard to do, then it's not worth doing
You know, boys, a nuclear reactor is a lot like a woman. You just have to read the manual and press the right buttons.
mmmmmdonuts21
Gerbil Elite
 
Posts: 590
Joined: Wed Jul 16, 2008 8:09 am

Re: Building a File Server

Postposted on Tue Aug 31, 2010 7:11 am

Mod hat on
I'm not going to go through the thread and split out the previous discussions over Linux distributions as I think it is useful information and holds a record of how the OP got here. However the OP has now chosen Ubuntu Server and I'm sure they would like to use this thread for further discussions and troubleshooting of shares and such on this setup.

For this reason, I'm asking as a mod that any further discussion of distro choice be in a new thread in the Linux, Unix, and Assorted Madness forum. Further posts on this subject will not only get split out of this thread, they will annoy me as a mod with potential consequences - see Forum Rules 10 and 11. This includes any continual harping of "see I told you this would happen with Ubuntu Server and not with distro X" on any problems the OP may encounter.

I now return you to your regularly scheduled programming.
Mod hat off
notfred
Grand Gerbil Poohbah
 
Posts: 3647
Joined: Tue Aug 10, 2004 9:10 am
Location: Ottawa, Canada

Re: Building a File Server

Postposted on Tue Aug 31, 2010 6:49 pm

mmmmmdonuts21 wrote:A little update on the server situation. Last night I managed to get Ubuntu Server installed and up and running along with the program Webmin which I like very much. Tonight I plan on getting my files organized and migrated over to the server so I can at least start attempting to get shares and permissions going and seeing how that system works. I can't wait to dive into the more expansive features. Probably most I won't need but it is nice knowing they are there in case.

Overall I am throughly impressed how light the entire system is (so far). Nothing seems taxed at all. When I was running WHS it just seemed so bloated in its interface and changing any of the settings would be a click, and wait 30 seconds and then click again. (I don't blame Windows, I am running an atom)


I was about to recommend webmin. A very powerful program. You'll likely never use everything for a simple file server, but it's nice to have.
However, before you get in too deep do yourself a favor and link your Linux users and groups with that of samba it will save you from having to remember who is who and where they are. Webmin will allow you to do this with a simple click of a button.

Also before you start copying over all of your data get used to the system first. Create a couple of shares and what not and just learn some stuff. Then I would rebuild it. Set up one partition for your OS (10 GB). Then setup a second partition using only half of the disk for your files/share. That way if you ever want to blow away your main partition to install a fresh version of the OS you can without worrying about your data. The remaining extra space is useful for when you want to get into backup options. As for the file system I'd probably go with ext4 for you. If this was enterprise I'd probably say ext3. Hmmm above all else have fun. :D
Core i7 920 @stock - 6GB OCZ Mem - Adaptec 5805 - 2 x Intel X25-M in RAID1 - 5 x Western Digital RE4 WD1003FBYX 1TB in RAID 6 - Nvidia GTX 460
kc77
Gerbil Team Leader
 
Posts: 242
Joined: Sat Jul 02, 2005 1:25 am

Re: Building a File Server

Postposted on Tue Aug 31, 2010 7:22 pm

Congrats on the jump. I actually went the other way a few years ago, from Ubuntu server to WHS. Heh. You'll enjoy the learning experience. BTW, once you setup ssh, check out WinSCP (it'll become your next best friend).
Usacomp2k3
Gerbil God
 
Posts: 21240
Joined: Thu Apr 01, 2004 3:53 pm
Location: Orlando, FL

Re: Building a File Server

Postposted on Tue Aug 31, 2010 7:56 pm

Also before you start copying over all of your data get used to the system first. Create a couple of shares and what not and just learn some stuff. Then I would rebuild it. Set up one partition for your OS (10 GB). Then setup a second partition using only half of the disk for your files/share. That way if you ever want to blow away your main partition to install a fresh version of the OS you can without worrying about your data. The remaining extra space is useful for when you want to get into backup options. As for the file system I'd probably go with ext4 for you. If this was enterprise I'd probably say ext3. Hmmm above all else have fun.


Thanks for the advice. I have not migrated anything yet. I got a few questions though.

1) Should I use LVM? I guess my main concern is losing data carelessly because it is spread over two or three hard drives. Or should I split up the data on those drives. (Movies on one, Music on another, TV on another, etc.)

2) I am trying to setup manual partitions and I just want to make sure this is the correct on what I have (2TB drive):

#1 510.7MB B f ext2 boot /boot
#2 10.0GB B f ext4 OS /
#3 8.0GB B f swap swap /swap
#4 1.4TB f ext4 home /home
576.9 GB free space

I guess my other question is how do I want to mount folders and files that everyone will use? Do I make up my own mount like "/Movies"? I guess I just want to know my best way to attack the file system because that is confusing me the most right now.
To Start Press Any Key'. Where's the ANY key?
If something's hard to do, then it's not worth doing
You know, boys, a nuclear reactor is a lot like a woman. You just have to read the manual and press the right buttons.
mmmmmdonuts21
Gerbil Elite
 
Posts: 590
Joined: Wed Jul 16, 2008 8:09 am

Re: Building a File Server

Postposted on Tue Aug 31, 2010 8:10 pm

mmmmmdonuts21 wrote:1) Should I use LVM? I guess my main concern is losing data carelessly because it is spread over two or three hard drives. Or should I split up the data on those drives. (Movies on one, Music on another, TV on another, etc.)

Personally, I would not use spanned volumes for anything, and would not use RAID-0 for anything other than a fast scratch volume. Generally if I use LVM at all, it is for RAID-1 or RAID-5.

If this is data you would be upset about losing, you still need backups regardless of how you stripe/partition.

2) I am trying to setup manual partitions and I just want to make sure this is the correct on what I have (2TB drive):

#1 510.7MB B f ext2 boot /boot
#2 10.0GB B f ext4 OS /
#3 8.0GB B f swap swap /swap
#4 1.4TB f ext4 home /home
576.9 GB free space

Looks OK, but I do have a couple of comments...

- Modern systems generally don't need the separate /boot and / partitions. It's basically a holdover from the days when all of the files required to boot had to reside below a certain cylinder number, to get around disk addressing limitations of older BIOSes. It doesn't really hurt anything (other than wasting a small bit of space) though.

- If *all* this system is doing is basic server stuff, 8 GB swap is overkill. But disk space is cheap, so whatever...

- Why the extra unallocated half terabyte at the end? I would either make that part of the /home partition, or shrink the home partition down and create a (5th) data partition.

I guess my other question is how do I want to mount folders and files that everyone will use? Do I make up my own mount like "/Movies"?

That's how I would do it.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 36905
Joined: Tue Aug 20, 2002 9:51 pm
Location: Somewhere, having a beer

Re: Building a File Server

Postposted on Tue Aug 31, 2010 9:24 pm

mmmmmdonuts21 wrote:1) Should I use LVM? I guess my main concern is losing data carelessly because it is spread over two or three hard drives. Or should I split up the data on those drives. (Movies on one, Music on another, TV on another, etc.)

Yes, for a server you should use LVM regardless if you're using RAID, spanned drives or a single drive. It will make life so much easier if you need to add space to a filesystem. One thing to be careful of is you need to make the PE (physical extent) size big enough if you want to create a large volume. 32MB will let you create up to a 2TB volume, 64MB will go up to 4TB, etc.

mmmmmdonuts21 wrote:2) I am trying to setup manual partitions and I just want to make sure this is the correct on what I have (2TB drive):

#1 510.7MB B f ext2 boot /boot
#2 10.0GB B f ext4 OS /
#3 8.0GB B f swap swap /swap
#4 1.4TB f ext4 home /home
576.9 GB free space

Should be fine if you're not going the LVM route, though 500MB is a little beefy for a /boot partition. 100MB should cover anything that will ever go in there.
If you decide to go with LVM, the partition table should only have two entries; the /boot partition and the LVM physical volume.

mmmmmdonuts21 wrote:I guess my other question is how do I want to mount folders and files that everyone will use? Do I make up my own mount like "/Movies"? I guess I just want to know my best way to attack the file system because that is confusing me the most right now.

It's up to you how you want to set it up. If you want to keep it simple, you can create one large data volume and create folders under that to share.

just brew it! wrote:- Modern systems generally don't need the separate /boot and / partitions. It's basically a holdover from the days when all of the files required to boot had to reside below a certain cylinder number, to get around disk addressing limitations of older BIOSes. It doesn't really hurt anything (other than wasting a small bit of space) though.

It's still necessary to have a /boot partition if you're using LVM or software RAID and want to keep root in the volume group or RAID set.
Steel
Global Moderator
Gold subscriber
 
 
Posts: 2321
Joined: Wed Dec 26, 2001 6:00 pm

Re: Building a File Server

Postposted on Tue Aug 31, 2010 9:29 pm

Steel wrote:It's still necessary to have a /boot partition if you're using LVM or software RAID and want to keep root in the volume group or RAID set.

Ahh, OK. I'd forgotten that little detail...
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 36905
Joined: Tue Aug 20, 2002 9:51 pm
Location: Somewhere, having a beer

Re: Building a File Server

Postposted on Tue Aug 31, 2010 9:39 pm

Mmm, I'd go with 200MB for /boot. I had mine at ~100MB for a time, but that only let me have two or maybe three kernels to choose from at boot before I'd have to go back and remove one to allow an upgrade.

Might consider making /boot ext2 as well, to save space.
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3071
Joined: Mon Dec 29, 2003 10:55 pm
Location: Southwest Missouri, USA

Re: Building a File Server

Postposted on Tue Aug 31, 2010 10:27 pm

bthylafh wrote:Might consider making /boot ext2 as well, to save space.

DId you mean root? His boot partition is already ext2.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 36905
Joined: Tue Aug 20, 2002 9:51 pm
Location: Somewhere, having a beer

Re: Building a File Server

Postposted on Tue Aug 31, 2010 10:31 pm

bthylafh wrote:Mmm, I'd go with 200MB for /boot. I had mine at ~100MB for a time, but that only let me have two or maybe three kernels to choose from at boot before I'd have to go back and remove one to allow an upgrade.

Might consider making /boot ext2 as well, to save space.


I use ext4 on /boot and it works well. I recommend using ext4 for both the journal and short ****, ille est, file system checks.

64MB is the lower limit of what I would recommend for Ubuntu's /boot partition. Ubuntu puts all of its kernel modules and other stuff into /boot, so it uses a great deal of space, especially during upgrades, where it simply piles on stuff before deleting anything, if it deletes anything. I learned this the hard way when I tried installing Ubuntu on a laptop my mother uses. I used a 32MB /boot partition like I use on another distribution and it worked for the installation, but the moment I tried to do upgrades, it ran out of space and no amount of tweaking could fix it without either reinstalling the OS or getting a LiveCD and modifying the partition boundaries, which is both a major operation and a major pain.
Last edited by Shining Arcanine on Tue Aug 31, 2010 10:47 pm, edited 1 time in total.
Disclaimer: I over-analyze everything, so try not to be offended if I over-analyze something you wrote.
Shining Arcanine
Gerbil Jedi
 
Posts: 1717
Joined: Wed Jun 11, 2003 10:30 am

Re: Building a File Server

Postposted on Tue Aug 31, 2010 10:46 pm

Shining Arcanine wrote:64MB is the lower limit of what I would recommend for Ubuntu's boot partition. Ubuntu puts all of its kernel modules and other stuff into /boot, so it uses a great deal of space, especially during upgrades, where it simply piles on stuff before deleting anything, if it deletes anything. I learned this the hard way when I tried installing Ubuntu on a laptop my mother uses. I used a 32MB /boot partition like I use on another distribution and it worked for the installation, but the moment I tried to do upgrades, it ran out of space and no amount of tweaking could fix it without either reinstalling the OS or getting a LiveCD and modifying the partition boundaries, which is both a major operation and a major pain.

Yup, it leaves all old kernels in place when you do updates; you need to use the package manager to clean out the ones you don't want. The default /boot partition is larger for a reason; sounds like you tried to shrink it without bothering to understand why Canonical made the default size larger in the first place.

I wouldn't say that modifying partition boundaries after the fact is *that* bad... gparted seems to do a decent job with a minimum of fuss, but yes you do need to use a Live CD.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 36905
Joined: Tue Aug 20, 2002 9:51 pm
Location: Somewhere, having a beer

Re: Building a File Server

Postposted on Wed Sep 01, 2010 12:16 am

mmmmmdonuts21 wrote:
1) Should I use LVM? I guess my main concern is losing data carelessly because it is spread over two or three hard drives. Or should I split up the data on those drives. (Movies on one, Music on another, TV on another, etc.)
.......I guess my other question is how do I want to mount folders and files that everyone will use? Do I make up my own mount like "/Movies"? I guess I just want to know my best way to attack the file system because that is confusing me the most right now.

I thought about this but I didn't think you would be ready for it out the gate. However, since you've got only two drives to work with that's going to be the best way to maximize space while giving you some flexibility.

Drive Layout:

Device Location: /dev/sda1
Mount Point: /boot
File Type: ext2
Size: 100MB/300MB (100 if you don't mind managing/deleting old kernels or 300 if you don't want to ever have to think about it again)

Device Location(s): /dev/sda2 /dev/sdb1
Volume Group: OSANDSHARE_VG
LV Groups: MAINOS_LV (2GB) SWAP_LV (1GB) SHARES_LV (700GB) BACKUP_LV (700GB)
LV Filetype: ext4

Now that should set you up nicely.

Mounting:

Once you boot into the OS create two directories under the "media" (/media) directory. Name them SHARES (or whatever you want) and BACKUP. Go to fstab and have logical volumes of the same name automount at boot up.

Backup and Misc:

Now since we've got everything nicely isolated your shares/files will be within the SHARES_LV mounted under the SHARES directory(/media/SHARES). You can get jiggy within the directories here without fear of placing something in an odd location (like home). For the backup directory (/media/BACKUP) create a bash script (something like backupjob.sh).

Within the bash script you should have it execute rsync (there's other stuff out there but this is the lightest). There's documentation a plenty on creating a bash script such as this. Rsync if configured correctly will only copy files that have changed and leave the files that haven't. Essentially you're going to rsync between your SHARES directory and your BACKUP directory. You could also use LVM snapshots but you're just too space limited for that and this requires less management from you. After you've created this bash script make it executable and go and log into webmin. Within webmin create a new cronjob which will fire your newly created bash script either once a week or once a day (your choice). I'd recommend once a week or even once a month. This isn't mission critical stuff and you're using WD Greens anyway.

I think I covered it all. It's late so if I missed anything or you've got questions please ask.
Core i7 920 @stock - 6GB OCZ Mem - Adaptec 5805 - 2 x Intel X25-M in RAID1 - 5 x Western Digital RE4 WD1003FBYX 1TB in RAID 6 - Nvidia GTX 460
kc77
Gerbil Team Leader
 
Posts: 242
Joined: Sat Jul 02, 2005 1:25 am

Re: Building a File Server

Postposted on Wed Sep 01, 2010 12:46 am

just brew it! wrote:Personally, I would not use spanned volumes for anything


Sounds like there's a good story behind that. So what happened?
Core i7 920 @stock - 6GB OCZ Mem - Adaptec 5805 - 2 x Intel X25-M in RAID1 - 5 x Western Digital RE4 WD1003FBYX 1TB in RAID 6 - Nvidia GTX 460
kc77
Gerbil Team Leader
 
Posts: 242
Joined: Sat Jul 02, 2005 1:25 am

Re: Building a File Server

Postposted on Wed Sep 01, 2010 5:58 am

kc77 wrote:
just brew it! wrote:Personally, I would not use spanned volumes for anything

Sounds like there's a good story behind that. So what happened?

No particular story. Just the fact that it has the disadvantage of RAID-0 (reduced reliability) without the performance advantage (no striping). If you want that sort of flexibility (ability to arbitrarily remap storage from multiple drives to multiple filesystems), your best bet is LVM on top of MD (with the underlying MD array configured as RAID-1 or RAID-5).
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 36905
Joined: Tue Aug 20, 2002 9:51 pm
Location: Somewhere, having a beer

Re: Building a File Server

Postposted on Thu Sep 02, 2010 10:37 am

So I have been trying to use Webmin to get most of the things I want up and running but I am not sure exactly how I should be doing most of these things especially using samba to try and share files. I will also do my best to explain my current setup as well and see if I need to change that.

Setup:

The way my home network is currently configured is as such:

Cable Box (TWC) --> Router (D-Link 655, which acts as a DCHP server to the rest of the house) --> Unmanaged Switch --> HTPC 1
--> Old Desktop
--> Xbox 360
--> Unmanaged Switch --> Gaming PC
--> Server

I also have three laptops in the house and a Wii. Most of the time they are all wireless but I do occasionally hook them up to different wired ports throughout the house.

I have four pain users as well including myself that would like to access the media on the server. I know I maybe complicating things a bit but am I best just to leave my router as the DCHP server or should I change it over to the Ubuntu server? Also I plan on moving in the next year or two out of my current house. How easy is it to just leave a server system like this going even if the hardware changes a bit?

Now on to my questions with Samba. Like I said at the beginning I am trying to configure this through Webmin. I can get my server to show up on my windows network and even the shares I add but I am having problems with writing to the folders. (I tried following the directions here http://doxfer.com/Webmin/SambaWindowsFileSharing to the best of my ability) I went in and to the authentication options and clicked allow writing to this share, but I am keep getting an authentication error. I used the same user name and password on the server and my test computer.

I also don't know if this will be a problem again but sometimes when trying to copy files to the drive I get a not enough free space error before I get an authentication error. I don't know why this is because the drive is 2TB and I was only trying to copy 500GB. (It seems to error around 300GB). I have nothing else on the drive either.

I don't know if this stuff is all above my head but I am just trying to learn a little:) Thanks again for all the help past, present and future.
To Start Press Any Key'. Where's the ANY key?
If something's hard to do, then it's not worth doing
You know, boys, a nuclear reactor is a lot like a woman. You just have to read the manual and press the right buttons.
mmmmmdonuts21
Gerbil Elite
 
Posts: 590
Joined: Wed Jul 16, 2008 8:09 am

Re: Building a File Server

Postposted on Thu Sep 02, 2010 11:52 am

I'd double check the section on Managing Samba Users. There are Linux userids that are on the Linux box and then there are Samba users that must map through to a Linux user. If the mapping is bad or the Linux user doesn't have permissions then you can get funny errors back from Samba.
notfred
Grand Gerbil Poohbah
 
Posts: 3647
Joined: Tue Aug 10, 2004 9:10 am
Location: Ottawa, Canada

Re: Building a File Server

Postposted on Thu Sep 02, 2010 1:25 pm

notfred wrote:I'd double check the section on Managing Samba Users. There are Linux userids that are on the Linux box and then there are Samba users that must map through to a Linux user. If the mapping is bad or the Linux user doesn't have permissions then you can get funny errors back from Samba.


I managed to figure this out so I am able to test it out. What I was doing wrong was I was creating shares as the root user and not as an actual user. Once I created shares as a user I had no problems sharing.

My biggest issue right now is figuring out the hard drives and how to mount things in Webmin. I get an error:

mount: wrong fs type, bad option, bad superblock on /dev/mapper/Shares-Shares,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

I have tried creating a single partition with the root drive, but for some reason it maxs out at 300GB or so and won't allow anymore data even though I have 2TB available and shows this in various places in Webmin.
To Start Press Any Key'. Where's the ANY key?
If something's hard to do, then it's not worth doing
You know, boys, a nuclear reactor is a lot like a woman. You just have to read the manual and press the right buttons.
mmmmmdonuts21
Gerbil Elite
 
Posts: 590
Joined: Wed Jul 16, 2008 8:09 am

Re: Building a File Server

Postposted on Thu Sep 02, 2010 3:35 pm

mmmmmdonuts21 wrote:I managed to figure this out so I am able to test it out. What I was doing wrong was I was creating shares as the root user and not as an actual user. Once I created shares as a user I had no problems sharing.


sounds like you were leaving root as the owner of the directories and not changing the default permissions so your normal users couldn't write to them.

You can use chown to change to owner of files and directories
chown username /path/
or
chown username:group /path/ (for a quick way to change both user and group at one time)

and chmod to change the permissions
chmod 750 /path/

the 3 digits in that command change the permissions of the owner, group and others respectively so in this case:
owner is 7 (read write and execute)
group is 5 (read and execute)
others is 0 (no permissions)

proper server administration requires setting up your shares so that only those who need it can read or execute the files they need... this said it's only a home server so you can probably just chmod 777 the main shares and forget about it.

EDIT:
obviously that's only the very briefest intro to filesystem permissions.

Samba also allows you to control what permissions are set on files that users create on shares.
Fernando!
Your mother ate my dog!
cheesyking
Minister of Gerbil Affairs
 
Posts: 2221
Joined: Sun Jan 25, 2004 6:52 am
Location: That London (or so I'm told)

PreviousNext

Return to Networking

Who is online

Users browsing this forum: No registered users and 3 guests