What is the recommended partition setup for a web server?Any Tools for check partition?Sell partitioning to meShrink Partition on Production ServerCentOS 5.5 ext4 conversion problem - ext4 partition is recognized as ext3Can I make an ext3 filesystem recognize (and use) the entire partition?Software Raid 10 on VirtualBox?PXE boot Linux - which directories must be writable?Debian - move partitions to a new driveLinux OS installed as a guest OS on VMware Workstation v10.0.2 doesn't show all partitions as is shown when installed ona physical HP server/home /opt /tmp /usr /var on a single partition of another hard drive Debian 8

Can my floppy disk still work without a shutter spring?

Mercedes C180 (W204) dash symbol

What does kpsewhich stand for?

Manager questioning my time estimates for a project

Are there any German nonsense poems (Jabberwocky)?

What was the idiom for something that we take without a doubt?

The art of clickbait captions

How to melt snow without fire or body heat?

Python program to take in two strings and print the larger string

Is superuser the same as root?

includegraphics: get the "scale" value of a figure whose size is expressed by "width"

Take elements from a list based on two criteria

Is the Unsullied name meant to be ironic? How did it come to be?

Is there a simple example that empirical evidence is misleading?

Can I install a back bike rack without attachment to the rear part of the frame?

On San Andreas Speedruns, why do players blow up the Picador in the mission Ryder?

Why haven't we yet tried accelerating a space station with people inside to a near light speed?

Parallel fifths in the orchestra

How to cut a climbing rope?

What did the 'turbo' button actually do?

Why did the person in charge of a principality not just declare themself king?

Time complexity of an algorithm: Is it important to state the base of the logarithm?

How did NASA Langley end up with the first 737?

Is this statement about cut time correct?



What is the recommended partition setup for a web server?


Any Tools for check partition?Sell partitioning to meShrink Partition on Production ServerCentOS 5.5 ext4 conversion problem - ext4 partition is recognized as ext3Can I make an ext3 filesystem recognize (and use) the entire partition?Software Raid 10 on VirtualBox?PXE boot Linux - which directories must be writable?Debian - move partitions to a new driveLinux OS installed as a guest OS on VMware Workstation v10.0.2 doesn't show all partitions as is shown when installed ona physical HP server/home /opt /tmp /usr /var on a single partition of another hard drive Debian 8






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am going to be running a web server using Debian which has 2 x 4 TB (8 TB total) drives in RAID 1. This server will be used for running websites, email and file storage.



From doing my research I am still really confused on how to setup my partitions, I really want to get it right before I continue. But all the past posts about this are like 7 years old.



I would prefer to have /boot and swap on their own partitions, then just have one big partition for the rest. I've read about /tmp /var/log all filling up and going wild... is this still something I should worry about?



I have heard of LVM but I don't like the idea of having to keep allocating drive space when needed, I would rather have all my HDD space available from the start and not have to worry about allocating new space at some point in the future.



For now I currently went with this:



PART swap swap 8G
PART /boot ext3 800M
PART / ext4 all


I'm not sure if this is a good setup for my server, am I "partitioning myself into a corner"?



Is there anyway in which I can restrict folders such as /tmp and /var/log without setting size limits with partitions?










share|improve this question



















  • 1





    You should research deeper into the technologies and understand them instead of just asking others for answers. There's absolutely no need to 'keep allocated drive space when needed'. Allocate whatever you want wherever you want, then resize accordingly when needed. It can make logical volumes smaller too, not just increase them.

    – yoonix
    Feb 3 '17 at 23:44











  • I disagree. OP wants to build a web server and learn the tech while building. OP doesn't want to do it on a bad foundation, so getting partition semi-right before getting much deeper is a good idea. OP did some reading but didn't find satisfying answers.

    – Dylan Martin
    Feb 3 '17 at 23:57







  • 2





    I have heard of LVM but I don't like the idea of having to keep allocating -If you are certain that you know how you will be using the system over the entire lifetime of the system, that is fine. But the entire point of LVM and filesystems like zfs is that they give you flexibility to adjust your partitions as needed when and if your assumptions change in the future. The entire point is to let people start with some kind of simple partitions, then make things more complicated as needed.

    – Zoredache
    Feb 3 '17 at 23:59







  • 2





    @yoonix From your profile "I give up. ServerFault has been overrun by idiots and people that bought their first Ubuntu VPS an hour ago." well stay away from posts like these, you are not helpful and if these types of posts are already answered correctly without wasteful comments like yours, there would be less of these posts, enabling people like me to find current information on the topic rather than looking at 7 year old posts.

    – Buckket5
    Feb 3 '17 at 23:59











  • @gofoques sorry but I'm going to disagree with you. This site is for managing systems in a business capacity. One doing so should already have a base foundation of knowledge instead of just asking others 'how do I?'. These questions shouldn't be here in the first place. This is not a site for learners trying to grasp the basics.

    – yoonix
    Feb 4 '17 at 4:39


















