USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Partition Scheme For A Basic Server
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Servers and Server Administration
View previous topic :: View next topic  
Author Message
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Tue Dec 30, 2024 3:21 pm    Post subject: Partition Scheme For A Basic Server Reply with quote

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
View user's profile Send private message
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Tue Dec 30, 2024 4:53 pm    Post subject: Re: Partition Scheme For A Basic Server Reply with quote

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.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
mushroom
Ultimate Member


Joined: 29 Jun 2024
Posts: 2129
Location: Queen Charlotte B. C. Canada

PostPosted: Tue Dec 30, 2024 5:30 pm    Post subject: Re: Partition Scheme For A Basic Server Reply with quote

richard wrote:

sda1
/swap - 2GB
/boot - 100mb
/var - 4GB
/root - remainder

sda
/home 500GB


Rethink the "/var - 4GB" partition Exclamation

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
View user's profile Send private message Visit poster's website
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Tue Dec 30, 2024 6:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
platinummonkey
Advanced Member


Joined: 01 Mar 2024
Posts: 732
Location: Texas

PostPosted: Tue Dec 30, 2024 6:44 pm    Post subject: Reply with quote

My suggestion: (assuming sda1 is the 80gb, and sda2 is the 500gb)

sda1:
swap - 4GB (why not.. you have the space Wink)
/boot - 300mb (ubuntu tends to leave older kernels behind... quite annoying imo, save yourself a headache Wink unless you are committed to removing older kernels Wink then 100mb will get you about 2 kernels and 1 fallback Razz)
/var - 20Gb (why? because this can get large think about it... /var/spool/mail.... all the logs... etc Razz)
/etc - 1GB (just holds configs, and some rc scripts at boot, 1gb is probably overkill at that Razz)
/ - 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 Wink
/home - the rest Razz, I would also suggest making backups of /boot to here
as well plus maybe more Razz (should that 80gb drive die on you and ppl want their stuff right then... Razz)



_________________
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
View user's profile Send private message Visit poster's website AIM Address
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Tue Dec 30, 2024 7:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
platinummonkey
Advanced Member


Joined: 01 Mar 2024
Posts: 732
Location: Texas

PostPosted: Tue Dec 30, 2024 7:15 pm    Post subject: Reply with quote

make a raid 1 with the 2 500's Razz (uber backup Razz)



_________________
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
View user's profile Send private message Visit poster's website AIM Address
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Tue Dec 30, 2024 7:34 pm    Post subject: Reply with quote

@ 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
View user's profile Send private message
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Tue Dec 30, 2024 8:01 pm    Post subject: Reply with quote

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.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Tue Dec 30, 2024 8:08 pm    Post subject: Reply with quote

@ 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
View user's profile Send private message
Lord.DragonFly.of.Dawn
Advanced Member


Joined: 18 Jul 2024
Posts: 607
Location: South Portland, Maine, USA, Earth, Sol System

PostPosted: Tue Dec 30, 2024 11:27 pm    Post subject: Reply with quote

platinummonkey wrote:
My suggestion: (assuming sda is the 80gb, and sdb is the 500gb)

sda:
swap - 4GB (why not.. you have the space Wink)
/boot - 300mb (ubuntu tends to leave older kernels behind... quite annoying imo, save yourself a headache Wink unless you are committed to removing older kernels Wink then 100mb will get you about 2 kernels and 1 fallback Razz)
/var - 20Gb (why? because this can get large think about it... /var/spool/mail.... all the logs... etc Razz)
/etc - 1GB (just holds configs, and some rc scripts at boot, 1gb is probably overkill at that Razz)
/ - 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 Wink
/home - the rest Razz, I would also suggest making backups of /boot to here
as well plus maybe more Razz (should that 80gb drive die on you and ppl want their stuff right then... Razz)


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
View user's profile Send private message Visit poster's website
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Wed Dec 31, 2024 12:30 am    Post subject: Reply with quote

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.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
platinummonkey
Advanced Member


Joined: 01 Mar 2024
Posts: 732
Location: Texas

PostPosted: Wed Dec 31, 2024 12:37 am    Post subject: Reply with quote

my mistake guys Razz lol, i was actually supposed to be working when i wrote that Razz lol, so i was trying not to get caught Razz (over the winter break, im continuing my internship as an engineer in a medical company Razz)

and you could still do lvm.. you can just install the kernel module and packages from apt Razz

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 Razz its the fact that it is two distinguished block devices that counts Razz); but, thanks for the catch on that mistake Wink Razz



_________________
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, 2024 12:41 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website AIM Address
masinick
Linux Guru


Joined: 03 Apr 2024
Posts: 8615
Location: Concord, NH

PostPosted: Wed Dec 31, 2024 12:39 am    Post subject: Reply with quote

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.



_________________
Brian Masinick
Distros: SimplyMEPIS
sidux - no CAPS!, antiX, Debian
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
eriefisher
Jr. Member


Joined: 12 Jul 2024
Posts: 89

PostPosted: Wed Dec 31, 2024 2:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Servers and Server Administration All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse