LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2016, 06:43 AM   #1
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Rep: Reputation: Disabled
Partition scheme on a hosting plan


I got a dedicated server (low cost) and the partition scheme looks something like this:

1) 1004.5K - type BIOS - boot partition - primary
2) 19.5G - type Linux - filesystem - primary
3) 1.8T - type Linux - filesystem - primary
4) 511M - type Linux - swap - primary

It is something like this:

1) primary - ext4 - / - 20GB
2) primary - ext4 - /home - 1980GB
3) primary - swap - swap - 512MB

I understand the swap space (even though it could be probably larger, since the plan comes with 4GB of RAM <how large should it be?>) but what is the purpose of the 20GB one?
 
Old 01-07-2016, 07:37 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864
Regarding the swap partition, it should be as large as needed for your specific workload, general rules are not of much worth.
In your partition scheme you have a 20GB partition for system files (binaries, libraries, configuration files, logs, ...) and a partition for user data called /home. This is done to separate user files from system files, so that you can reinstall the OS without having to backup and restore the user data. Of course that doesn't mean you shouldn't backup the user data before doing system critical changes, but it simplifies many things.
 
Old 01-07-2016, 09:16 AM   #3
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
prntscr.com screenshot

It looks something like this. I am still researching this / looking into it, but what would be all the tmpfs and the devtmpfs. I guess it is temporary file system, but what is this for?

So the 20G one is /dev/root mounted on /
1.8T one is /dev/sda3 mounted on /home

What would be the /dev, /dev/shm, /run, /sys/fs/group, and /run/user/0 ones?

### Edit:

I guess I only care about / (the 20GB one), and /home (1.8T one), and I can increase the size of the swap one, if needed. The other ones are some kind of temporary file systems that are there because of how the system (CentOS7) works...

Last edited by AdultFoundry; 01-07-2016 at 09:21 AM.
 
Old 01-07-2016, 09:26 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,102

Rep: Reputation: 4144Reputation: 4144Reputation: 4144Reputation: 4144Reputation: 4144Reputation: 4144Reputation: 4144Reputation: 4144Reputation: 4144Reputation: 4144Reputation: 4144
tmpfs are used to create filesystems which can be lost when you switch off your host. They are simply stored in RAM because it is much faster than anything else.
/ is used to hold the os itself and /home is for the files of the users.
 
Old 01-07-2016, 09:35 AM   #5
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
I will be the only user of this hosting plan. Most of what I will be doing is hosting websites (mostly picture files). The DocumentRoot for Apache web server is /var/www/html, so I guess, based on this /home layout, I will be running it from /home? I mean I can do that, but would I consider changing something with this (file system / partitions, to begin with)? Or just leave it as is?

### Edit:

I guess I will leave it as is and work from this / and /home model, since this is good.

Last edited by AdultFoundry; 01-07-2016 at 09:40 AM.
 
Old 01-07-2016, 10:02 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864
For more information about the different directories in your Linux system and what their purpose is I recommend to read the Linux Filesystem Hierarchy Standard: https://wiki.linuxfoundation.org/en/FHS
 
Old 01-07-2016, 10:16 AM   #7
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
"Swap space can be a dedicated swap partition (recommended), a swap file, or a combination of swap partitions and swap files.

Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB.

So, if:

M = Amount of RAM in GB, and S = Amount of swap in GB, then
If M < 2
S = M *2
Else
S = M + 2

Using this formula, a system with 2 GB of physical RAM would have 4 GB of swap, while one with 3 GB of physical RAM would have 5 GB of swap. Creating a large swap space partition can be especially helpful if you plan to upgrade your RAM at a later time.

For systems with really large amounts of RAM (more than 32 GB) you can likely get away with a smaller swap partition (around 1x, or less, of physical RAM)."

https://www.centos.org/docs/5/html/D...swapspace.html
 
Old 01-07-2016, 10:26 AM   #8
AdultFoundry
Member
 
Registered: Jun 2015
Posts: 282

Original Poster
Rep: Reputation: Disabled
I did not do anything to the hosting plan, and I can just reinstall the system. I increased the swap partition to 5926MB / 5.926 GB (based on S=M+2, 4GB RAM -> 6GB swap). I am already installing it with the 20GB / directory. Would it make some kind of sense to increase the size of it too (or change its size)?
 
Old 01-08-2016, 07:13 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864Reputation: 4864
Again, those kind of general rules about swap size are bogus and have no real meaning. The size swap should have on your system is solely dependent on your workload. I currently have two systems running totally without swap (one with 4GB, one with 16GB of RAM), and they are running totally fine since their workload never exceeds that amount of physical memory installed.
Having said that, it doesn't matter if you have to much swap, though it will matter if you have not enough, so if you feel safer with adding more swap there is not much wrong with it, especially when using disks that large that a few GB less of usable space don't matter.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up back up on CentOS7 hosting plan AdultFoundry Linux - Server 4 12-17-2015 08:47 AM
The best way of setting up back up on a CentOS 7 hosting plan AdultFoundry Linux - Server 1 12-10-2015 11:24 AM
LXer: Hostmysite.com Unveils New $2.95 Linux Hosting Plan LXer Syndicated Linux News 0 06-17-2006 10:54 AM
LXer: Exabytes Upgrades Linux Hosting Plan LXer Syndicated Linux News 0 12-31-2005 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration