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 08-28-2012, 01:14 PM   #106
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947

Quote:
Originally Posted by Aunnix View Post
http://www.tldp.org/LDP/lame/LAME/li...titioning.html

Is the information on this page good advice? Especially when it comes to dividing up the HDD space for the partitions? Just wondering what you thoughts you guys may have..
That is incredibly old, I wouldn't follow it. Partitioning "rules" have changed over the years as drives have gotten bigger and different directories are used for different things.

Personally, I would just give everything to / except for a small (maybe 2GB) swap partition. Once you move /home onto the RAID, you'll end up with three total partitions. A 2GB swap, a 58GB /, and a 750GB /home. If you'll be running a lot of services that write to /var (log files), you may consider giving that its own separate partition, so that if one of them runs a muck it won't fill up your / partition and bring down the system. Other than that, it's all personal preference. Some people like to give /etc/ its own partition so that system config files can be retained through wiping and reinstalling the OS. Some people like to install shared programs/data in /usr, so they give that its own paritition so it can be retained through wiping and reinstalling the OS. None of this is necessary though, it's all personal preference, and it all depends on what you plan to do with the system, where you're going to be putting your data, etc. The only partition that's NEEDED is /. Swap is highly recommended though. Everything after that is just user preference.

Last edited by suicidaleggroll; 08-28-2012 at 01:18 PM.
 
Old 08-28-2012, 02:00 PM   #107
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
That is incredibly old, I wouldn't follow it. Partitioning "rules" have changed over the years as drives have gotten bigger and different directories are used for different things.

Personally, I would just give everything to / except for a small (maybe 2GB) swap partition. Once you move /home onto the RAID, you'll end up with three total partitions. A 2GB swap, a 58GB /, and a 750GB /home. If you'll be running a lot of services that write to /var (log files), you may consider giving that its own separate partition, so that if one of them runs a muck it won't fill up your / partition and bring down the system. Other than that, it's all personal preference. Some people like to give /etc/ its own partition so that system config files can be retained through wiping and reinstalling the OS. Some people like to install shared programs/data in /usr, so they give that its own paritition so it can be retained through wiping and reinstalling the OS. None of this is necessary though, it's all personal preference, and it all depends on what you plan to do with the system, where you're going to be putting your data, etc. The only partition that's NEEDED is /. Swap is highly recommended though. Everything after that is just user preference.

Yeah, I've noticed alot of it seems to be personal preference. And, I knew that was pretty old, lol, just wondering if some of the logic stills holds true.. I think I need to research each partition some more and find out what files will they handle. I do plan to throw a SWAP partition together.

The way I was looking at it, was there is no need for additional "users" (besides root and me so I was going to name the me as "all" for the user) so I didn't think the /usr partition was necessary and wasn't planning to use it. I was also under the impression that any packages or software I install would be located on the / partition and not the /usr.

The main reason I'd like to separate the other partitions (/etc, /var, /tmp, etc..) is 2 reasons... 1. I hear it's good practice in regards to security and 2. if they are housing files that I would make changes to regularly, I assumed it would be better to have them as their own partitions?

Here is what I am imagining for the 60GB HDD (and the system will be used mostly for web development)..

