
|
View Full Version : partition question
dektong 07-04-2001, 07:12 AM I wonder since I am about to setup a new OS on my server. Why do people like to parition the HD into several partions instead of just one big partition? In Windows/DOS environment, the idea of having a partition is to reduce the cluster size so that a 1KB file size would take only 8KB of space instead of 32KB of space, for example ...
But is this still the same with Linux formatted drives? What is the pro and contra of using a single and large partition (as / ) and a much smaller swap partition and put /home, /usr, /var, /, etc off that single partition? I see nothing harm be done and in fact I can see an additional benefits to do so. Currently on my other server, I only have 256 MB for /var . And it's getting about 86% filled (due to mysql db files). If I have only one single partition, then I don't need to worry this partition be filled up too much ...
BTW, just a little quote from Osborne's Linux Administration: A beginner's guide (2nd edition), p. 27
Now you see why it is a good idea to create multiple partitions on a disk rather than a single large parition ... As you become more familiar with the hows and whys of paritioning disks under Linux, you may choose to go back to a single large partition. At that point, of course, you will have enough knowledge of both systems to understand why one may work better for you than the other
Hence, the book seems to suggest that at one point I should consider using a single large partition, yet there are still benefits (pro/contra) on using either options. So, anybody will list these pro/contra?
Also, if I have 30GB of HD, how should I partition it (if I decide to use multiple partitions) the HD? Any rule of thumb as to how large each partions should be?
Any inputs will be appreciated.
cheers,
:beer:
Voodoo Web 07-04-2001, 08:19 AM I think there are hundreds of important and unimportant reasons why you should split your HDD in partitions.
A few pros I know.
- The users can fill up your HD and your server crashs.
- The logfiles fill up your HD.
- Security, hard-linking is not possible over different partitions.
- Data corruption doesn't kill the whole HD.
The cons you already know ;-)
A solution for your problem is to move the MySQL databses to another partition and change to config or make a link.
I don't know a rule of thumb maybe you will find a suggestion in the handbook of your OS.
- domi
Walter 07-04-2001, 10:24 AM Originally posted by dektong
I only have 256 MB for /var . And it's getting about 86% filled (due to mysql db files).
That's something I am always wondering why hosts are making var such small. I think even 512 MB is too small (or you really know mysql will never grow such big!)
eva2000 07-04-2001, 10:44 AM yeah the way my server is partitioned i have 3 - 4GB each for /var and /usr
and my MySQL database is using 35% of /var and my log files always reach 90% on /usr before the end of the month so i have to clear them out once a month after i have downloaded them
dektong 07-04-2001, 11:40 AM Originally posted by Voodoo Web
A few pros I know.
- The users can fill up your HD and your server crashs.
- The logfiles fill up your HD.
- Security, hard-linking is not possible over different partitions.
- Data corruption doesn't kill the whole HD.
I don't quite get it. Except for the last on, Dont you mean those are the cons for having multiple partitions instead of single big partition? Besides, what kind of data corruption will crash the whole HD? Even physical bad sectors on HD does not crash the whole HD ....
cheers,
:beer:
dektong 07-04-2001, 11:41 AM Originally posted by eva2000
my log files always reach 90% on /usr before the end of the month so i have to clear them out once a month after i have downloaded them
90% of the 3-4GB partition? wow ... must have a very busy web server :) So, what is the reason for you not to get single partitition? That way you don't have to worry much about cleaning space to make room for your logs file, etc ...
cheers,
:beer:
DavidU 07-04-2001, 02:08 PM Originally posted by dektong
90% of the 3-4GB partition? wow ... must have a very busy web server :) So, what is the reason for you not to get single partitition? That way you don't have to worry much about cleaning space to make room for your logs file, etc ...
cheers,
:beer:
Dektong...this isn't really even a question, you NEED to partition.
Here are some scenarios which should show you why.
1) you have your new server but you only made /home 10 gigs and now it's full...you put in a new 100 gig hard drive so all you had to do was make a new /home on the new drive, move your files with dd (an exact copy of the filesystem, not files) and then edit /etc/fstab.
if you just made /home part of / and then tried the same thing, all your symbolic links would get fuxored.
2) Lets say you partition like a good person should and then your OS gets hosed. The problem is, you don't want to lose all your /home users files. You can reinstall your OS without losing /home because you just don't format that partition when you reinstall (save your /etc/passwd though...)
3) I used to do this one. I had two linux distro's dual booting on my computer and I had them share the /home partition. That way I only had one ~home directory regardless of if I was in Debian or Redhat.
YOU NEED TO PARTITION FOR A SERVER....the reason "to protect from log floods" is reason enough but mine should make it more clear.
-davidu
dektong 07-04-2001, 02:14 PM DavidU,
thanks for the reply ... Your explanation makes a lot of sense. Now it makes me wonder why my book seems to suggest using a large single partition ... Any other pros and cons?
cheers,
:beer:
DavidU 07-04-2001, 02:30 PM Originally posted by dektong
DavidU,
thanks for the reply ... Your explanation makes a lot of sense. Now it makes me wonder why my book seems to suggest using a large single partition ... Any other pros and cons?
cheers,
:beer:
There are no good linux books trust me. Even for newbies, just hang out in forums like this, IRC, or read the HOW-tos which are up-2-date.
Programming books are worth it, linux/OS books aren't.
-davidu
markblair 07-04-2001, 09:42 PM ...to partition your hard drive is if you plan on running any diagnostic utilities (i.e. Disk Defragmenter, Norton SystemWorks, etc.) then they will run faster on smaller partitions than an entire hard drive. If you have a 30GB hard drive and it is partition 3 ways in 10GB sections, each partition will run faster than if you were to run diagnostics on the entire 30GB at once.
Plus another obvious reason already mentioned is if your C:\ drive crashes, you most likely won't lose the data on other partitions (where you should save all your important work anyway).
|