0















I am going to be running a web server using Debian which has 2 x 4 TB (8 TB total) drives in RAID 1. This server will be used for running websites, email and file storage.



From doing my research I am still really confused on how to setup my partitions, I really want to get it right before I continue. But all the past posts about this are like 7 years old.



I would prefer to have /boot and swap on their own partitions, then just have one big partition for the rest. I've read about /tmp /var/log all filling up and going wild... is this still something I should worry about?



I have heard of LVM but I don't like the idea of having to keep allocating drive space when needed, I would rather have all my HDD space available from the start and not have to worry about allocating new space at some point in the future.



For now I currently went with this:



PART swap swap 8G
PART /boot ext3 800M
PART / ext4 all


I'm not sure if this is a good setup for my server, am I "partitioning myself into a corner"?



Is there anyway in which I can restrict folders such as /tmp and /var/log without setting size limits with partitions?










share|improve this question



















  • 1





    You should research deeper into the technologies and understand them instead of just asking others for answers. There's absolutely no need to 'keep allocated drive space when needed'. Allocate whatever you want wherever you want, then resize accordingly when needed. It can make logical volumes smaller too, not just increase them.

    – yoonix
    Feb 3 '17 at 23:44











  • I disagree. OP wants to build a web server and learn the tech while building. OP doesn't want to do it on a bad foundation, so getting partition semi-right before getting much deeper is a good idea. OP did some reading but didn't find satisfying answers.

    – Dylan Martin
    Feb 3 '17 at 23:57







  • 2





    I have heard of LVM but I don't like the idea of having to keep allocating -If you are certain that you know how you will be using the system over the entire lifetime of the system, that is fine. But the entire point of LVM and filesystems like zfs is that they give you flexibility to adjust your partitions as needed when and if your assumptions change in the future. The entire point is to let people start with some kind of simple partitions, then make things more complicated as needed.

    – Zoredache
    Feb 3 '17 at 23:59







  • 2





    @yoonix From your profile "I give up. ServerFault has been overrun by idiots and people that bought their first Ubuntu VPS an hour ago." well stay away from posts like these, you are not helpful and if these types of posts are already answered correctly without wasteful comments like yours, there would be less of these posts, enabling people like me to find current information on the topic rather than looking at 7 year old posts.

    – Buckket5
    Feb 3 '17 at 23:59











  • @gofoques sorry but I'm going to disagree with you. This site is for managing systems in a business capacity. One doing so should already have a base foundation of knowledge instead of just asking others 'how do I?'. These questions shouldn't be here in the first place. This is not a site for learners trying to grasp the basics.

    – yoonix
    Feb 4 '17 at 4:39














0












0








0








I am going to be running a web server using Debian which has 2 x 4 TB (8 TB total) drives in RAID 1. This server will be used for running websites, email and file storage.



From doing my research I am still really confused on how to setup my partitions, I really want to get it right before I continue. But all the past posts about this are like 7 years old.



I would prefer to have /boot and swap on their own partitions, then just have one big partition for the rest. I've read about /tmp /var/log all filling up and going wild... is this still something I should worry about?



I have heard of LVM but I don't like the idea of having to keep allocating drive space when needed, I would rather have all my HDD space available from the start and not have to worry about allocating new space at some point in the future.



For now I currently went with this:



PART swap swap 8G
PART /boot ext3 800M
PART / ext4 all


I'm not sure if this is a good setup for my server, am I "partitioning myself into a corner"?



Is there anyway in which I can restrict folders such as /tmp and /var/log without setting size limits with partitions?










share|improve this question
















I am going to be running a web server using Debian which has 2 x 4 TB (8 TB total) drives in RAID 1. This server will be used for running websites, email and file storage.



From doing my research I am still really confused on how to setup my partitions, I really want to get it right before I continue. But all the past posts about this are like 7 years old.



I would prefer to have /boot and swap on their own partitions, then just have one big partition for the rest. I've read about /tmp /var/log all filling up and going wild... is this still something I should worry about?



I have heard of LVM but I don't like the idea of having to keep allocating drive space when needed, I would rather have all my HDD space available from the start and not have to worry about allocating new space at some point in the future.



For now I currently went with this:



PART swap swap 8G
PART /boot ext3 800M
PART / ext4 all


I'm not sure if this is a good setup for my server, am I "partitioning myself into a corner"?



Is there anyway in which I can restrict folders such as /tmp and /var/log without setting size limits with partitions?







linux debian web-server partition web-hosting






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 4 '17 at 0:00









1234567

12810




12810










asked Feb 3 '17 at 23:39









Buckket5Buckket5

287




287







  • 1





    You should research deeper into the technologies and understand them instead of just asking others for answers. There's absolutely no need to 'keep allocated drive space when needed'. Allocate whatever you want wherever you want, then resize accordingly when needed. It can make logical volumes smaller too, not just increase them.

    – yoonix
    Feb 3 '17 at 23:44











  • I disagree. OP wants to build a web server and learn the tech while building. OP doesn't want to do it on a bad foundation, so getting partition semi-right before getting much deeper is a good idea. OP did some reading but didn't find satisfying answers.

    – Dylan Martin
    Feb 3 '17 at 23:57







  • 2





    I have heard of LVM but I don't like the idea of having to keep allocating -If you are certain that you know how you will be using the system over the entire lifetime of the system, that is fine. But the entire point of LVM and filesystems like zfs is that they give you flexibility to adjust your partitions as needed when and if your assumptions change in the future. The entire point is to let people start with some kind of simple partitions, then make things more complicated as needed.

    – Zoredache
    Feb 3 '17 at 23:59







  • 2





    @yoonix From your profile "I give up. ServerFault has been overrun by idiots and people that bought their first Ubuntu VPS an hour ago." well stay away from posts like these, you are not helpful and if these types of posts are already answered correctly without wasteful comments like yours, there would be less of these posts, enabling people like me to find current information on the topic rather than looking at 7 year old posts.

    – Buckket5
    Feb 3 '17 at 23:59











  • @gofoques sorry but I'm going to disagree with you. This site is for managing systems in a business capacity. One doing so should already have a base foundation of knowledge instead of just asking others 'how do I?'. These questions shouldn't be here in the first place. This is not a site for learners trying to grasp the basics.

    – yoonix
    Feb 4 '17 at 4:39













  • 1





    You should research deeper into the technologies and understand them instead of just asking others for answers. There's absolutely no need to 'keep allocated drive space when needed'. Allocate whatever you want wherever you want, then resize accordingly when needed. It can make logical volumes smaller too, not just increase them.

    – yoonix
    Feb 3 '17 at 23:44











  • I disagree. OP wants to build a web server and learn the tech while building. OP doesn't want to do it on a bad foundation, so getting partition semi-right before getting much deeper is a good idea. OP did some reading but didn't find satisfying answers.

    – Dylan Martin
    Feb 3 '17 at 23:57







  • 2





    I have heard of LVM but I don't like the idea of having to keep allocating -If you are certain that you know how you will be using the system over the entire lifetime of the system, that is fine. But the entire point of LVM and filesystems like zfs is that they give you flexibility to adjust your partitions as needed when and if your assumptions change in the future. The entire point is to let people start with some kind of simple partitions, then make things more complicated as needed.

    – Zoredache
    Feb 3 '17 at 23:59







  • 2





    @yoonix From your profile "I give up. ServerFault has been overrun by idiots and people that bought their first Ubuntu VPS an hour ago." well stay away from posts like these, you are not helpful and if these types of posts are already answered correctly without wasteful comments like yours, there would be less of these posts, enabling people like me to find current information on the topic rather than looking at 7 year old posts.

    – Buckket5
    Feb 3 '17 at 23:59











  • @gofoques sorry but I'm going to disagree with you. This site is for managing systems in a business capacity. One doing so should already have a base foundation of knowledge instead of just asking others 'how do I?'. These questions shouldn't be here in the first place. This is not a site for learners trying to grasp the basics.

    – yoonix
    Feb 4 '17 at 4:39








