LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 02-09-2013, 09:50 AM   #1
Vexe
Member
 
Registered: Feb 2013
Posts: 36

Rep: Reputation: Disabled
Is there any benefit of making a separate partition for home, root and boot partition


Some users put everything in one partition, some separate them, why? Isn't this painful?
What's the point of this? Is there a performance benefit out of it?

Can I that way, for example, say I wanna install a new Distro, rely on my home partition, so that all my preferences will be the same? Can I even make a partition for /usr/bin so that after I install, I already have my packages installed?

Thanks!
 
Old 02-09-2013, 10:03 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,524
Blog Entries: 51

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
For me that would depend on the purpose of the machine. For example on a server you might want to move a mount point directory to it's own disk on another controller for performance reasons or create a separate partition for a directory to keep it from filling a disk and so prevent it from halting operations. Many "modern" mainstream Linux distributions seem to have moved to a "/ + swap" layout, which may be "easier" for some types of end user, and as long as your reasoning makes sense and you watch for pitfalls you can basically turn any top level or subdirectory into a mount point should you really want to.
 
Old 02-09-2013, 10:08 AM   #3
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,168
Blog Entries: 23

Rep: Reputation: 275Reputation: 275Reputation: 275
Hi,

Okay, first of: welcome! Keep asking thiese kinda questions, and you'll be liked! Trust me, this is a great question.

In a simple answer: I prefer having things partitioned, and for good reasons.
One scenario: the disk (in one lump) floods. Oh dear. Well, that means that the OS does'nt have any way to do the housekeeping anymore. Ergo: forget booting up. What happens at boot is simple. Everything is a program, programs in a Linux system communicate with disk based sockets. Try it! Enter this in the console:

Quote:
netstat -anp
You'll get a long list where the second part is about the processes on the system...if these do not get a bit of disk, they'll not be able to communicate, and hence function. They crash and some try to restart/respawn...leaving you with a worthless system...
If the disk were partitioned, this would be far less of a problem. Performance issues? Not likely, disks are fast enough to handle this.

One scheme is simple: on a 80 Gb disk:

Quote:
/
.../boot (250Mb)
.../swap (system determines that)
.../system (35Gb or so)
.../home (the rest)
What happens is pretty transparent. In the "system" bit, there are two folders, boot and home. On boot-up, the bit of 250Mb gets mounted in to the boot folder and the remainder (the user space) gets mounted into the home folder. Try it out! Open a file manager and navigate to the boot folder. See the "disk size"???? Now, open the /usr folder. Different size. The big pro is that you can simply mount an external disk into a folder as well. If you'd spin it up (and it's connected) this is what you could do (of course, Linux does that for you nowadays)

Quote:
fdisk -l (to see what the disk is called)
mount /dev/[disk] /media/somedisk
And, entering the folder /media/somedisk, would yield a totally different disk size.

Your stuff stays isolated from "accidents" and, indeed, you could install something different in the system partition without affecting your user data...ainnit cool???

Thor

Last edited by Thor_2.0; 02-09-2013 at 10:10 AM.
 
Old 02-09-2013, 10:33 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware
Posts: 14,868
Blog Entries: 2

Rep: Reputation: 3804Reputation: 3804Reputation: 3804Reputation: 3804Reputation: 3804Reputation: 3804Reputation: 3804Reputation: 3804Reputation: 3804Reputation: 3804Reputation: 3804
There are some reasons for using separate partitions, but not all are applying to any use-case.
For example, if you have your /-partition on LVM or a software RAID you will need a separate /boot-partition to be able to start the system. Other than that it is not really needed.
A separate /home can be quite handy if you want to re-install the system without having to re-configure programs. Problems can occur if you use different distributions with different versions of software with a shared /home-partition, since the configuration files are possibly not compatible.
I used a separate /home for quite a while, but nowadays I prefer just a separate partition for data (mounted as /data) to keep data separated from the OS. Configuration files are backed up anyways automatically on my systems, so there is no need for me to have a separate /home.

Quote:
Originally Posted by Thor_2.0
One scenario: the disk (in one lump) floods. Oh dear. Well, that means that the OS does'nt have any way to do the housekeeping anymore. Ergo: forget booting up. What happens at boot is simple. Everything is a program, programs in a Linux system communicate with disk based sockets. Try it! Enter this in the console:

