LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-02-2004, 07:51 PM   #1
Mike23
Member
 
Registered: Apr 2004
Distribution: Mandrake 10.0
Posts: 37

Rep: Reputation: 15
Linux partitions


hi, i'm realatively new to linux... migrating from windows.

sorry if this a silly question, but why are their so many partitions in linux? in windows i always had 2 partitions: one for the OS and the other one for all my data... just in case the os dies on me.

in linux, it seems to make 3 partitions by default, which i can still understand: "swap" for virtual memory, "/home" for data and "/" for everything else. but if i do an expert install, it there are options for making partitions for "/var", "/root" and just about every other folder there is....

why break up the system to this extent? doesn't it have an impact on performance? how big should the partitions be? "/home" is part of "/", isn't it? so what effect does it have to have a partition "inside" another partition?

thanks for any answers....
 
Old 05-02-2004, 07:59 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Hi Mike23!!!

Well, you not really have to do all those partitions. It's always good to have /home if you are going to try other distros and want to save your configuration files though. The performance won't be reduced by doing that though. I use only two partitions actually, swap and /. If you've got a good amount of RAM and you are not running servers and such, you could even skip swap.

Just do the other partitions (/src, /usr, whatever) if you sometime need to install another distro or get yourself into trouble and don't want to lose everything... It's more a matter of taste and organization then a real case when going down to partitions...
 
Old 05-02-2004, 07:59 PM   #3
kris_ericson82
LQ Newbie
 
Registered: Apr 2004
Location: Cincinnati, OH
Distribution: Mandrake 9.1
Posts: 10

Rep: Reputation: 0
For linux, you need only two partitions - root (/) and swap. The root one is where all your files will be stores, and the swap is used as virtual memory. If you want to have windows installed on the same computer, you will also need a windows partition.
 
Old 05-02-2004, 08:00 PM   #4
blinux1
Member
 
Registered: Nov 2002
Location: Pennsylvania
Distribution: Mandrake 9.1 and Redhat 9
Posts: 144

Rep: Reputation: 15
Well, actually linux filesystems aren't that confusing nor convoluted. Mainly there are two partitions for linux install--the swap and the root partition. Swap is used for programs that are bigger than main memory, so the sytem "swaps pages from ram" to the harddisk. Then you have the main filesystem tree with the root ( / ). Various devices like your cdrom and floppy, which have different filesytems then either windows or linux, can have their filesystem tree "mounted" on parts of the linux tree. Example-- "/dev/cdrom" filesystem is mounted on "/mnt/cdrom". There shouldn't be a separate partition for /home though.
 
Old 05-02-2004, 08:01 PM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
You don't need to make extra partitions - generally in Linux you only need to set up a relatively small swap (256Mg or 512Mg max) and leave the rest to the root (/) parition. All other directories (/home, /var, /usr, etc) will be created under /

That being said though, it's an excellent idea to set up your /home directory on its own partition. Should you want/need to reinstall your OS, you do not need to worry about killing all your own personal data.

Partitioning is an extremely subjective topic - you may want to use the Search function here at LQ to find similar threads. -- J.W.
 
Old 05-02-2004, 08:05 PM   #6
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
hi, i'm realatively new to linux... migrating from windows.

Be welcome!

sorry if this a silly question, but why are their so many partitions in linux?

Because this prevents a lot of problems. Most usual, prevents data lost and corruption.

in windows i always had 2 partitions: one for the OS and the other one for all my data... just in case the os dies on me.

Well, this is already a bit of hacking win. To my knowledge, a default win install uses 1 partition, both for OS and data.

in linux, it seems to make 3 partitions by default, which i can still understand: "swap" for virtual memory, "/home" for data and "/" for everything else. but if i do an expert install, it there are options for making partitions for "/var", "/root" and just about every other folder there is....

But if you choose expert, the system will give you tools for partitioning for a specific purpose, or for a large system, or something different. Its pointless to use expert partitioning if you do not plan to do anything different than the default partitioning.
Also, you might want to allocate certain areas of your disk to certain partitions, to improve performance.

why break up the system to this extent? doesn't it have an impact on performance?

A partition doesn't "break" a system. Partitions are tools designed to let you allocate disk space efficiently. I know win doesn't use partitions very much, but Lin does.

