*Re-sending as it appears my original e-mail did not go through*.
Good Evening All,
I have a question regarding CentOS 6 server partitioning. Now I know there are a lot of different ways to partition the system and different opinions depending on the use of the server. I currently have a quad core intel system running 8GB of RAM with 1 TB hard drive (single). In the past as a FreeBSD user, I have always made a physical volume of the root filesystem (/), SWAP, /tmp, /usr, /var, and /home. In the partitioning manager I would always specify 10GB for root, 2GB or so for SWAP, 20GB var, 50GB usr, 10GB /tmp, and allocate all remaining space to my home directory as my primary data volume (assuming all my applications are installed and ran from my home directories). I was recently told that this is an old style of partitioning and is not used in modern day Linux distributions. So more accurately, here are my questions to the list:
1) What is a good partition map/schema for a server OS where it's primary purpose is for a LAMP server, DNS (bind), and possibly gameservers
2) CentOS docs recommend using 10GB SWAP for 8GB of RAM. 1X the amount of physical memory + 2GB added. (Reference: http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-diskpartitioni...). I was told this is ridiculous and will severely slow down the system. Is this true? If so, what is a good swap space to use for 8GB of RAM? The university of MIT recommends making MULTIPLE 2GB swap spaces equaling 10GB if this is the case. Please help!
3) Is EXT4 better or worse to use then XFS for what I am planning to use the system for?
Thanks in advance for all your help guys
Kind Regards, Jonathan Vomacka
On Wed, 2011-08-31 at 21:28 -0400, Jonathan Vomacka wrote:
*Re-sending as it appears my original e-mail did not go through*.
Good Evening All,
Bon soir.
Both version of your email were received in Europe.
On the subject of SWAP, I'm working on a standalone server with 8 GB RAM and a AMD 3 core processor with Centos 5.6. I do not use swap and I notice no detrimental effect.
Best regards,
Paul.
Paul,
Thanks for your reply. I have heard the suggestion of not using SWAP which is fine. My curiosity on the SWAP subject is now what happens if all memory is used or an application has a memory leak. Does the server crash if there is no SWAP and all available RAM is used? Will SWAP cause performance degradation issues? Also the system is not able to drop a core dump is the SWAP doesn't match the RAM. I guess I am a little worried because CentOS docs suggest 10GB of SWAP for 8GB of RAM, but it doesn't explain if any performance issues are seen, or if SWAP is still necessary if core dumps are not needed. I was hoping someone in the field who has had first hand experience can tell me these additional questions which may not be answered in the docs.
Also, any help you can give me regarding a partition map would be great.
On 8/31/2011 9:32 PM, Always Learning wrote:
On Wed, 2011-08-31 at 21:28 -0400, Jonathan Vomacka wrote:
*Re-sending as it appears my original e-mail did not go through*.
Good Evening All,
Bon soir.
Both version of your email were received in Europe.
On the subject of SWAP, I'm working on a standalone server with 8 GB RAM and a AMD 3 core processor with Centos 5.6. I do not use swap and I notice no detrimental effect.
Best regards,
Paul.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Wed, 2011-08-31 at 21:41 -0400, Jonathan Vomacka wrote:
Also, any help you can give me regarding a partition map would be great.
I'm probably different to many of the others who seem to have fixed ideas. I'm relatively new to Linux but not to computers.
I assume your machine is a single user machine. If so, I would suggest
3 primary partitions (if the partition table is MS-DOS) each about 10 GB. These can be used for different operating systems, Centos, BSD etc. because the machine will multi-boot.
A fourth partition made into an extended partition. The extended partition then made into several logical partitions to provide you with all the space you need. You do not need to use all the space in the extended partition and can keep the unused and unallocated extra space for future requirements.
In the main Centos partition you can mount, using the entries in /etc/fstab, the logical partitions from the extended partition and attach them to whatever place you wish. Centos is very flexible. I mount extended (from the same HDD) and external (from other HDDs) partitions in /ax.
I store confidential data on extended partitions and use LUKS to encrypt the entire extended partition. I also use LUKS on laptops and netbooks.
This is my personal preference. I like the idea of having space for other operating systems in the 3 primary partitions. One can also use some of the space in the extended partition for more logical partitions to contain more operating systems. You can access data files stored on extended partitions from any of the operating system partitions (after being mounted of course)
Centos 5.6 takes, depending on install options, between about 3.5 and 4 and a bit GB.
Having everything in one big super partition on a end-user machine makes handling awkward. Breaking it down into manageable chunks is my preference. Remember it is your machine so you can be as flexible or as inflexible as you wish.
I am sure some will have their own preferences totally radically different from mine.
Best regards,
Paul.
On Wed, 2011-08-31 at 19:41 -0700, John R Pierce wrote:
On 08/31/11 7:07 PM, Always Learning wrote:
I assume
Which part of LAMP server didn't you read?
I read none of it. Why ask such time-wasting questions ? Go and have a cup of tea, pull-out your network card and settle down for the night :-)
On 08/31/11 7:43 PM, Always Learning wrote:
I read none of it.
figures. the original post asked...
- What is a good partition map/schema for a server OS where it's
primary purpose is for a LAMP server, DNS (bind), and possibly gameservers
and you take off on a tangent about multiple small static partitions for multibooting BSD yada yada.
On Wednesday, August 31, 2011 10:07:01 PM Always Learning wrote:
I assume your machine is a single user machine. If so, I would suggest
He stated clearly in his request that this was for a server, by definition a multi-user machine (each server process should, after all, run as a unique user) serving requests to many users.
Advice for a single-user desktop won't help him.
On Thu, Sep 1, 2011 at 3:14 PM, Lamar Owen lowen@pari.edu wrote:
On Wednesday, August 31, 2011 10:07:01 PM Always Learning wrote:
I assume your machine is a single user machine. If so, I would suggest
He stated clearly in his request that this was for a server, by definition a multi-user machine (each server process should, after all, run as a unique user) serving requests to many users.
Advice for a single-user desktop won't help him. _______________________________________________
just goes to show how well people actually read anything on the internet these days. and then they can't understand why the original poster gets irritated when he's told to use a hammer to hit the nail into the wall, when asked what color your car is.
On Thu, 2011-09-01 at 15:19 +0200, Rudi Ahlers wrote:
just goes to show how well people actually read anything on the internet these days. and then they can't understand why the original poster gets irritated when he's told to use a hammer to hit the nail into the wall, when asked what color your car is.
Thank you for providing to everyone you too are guilty for not reading things properly :-)
Welcome to the club !
The original poster did not get irritated. Someone unconnected with the matter got 'irritated'.
Have a nice day.
Paul.
Always Learning wrote:
On Thu, 2011-09-01 at 15:19 +0200, Rudi Ahlers wrote:
just goes to show how well people actually read anything on the internet these days. and then they can't understand why the original poster gets irritated when he's told to use a hammer to hit the nail into the wall, when asked what color your car is.
But who's filling the bathtub with power tools? <snip> I missed the thread overnight (for me), but the way I used to recommend it is part of my article, which you can read at http://24.5-cent.us/upgrading_linux.doc These days, our default here at work is: /boot is 200M (we'll probably be moving that up to 300M or 500M, given the preupgrade of fedora that will probably be coming down the pike). 2GB is swap and the rest of the drive is / (my manager doesn't like LVM, for some reason). home directories are *always* NFS mounted here; at home, it's *always* on a separate partition or drive, along with /opt, though I might start putting /usr/local there as well, given that some things seem to be moving back there from /opt.
Sizing: remember, do NOT size for "typical", size for worst huge case, esp. for a production or development system that others will be using.
mark
On Thu, 2011-09-01 at 09:54 -0400, m.roth@5-cent.us wrote:
I missed the thread overnight (for me), but the way I used to recommend it is part of my article, which you can read at http://24.5-cent.us/upgrading_linux.doc These days, our default here at work is: /boot is 200M (we'll probably be moving that up to 300M or 500M, given the preupgrade of fedora that will probably be coming down the pike). 2GB is swap and the rest of the drive is / (my manager doesn't like LVM, for some reason). home directories are *always* NFS mounted here; at home, it's *always* on a separate partition or drive, along with /opt, though I might start putting /usr/local there as well, given that some things seem to be moving back there from /opt.
Agreed /boot needs less (currently on C 5) than 200 MB. Operating system in one partition on / User data on a different partition or partitions.
Sizing: remember, do NOT size for "typical", size for worst huge case, esp. for a production or development system that others will be using.
Agreed.
Paul.
Always Learning wrote:
On Thu, 2011-09-01 at 09:54 -0400, m.roth@5-cent.us wrote:
I missed the thread overnight (for me), but the way I used to recommend it is part of my article, which you can read at http://24.5-cent.us/upgrading_linux.doc These days, our default here at work is: /boot is 200M (we'll probably be moving that up to 300M or 500M, given the preupgrade of fedora that will probably be coming down the pike). 2GB is swap and the rest of the drive is / (my manager doesn't like LVM, for some reason). home directories are *always* NFS mounted here; at home, it's *always* on a separate partition or drive, along with /opt, though I might start putting /usr/local there as well, given that some things seem to be moving back there from /opt.
Agreed /boot needs less (currently on C 5) than 200 MB.
That's where I disagree, actually: in the future, I'll be putting either 300M or 500M on /boot, having used preupgrade to bring one system from fedora 9? 10? to 13, and I had to delete and delete from /boot to squeeze it in - it seems to want to install most of the base o/s, and is *bloated*, that it wants a *lot* of space... and I'm sure we'll see that reflected in CentOS in CentOS 7 or so. <snip> mark
On 08/31/11 6:28 PM, Jonathan Vomacka wrote:
- What is a good partition map/schema for a server OS where it's
primary purpose is for a LAMP server, DNS (bind), and possibly gameservers
my servers generally have 2 disks mirrored for the OS, then 2 or more disks in a raid for the application file systems, be they databases, web files, NFS shared data, or whatever. I generally make the OS raid an LVM volume, then allocate /, /var, swap, and maybe /home out of that. depending on what I'm doing, the data raid is probably also a LVM volume group, and would have things like /var/www, /var/lib/pgsql/9.0/data, as logical volumes, possibly /home, depending on usage patterns.
but, my workloads are often disk IO intensive. Your Mileage May Vary. Objects In Mirror May Be Closer Than They Appear. Caveat Emptor. etc etc.
John,
The server which is housed at the datacenter only has a single 1TB drive. Just to confirm, LVM allows you to increase and decrease space on any partition on the fly, but setting each volume manually with EXT4 is a physical mount?
If I were to set hard limits by setting each volume on EXT4 (not using the LVM option), do you recommend only setting up a /, /boot, and SWAP? In the past this was my partition scheme:
Root filesystem (/) = 10240MB (10GB) /boot = 200MB swap = 1024MB (1GB) /var = 20480MB (20GB) /tmp = 10240MB (10GB) /usr = 51200MB (50GB) /home = all remaining space on the drive
Is the above a bad partition?
On 8/31/2011 9:45 PM, John R Pierce wrote:
On 08/31/11 6:28 PM, Jonathan Vomacka wrote:
- What is a good partition map/schema for a server OS where it's
primary purpose is for a LAMP server, DNS (bind), and possibly gameservers
my servers generally have 2 disks mirrored for the OS, then 2 or more disks in a raid for the application file systems, be they databases, web files, NFS shared data, or whatever. I generally make the OS raid an LVM volume, then allocate /, /var, swap, and maybe /home out of that. depending on what I'm doing, the data raid is probably also a LVM volume group, and would have things like /var/www, /var/lib/pgsql/9.0/data, as logical volumes, possibly /home, depending on usage patterns.
but, my workloads are often disk IO intensive. Your Mileage May Vary. Objects In Mirror May Be Closer Than They Appear. Caveat Emptor. etc etc.
On Wed, 2011-08-31 at 21:51 -0400, Jonathan Vomacka wrote:
Root filesystem (/) = 10240MB (10GB) /boot = 200MB swap = 1024MB (1GB) /var = 20480MB (20GB) /tmp = 10240MB (10GB) /usr = 51200MB (50GB) /home = all remaining space on the drive
You can just allocate the drive and Centos will store everything there. Not allocating specific space for specific directories gives you greater flexibility.
Paul.
On 08/31/2011 08:51 PM, Jonathan Vomacka wrote:
In the past this was my partition scheme:
Root filesystem (/) = 10240MB (10GB) /boot = 200MB swap = 1024MB (1GB) /var = 20480MB (20GB) /tmp = 10240MB (10GB) /usr = 51200MB (50GB) /home = all remaining space on the drive
Having /usr separate from the root file system is no longer recommended or supported. There are various bits and pieces from /usr that now may get called during the boot sequence while only the root file system is mounted. Mostly, these support udev classification of various devices you might not have, so it's possible that everything would work just fine for you, but it's still not a recommended configuration.
On 08/31/2011 08:51 PM, Jonathan Vomacka wrote:
In the past this was my partition scheme:
Root filesystem (/) = 10240MB (10GB) /boot = 200MB swap = 1024MB (1GB) /var = 20480MB (20GB) /tmp = 10240MB (10GB) /usr = 51200MB (50GB) /home = all remaining space on the drive
Having /usr separate from the root file system is no longer recommended or supported. There are various bits and pieces from /usr that now may
Are you sure that's true? Reading the latest EL6 docs I have the impression it's recommended to put /usr on the same disk where / and /boot are. That's a good rule but I don't think it's meant to run without /usr.
Simon
On 09/01/2011 12:20 AM, Simon Matter wrote:
On 08/31/2011 08:51 PM, Jonathan Vomacka wrote:
In the past this was my partition scheme:
Root filesystem (/) = 10240MB (10GB) /boot = 200MB swap = 1024MB (1GB) /var = 20480MB (20GB) /tmp = 10240MB (10GB) /usr = 51200MB (50GB) /home = all remaining space on the drive
Having /usr separate from the root file system is no longer recommended or supported. There are various bits and pieces from /usr that now may
Are you sure that's true? Reading the latest EL6 docs I have the impression it's recommended to put /usr on the same disk where / and /boot are. That's a good rule but I don't think it's meant to run without /usr.
Yes, I'm quite sure. Do you have a specific reference that supports your impression?
Here's what the RHEL6 Installation Guide has to say:
Do not place /usr on a separate partition If /usr is on a separate partition from /, the boot process becomes much more complex, and in some situations (like installations on iSCSI drives), might not work at all.
I had a discussion about this on the Fedora users list back in March. Since Fedora 11, separate /usr partition has not been recommended. For Fedora 12 (the basis for RHEL6), I went through the exercise of identifying the files on /usr that might be needed early in the boot sequence. Here is what I found:
/usr/sbin/vbetool /usr/sbin/pcscd /usr/sbin/Kobil_mIDentity_switch /usr/sbin/bluetoothd /usr/bin/env /usr/bin/hp-mkuri /usr/share/hwdata/* (total of 29 files) /usr/lib64/libusb-0.1.so.4.4.4 /usr/lib64/libsensors.so.4.2.1 /usr/lib64/libbluetooth.so.3.4.2 /usr/lib64/libcrypto.so.10 /usr/lib64/libpciaccess.so.0 /usr/lib64/libnetsnmp.so.15.1.2 /usr/lib64/libpciaccess.so.0.10.8 /usr/lib64/libnetsnmp.so.15 /usr/lib64/libsensors.so.4 /usr/lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so.1.3.9 /usr/lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so /usr/lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist /usr/lib64/pcsc/drivers/serial/libccidtwin.so /usr/lib64/pcsc/drivers/serial/libccidtwin.so.1.3.9 /usr/lib64/libusb-0.1.so.4 /usr/lib64/libcrypto.so.1.0.0b /usr/lib64/libx86.so.1 /usr/lib64/libhal.so.1.0.0 /usr/lib64/libhal.so.1 /usr/lib64/libbluetooth.so.3 /usr/lib64/libusb-1.0.so.0.0.0 /usr/lib64/libusb-1.0.so.0
I actually had a Fedora 12 system set up with a root file system that had a stub /usr directory tree containing just those files. It would get overlaid by the full /usr file system when that partition got mounted. I wouldn't actually recommend that as a configuration.
On Thu, Sep 1, 2011 at 1:20 AM, Simon Matter simon.matter@invoca.ch wrote:
On 08/31/2011 08:51 PM, Jonathan Vomacka wrote:
In the past this was my partition scheme:
Root filesystem (/) = 10240MB (10GB) /boot = 200MB swap = 1024MB (1GB) /var = 20480MB (20GB) /tmp = 10240MB (10GB) /usr = 51200MB (50GB) /home = all remaining space on the drive
Having /usr separate from the root file system is no longer recommended or supported.
Are you sure that's true? Reading the latest EL6 docs I have the impression it's recommended to put /usr on the same disk where / and /boot are. That's a good rule but I don't think it's meant to run without /usr.
http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
and
from http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installati...
Do not place /usr on a separate partition
If /usr is on a separate partition from /, the boot process becomes much more complex, and in some situations (like installations on iSCSI drives), might not work at all.
On 9/1/2011 1:19 PM, Tom H wrote:
On Thu, Sep 1, 2011 at 1:20 AM, Simon Mattersimon.matter@invoca.ch wrote: from http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installati... Do not place /usr on a separate partition If /usr is on a separate partition from /, the boot process becomes much more complex, and in some situations (like installations on iSCSI drives), might not work at all.
Thanks for this Tom. I was operating in old_schema mode and now I see I need to do a couple of re-installs as I did create /usr partitions. I do wonder why upstream left /usr as a suggestion in the partitioning program used inside of Anaconda?
I do believe that 6.0 has more core changes than any release I remember to date.
Good to find this out 'before' I got lots of stuff on that system!! ;) I can easily just copy my configs and start over.... way easier now than on a in service system!
John Hinton
On Thu, Sep 1, 2011 at 1:44 PM, John Hinton webmaster@ew3d.com wrote:
On 9/1/2011 1:19 PM, Tom H wrote:
On Thu, Sep 1, 2011 at 1:20 AM, Simon Mattersimon.matter@invoca.ch wrote:
from http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installati... Do not place /usr on a separate partition If /usr is on a separate partition from /, the boot process becomes much more complex, and in some situations (like installations on iSCSI drives), might not work at all.
Thanks for this Tom. I was operating in old_schema mode and now I see I need to do a couple of re-installs as I did create /usr partitions. I do wonder why upstream left /usr as a suggestion in the partitioning program used inside of Anaconda?
I do believe that 6.0 has more core changes than any release I remember to date.
Good to find this out 'before' I got lots of stuff on that system!! ;) I can easily just copy my configs and start over.... way easier now than on a in service system!
You're welcome.
You must have forgotten the 4-5 transition and, for example, the expanded-selinux-by-default change that it brought. :)
The 6-7 transition will be interesting simply judging from F15 and F16: systemd and grub2. And most probably btrfs too.
I was pressed for time when I posted the two links. Poettering says in his blog that you can have "/usr" on a separate partition if you mount it in the initramfs. With dracut, it means using "--add fstab-sys" (or adding "fstab-sys" to the "/etc/dracut.conf" modules list) and creating an "/etc/fstab.sys" with a "/usr" line".
On 09/01/2011 07:58 PM, Tom H wrote:
Poettering says in his blog that you can have "/usr" on a separate partition if you mount it in the initramfs. With dracut, it means using "--add fstab-sys" (or adding "fstab-sys" to the "/etc/dracut.conf" modules list) and creating an "/etc/fstab.sys" with a "/usr" line".
I tried setting up a system that way, but there are a couple of problems:
1) You have to patch rc.sysinit to fake an entry for /usr in /etc/mtab. That's easy enough, and not necessary on distributions where /etc/mtab is just a symlink to /proc/mounts.
2) You have to disable the automatic fsck of /usr. Because /usr is now mounted, fsck will always fail regardless of the "clean" state of the file system, and the special handling for the already-mounted root file system seems to be hard-coded in the fsck binary and can not be made to apply to /usr.
Thank you to everyone who responded and contributed to this topic. I appreciate it greatly!
On 9/2/2011 11:27 AM, Robert Nichols wrote:
On 09/01/2011 07:58 PM, Tom H wrote:
Poettering says in his blog that you can have "/usr" on a separate partition if you mount it in the initramfs. With dracut, it means using "--add fstab-sys" (or adding "fstab-sys" to the "/etc/dracut.conf" modules list) and creating an "/etc/fstab.sys" with a "/usr" line".
I tried setting up a system that way, but there are a couple of problems:
You have to patch rc.sysinit to fake an entry for /usr in /etc/mtab. That's easy enough, and not necessary on distributions where /etc/mtab is just a symlink to /proc/mounts.
You have to disable the automatic fsck of /usr. Because /usr is now mounted, fsck will always fail regardless of the "clean" state of the file system, and the special handling for the already-mounted root file system seems to be hard-coded in the fsck binary and can not be made to apply to /usr.
On 08/31/11 6:51 PM, Jonathan Vomacka wrote:
The server which is housed at the datacenter only has a single 1TB drive. Just to confirm, LVM allows you to increase and decrease space on any partition on the fly, but setting each volume manually with EXT4 is a physical mount?
shrinking file systems is not easy, I generally try and avoid it. With LVM, growing logical volumes and the file systems contained within them is quite easy, as long as their is unallocated space in the volume group.
The server which is housed at the datacenter only has a single 1TB drive. Just to confirm, LVM allows you to increase and decrease space on any partition on the fly, but setting each volume manually with EXT4 is a physical mount?
If I were to set hard limits by setting each volume on EXT4 (not using the LVM option), do you recommend only setting up a /, /boot, and SWAP? In the past this was my partition scheme:
Root filesystem (/) = 10240MB (10GB) /boot = 200MB swap = 1024MB (1GB) /var = 20480MB (20GB) /tmp = 10240MB (10GB) /usr = 51200MB (50GB) /home = all remaining space on the drive
Is the above a bad partition?
Man, a thread like this could go on for a long, long time......
In the last couple of years I find myself more in the John r. camp.
Keeping OS separated from data.
Having the OS on a 10gb part and keeping all data, including home dirs off the OS. part.
Your OS is not likely to grow much, but your data will and it's very easy to move/copy the data partitions more manageable for backups too.
I use this kind of set up on hosts on ESXi, windows, EC2.
What's you backup strat, how about disaster recovery?
Do you need snap shots, or do you need to freeze the file system or mount data part ro for your backups?
Ext4, XFS, reiserfs, LVM, ....................
cough, cough, I'm very fond of zfs, sigh, maybe someday.
Keep in mind some file systems can grow, but not shrink.
I think the best bet is to install a couple of test systems vmware style and hack around a little.
Test your backup and disaster recovery methods, grow/shrink partitions, test associated fs tools.
You might find you're more comfortable doing/using certain things.
oh....
disk1 /boot / /swap disk2 /data (including home if needed)
my 2c