Quote:
netstat -anp
You'll get a long list where the second part is about the processes on the system...if these do not get a bit of disk, they'll not be able to communicate, and hence function. They crash and some try to restart/respawn...leaving you with a worthless system...
By default Linux filesystems have 5% of its capacity reserved for the root user, so that you can still boot the system for maintenance if the disk gets filled. So normally the system is neither worthless nor unbootable when disk flooding occurs.
 
Old 02-09-2013, 10:42 AM   #5
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,168
Blog Entries: 23

Rep: Reputation: 275Reputation: 275Reputation: 275
Quote:
By default Linux filesystems have 5% of its capacity reserved for the root user, so that you can still boot the system for maintenance if the disk gets filled. So normally the system is neither worthless nor unbootable when disk flooding occurs.
Well, yes...but I have been in the situation where my X server kept respawning due to lack of space...but, yes, there is that fail safe. Of course, I had that experience around 1999 or so, on a pre 2.4 kernel...
Nontetheless, there is a solid case PRO-partitioning...
Granted, on a server you could deviate, but I never do. I put the users in a separate partition, isolating the two (users and OS)....but, that's just me...
 
Old 02-09-2013, 12:28 PM   #6
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 358

Rep: Reputation: 28
i personally newer want a separate partitions. btw, software raid 1 very good work with only one / partition.
i may see some benefits /home on different partition, for may reinstall OS without any operations with your personal data, but i prefer to copy in one time more, as so i use only one partition, and not bother with my /home is full, and in /usr is a lot of free space, or contrary situations
 
Old 02-09-2013, 12:58 PM   #7
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Centos
Posts: 4,963

Rep: Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073
Quote:
Originally Posted by Vexe View Post
Some users put everything in one partition, some separate them, why? Isn't this painful?
I don't split anything out of / unless I have a specific good reason for splitting that specific directory.

Before liveCDs existed there were lots of good reasons for splitting /boot. Now I think there is only one. If you have / on some kind of LVM or RAID setup that grub can't read then you need a /boot partition. Otherwise not.

Quote:
Is there a performance benefit out of it?
Usually there is performance cost, not benefit from splitting /home from / (as partitions of one drive).
There could be situations in which performance is better with that split, but that benefit is unlikely to happen by itself (lacking detailed advance knowledge of access patterns and special care to split exactly correctly).


Quote:
Can I that way, for example, say I wanna install a new Distro, rely on my home partition, so that all my preferences will be the same? Can I even make a partition for /usr/bin so that after I install, I already have my packages installed?
It is very rare for things like that to be practical (even the preferences. The packages rarer still). More often a separate /home is an inconvenience on a reinstall.

For systems with very large data files, I find it best to have a /data partition actually hold the directories of data and have some kind of symlink or alias mount make the data appear to be in subdirectories of /home or where ever else you want it to appear logically. That makes the next Linux upgrade or reinstall much easier.

For unattended servers, you might want partitioning to reduce the consequences of running out of disk space. But that is tricky, because at best you are increasing the probability that some less important partition will run out of space as a way of decreasing the damage.

Last edited by johnsfine; 02-09-2013 at 01:03 PM.
 
Old 02-10-2013, 11:51 AM   #8
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 2,823

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Over the years, I've used Fedora 1-10, Debian, Fedora 12-14, and CentOS. Because /home was on a separate partition, I could install each distro or version without having to restore my data. With Debian, I had to manually change the uid for /home (1000 instead of 500) but Fedora did it automatically. Software is not troubled by old configuration files. If a new version of a program uses different ones, they're created and the old ones ignored.

As mentioned above, /boot is only needed if you're using something like LVM that the BIOS can't cope with; not much use on a home PC anyway.

If you use encryption (which you should do on a laptop with personal data on it) you obviously need /home on a different partition in those distros that will only encrypt a partition rather than a folder; obviously /boot can't be on an encrypted partition, or you'd never get started.
 
Old 02-10-2013, 01:09 PM   #9
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,860

Rep: Reputation: 768Reputation: 768Reputation: 768Reputation: 768Reputation: 768Reputation: 768Reputation: 768
Quote:
Originally Posted by DavidMcCann View Post
Software is not troubled by old configuration files.
Mostly.

That's true of most 'ordinary' programs that come to mind (all?), but it isn't, for example, true of kde. If you install a new kde over the top of an older one, it tends to leave the old config file in place, and it usually causes more or less subtle things to go wrong and it isn't normally apparent immediately.

In any case, the 'ignores' part is usually a matter of what the software or installer chooses to do; in some cases, with minor version changes, the same config file name is used, for major changes (eg,version 2.x to 3.x) the config file name often changes, so it becomes a non-issue (well, apart from the cruft issue, potentially). If the file name has changed, the software is not going to accidentally pick up the old config file, anyway.

Quote:
Originally Posted by DavidMcCann View Post

If you use encryption...
In addition to encryption, you could decide to put something that had lots of small files on a different partition from things that have different characteristics, and, equally, you could decide to give different partitions different journalling options for speed/security. I'm not sure that there is much application for tweaking the journalling characteristics outside of a server, though.

And, finally, if you are tight for disk space, the last thing that you want to do is complicate the partition scheme any more than need be, because every time that you add an extra partition, you've added an extra partition that can run out of space, if you get the partition sizes wrong.
 
Old 02-10-2013, 03:04 PM   #10
John VV
Guru
 
Registered: Aug 2005
Posts: 12,074

Rep: Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574Reputation: 1574
All of the above

Years back when i was first starting out i did not heed some good advice
and did not put my home directory on a separate partition ( it is NOT required)
then i proceeded to ROYALLY FUBAR my fedora 4 and then 5 installs

this took a lot of work to redo everything , and i do mean EVERYTHING .

then i paid attention
and put my home folder on a separate partition .Then added a second hard drive for programs i built from source .

a "normal everyday install on a home system might have partitions that look like this
sda1 /boot
sda2 /
sda3 SWAP
sad4 -- "extended" ---
sda5 /home
---- if the drive is big enough ( say 1 or 2 terabits )
--- then a large DATA partition
sda6 /DATA




that way i could STILL mess up fedora 6,7,and 8 ( witch I DID DO )

this allowed me to VERY easily reinstall the operating system and not have to redo a lot of work

now years latter , i still do it ,but as a safety precaution .Just in case

-- mistakes and oopses WILL happen from time to time

do some reading and then you can decide for your self just what is BEST for YOU

Last edited by John VV; 02-15-2013 at 02:50 PM.
 
Old 02-15-2013, 12:42 PM   #11
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,220

Rep: Reputation: 116Reputation: 116
Well, most things have been said, I just want to make it clear.
Yes you shall partition! :-)
On personal computer:
ALways keep your personal data on a separate partition - if for nothing else just because one day you will want to install some other system. Not having separated the operating system from personal data will make that far more complicated.
If you use a separate /home or a dedicated /data partition - well, that's just for you to decide! (Actually it's a huge subject, I've written lots of pro's and con's about this over the years.)
On a server:
Depends on the server, what it's used for.
For instance, on a webbserver - keep webroot (default /var/www) on one partition, if it gets filled system still won't grind to halt.
Another example from real life:
OS in one partition, self-compiled apache, php & mysql on another, our data on third.
We can completely ditch the system & reinstall, our webapps are not affected! (Always the same distro though, might very well work even if we changed distro but that has to be
tested.)
 
1 members found this post helpful.
Old 02-17-2013, 11:49 AM   #12
Vexe
Member
 
Registered: Feb 2013
Posts: 36

Original Poster
Rep: Reputation: Disabled
@EVERYONE: THANK YOU! I'm really liking my stay here ^^ & sorry for the delay, I've had a LONG journey, but finally made it! Installed and customized Arch with Awesome wm!
haha, happy me ^^

I seem to have asked a very broad and open question
I'm not very technical, but of course I agree with everyone saying that I shouldn't have everything on one slice, otherwise I'd have a lot of headaches.

I actually have 4 partitions, 1 for Win, 2 for Linux, 3 for data, 4 extra. The way I deal with it, is that the data partition is shared between Linux & Win, it's how they communicate with each other.

So I'm not worried that much about my 'personal' data, cuz, Ihttp://www.webupd8.org/2010/10/pywo-python-window-organizer-easily.html don't keep the important stuff on any system-partition (win|lin) That's why I installed Arch on one partition.

