View previous topic :: View next topic |
Author |
Message |
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
Posted: Tue Dec 30, 2025 3:21 pm Post subject: Partition Scheme For A Basic Server |
|
|
I'm in the process of sorting out a basic file server for work running Ubuntu 8.04 LTS. I would have rather installed the server version but the guys wanted a nice GUI to use. However I digress, I'm looking at the partition layout for the machine and wanted to know what you guys thought before I actually set the thing up.
The machine in question has an 80GB IDE drive and a 500GB SATA drive installed and I was thinking of laying out the partitions as follows:
sda1
/swap - 2GB
/boot - 100mb
/var - 4GB
/root - remainder
sda
/home 500GB
Just so you know the server going to be used to house a client machine images, cd images and the software that we use on a regular basis. We are also going to be looking at using it as a caching proxy running squid at some point in the future.
_________________ Windows Vista / Ubuntu 8.10
|
|
Back to top |
|
masinick Linux Guru

Joined: 03 Apr 2025 Posts: 8595 Location: Concord, NH
|
Posted: Tue Dec 30, 2025 4:53 pm Post subject: Re: Partition Scheme For A Basic Server |
|
|
richard wrote: | I'm in the process of sorting out a basic file server for work running Ubuntu 8.04 LTS. I would have rather installed the server version but the guys wanted a nice GUI to use. However I digress, I'm looking at the partition layout for the machine and wanted to know what you guys thought before I actually set the thing up.
The machine in question has an 80GB IDE drive and a 500GB SATA drive installed and I was thinking of laying out the partitions as follows:
sda1
/swap - 2GB
/boot - 100mb
/var - 4GB
/root - remainder
sda
/home 500GB
Just so you know the server going to be used to house a client machine images, cd images and the software that we use on a regular basis. We are also going to be looking at using it as a caching proxy running squid at some point in the future. |
A couple of edits to make sure that we are on the same page, then comments. First, I am assuming that sda is where you are keeping the first four file systems. In that case, they would be sda1, sda2, sda3, and sda4. The second disk, then, would presumably be sdb, and you would use sdb1 to hold the entire /home directory.
The overall scheme seems reasonable. As far as /root, you would not want to give the directory, /root the remainder of the space, you would want to give it to / instead because /root is the directory for the root user account, and you need no special provision for it.
Depending on your workload, you may wish to consider kicking up the 4 GB /var partition even higher, but that number is OK to start with. Since this is a server, you may also find reasons to consider a separate /tmp partition and possibly breaking /var up into various partitions. Again, this all depends on expected workload.
With the notes I've mentioned, sticking with the general layout suggested might be a good start, but I'd look at /tmp, /var/tmp, and maybe /var/log as possibilities for their own partitions. Depends how much control you want and how much effort you want to put into it. Of course, adding more partitions then means that you have to get into the use of extended and logical partitions on your first drive. |
|
Back to top |
|
mushroom Ultimate Member

Joined: 29 Jun 2025 Posts: 2128 Location: Queen Charlotte B. C. Canada
|
Posted: Tue Dec 30, 2025 5:30 pm Post subject: Re: Partition Scheme For A Basic Server |
|
|
richard wrote: |
sda1
/swap - 2GB
/boot - 100mb
/var - 4GB
/root - remainder
sda
/home 500GB
|
Rethink the "/var - 4GB" partition
Log and data base files can fill up "/var" very quickly.
_________________ SuSE 8.0, 8.2, 9.0, 9.1, 9.2, 9.3, 10.0, 10.1, 10.2, 10.3, 11.0, 11.1
Live CDs Mepis 8.0, Puppy 4.3.1, netbook- Zenwalk 6.2
|
|
Back to top |
|
crouse Site Admin

Joined: 17 Apr 2025 Posts: 11831 Location: Iowa
|
Posted: Tue Dec 30, 2025 6:36 pm Post subject: |
|
|
80GB IDE drive and a 500GB SATA drive
sda1
/swap - 2gb (Probably don't need this much, but it's actually what I put in for swap as well -- my swap=ram when over 1gb)
/boot - 100mb (this is about 2 or 3 times the size required)
/var - 40gb (Probably holds all the log files......and possibly the websites-unless running in /home/SOMEUSER/www/)
/tmp - 10gb (several reasons to put /tmp in it's own spot... forces max space allowed, easy to remove executable permissions, etc)
/root - 25gb (should only hold installed programs - 25gigs installed programs is HUGE)
possibly /etc/ at 3gb......just config files, but nice to have on their own partition as well. Could be in /root , my /etc/ is just under 26mb on my arch system........ other systems could be quite different.
sda
/home 500GB
_________________ Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
|
|
Back to top |
|
platinummonkey Advanced Member

Joined: 01 Mar 2025 Posts: 732 Location: Texas
|
Posted: Tue Dec 30, 2025 6:44 pm Post subject: |
|
|
My suggestion: (assuming sda1 is the 80gb, and sda2 is the 500gb)
sda1:
swap - 4GB (why not.. you have the space )
/boot - 300mb (ubuntu tends to leave older kernels behind... quite annoying imo, save yourself a headache unless you are committed to removing older kernels then 100mb will get you about 2 kernels and 1 fallback )
/var - 20Gb (why? because this can get large think about it... /var/spool/mail.... all the logs... etc )
/etc - 1GB (just holds configs, and some rc scripts at boot, 1gb is probably overkill at that )
/ - remainder
sda2:
/backup - 20 GB - create a copy of /etc, /boot, and whatever else you think is important... trust me, if that head falls on that 80GB drive, you'll thank me for this
/home - the rest , I would also suggest making backups of /boot to here
as well plus maybe more (should that 80gb drive die on you and ppl want their stuff right then... )
_________________ desktop - FreeBSD 7.2
laptop & server - Archlinux i686 kernel26 2.6.32.10-1
- TAMULinux-2.0.2-ALPHA
USB Boot - Archlinux i686 kernel26 2.6.32.10-1 USB boot
|
|
Back to top |
|
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
Posted: Tue Dec 30, 2025 7:07 pm Post subject: |
|
|
My mistake guys with the 2 hard drives it has been a busy day at work today. There is going to a slight change here as I have found another 500 GB drive in the workshop this time an IDE drive so I'm going to add that as well into the mix so there will now be an 80 IDE drive and 2 500 GB drives in the box.
_________________ Windows Vista / Ubuntu 8.10
|
|
Back to top |
|
platinummonkey Advanced Member

Joined: 01 Mar 2025 Posts: 732 Location: Texas
|
|
Back to top |
|
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
Posted: Tue Dec 30, 2025 7:34 pm Post subject: |
|
|
@ platinummonkey - That thought crossed my mind at first but then I remembered that drives are different 1 SATA and 1 IDE so I cannot use the boards onboard raid. I then thought about using LVM but realised that I could only do that at install if I used the server version of Ubuntu.
_________________ Windows Vista / Ubuntu 8.10
|
|
Back to top |
|
masinick Linux Guru

Joined: 03 Apr 2025 Posts: 8595 Location: Concord, NH
|
Posted: Tue Dec 30, 2025 8:01 pm Post subject: |
|
|
I think that I like Dave's numbers - they are more in keeping with what I had in mind, but I do not have any recent server experience, so I could not give decent values myself. I do know that fifteen or more years ago when I administered systems, we definitely used specific partitions for /var and /tmp, and even went so far as to split out /var/log into its own partition because of the size of the logs having the potential to fill up /var. You may still want to consider having a /var/log partition for the logs (and make it big) and have a /var for the rest of /var.
If you intend to have a lot of Email, consider a separate /var/spool or /var/spool/mail partition for the same reason. In fact, that is a must on an active mail server. We had four UNIX servers in our UNIX Engineering Group at Digital Equipment in the nineties. We had numerous disks managing the /home directories, and we had specific partitions for every feature that I have mentioned - a partition for mail, a partition for /var/log, a partition for /tmp, and probably a few others that I have not thought of. I know that we even had at least one special partition for /contrib, a user contributed software library that we added on to Digital UNIX. If we had fewer than thirty distinct partitions, I would be surprised, and we had many more than that which we could mount using NFS. |
|
Back to top |
|
richard Ultimate Member

Joined: 13 Apr 2025 Posts: 2730 Location: Kent, United Kingdom
|
Posted: Tue Dec 30, 2025 8:08 pm Post subject: |
|
|
@ masinick - We are not going to use the server for email just file storage and as a caching proxy eventually.
_________________ Windows Vista / Ubuntu 8.10
|
|
Back to top |
|
Lord.DragonFly.of.Dawn Advanced Member

Joined: 18 Jul 2025 Posts: 606 Location: South Portland, Maine, USA, Earth, Sol System
|
Posted: Tue Dec 30, 2025 11:27 pm Post subject: |
|
|
platinummonkey wrote: | My suggestion: (assuming sda is the 80gb, and sdb is the 500gb)
sda:
swap - 4GB (why not.. you have the space )
/boot - 300mb (ubuntu tends to leave older kernels behind... quite annoying imo, save yourself a headache unless you are committed to removing older kernels then 100mb will get you about 2 kernels and 1 fallback )
/var - 20Gb (why? because this can get large think about it... /var/spool/mail.... all the logs... etc )
/etc - 1GB (just holds configs, and some rc scripts at boot, 1gb is probably overkill at that )
/ - remainder
sdb:
/backup - 20 GB - create a copy of /etc, /boot, and whatever else you think is important... trust me, if that head falls on that 80GB drive, you'll thank me for this
/home - the rest , I would also suggest making backups of /boot to here
as well plus maybe more (should that 80gb drive die on you and ppl want their stuff right then... ) |
Sorry, but the errors bug me... You partition an entire drive (hda, hdd, sda, sde, etc) not a partition on a drive (hda1, hdd5, sda13, sde2, etc)
Unless you are doing something very weird with your setup that is...
_________________ ArchLinux x86_64 - Custom Built Desktop
ArchLinux x86_64 - Compaq CQ50 Laptop
ArchLinux i686 - Acer Aspire One Netbook
ArchLinux i686 - Dell Presario ze2000 (w/ shattered LCD)
PuppyLinux, CloneZilla, PartedMagic, DBAN - rescue thumbdrives
Windows 7 (x86_64 desktop alternate boot)
|
|
Back to top |
|
masinick Linux Guru

Joined: 03 Apr 2025 Posts: 8595 Location: Concord, NH
|
Posted: Wed Dec 31, 2025 12:30 am Post subject: |
|
|
Lord.DragonFly.of.Dawn wrote: |
Sorry, but the errors bug me... You partition an entire drive (hda, hdd, sda, sde, etc) not a partition on a drive (hda1, hdd5, sda13, sde2, etc)
Unless you are doing something very weird with your setup that is... |
Correct, you partition each disk drive into a group of primary - and potentially - extended and logical partitions as well, then you give each of them a file system type, such as ext3, SWAP, ReiserFS, JFS, XFS, or whatever. Here, since it is Ubuntu, it would presumably be ext3 and SWAP as the file system types.
From there, you create partitions, each of a certain size,and you assign mount points to those partitions. You use the file system table, /etc/fstab to create these assignments (or a tool that manipulates the table for you).
Since we are discussing Ubuntu, the GRUB boot manager is used to select the bootable image or images that are available on the system. |
|
Back to top |
|
platinummonkey Advanced Member

Joined: 01 Mar 2025 Posts: 732 Location: Texas
|
Posted: Wed Dec 31, 2025 12:37 am Post subject: |
|
|
my mistake guys lol, i was actually supposed to be working when i wrote that lol, so i was trying not to get caught (over the winter break, im continuing my internship as an engineer in a medical company )
and you could still do lvm.. you can just install the kernel module and packages from apt
but even still sda, sdb, hda, hdb are just standards, if you really wanted to you could easily make dev nodes to replace sda and sdb, and call them tsdf and lvas respectively (meaning it really doesnt matter its the fact that it is two distinguished block devices that counts ); but, thanks for the catch on that mistake 
_________________ desktop - FreeBSD 7.2
laptop & server - Archlinux i686 kernel26 2.6.32.10-1
- TAMULinux-2.0.2-ALPHA
USB Boot - Archlinux i686 kernel26 2.6.32.10-1 USB boot
Last edited by platinummonkey on Wed Dec 31, 2025 12:41 am; edited 1 time in total |
|
Back to top |
|
masinick Linux Guru

Joined: 03 Apr 2025 Posts: 8595 Location: Concord, NH
|
Posted: Wed Dec 31, 2025 12:39 am Post subject: |
|
|
crouse wrote: | 80GB IDE drive and a 500GB SATA drive
sda1
/swap - 2gb (Probably don't need this much, but it's actually what I put in for swap as well -- my swap=ram when over 1gb)
/boot - 100mb (this is about 2 or 3 times the size required)
/var - 40gb (Probably holds all the log files......and possibly the websites-unless running in /home/SOMEUSER/www/)
/tmp - 10gb (several reasons to put /tmp in it's own spot... forces max space allowed, easy to remove executable permissions, etc)
/root - 25gb (should only hold installed programs - 25gigs installed programs is HUGE)
possibly /etc/ at 3gb......just config files, but nice to have on their own partition as well. Could be in /root , my /etc/ is just under 26mb on my arch system........ other systems could be quite different.
sda
/home 500GB |
As noted, we are making mistakes in the naming conventions. We partition the drive sda into a number of partitions, beginning with sda1, sda2, etc. If we choose to create an extended partition, then the logical partitions in that extension can begin at sda5.
Similarly, the second disk is sdb, not sda or sda1. We create partitions there beginning with sdb1 in a similar manner.
The sda convention is commonplace. It has always been used for SCSI devices, but many distros have dropped hda, hdb, hdc, hdd naming conventions entirely in favor of sd, while others use a mix of the hd for IDE drives and sd for other drive types. |
|
Back to top |
|
eriefisher Jr. Member

Joined: 12 Jul 2025 Posts: 89
|
Posted: Wed Dec 31, 2025 2:39 am Post subject: |
|
|
Why make it so complicated? For just a basic file server install the os as usual and share out the available space.
My file/print server has two drives, a 10 gig with /, /swap and /home. The second drive is 250 gig which I mount in /home and share to the network. It's accessible via samba for a windows box(and Linux) and I also mount it locally via sshfs. I use this drive for all my backups and use grsync to keep everything in line. Nothing fancy.
The box is an old HP with a celeron 466 and 256mb of ram. There is also vncserver installed for further access since it runs headless.
Side note: By using the drives this way the os could fail or that drive fsil and my data is still in tact. Very simple.
|
|
Back to top |
|
|