1




1





You should research deeper into the technologies and understand them instead of just asking others for answers. There's absolutely no need to 'keep allocated drive space when needed'. Allocate whatever you want wherever you want, then resize accordingly when needed. It can make logical volumes smaller too, not just increase them.

– yoonix
Feb 3 '17 at 23:44





You should research deeper into the technologies and understand them instead of just asking others for answers. There's absolutely no need to 'keep allocated drive space when needed'. Allocate whatever you want wherever you want, then resize accordingly when needed. It can make logical volumes smaller too, not just increase them.

– yoonix
Feb 3 '17 at 23:44













I disagree. OP wants to build a web server and learn the tech while building. OP doesn't want to do it on a bad foundation, so getting partition semi-right before getting much deeper is a good idea. OP did some reading but didn't find satisfying answers.

– Dylan Martin
Feb 3 '17 at 23:57






I disagree. OP wants to build a web server and learn the tech while building. OP doesn't want to do it on a bad foundation, so getting partition semi-right before getting much deeper is a good idea. OP did some reading but didn't find satisfying answers.

– Dylan Martin
Feb 3 '17 at 23:57





2




2





I have heard of LVM but I don't like the idea of having to keep allocating -If you are certain that you know how you will be using the system over the entire lifetime of the system, that is fine. But the entire point of LVM and filesystems like zfs is that they give you flexibility to adjust your partitions as needed when and if your assumptions change in the future. The entire point is to let people start with some kind of simple partitions, then make things more complicated as needed.

– Zoredache
Feb 3 '17 at 23:59






I have heard of LVM but I don't like the idea of having to keep allocating -If you are certain that you know how you will be using the system over the entire lifetime of the system, that is fine. But the entire point of LVM and filesystems like zfs is that they give you flexibility to adjust your partitions as needed when and if your assumptions change in the future. The entire point is to let people start with some kind of simple partitions, then make things more complicated as needed.

– Zoredache
Feb 3 '17 at 23:59





2




2





@yoonix From your profile "I give up. ServerFault has been overrun by idiots and people that bought their first Ubuntu VPS an hour ago." well stay away from posts like these, you are not helpful and if these types of posts are already answered correctly without wasteful comments like yours, there would be less of these posts, enabling people like me to find current information on the topic rather than looking at 7 year old posts.

– Buckket5
Feb 3 '17 at 23:59





@yoonix From your profile "I give up. ServerFault has been overrun by idiots and people that bought their first Ubuntu VPS an hour ago." well stay away from posts like these, you are not helpful and if these types of posts are already answered correctly without wasteful comments like yours, there would be less of these posts, enabling people like me to find current information on the topic rather than looking at 7 year old posts.

– Buckket5
Feb 3 '17 at 23:59













@gofoques sorry but I'm going to disagree with you. This site is for managing systems in a business capacity. One doing so should already have a base foundation of knowledge instead of just asking others 'how do I?'. These questions shouldn't be here in the first place. This is not a site for learners trying to grasp the basics.

– yoonix
Feb 4 '17 at 4:39






@gofoques sorry but I'm going to disagree with you. This site is for managing systems in a business capacity. One doing so should already have a base foundation of knowledge instead of just asking others 'how do I?'. These questions shouldn't be here in the first place. This is not a site for learners trying to grasp the basics.

– yoonix
Feb 4 '17 at 4:39











1 Answer
1






active

oldest

votes


















0














Here's what I would suggest.



  • Don't worry about how much swap. Sure, have some, like 1G. More importantly, never ever let your box need to use swap. If it does, your server is going to grind to a near halt, and your users will tar and feather you.

  • You're going to want a separate partition for your web server logs (eg /var/log/httpd) so if it fills all the way up, your whole server doesn't puke.

  • Use LVM and leave a fair amount of space unallocated. Your reluctance to use LVM is probably misguided. Then you can allocate that space later. EG more to /home if you have greedy users, more to /var/log or /var/log/httpd if you want to keep lots of logs, etc... It's generally better to leave space unallocated than rely on your long-term predictions. Make your predictions, and allocate space, for sure, but try to keep some in reserve.

  • (this is more philophical than practical) Follow the middle path between planning and reacting. Your ability to predict your future needs will never be very good. Plan as well as you can, but keep as much flexibility as possible. LVM lets you do this.





share|improve this answer

























  • The comment "leave as much space unallocated as you can", is both good and bad advice. Personally I try to allocate reasonable amounts of data, and leave myself some breathing room. For example if I have 4TB to play with, but only need 10GB right now, I'll still allocate 2-3TB. You don't want to keep resizing volumes every day. Leave some space for emergencies though. LVM is very useful to let you expand partitions later, especially if you end up swapping your physical disk for larger ones later, or adding additional disks.

    – KHobbits
    Feb 4 '17 at 2:20











  • Using separate partitions for things like /var/log can cause problems too. In the past badly sized volumes have done more harm than good. For example on a webserver with 400gb hdd, I figured 20gb would be enough for /var/log, and allocated the rest for root. Turns out the way the developer wrote the code for the web apps, the sites only use 20gb of space, but generate 10gb logs each month. While my assumptions were fine at the time, 2 years on, they caused more problems, and I ended up resizing the partitions and giving half the disk to logs (even with logrotate).

    – KHobbits
    Feb 4 '17 at 2:24












  • I agree about the "leave as much space unallocated as you can" statement. I've changed it. I think it's better to leave space unallocated against and uncertain future, rather than pre-allocate it based on a prediction. Your /var/log example illustrates this perfectly.

    – Dylan Martin
    Feb 6 '17 at 20:11











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f830506%2fwhat-is-the-recommended-partition-setup-for-a-web-server%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Here's what I would suggest.



  • Don't worry about how much swap. Sure, have some, like 1G. More importantly, never ever let your box need to use swap. If it does, your server is going to grind to a near halt, and your users will tar and feather you.

  • You're going to want a separate partition for your web server logs (eg /var/log/httpd) so if it fills all the way up, your whole server doesn't puke.

  • Use LVM and leave a fair amount of space unallocated. Your reluctance to use LVM is probably misguided. Then you can allocate that space later. EG more to /home if you have greedy users, more to /var/log or /var/log/httpd if you want to keep lots of logs, etc... It's generally better to leave space unallocated than rely on your long-term predictions. Make your predictions, and allocate space, for sure, but try to keep some in reserve.

  • (this is more philophical than practical) Follow the middle path between planning and reacting. Your ability to predict your future needs will never be very good. Plan as well as you can, but keep as much flexibility as possible. LVM lets you do this.





share|improve this answer

























  • The comment "leave as much space unallocated as you can", is both good and bad advice. Personally I try to allocate reasonable amounts of data, and leave myself some breathing room. For example if I have 4TB to play with, but only need 10GB right now, I'll still allocate 2-3TB. You don't want to keep resizing volumes every day. Leave some space for emergencies though. LVM is very useful to let you expand partitions later, especially if you end up swapping your physical disk for larger ones later, or adding additional disks.

    – KHobbits
    Feb 4 '17 at 2:20











  • Using separate partitions for things like /var/log can cause problems too. In the past badly sized volumes have done more harm than good. For example on a webserver with 400gb hdd, I figured 20gb would be enough for /var/log, and allocated the rest for root. Turns out the way the developer wrote the code for the web apps, the sites only use 20gb of space, but generate 10gb logs each month. While my assumptions were fine at the time, 2 years on, they caused more problems, and I ended up resizing the partitions and giving half the disk to logs (even with logrotate).

    – KHobbits
    Feb 4 '17 at 2:24












  • I agree about the "leave as much space unallocated as you can" statement. I've changed it. I think it's better to leave space unallocated against and uncertain future, rather than pre-allocate it based on a prediction. Your /var/log example illustrates this perfectly.

    – Dylan Martin
    Feb 6 '17 at 20:11















0














Here's what I would suggest.



  • Don't worry about how much swap. Sure, have some, like 1G. More importantly, never ever let your box need to use swap. If it does, your server is going to grind to a near halt, and your users will tar and feather you.

  • You're going to want a separate partition for your web server logs (eg /var/log/httpd) so if it fills all the way up, your whole server doesn't puke.

  • Use LVM and leave a fair amount of space unallocated. Your reluctance to use LVM is probably misguided. Then you can allocate that space later. EG more to /home if you have greedy users, more to /var/log or /var/log/httpd if you want to keep lots of logs, etc... It's generally better to leave space unallocated than rely on your long-term predictions. Make your predictions, and allocate space, for sure, but try to keep some in reserve.

  • (this is more philophical than practical) Follow the middle path between planning and reacting. Your ability to predict your future needs will never be very good. Plan as well as you can, but keep as much flexibility as possible. LVM lets you do this.