how big should the partitions be?

That depends heavily on the use of the system.

"/home" is part of "/", isn't it?

No, they are different partitions. But you see them that way.

so what effect does it have to have a partition "inside" another partition?

The only case where you have partitions inside partitions are extended partitons who host logical partitions. Is this what you're talking about?

Hey, by doing a /, swap and a /home partitioning scheme, you are doing fine. If you plan to do something different than that, look for specific documentation to accomplish specific setups.
Hope it helps!
 
Old 05-02-2004, 08:17 PM   #7
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
Unless you specifically allocate a separate partition for /home, it will be under /
By default it is not a separate partition. As indicated before however, there are benefits to setting up /home as an independent partition -- J.W.
 
Old 05-02-2004, 10:48 PM   #8
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
What we, the average desktop user, should do is, at most is /, swap, and /home. Any more can be a means to waste disk space. We install and delete a lot of stuff, so we can't really plan our disk space.

These divisions actually have purpose. Disk performance can be improved by slicing it up. Each partition can have its own filesystem, depending on the files its intended to contain. Dividing the structure up can help in recovery of important data in the case of disk failure. Don't worry about it. For the average user we have cd burners to back up our files and the install disks to get our OS back if that happens.

I like to play with distros and OSs, so I go for /,swap,/home for my working distro and I share the swap between them all, and go with / for the extra toy distros.
 
Old 05-02-2004, 11:58 PM   #9
Mike23
Member
 
Registered: Apr 2004
Distribution: Mandrake 10.0
Posts: 37

Original Poster
Rep: Reputation: 15
thanks for the explanations! only one more thing that i don't quite get:

if i make a "/" partition and a "/home" partition, what happens if the "/home" partition fills up? will it be able to store more data on the "/" partition? how about vice versa?
 
Old 05-03-2004, 01:27 AM   #10
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
If the /home partition fills up, that's it, no one will be able to write files to it until somebody frees up some space. In face, this is one reason why servers have multiple partitions. For instance if a process goes out of control and fills up /var with log files, it won't affect any other partitions. Filling the / filesystem totally full can often have unpleasant consequences (although perhaps modern Linuxes handle it better -- the last system I saw that running on wad Red Hat 5.2).
 
Old 05-03-2004, 07:53 AM   #11
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Quote:
Originally posted by btmiller
If the /home partition fills up, that's it, no one will be able to write files to it until somebody frees up some space. In face, this is one reason why servers have multiple partitions. For instance if a process goes out of control and fills up /var with log files, it won't affect any other partitions. Filling the / filesystem totally full can often have unpleasant consequences (although perhaps modern Linuxes handle it better -- the last system I saw that running on wad Red Hat 5.2).
I was reading about that problem (in the FAQs for OpenBSD) shortly after I had posted. Thanks for bringing it up. That is one style of DDoS attack - fill the log file until; it fills the partition - which is why someone with a webserver might seperate /var
 
Old 05-04-2004, 01:06 AM   #12
Mike23
Member
 
Registered: Apr 2004
Distribution: Mandrake 10.0
Posts: 37

Original Poster
Rep: Reputation: 15
can i mount two or more partitions to the same folder to increase the size if i run out of space?
 
Old 05-04-2004, 05:42 AM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,430

Rep: Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938
No. you can mount another partiton to a subfolder or create a symlink that points to another partition.

Or.
http://tldp.org/HOWTO/LVM-HOWTO/
 
Old 05-04-2004, 07:20 AM   #14
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
Logical Volumes Manager is the way to go!
 
  


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
Linux installed, linux partitions lost, computer scragged, need serious help. B4UTRUST Linux - Newbie 4 01-23-2004 11:21 AM
Win XP Install Overwrites MBR and Linux Rescue Fails to Recognize Linux Partitions carrlane Linux - Software 8 01-14-2004 08:49 AM
partitions with linux beginnerx Linux - Newbie 5 09-26-2003 04:45 PM
Linux Partitions Megos Linux - Newbie 1 06-27-2003 03:37 AM
Linux partitions- scocha Linux - Newbie 19 06-18-2003 03:21 PM

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

All times are GMT -5. The time now is 04:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration