I am going to deploy Ubuntu server having following servers on it:
- Bind server
- DHCP server
- LAMP Server
- OpenSSH Server
- Ldap server
- Mongodb database
- FTP server
- Mail server
- Samba server
- NFS server
- In the future, I want to set up Openstack for PAAS.
I currently have a Raid 5 filesystem with 10TB storage.
How should I set up my partition scheme?
I am looking to ensure that I don't have problems in future and that storage size can be easily expanded. Can you suggest a partition scheme giving specific percentage of storage to partitions like /
, /boot
, /var
, /etc
?
Before you decide on partitioning schemes it might help to actually understand the reasons for splitting various parts of the linux.
Firstly multiple partitions are 'safer' since if one filesystem is damaged, the others should be alright. This won't save you from a disk failure. Backups would, as might the parity scheme in your raid level.
Secondly it was a way to use multiple drives of different styles before LVM - this is moot for you
Source - Linux Installation and getting started
In short, the multi partition scheme is sort of a relic of older times, continued for legacy reasons. If you need to ask why, you're better off with a single partition.
In the modern context the smart partitioning method would be to use a single large partition (and a second one, optionally for swap, swap files would be an option). Use LVM so you can add disks if you can if you think you may need to add space. A single large partition means things will handle themselves as long as there's enough space, and you can backup /etc/ /user/local and /home, and use that and a list of installed packages should a bare metal recovery be needed.
I generally recommend a
/boot
of 1GB, a/
of 20GB, and a/data
which uses the rest of the available space. This is so that you can get through afsck /
in a hurry if need be; nothing sucks more than having to sit through three hours or more of fsck just to see if your system will be willing to boot at all!Aside from that, be sure to use LVM on top of your RAID5; it's hard to give further advice without knowing more details of your RAID array - is it hardware, or is it kernel RAID (mdraid)? Etc.
One other note - you might consider RAID10 instead of RAID5, depending on how serious your space needs are. RAID10 will give you less available storage for the same number and size of drives (n/2 instead of n-1), but it will be both higher performance and more resilient in the event of device failure than RAID5. (It will also be much, much, MUCH higher performance when actually running in degraded mode if and when a device DOES fail.)
There can be no perfect answer to this question, the best one can say is that it depends. The size of
/
,/boot
and/etc
don't need too be too much. Where you actually need space is where you'll be storing your content i.e. the websites or user emails etc. This can be configured too but if they're in/var
then that's where most of the space would be needed.10 TB sounds awesome but one can't be future proof, linux always allows you to add more media and mount them as a subdirectory of say
/var
in your case giving you and your users a transparent view.I haven't gone into percentages and specifics because those would depend on a case to case basis but I hope that you get an idea.