share|improve this answer

























  • The comment "leave as much space unallocated as you can", is both good and bad advice. Personally I try to allocate reasonable amounts of data, and leave myself some breathing room. For example if I have 4TB to play with, but only need 10GB right now, I'll still allocate 2-3TB. You don't want to keep resizing volumes every day. Leave some space for emergencies though. LVM is very useful to let you expand partitions later, especially if you end up swapping your physical disk for larger ones later, or adding additional disks.

    – KHobbits
    Feb 4 '17 at 2:20











  • Using separate partitions for things like /var/log can cause problems too. In the past badly sized volumes have done more harm than good. For example on a webserver with 400gb hdd, I figured 20gb would be enough for /var/log, and allocated the rest for root. Turns out the way the developer wrote the code for the web apps, the sites only use 20gb of space, but generate 10gb logs each month. While my assumptions were fine at the time, 2 years on, they caused more problems, and I ended up resizing the partitions and giving half the disk to logs (even with logrotate).

    – KHobbits
    Feb 4 '17 at 2:24












  • I agree about the "leave as much space unallocated as you can" statement. I've changed it. I think it's better to leave space unallocated against and uncertain future, rather than pre-allocate it based on a prediction. Your /var/log example illustrates this perfectly.

    – Dylan Martin
    Feb 6 '17 at 20:11













0












0








0







Here's what I would suggest.



  • Don't worry about how much swap. Sure, have some, like 1G. More importantly, never ever let your box need to use swap. If it does, your server is going to grind to a near halt, and your users will tar and feather you.

  • You're going to want a separate partition for your web server logs (eg /var/log/httpd) so if it fills all the way up, your whole server doesn't puke.

  • Use LVM and leave a fair amount of space unallocated. Your reluctance to use LVM is probably misguided. Then you can allocate that space later. EG more to /home if you have greedy users, more to /var/log or /var/log/httpd if you want to keep lots of logs, etc... It's generally better to leave space unallocated than rely on your long-term predictions. Make your predictions, and allocate space, for sure, but try to keep some in reserve.

  • (this is more philophical than practical) Follow the middle path between planning and reacting. Your ability to predict your future needs will never be very good. Plan as well as you can, but keep as much flexibility as possible. LVM lets you do this.





share|improve this answer















Here's what I would suggest.



  • Don't worry about how much swap. Sure, have some, like 1G. More importantly, never ever let your box need to use swap. If it does, your server is going to grind to a near halt, and your users will tar and feather you.

  • You're going to want a separate partition for your web server logs (eg /var/log/httpd) so if it fills all the way up, your whole server doesn't puke.

  • Use LVM and leave a fair amount of space unallocated. Your reluctance to use LVM is probably misguided. Then you can allocate that space later. EG more to /home if you have greedy users, more to /var/log or /var/log/httpd if you want to keep lots of logs, etc... It's generally better to leave space unallocated than rely on your long-term predictions. Make your predictions, and allocate space, for sure, but try to keep some in reserve.

  • (this is more philophical than practical) Follow the middle path between planning and reacting. Your ability to predict your future needs will never be very good. Plan as well as you can, but keep as much flexibility as possible. LVM lets you do this.






share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 6 '17 at 20:12

























answered Feb 3 '17 at 23:55









Dylan MartinDylan Martin

433310




