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;
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
add a comment |
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
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
add a comment |
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
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
linux debian web-server partition web-hosting
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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