/ - 8GB (this is about 10-15% of the 60GB HDD, but being the system partition should I just let this use the remainder of space after separating the other partitions?)
SWAP - 4GB (half of the amount of RAMM I have, and with /home on the RAID I have all 60GB to work with... why not give it some extra?)
/home - 750GB mounted to RAID (size won't matter because it will share the space on the / partition? at least during the initial setup)
/var - ?GB (with it being a web server, I assume I will be using a few services that write log files to /var?)
/usr - ?GB will hold software and packages so I can do reinstalls without losing them (can I create a different partition for these, or do they automatically get installed on the /usr partition? I'd like to create a new partition so I can name it /packs or /soft or soemthing...)
/etc - ?GB partitioned for extra security... no system config files on /
/tmp - ?GB (not sure if I should partition this one or not... I don't know how often I'd need to use this since it's like temporary downloads/files?)

I'm mostly worried about what sizes the partitions should be as I don't want to "short change" any of them. For example, I feel like / should be quite large being the system, but /usr will need to be quite large to make sure I have room for PLENTY of packages (in case I find more to run after getting up an running with my currents plans). I plan to dedicate my whole 60GB HDD to the OS, packages, and any "system" related files.

Last edited by Aunnix; 08-28-2012 at 02:02 PM.
 
Old 08-28-2012, 02:50 PM   #108
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by Aunnix View Post
The way I was looking at it, was there is no need for additional "users" (besides root and me so I was going to name the me as "all" for the user) so I didn't think the /usr partition was necessary and wasn't planning to use it. I was also under the impression that any packages or software I install would be located on the / partition and not the /usr.
The name '/usr' does suggest that it is a place to store users' files, however that is by no means the conventional purpose (the /home directory tree serves that purpose). /usr should be treated as a read-only tree, where additional packages not normally part of a standard installation are loaded (normally where root installs system-wide stuff). I don't think it is very conventional to dedicate a partition to the /usr directory.

--- rod.
 
Old 08-28-2012, 03:11 PM   #109
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Quote:
Originally Posted by Aunnix View Post
The main reason I'd like to separate the other partitions (/etc, /var, /tmp, etc..) is 2 reasons... 1. I hear it's good practice in regards to security and 2. if they are housing files that I would make changes to regularly, I assumed it would be better to have them as their own partitions?
It has nothing to do with security or regularly changing files. There are basically two reasons to separate a given directory onto its own partition:

1) If system services are regularly writing to that directory, there is a chance it could fill up the filesystem without your knowledge (say something happens to your ftp server and it starts rapidly dumping out messages to its log file in the middle of the night or over the weekend). If it's located on /, this could cause some serious problems. If it's in its own partition, then those services trying to write to it will get angry, but the system as a whole will still function normally.

2) If you accidentally screw up and break the OS, or if you want to change or upgrade the OS, it can be nice to have separate partitions for system config files, user config files, data files, etc., so that they'll persist through the new OS install, rather than being wiped out along with the old OS.

I think your planned partitioning layout is excessive to a fault.

As I said above, do not give /home its own partition during installation. If you do, then as soon as you migrate onto the RAID this partition will be useless, just sitting there eating up hard drive space doing absolutely nothing.

For your first setup, you do not want to go overboard. I would just do swap, /, and then put /home on the RAID once you get it set up. Let everything else live on /. After you've used this system for a while, you can decide for yourself whether or not you want to use separate partitions for any or all of those directories, and you can look at your current usage to decide how big they need to be. I think by pre-allocating the sizes for SEVEN different partitions having never set up a system before, you're going to quickly back yourself into a corner.

Everybody, and every system is different. Not a single person here can tell you how YOU are going to use YOUR system, so nobody can tell you how big to make any of those partitions. I can tell you that on my home server (OpenSUSE, hosting all media files for my home through both NFS and SAMBA shares, running a web server, ftp server, etc), this is the current usage for those directories:
Code:
/      500MB (excluding below directories, since most of them do not have their own partition)
/home  1.5TB
/var   900MB
/usr   6.2GB
/etc   39MB
/tmp   0
My workstation at the office:
Code:
/      10.8GB (excluding below directories, since most of them do not have their own partition)
/home  2.0TB
/var   367MB
/usr   4.8GB
/etc   36MB
/tmp   3.1MB
One of the servers at the office:
Code:
/      2.1GB (excluding below directories, since most of them do not have their own partition)
/home  6.1TB
/var   857MB
/usr   53GB
/etc   36MB
/tmp   83MB
The only consistent one there is /etc. Until you know how YOU are going to use your system, don't overly constrain yourself by giving every single directory its own partition.

Last edited by suicidaleggroll; 08-28-2012 at 03:23 PM.
 
Old 08-28-2012, 03:16 PM   #110
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by theNbomr View Post
The name '/usr' does suggest that it is a place to store users' files, however that is by no means the conventional purpose (the /home directory tree serves that purpose). /usr should be treated as a read-only tree, where additional packages not normally part of a standard installation are loaded (normally where root installs system-wide stuff). I don't think it is very conventional to dedicate a partition to the /usr directory.

--- rod.
Ok. If I leave it as part of / though, I will have to reinstall all of the packages that I install and use over time the next time I decide to do an OS install? If so, will re installing all of the packages / software be a hassle later?
 
Old 08-28-2012, 03:25 PM   #111
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Quote:
Originally Posted by Aunnix View Post
Ok. If I leave it as part of / though, I will have to reinstall all of the packages that I install and use over time the next time I decide to do an OS install? If so, will re installing all of the packages / software be a hassle later?
Chances are you're going to have to re-install most of them anyway, unless the new OS install is exactly the same distribution and version as the one you had before. Just save the installation files for the packages you want, and it will be easy to re-install them later.
 
Old 08-28-2012, 03:49 PM   #112
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
It has nothing to do with security or regularly changing files. There are basically two reasons to separate a given directory onto its own partition:

1) If system services are regularly writing to that directory, there is a chance it could fill up the filesystem without your knowledge (say something happens to your ftp server and it starts rapidly dumping out messages to its log file in the middle of the night or over the weekend). If it's located on /, this could cause some serious problems. If it's in its own partition, then those services trying to write to it will get angry, but the system as a whole will still function normally.

2) If you accidentally screw up and break the OS, or if you want to change or upgrade the OS, it can be nice to have separate partitions for system config files, user config files, data files, etc., so that they'll persist through the new OS install, rather than being wiped out along with the old OS.

I think your planned partitioning layout is excessive to a fault.

As I said above, do not give /home its own partition during installation. If you do, then as soon as you migrate onto the RAID this partition will be useless, just sitting there eating up hard drive space doing absolutely nothing.

For your first setup, you do not want to go overboard. I would just do swap, /, and then put /home on the RAID once you get it set up. Let everything else live on /. After you've used this system for a while, you can decide for yourself whether or not you want to use separate partitions for any or all of those directories, and you can look at your current usage to decide how big they need to be. I think by pre-allocating the sizes for SEVEN different partitions having never set up a system before, you're going to quickly back yourself into a corner.

Everybody, and every system is different. Not a single person here can tell you how YOU are going to use YOUR system, so nobody can tell you how big to make any of those partitions. I can tell you that on my home server (OpenSUSE, hosting all media files for my home through both NFS and SAMBA shares, running a web server, ftp server, etc), this is the current usage for those directories:
Code:
/      500MB
/home  1.5TB
/var   900MB
/usr   6.2GB
/etc   39MB
/tmp   0

Sorry. I didn't mean for it to look like I was suggesting setting up /home as a separate partition. I just listed it so it would be accounted for, lol. I have do a question in regards to /home being on the / partition... what happens to my data on /home if I decide/need to upgrade or reinstall the OS? Will the data still be intact?

Setting up the system with the 3-4 partitions makes sense. I'll just have to figure out how to "track" what services are writing to what directories and how fast / how much they do their writing. Then, just start from scratch after a couple months..

As for security, I didn't really want to upload any of my data until I'm secure on the web... How does this work? Are there packages for securing your network that I should install before setting up any web / sharing packages? Or, do I setup security through the packages as I install them?
 
Old 08-28-2012, 03:55 PM   #113
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Chances are you're going to have to re-install most of them anyway, unless the new OS install is exactly the same distribution and version as the one you had before. Just save the installation files for the packages you want, and it will be easy to re-install them later.
Do I need to save them to a separate partition though? Because if the packages are installed on /usr which is on the / partition... won't they be deleted if I reinstall the OS because they are part of the / partition? Would I just move the download/installation files to my /home setup?

Last edited by Aunnix; 08-28-2012 at 03:57 PM.
 
Old 08-28-2012, 03:58 PM   #114
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Security will depend on the distro use you. Most will have some kind of firewall built in, such as SELinux. Other than that...don't log in as root unless you need to do something that requires root permissions, don't browse the web as root, etc., shut down services you don't need/use, keep the system updated, and it's unlikely you'll have any problems. I would also disable root SSH login, you can do that through the sshd config file.


As for /home, I'm not sure I understand your question. /home will only be on the / partition for the first few minutes/hours that you are running the system. One of the first things you will do is migrate everything in the /home directory onto the RAID, then replace /home with the version from the RAID. At that point, /home will no longer be on /'s partition, it will be on its own partition on the RAID, so you can do anything you want with / and the OS without affecting it.
 
Old 08-28-2012, 04:07 PM   #115
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
Security will depend on the distro use you. Most will have some kind of firewall built in, such as SELinux. Other than that...don't log in as root unless you need to do something that requires root permissions, don't browse the web as root, etc., shut down services you don't need/use, keep the system updated, and it's unlikely you'll have any problems. I would also disable root SSH login, you can do that through the sshd config file.


As for /home, I'm not sure I understand your question. /home will only be on the / partition for the first few minutes/hours that you are running the system. One of the first things you will do is migrate everything in the /home directory onto the RAID, then replace /home with the version from the RAID. At that point, /home will no longer be on /'s partition, it will be on its own partition on the RAID, so you can do anything you want with / and the OS without affecting it.

Ok. I'm quite worried about my security, haha. I'd like to build a CMS in PHP and mySQL, but I'm afraid to put it online because I worry about security holes, lol.

And, you got me about /home. I basically wanted to make sure that once I move /home to the RAID setup, anything I do to the OS on the / partition will not affect my data (music, web sites, videos) on /home.
 
Old 08-28-2012, 07:17 PM   #116
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Quote:
For your first setup, you do not want to go overboard. I would just do swap, /, and then put /home on the RAID once you get it set up. Let everything else live on /. After you've used this system for a while, you can decide for yourself whether or not you want to use separate partitions for any or all of those directories, and you can look at your current usage to decide how big they need to be. I think by pre-allocating the sizes for SEVEN different partitions having never set up a system before, you're going to quickly back yourself into a corner.
This ++
You're definitely over-thinking it

In any case we've all ended up doing a few re-installs in our early days before we got a handle on exactly what we want and how the system responds to that; each system is unique.

Just make sure you backup key data files and any amended cfg files; basically any changes you make.
Eventually you may(!) want a separate partition for /var (ie logs) if you are going to go public with this, in case of runaway progs (or security breaches; see below) as mentioned.

I wouldn't rush to go on the net until you've
a) got all the progs etc working the way you want them to and THEN(!)
b) read all the Stickies on the Security forum and implement+test(!) all the relevant suggestions.
This is going to take a while; don't try to rush it.
 
2 members found this post helpful.
Old 08-28-2012, 08:37 PM   #117
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
This ++
You're definitely over-thinking it

In any case we've all ended up doing a few re-installs in our early days before we got a handle on exactly what we want and how the system responds to that; each system is unique.

Just make sure you backup key data files and any amended cfg files; basically any changes you make.
Eventually you may(!) want a separate partition for /var (ie logs) if you are going to go public with this, in case of runaway progs (or security breaches; see below) as mentioned.

I wouldn't rush to go on the net until you've
a) got all the progs etc working the way you want them to and THEN(!)
b) read all the Stickies on the Security forum and implement+test(!) all the relevant suggestions.
This is going to take a while; don't try to rush it.
In order to run the web server and file server, doesn't the machine need to be online?
 
Old 08-28-2012, 08:42 PM   #118
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by chrism01 View Post
This ++
You're definitely over-thinking it

In any case we've all ended up doing a few re-installs in our early days before we got a handle on exactly what we want and how the system responds to that; each system is unique.
Couldn't agree more. Doing a re-install isn't a sign of weakness or failure. I recommend planning on at least one re-install. Just don't spend a huge amount of time installing and configuring stuff. Anything you really do want to keep, burn to DVD or copy to some other host temporarily.

--- rod.
 
Old 08-28-2012, 08:44 PM   #119
Aunnix
Member
 
Registered: Aug 2012
Posts: 126

Original Poster
Rep: Reputation: Disabled
So, I've installed the base system and have made it to the command line. Yay!

I'm having an issue with "overscan" on the monitor though. Any ideas on how I can fix this? It's not real bad but it cuts off the first few letters of of each line, so some of the information during start up is easily missed.
 
Old 08-28-2012, 09:40 PM   #120
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Quote:
In order to run the web server and file server, doesn't the machine need to be online?
It needs to be up and running; it does NOT need to be available on the internet.
It just needs to either listen on 127.0.01 & test from the on board GUI, or use the normal address and add a client system to your LAN.
Latter is more realistic.
 
  


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
LXer: Easy way to Build FTP server in Ubuntu Server 12.04 LXer Syndicated Linux News 0 05-29-2012 09:10 AM
jenkins continuous build server not starting application userbrian Programming 2 03-31-2012 03:12 PM
Starting to build a cluster martins48 Linux - Software 4 10-21-2011 06:33 PM
Building my first home server - atom based router/file server build need advice mothergoose729 Linux - Networking 5 03-23-2010 04:19 AM
starting xprogram without starting X server. bruse Linux - Newbie 9 04-26-2005 08:05 PM


All times are GMT -5. The time now is 11:00 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