433310












  • The comment "leave as much space unallocated as you can", is both good and bad advice. Personally I try to allocate reasonable amounts of data, and leave myself some breathing room. For example if I have 4TB to play with, but only need 10GB right now, I'll still allocate 2-3TB. You don't want to keep resizing volumes every day. Leave some space for emergencies though. LVM is very useful to let you expand partitions later, especially if you end up swapping your physical disk for larger ones later, or adding additional disks.

    – KHobbits
    Feb 4 '17 at 2:20











  • Using separate partitions for things like /var/log can cause problems too. In the past badly sized volumes have done more harm than good. For example on a webserver with 400gb hdd, I figured 20gb would be enough for /var/log, and allocated the rest for root. Turns out the way the developer wrote the code for the web apps, the sites only use 20gb of space, but generate 10gb logs each month. While my assumptions were fine at the time, 2 years on, they caused more problems, and I ended up resizing the partitions and giving half the disk to logs (even with logrotate).

    – KHobbits
    Feb 4 '17 at 2:24












  • I agree about the "leave as much space unallocated as you can" statement. I've changed it. I think it's better to leave space unallocated against and uncertain future, rather than pre-allocate it based on a prediction. Your /var/log example illustrates this perfectly.

    – Dylan Martin
    Feb 6 '17 at 20:11

















  • The comment "leave as much space unallocated as you can", is both good and bad advice. Personally I try to allocate reasonable amounts of data, and leave myself some breathing room. For example if I have 4TB to play with, but only need 10GB right now, I'll still allocate 2-3TB. You don't want to keep resizing volumes every day. Leave some space for emergencies though. LVM is very useful to let you expand partitions later, especially if you end up swapping your physical disk for larger ones later, or adding additional disks.

    – KHobbits
    Feb 4 '17 at 2:20











  • Using separate partitions for things like /var/log can cause problems too. In the past badly sized volumes have done more harm than good. For example on a webserver with 400gb hdd, I figured 20gb would be enough for /var/log, and allocated the rest for root. Turns out the way the developer wrote the code for the web apps, the sites only use 20gb of space, but generate 10gb logs each month. While my assumptions were fine at the time, 2 years on, they caused more problems, and I ended up resizing the partitions and giving half the disk to logs (even with logrotate).

    – KHobbits
    Feb 4 '17 at 2:24












  • I agree about the "leave as much space unallocated as you can" statement. I've changed it. I think it's better to leave space unallocated against and uncertain future, rather than pre-allocate it based on a prediction. Your /var/log example illustrates this perfectly.

    – Dylan Martin
    Feb 6 '17 at 20:11
















The comment "leave as much space unallocated as you can", is both good and bad advice. Personally I try to allocate reasonable amounts of data, and leave myself some breathing room. For example if I have 4TB to play with, but only need 10GB right now, I'll still allocate 2-3TB. You don't want to keep resizing volumes every day. Leave some space for emergencies though. LVM is very useful to let you expand partitions later, especially if you end up swapping your physical disk for larger ones later, or adding additional disks.

– KHobbits
Feb 4 '17 at 2:20





The comment "leave as much space unallocated as you can", is both good and bad advice. Personally I try to allocate reasonable amounts of data, and leave myself some breathing room. For example if I have 4TB to play with, but only need 10GB right now, I'll still allocate 2-3TB. You don't want to keep resizing volumes every day. Leave some space for emergencies though. LVM is very useful to let you expand partitions later, especially if you end up swapping your physical disk for larger ones later, or adding additional disks.

– KHobbits
Feb 4 '17 at 2:20













Using separate partitions for things like /var/log can cause problems too. In the past badly sized volumes have done more harm than good. For example on a webserver with 400gb hdd, I figured 20gb would be enough for /var/log, and allocated the rest for root. Turns out the way the developer wrote the code for the web apps, the sites only use 20gb of space, but generate 10gb logs each month. While my assumptions were fine at the time, 2 years on, they caused more problems, and I ended up resizing the partitions and giving half the disk to logs (even with logrotate).

– KHobbits
Feb 4 '17 at 2:24






Using separate partitions for things like /var/log can cause problems too. In the past badly sized volumes have done more harm than good. For example on a webserver with 400gb hdd, I figured 20gb would be enough for /var/log, and allocated the rest for root. Turns out the way the developer wrote the code for the web apps, the sites only use 20gb of space, but generate 10gb logs each month. While my assumptions were fine at the time, 2 years on, they caused more problems, and I ended up resizing the partitions and giving half the disk to logs (even with logrotate).

– KHobbits
Feb 4 '17 at 2:24














I agree about the "leave as much space unallocated as you can" statement. I've changed it. I think it's better to leave space unallocated against and uncertain future, rather than pre-allocate it based on a prediction. Your /var/log example illustrates this perfectly.

– Dylan Martin
Feb 6 '17 at 20:11





I agree about the "leave as much space unallocated as you can" statement. I've changed it. I think it's better to leave space unallocated against and uncertain future, rather than pre-allocate it based on a prediction. Your /var/log example illustrates this perfectly.

– Dylan Martin
Feb 6 '17 at 20:11

















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f830506%2fwhat-is-the-recommended-partition-setup-for-a-web-server%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020