But I just, don't like to reinstall lots of stuff after installing a new linux distro. In windows, I have a big folder storing all the programs I need after a format. But when it comes to formatting/reinstalling in Linux, it's a whole different story.

From the answers above, it seems it's doable to depend on what's previously installed before a reinstall/format, but it has to be the same distro and stuff like that.
 
Old 02-17-2013, 12:10 PM   #13
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,168
Blog Entries: 23

Rep: Reputation: 275Reputation: 275Reputation: 275
Umm, this...

Quote:
and customized Arch with Awesome wm
and that

Quote:
I'm not very technical
do not match...unless you're a "natural" ...Arch is not easy to install...but, yes, it uses four partitions...
Good for you, Arch is a good distro, not the easiest one, but a great one if you want to be in control...
Edit - beware of the community around Arch, they can be a little rough on the edges...just a warning from a seasoned Arch affectionado...

Last edited by Thor_2.0; 02-17-2013 at 12:15 PM.
 
Old 02-19-2013, 12:49 AM   #14
the dsc
Member
 
Registered: May 2009
Distribution: Debian testing
Posts: 115
Blog Entries: 44

Rep: Reputation: 27
I never understood the reasons behind other partitions than root and home before this thread, and I had never thought about the possibility of having even the installed packages in a separate partition before. I think it's unusual but seems interesting to try (if not outright impossible... perhaps it would also require "etc" to work properly and then the whole re-install would be somewhat null?)

I'm with everyone who voted for at least a separate /home partition. I'm like 98% sure that for lots of stuff you can even just create a username with the same name and point to the old folder and it will work normally. Most times (about three I guess) what I've done was to just create another user like "me2", or rename the old user to "me-old", and go by more carefully copying the hidden folders/settings and user data, but very recently I just said "what the hell" and tried to just create a user with the old username or something like that, and it worked perfectly as far as I can remember. It may be partly due to the fact that my DE is openbox I guess, perhaps KDE and Gnome have fancier stuff that would be all weirded out by such attempt.

Having a fresh new user and gradually restoring stuff has its advantages, though. If you had that user for years and made tons of configuration changes you may happily find out that with a fresh new user some "factory configurations" will work better than the config mess you put yourself in over the years.
 
Old 02-19-2013, 09:21 PM   #15
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 1,949

Rep: Reputation: 279Reputation: 279Reputation: 279
For a home desktop system, there are not a whole lot of reasons to break things up. It is a good idea to have a seperate /home and a seperate data partition (where you might keep photos, videos, music, etc.) if you want to move around between different distros but keep your personal stuff mountable by any of them.

For a multi-user system it is different. When I set up something at work, I (usually) break things up a LOT. Seperate filesystems for /, /home, /var, /opt, /usr, /usr/local, /boot, /tmp, swap, and usually a couple of more specialized filesystems. And then I put (most) of these on LVM so I can resize them easily. I do this to protect the system from some brain-damaged user who might otherwise hobble the whole system by creating some gigantic file in their $HOME. They can still wipe /home out of space, but it doesn't affect the system as whole. Another thing that's good about seperate filesystems, you can choose different filesystem types and tune them based on how that filesystem is used (for example, /tmp probably does not need journaling, for example, for video storage you probably want a filesystem type that is optimal for handling a relativey small number of very large files). And you can mount some filesystems as read-only if needed.

Bottom line: If the intended use of your system needs things broken up, you will already know that it does, and why it does. Otherwise you would not have been put in charge of a system like that without the required skill set. If you don't know why you would want to break things up, your probably don't need to.
 
1 members found this post helpful.
  


Reply

Tags
partitioning, partitions


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
benefit of mounting luks encrypted partition at boot Wojk Linux - General 2 11-02-2012 07:57 PM
Using a separate /home partition. Sgt Canuck Linux - General 6 03-10-2009 01:22 PM
Home directory on separate partition Steve W Linux - Newbie 23 03-19-2008 01:51 PM
Home directory on separate partition Steve W Linux - Newbie 5 03-12-2008 12:37 PM
Does anyone here have a separate /root and /home partition? Kramer Linux - General 12 03-17-2004 05:52 AM


All times are GMT -5. The time now is 08:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration