LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-09-2006, 11:55 AM   #1
jacksonb
LQ Newbie
 
Registered: May 2004
Posts: 5

Rep: Reputation: 0
question about partitioning hard drive.


Question about partitioning hard drive.

Certain distributions allow you to set up auto defaults which partition the hard drive with "/var" "/swap" "/home"..etc and other distributions only do two other partitions "/swap" "/". I know that I can manually create the partition in the latter example but is there a reason for this.

Does it matter how you have the HD setup hardware wise?
 
Old 01-09-2006, 12:00 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
I guess it boils down to your preference. I just use the " / " and /swap . I'm usually adding and removing distros for testing and fewer partitions is what I'm after.

Either way works.
 
Old 01-09-2006, 12:05 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
example uses for multiople partitions

- you don't want to run out of disk space in a particular area

- you want to use a common data area, e.g. /var/data or /home across multiple versions of linux

- you want to keep your /home data safe when reinstalling your system and reformatting all other partitions

- you don't want one area using up all the space that other parts require. e.g. you risk a temporary file from a database crashing your system completely. instead it cdan just fill up it's own partition and fail by itself without impacting the core system.
 
Old 01-09-2006, 12:08 PM   #4
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
I guess some distros offer only / and swap because it's so easy to set-up and most flexible (if you don't know how much space you will need).

I was very happy with my decision to have a separate /home partition. Now I can update the system without losing my data.

But, yes, I guess it boils down to your preference.
 
Old 01-09-2006, 12:29 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by jacksonb
...but is there a reason for this.
Sure, there's a reason to do it ... or NOT do it. ;-)

It depends on how you plan to use your system. For a general home system that has no special use planned for it you can easily get by with only / and /swap if that's what you want. It is a simpler setup. Some special uses may make you think differently however. For example, say you're building a MythTV box. This will create huge video recordings that take up lots of disk space. You wouldn't want to be in the middle of recording something and run yourself out of space if all's you had was /. Your recording would have run your entire system out of space - including the Linux OS itself. You would not have a happy computer! On the other hand, if your recordings were going to a seperate mounted filesystem, you'd run the recording itself out of space but not the operating system. Your recording would crash but not your computer.

There are other reasons to have seperate mountpoints as well. Backups are easier to configure. Upgrades are easier. In the case of an upgrade, think what would happen if you decided to move from Fedora, to say Debian. With everything under /, including those 80Gb of MP3 files in your home directory, a move to a different distro would be quite a workout. But if you had planned ahead and mounted /home (and all those MP3's) seperately, it becomes relatively trivial to change distros without having to backup/copy/restore those MP3's.

Personally, I have everything on different mounted partitions. Not exactly true. I have many different physical partitions and disks, but I also use LVM (Logical Volume Management) on top of that for even more flexibility. So my setup is much more complex than just / and /swap. This is my personal choice. I favor flexibility over simplicity for my situation. Multi-boot, multi-purpose, and multi-user (to a small extent). It's also great for learning and experimenting. If you just want something that runs, and you don't have to worry about it, go for just / and /swap (similar to a Windows box with a 300Gb drive and only one big 'ol C: drive!)
 
Old 01-09-2006, 02:14 PM   #6
jacksonb
LQ Newbie
 
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
hmm..

here is a somewhat n00b question but lets say I create the following partions


/swap
/home
/var
/videofiles
/

How does the OS know to install all the var files in the /var partition that i've created?
 
Old 01-09-2006, 02:21 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it doesn't know, as in it has no idea that it exists at all. once a partition is mounted it is simply another part of the filesystem. /var/lib/pants/blah just so happens to exist on a different location, that's all, it's totally abstracted from a file writing to a certin directory.

Above someone mentioned that a single / was the most fliexible... well... cue LVM. a fnatastic idea that gives you total flexibility of both views, as you cvan move the partition sizes around all you want in an instant.
 
Old 01-09-2006, 02:53 PM   #8
jacksonb
LQ Newbie
 
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
../

Quote:
Originally Posted by acid_kewpie
it doesn't know, as in it has no idea that it exists at all. once a partition is mounted it is simply another part of the filesystem. /var/lib/pants/blah just so happens to exist on a different location, that's all, it's totally abstracted from a file writing to a certin directory.

Above someone mentioned that a single / was the most fliexible... well... cue LVM. a fnatastic idea that gives you total flexibility of both views, as you cvan move the partition sizes around all you want in an instant.
so how do I get the OS to know to put var files in the /var partition during the install.
 
Old 01-09-2006, 03:02 PM   #9
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
I think acid_kewpie's answer might be a little confusing, or maybe not. But in case it is, I'll try to clarify what he is saying.
When you create several partitions and mount them, you are telling the OS that, for example, /var is going to be located on that certain partition you created. When you look at your filesystem or directory tree you will not see any sign of multiple partitions but they're there. If you did a 'umount /var' you would still have a /var directory but the files, which are located on that partition you just umounted, will no longer be available.
What all that means is that when the system has mounted, for example, /dev/hda5 at the /var location, everything that is written to /var by your OS will automatically go to /dev/hda5, or whatever your partition happens to be.
I hope that helps.
And just to add my own preference to this discussion, the most flexible partitioning scheme starts with a swap partition, a root (/) partition and a home (/home) partition. That way you can reinstall your OS on the / partition, or add an OS to some other partition or whatever, and still have your home files ready for you. I think having only the root (/) partition is the least desirable scenario.

Last edited by Vincent_Vega; 01-09-2006 at 08:47 PM.
 
  


Reply



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
Partitioning Hard Drive - Help simplyskate Slackware - Installation 13 07-04-2005 07:23 AM
Partitioning a hard drive phoenix_wolf Linux - Newbie 5 12-04-2004 01:50 AM
Second Hard drive partitioning boyzie Linux - Hardware 10 04-26-2004 02:57 PM
Hard drive partitioning question russonlinux Slackware 4 10-28-2003 07:39 PM
partitioning hard drive dilberim82 Linux - General 4 05-02-2001 01:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:35 AM.

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
Open Source Consulting | Domain Registration